discopat.manual_annotations.yolo
Classes
|
- 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: