nicetoolbox.evaluation.metrics.keypoint¶
Keypoint metrics for evaluating 3D joints data. Includes bone length calculation and jump detection metrics. No ground truth required.
Classes
Calculates the bone lengths for each frame using 3D only keypoints. |
|
Detects jumps in keypoint sequences based on sudden large movements. |
|
Handler for all keypoint metrics. |
- class nicetoolbox.evaluation.metrics.keypoint.BoneLength(keypoints_mapping: Dict[str, Any])[source]¶
Calculates the bone lengths for each frame using 3D only keypoints.
Initializes the metric. Subclasses can use kwargs for specific setup.
- compute() Dict[Tuple[str, str, str], List[BatchResult] | AggregatedResult][source]¶
Compute the final metric from the stored state.
- update(preds: torch.Tensor, gts: None, meta_chunk: ChunkWorkItem, meta_frames: List[FrameInfo]) None[source]¶
Computes the bone lengths and stores them.
- class nicetoolbox.evaluation.metrics.keypoint.JumpDetection(keypoints_mapping: Dict[str, Any])[source]¶
Detects jumps in keypoint sequences based on sudden large movements.
Initializes the metric. Subclasses can use kwargs for specific setup.
- compute() Dict[Tuple[str, str, str], List[BatchResult] | AggregatedResult][source]¶
Compute the final metric, returning both frame-based results and a summary.
- get_axis3(meta_chunk: ChunkWorkItem) List[str][source]¶
Get the names of the joints used for jump detection.
- update(preds: torch.Tensor, gts: None, meta_chunk: ChunkWorkItem, meta_frames: List[FrameInfo]) None[source]¶
Detects jumps and stores the results.
- class nicetoolbox.evaluation.metrics.keypoint.KeypointMetric(cfg: EvaluationMetricType, device: str)[source]¶
Handler for all keypoint metrics.
Initialize the metric handler with its config and device, creating its metrics.
- Parameters:
cfg (MetricTypeConfig) – Configuration for this metric type.
device (str) – Device to run the metrics on (e.g., ‘cpu’ or ‘cuda’).
- property name: str¶
The name of the metric handler (e.g., ‘point_cloud_metrics’).