Get the mode name for the given spatial dimension using class variable ``name``. Args: spatial_dims: number of spatial dimensions of the bounding boxes. Returns: ``str``: mode string name
(cls, spatial_dims: int)
| 83 | |
| 84 | @classmethod |
| 85 | def get_name(cls, spatial_dims: int) -> str: |
| 86 | """ |
| 87 | Get the mode name for the given spatial dimension using class variable ``name``. |
| 88 | |
| 89 | Args: |
| 90 | spatial_dims: number of spatial dimensions of the bounding boxes. |
| 91 | |
| 92 | Returns: |
| 93 | ``str``: mode string name |
| 94 | """ |
| 95 | return cls.name[spatial_dims].value |
| 96 | |
| 97 | @abstractmethod |
| 98 | def boxes_to_corners(self, boxes: torch.Tensor) -> tuple: |