Motion¶
Run specification for human motion.
- pydantic model moveai_mocap.models.motion.runs.mocap.MocapRun¶
Run specification for human motion.
- Fields:
- field actor_mapping: list[ActorMapping] | None = None¶
Define what actors exist within this capture, along with their skeletons. Bounding boxes define where the actors physical position is at the first frame of the associated video capture input. If provided, will provide more accurate outputs.
- field number_of_actors: Annotated[int, Gt(gt=0)] [Required]¶
How many actors are in this capture.
- Constraints:
gt = 0
- Validated by:
- field rig: Resource | None = None¶
The configuration for the rig to be used for this capture. This is optional and will be excluded from the run configuration if not provided. If not provided, the default rig will be used.
- field volume_service: Service | None = None¶
The source of the capture volume (i.e. S3, GCP etc). Not required if there is only a single video input
- field volume_uri_prefix: str | None = None¶
The path to where the volume files are stored - without any filename. Not required if there is only a single video input
- Validated by:
- static calculate_iou(bounding_box1: Tuple[float, float, float, float], bounding_box2: Tuple[float, float, float, float]) float¶
Calculate the Intersection over Union (IoU) of two bounding boxes.
x1, y1 is the top left corner x2, y2 is the bottom right corner
- Args:
bounding_box1: Bounding box 1 list of 4 elements of the form [x1, y1, x2, y2] bounding_box2: Bounding box 2 list of 4 elements of the form [x1, y1, x2, y2]
- Returns:
IoU as a float, the ratio of intersection area over union area of the two boxes.
- classmethod check_tolerance(device_id: str, pairs: list[Tuple[Tuple[float, float, float, float], Tuple[float, float, float, float]]]) None¶
Check the tolerance on the list of pairs of bounding boxes.
- Args:
device_id: The device ID to check the bounding boxes for. pairs: The list of pairs of bounding boxes to check.
- Raises:
ValueError: If the bounding boxes for a pair are outside tolerance.
- validator validate_actor_device_id_on_capture » all fields¶
Validate that the device ids on all actors exist on the Capture.
- Raises:
ValueError: At least one device_id on the ActorMapping doesn’t exist on the Capture
- Returns:
The validated object
- validator validate_actor_mapping » all fields¶
Validate that the number of actors does not exist one if there is a single video input.
- Raises:
ValueError: The number of actors is incorrect
- Returns:
The validated data
- validator validate_number_of_actors » all fields¶
Validate that the a singlecam capture does not have actor mapping.
- Raises:
ValueError: The number of actors is incorrect
- Returns:
The validated data
- validator validate_outputs » outputs¶
Validate that the output URIs are unique.
- Args:
outputs: The list of outputs to validate
- Raises:
ValueError: There are duplicate resource output uris.
- Returns:
The validated data
- validator validate_unique_actor » actor_mapping¶
Validate that the actor is unique on the actor mapping.
Uses the actor name to ensure uniqueness
- Args:
actor_mapping_value: The actor mapping to validate
- Raises:
ValueError: If the actor name is not unique
- Returns:
The validated model data
- validator validate_volume_uri_prefix » all fields¶
Validate that the input volume is provided if there are multiple video inputs.
- Raises:
ValueError: If there are multiple video inputs and no input volume is provided.
- Returns:
The validated data
- validator validator_bounding_box_overlap » actor_mapping¶
Validate that the bounding box overlap is within tolerances.
The bounding box overlap must be within tolerance for each actor on a capture input.
- Args:
actor_mapping_value: The actor mapping to validate
- Returns:
The validated model data
Processing options for motion capture data.
- pydantic model moveai_mocap.models.motion.options.Options¶
Processing options for motion capture data.
- Fields:
- field floor_plane: bool | None = False¶
Should the floor plane be estimated?
- field mocap_model: MocapModel | None = None¶
The mocap model to use.
- field track_ball: bool | None = False¶
Is there a ball that needs tracking?
- field track_fingers: bool | None = False¶
Should the fingers be tracked?
- field track_jersey_numbers: bool | None = False¶
Should actors be tracked via a jersey number?