otx.cli.tools.utils.demo.visualization#

Visualisation module.

Functions

draw_bounding_boxes(frame, predictions, ...)

Converts predictions to bounding boxes and draws them on a frame.

draw_masks(frame, predictions[, ...])

Converts predictions to masks and draw them on frame.

draw_predictions(task_type, predictions, ...)

Converts predictions to visual representations depending on task type and draws them on a frame.

put_labels(frame, predictions)

Converts predictions to text labels and puts them to the top left corner of a frame.

put_text_on_rect_bg(frame, message, position)

Puts a text message on a black rectangular aread in specified position of a frame.

otx.cli.tools.utils.demo.visualization.draw_bounding_boxes(frame: Mat, predictions: List[Annotation], put_object_count: bool)[source]#

Converts predictions to bounding boxes and draws them on a frame.

otx.cli.tools.utils.demo.visualization.draw_masks(frame: Mat, predictions, put_object_count: bool = False)[source]#

Converts predictions to masks and draw them on frame.

otx.cli.tools.utils.demo.visualization.draw_predictions(task_type: TaskType, predictions: List[Annotation], frame: Mat, fit_to_size: Tuple[int, int])[source]#

Converts predictions to visual representations depending on task type and draws them on a frame.

otx.cli.tools.utils.demo.visualization.put_labels(frame: Mat, predictions: List[Annotation])[source]#

Converts predictions to text labels and puts them to the top left corner of a frame.

otx.cli.tools.utils.demo.visualization.put_text_on_rect_bg(frame: Mat, message: str, position: Tuple[int, int], color=(255, 255, 0))[source]#

Puts a text message on a black rectangular aread in specified position of a frame.