Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 2.17 KB

README.md

File metadata and controls

23 lines (16 loc) · 2.17 KB

Annotation-Visualizer

This is a simple script which has different functions that lets users draw different types of visualizations. Useful for instances when visualizing objects after object detection.

Photo by Joshua Earle on Unsplash

image function
bbox with label on top draw_rectangle(...)
add_label_to_rectangle(..., top=True)
bbox with label inside draw_rectangle(...)
add_label_to_rectangle(..., top=False)
bbox with T label draw_rectangle(...)
add_T_label_to_rectangle(...)
label with flag draw_flag_with_label(...)
label with opaque overlay draw_rectangle(..., is_opaque=True)
add_label_to_rectangle(..., draw_bg=False, top=False)

There are optional functions that can draw multiple bounding boxes and/or write multiple labels on the same image, but it is advisable to use the above functions in a loop in order to have full control over your visualizations. Nonetheless, the optional functions are as follows:

  • draw_rectangles(..., bboxes, ...)
  • add_labels_to_rectangles(..., labels, bboxes, ...)
  • add_T_labels_to_rectangles(..., labels, bboxes, ...)
  • draw_flags_with_labels(..., labels, bboxes, ...)

bboxes and labels are lists in the above examples.