discopat.manual_annotations package
Subpackages
Submodules
discopat.manual_annotations.operations module
- discopat.manual_annotations.operations.get_bounding_box(point_list)[source]
- Parameters:
point_list (list[tuple[float, float]])
- Return type:
tuple[float, float, float, float]
discopat.manual_annotations.yolo module
- class discopat.manual_annotations.yolo.YoloAnnotationImporter(simulation, label_map, data_dir=PosixPath('/home/docs/data/pattern_discovery'))[source]
Bases:
object- Parameters:
simulation (str)
label_map (dict[int, str])
data_dir (Path)
- txt_to_box(txt_box)[source]
Convert txt box annotation to discopat’s Box format.
- Parameters:
txt_box (str) – line of text encoding a box in the following format: “class_id x_center y_center width height”, where the last 4 values are expressed relatively to the image size.
- Returns:
discopat.core.Box
- Return type: