(self)
| 70 | raise TypeError(f"MaskData key {k} has an unsupported type {type(v)}.") |
| 71 | |
| 72 | def to_numpy(self) -> None: |
| 73 | for k, v in self._stats.items(): |
| 74 | if isinstance(v, torch.Tensor): |
| 75 | self._stats[k] = v.detach().cpu().numpy() |
| 76 | |
| 77 | |
| 78 | def is_box_near_crop_edge( |