class documentation
class ClassificationAnnotation(Annotation):
Dummy wrapper annotation for classification tasks.
There is no explicit annotation field for classification tasks, instead the class name of a detection is interpreted as the class label and interpreted as belonging to the entire image.
Multiple classification annotations are multi-hot encoded into a single vector with length equal to the total number of classes.
| Static Method | combine |
Combine classification annotations into a multi-hot label vector. |
@staticmethod
@override
def combine_to_numpy(annotations: @override
list[ ClassificationAnnotation], classes: list[ int], n_classes: int) -> np.ndarray:
¶
Combine classification annotations into a multi-hot label vector.
| Parameters | |
annotations:list[ | Classification annotations to combine. |
classes:list[ | Class IDs associated with the annotations. |
nint | Total number of known classes. |
| Returns | |
np.ndarray | Multi-hot class label vector of shape (N, ) where N is the total number of classes. |