diplomat.utils.track_formats.to_diplomat_table

diplomat.utils.track_formats.to_diplomat_table(num_outputs: int, body_parts: List[str], poses: Pose) pandas.DataFrame[source]

Convert a diplomat Pose object to a diplomat pandas table, which can be saved to a CSV.

Parameters:
  • num_outputs – The number of outputs in the pose object (number of bodies)

  • body_parts – The list of body part names describing the parts in the pose object, in order.

  • poses – The Pose object, storing x, y, and likelihood data for each body part.

Returns:

A pd.DataFrame, being a table storing the original pose data. Indexing is by body (Body1, Body2, then body part, then value (x, y, or likelihood).