s6.nn.keypointsΒΆ

class s6.nn.keypoints.KeypointDetectorResult(keypoints: List[Vector2D] | List[List[Vector2D]], heatmaps: ndarray, mask: ndarray | List[ndarray] | None = None)

Bases: object

Postprocessed keypoint detector outputs.

keypoints: List[Vector2D] | List[List[Vector2D]]
heatmaps: ndarray
mask: ndarray | List[ndarray] | None = None
class s6.nn.keypoints.KeypointDetector(model_path)

Bases: object

Run keypoint inference from an ONNX or TensorRT model.

property supports_triplet_prediction: bool

Whether the loaded model exposes at least tip/turn/end keypoints.

preprocess_image(image: ndarray)
preprocess_images(images: Sequence[ndarray]) Tuple[ndarray, List[Tuple[int, int]]]
run_inference(input_tensor, include_mask: bool = True)
postprocess_keypoints(keypoints, original_size)
postprocess_mask(mask_logits: ndarray, original_sizes: Sequence[Tuple[int, int]]) List[ndarray]