original_to_model

lightning_pose.data.utils.original_to_model(keypoints: Tensor, {'__torchtyping__': True, 'details': ('batch', 'num_keypoints', 2), 'cls_name': 'TensorType'}], bbox: Tensor, {'__torchtyping__': True, 'details': ('batch', 4), 'cls_name': 'TensorType'}], model_width: float, model_height: float) Tensor, {'__torchtyping__': True, 'details': ('batch', 'num_keypoints', 2,), 'cls_name': 'TensorType'}][source]

Convert keypoints from original image coordinates to model input coordinates.

This combines the transformations: 1. original → bbox: subtract offset, divide by bbox dimensions 2. bbox → model: multiply by model dimensions

bbox format: [x, y, h, w] where x,y is top-left corner