Learn R Programming

animl (version 3.2.0)

plot_all_bounding_boxes: Plot all bounding boxes in a manifest

Description

Plot all bounding boxes in a manifest

Usage

plot_all_bounding_boxes(
  manifest,
  out_dir,
  file_col = "filepath",
  min_conf = 0.1,
  label_col = FALSE,
  show_confidence = FALSE,
  colors = NULL,
  detector_labels = NULL
)

Value

None

Arguments

manifest

manifest of detections

out_dir

Name of the output directory

file_col

Column name containing file paths

min_conf

Confidence threshold to plot the box

label_col

Column name containing class to print above the box. If None, no label is printed.

show_confidence

If true, show confidence score above the box.

colors

Named list mapping class labels to BGR colors for the bounding boxes.

detector_labels

Named list mapping detector categories to human-readable labels.

Examples

Run this code
if (FALSE) plot_all_bounding_boxes(manifest, 'Plots/', label_col='prediction',
                                 show_confidence=TRUE, 
                                 colors=list("1" = c(0, 255, 0),
                                             "2" = c(0, 0, 255),
                                             "3" = c(255, 0, 0)))

Run the code above in your browser using DataLab