Customize how predictions are visualized on the output image—control labels, colors, line thickness, blur, and other overlay settings without affecting model results.
Estimated read time: 4 minutes
The rendered image you see comes from the result's image_overlay—your original frame with detections, keypoints, and (if applicable) segments drawn on top. Overlay settings affect only visualization; they do not change predictions, scores, or NMS behavior. The appearance is controlled by the properties below.
What you can change
The examples below show seven overlay presets applied to the same frame.
Baseline overlay: labels on, probabilities hidden.
Label text removed for a low-clutter view.
Custom cyan color palette with semi-transparent fills.
Selective blur hides person detections.
Probability scores displayed alongside labels.
Font scale doubled for large-format screens.
Bounding boxes drawn with thicker lines.
overlay_show_labels(bool): Show or hide class names.
Use False for low-clutter dashboards.
overlay_show_probabilities(bool): Show or hide scores next to labels.
Hide in demos to reduce visual noise.
overlay_line_width(int): Thickness of boxes and lines.
Typical range: 1–4. Increase for high-res or bright scenes.
overlay_font_scale(float): Label text size.
Typical range: 0.5–0.9. Scale with your stream resolution.
overlay_alpha(float 0–1): Box fill opacity.
Typical range: 0.2–0.5. Lower values make more background visible.
overlay_color(RGB tuple or list of RGB tuples, writable): Colors used for overlay elements.
Single tuple: One color for everything (points, boxes, labels, segments).
List of tuples: Behavior depends on model type:
Classification: Different label colors per class.
Detection: Different box/label colors per class.
Pose: Different keypoint colors per person.
Segmentation: Different segment colors per class.
If the list is shorter than the number of classes, colors are cycled.
Defaults:
Most models: Single yellow RGB tuple.
Segmentation models: Auto-generated palette (one color per class).
Use label_dictionary to inspect class names.
overlay_blur(writable): Blur policy for the overlay.
None: No blur.
"all": Blur all detected objects.
A class label or list of labels: Blur only those classes (from label_dictionary).
Minimal Inspection
Run this quick check to confirm the overlay configuration your model exposes.