mirror of
https://github.com/THU-MIG/yolov10.git
synced 2025-05-23 21:44:22 +08:00
Fix xyxyxyxyn calculation, swap axis (#8249)
This commit is contained in:
parent
2f22ff4ae6
commit
8aa73c4470
@ -710,8 +710,8 @@ class OBB(BaseTensor):
|
|||||||
def xyxyxyxyn(self):
|
def xyxyxyxyn(self):
|
||||||
"""Return the boxes in xyxyxyxy format, (N, 4, 2)."""
|
"""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 = self.xyxyxyxy.clone() if isinstance(self.xyxyxyxy, torch.Tensor) else np.copy(self.xyxyxyxy)
|
||||||
xyxyxyxyn[..., 0] /= self.orig_shape[0]
|
xyxyxyxyn[..., 0] /= self.orig_shape[1]
|
||||||
xyxyxyxyn[..., 1] /= self.orig_shape[1]
|
xyxyxyxyn[..., 1] /= self.orig_shape[0]
|
||||||
return xyxyxyxyn
|
return xyxyxyxyn
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
Loading…
x
Reference in New Issue
Block a user