discopat.core.entities.annotation
Functions
|
Classes
|
Abstract class to represent annotations and model predictions. |
|
Class to represent bounding boxes. |
|
Class to represent keypoint annotations (e.g., for pose estimation). |
|
Class to represent object tracks accross frames in a movie. |
- class discopat.core.entities.annotation.Annotation(label, score)[source]
Bases:
MetadataAbstract class to represent annotations and model predictions.
- Parameters:
label (str)
score (float)
- classmethod printable_fields()[source]
List of the relevant fields to serialise the object.
- Return type:
list[str]
- abstractmethod rescale(w_ratio, h_ratio)[source]
Rescale object.
- Parameters:
w_ratio (float) – Width ratio.
h_ratio (float) – Height ratio.
- Return type:
None
- property type: str
Handle for annotation types (box, keypoint, track, …).
- class discopat.core.entities.annotation.Box(label, x, y, width, height, score)[source]
Bases:
AnnotationClass to represent bounding boxes.
- Parameters:
label (str)
x (float)
y (float)
width (float)
height (float)
score (float)
- classmethod from_dict(data_as_dict)[source]
Make object from a dictionary.
- Parameters:
data_as_dict (dict)
- Return type:
Self
- classmethod printable_fields()[source]
List of the relevant fields to serialise the object.
- Return type:
list[str]
- rescale(w_ratio, h_ratio)[source]
Rescale object.
- Parameters:
w_ratio (float) – Width ratio.
h_ratio (float) – Height ratio.
- Return type:
None
- property xmax: float
Xmax for XYXY format.
- property xmin: float
Xmin for XYXY format.
- property ymax: float
Ymax for XYXY format.
- property ymin: float
Ymin for XYXY format.
- class discopat.core.entities.annotation.Keypoint(label, point_list, score)[source]
Bases:
AnnotationClass to represent keypoint annotations (e.g., for pose estimation).
- Parameters:
label (str)
point_list (list[tuple[float, float]])
score (float)
- classmethod from_dict(data_as_dict)[source]
Make object from a dictionary.
- Parameters:
data_as_dict (dict)
- Return type:
Self
- class discopat.core.entities.annotation.Track(track_id, box_list)[source]
Bases:
AnnotationClass to represent object tracks accross frames in a movie.
- Parameters:
track_id (int)
box_list (list[tuple[int, Box]])