RegressionRMSELossο
- class lightning_pose.losses.losses.RegressionRMSELoss[source]ο
Bases:
RegressionMSELossRoot MSE loss between ground truth and predicted coordinates.
Attributes Summary
Methods Summary
compute_loss(targets,Β predictions)Compute per-keypoint Euclidean distance between predicted and target coordinates.
Attributes Documentation
- loss_name: str = 'rmse'ο
Methods Documentation
- compute_loss(targets: Float[Tensor, 'batch_x_two_x_num_keypoints'], predictions: Float[Tensor, 'batch_x_two_x_num_keypoints']) Float[Tensor, 'batch_x_num_keypoints'][source]ο
Compute per-keypoint Euclidean distance between predicted and target coordinates.
- Parameters:
targets β ground-truth (x, y) keypoint coordinates, flattened.
predictions β predicted (x, y) keypoint coordinates, flattened.
- Returns:
per-keypoint RMSE (Euclidean pixel distance).
- __init__(data_module: BaseDataModule | UnlabeledDataModule | None = None, epsilon: float = 0.0, log_weight: float = 0.0, **kwargs: Any) None[source]ο
Initialize RegressionRMSELoss.
- Parameters:
data_module β data module providing access to datasets; passed to the parent class.
epsilon β loss values below this threshold are zeroed out.
log_weight β final weight in front of the loss term in the objective function is computed as
1.0 / (2.0 * exp(log_weight)).
- __new__(**kwargs)ο