discopat.manual_annotations.yolo

Classes

YoloAnnotationImporter(simulation, label_map)

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)

get_image_dimensions()[source]
Return type:

None

make_movie()[source]
Return type:

Movie

path_to_frame(path)[source]
Parameters:

path (Path)

Return type:

Frame

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:

Box

txt_to_frame(txt_frame, frame_name)[source]
Parameters:
  • txt_frame (str)

  • frame_name (str)

Return type:

Frame