class documentation
class ArrayAnnotation(Annotation):
Custom annotation backed by an array file.
All instances of this annotation must have the same shape.
| Static Method | combine |
Combine array annotations into instance-class-indexed arrays. |
| Method | to |
Load the array from the file path. |
| Instance Variable | path |
Path to the array saved as a .npy file. |
| Class Method | _validate |
Undocumented |
| Method | _serialize |
Undocumented |
@staticmethod
@override
def combine_to_numpy(annotations: @override
list[ ArrayAnnotation], classes: list[ int], n_classes: int) -> np.ndarray:
¶
Combine array annotations into instance-class-indexed arrays.
| Parameters | |
annotations:list[ | Array annotations to combine. |
classes:list[ | Class IDs associated with the annotations. |
nint | Total number of known classes. |
| Returns | |
np.ndarray | Combined arrays of shape (N, C, …) where C is the number of classes and N is the number of instances. |