Fix xyxyxyxyn calculation, swap axis (#8249)

main
Johannes Kaisinger 7 months ago committed by GitHub
parent 2f22ff4ae6
commit 8aa73c4470
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      ultralytics/engine/results.py

@ -710,8 +710,8 @@ class OBB(BaseTensor):
def xyxyxyxyn(self):
"""Return the boxes in xyxyxyxy format, (N, 4, 2)."""
xyxyxyxyn = self.xyxyxyxy.clone() if isinstance(self.xyxyxyxy, torch.Tensor) else np.copy(self.xyxyxyxy)
xyxyxyxyn[..., 0] /= self.orig_shape[0]
xyxyxyxyn[..., 1] /= self.orig_shape[1]
xyxyxyxyn[..., 0] /= self.orig_shape[1]
xyxyxyxyn[..., 1] /= self.orig_shape[0]
return xyxyxyxyn
@property

Loading…
Cancel
Save