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.operations.keypoint_to_box(keypoint, w_padding, h_padding)[source]
Parameters:
  • keypoint (Keypoint)

  • w_padding (float)

  • h_padding (float)

Return type:

Box

discopat.manual_annotations.operations.turn_keypoints_into_boxes(frame, w_padding, h_padding)[source]

Turn all keypoint annotations of a frame into boxes.

Parameters:
  • frame (Frame)

  • w_padding (float)

  • h_padding (float)

Return type:

None

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)

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

Module contents