diff --git a/ultralytics/utils/loss.py b/ultralytics/utils/loss.py index 3945f0391af..41f46b4d317 100644 --- a/ultralytics/utils/loss.py +++ b/ultralytics/utils/loss.py @@ -522,8 +522,7 @@ def kpts_decode(anchor_points, pred_kpts): """Decode predicted keypoints to image coordinates.""" y = pred_kpts.clone() y[..., :2] *= 2.0 - y[..., 0] += anchor_points[:, [0]] - 0.5 - y[..., 1] += anchor_points[:, [1]] - 0.5 + y[..., :2] += anchor_points[:, None, :] - 0.5 return y def calculate_keypoints_loss(