# Image overlay

*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.

{% tabs %}
{% tab title="Labels only" %}

<figure><img src="/files/p216Vgpk5LLPO4mQrXan" alt="Detection overlay showing default labels without scores or color changes."><figcaption><p>Baseline overlay: labels on, probabilities hidden.</p></figcaption></figure>
{% endtab %}

{% tab title="Labels hidden" %}

<figure><img src="/files/AQv8De6p4KrQuXHG9h8u" alt="Detection overlay with bounding boxes but no text labels."><figcaption><p>Label text removed for a low-clutter view.</p></figcaption></figure>
{% endtab %}

{% tab title="Cyan palette" %}

<figure><img src="/files/aLmBn7rLdPYHY9RyK33U" alt="Detection overlay recolored to a cyan palette with translucent fills."><figcaption><p>Custom cyan color palette with semi-transparent fills.</p></figcaption></figure>
{% endtab %}

{% tab title="Selective blur" %}

<figure><img src="/files/MsPtyRrEacrXJD5LZzCG" alt="Detection overlay with the person class blurred for privacy."><figcaption><p>Selective blur hides <code>person</code> detections.</p></figcaption></figure>
{% endtab %}

{% tab title="Scores shown" %}

<figure><img src="/files/v5DXrRwxFiiPySktHnVv" alt="Detection overlay displaying probability scores next to each label."><figcaption><p>Probability scores displayed alongside labels.</p></figcaption></figure>
{% endtab %}

{% tab title="Large labels" %}

<figure><img src="/files/h6NunMhznicITVujHL5p" alt="Detection overlay with double-sized label text."><figcaption><p>Font scale doubled for large-format screens.</p></figcaption></figure>
{% endtab %}

{% tab title="Thick boxes" %}

<figure><img src="/files/TuiZN3uJXkach0nAeNvr" alt="Detection overlay with wider bounding box outlines."><figcaption><p>Bounding boxes drawn with thicker lines.</p></figcaption></figure>
{% endtab %}
{% endtabs %}

* `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.

{% code overflow="wrap" %}

```python
from degirum_tools import ModelSpec, remote_assets

spec = ModelSpec(
    model_name="yolov8n_coco--640x640_quant_axelera_metis_1",
    zoo_url="degirum/axelera",
    inference_host_address="@local",
    model_properties={
        "device_type": ["AXELERA/METIS"],
    },
)
model = spec.load_model()
model(remote_assets.urban_picnic_elephants)

print("labels:", model.overlay_show_labels)
print("probs:", model.overlay_show_probabilities)
print("line width:", model.overlay_line_width)
print("font scale:", model.overlay_font_scale)
print("alpha:", model.overlay_alpha)
print("color:", model.overlay_color)
print("blur:", getattr(model, "overlay_blur", None))
```

{% endcode %}

Example output:

{% code overflow="wrap" %}

```bash
labels: True
probs: False
line width: 3
font scale: 1.0
alpha: auto
color: [(255, 255, 0), (0, 128, 0), (0, 128, 128), (128, 0, 0), (128, 0, 128), (128, 128, 0), (128, 128, 128), (0, 0, 64), (0, 0, 192), (0, 128, 64), (0, 128, 192), (128, 0, 64), (128, 0, 192), (128, 128, 64), (128, 128, 192), (0, 64, 0), (0, 64, 128), (0, 192, 0), (0, 192, 128), (128, 64, 0), (128, 64, 128), (128, 192, 0), (128, 192, 128), (0, 64, 64), (0, 64, 192), (0, 192, 64), (0, 192, 192), (128, 64, 64), (128, 64, 192), (128, 192, 64), (128, 192, 192), (64, 0, 0), (64, 0, 128), (64, 128, 0), (64, 128, 128), (192, 0, 0), (192, 0, 128), (192, 128, 0), (192, 128, 128), (64, 0, 64), (64, 0, 192), (64, 128, 64), (64, 128, 192), (192, 0, 64), (192, 0, 192), (192, 128, 64), (192, 128, 192), (64, 64, 0), (64, 64, 128), (64, 192, 0), (64, 192, 128), (192, 64, 0), (192, 64, 128), (192, 192, 0), (192, 192, 128), (64, 64, 64), (64, 64, 192), (64, 192, 64), (64, 192, 192), (192, 64, 64), (192, 64, 192), (192, 192, 64), (192, 192, 192), (0, 0, 32), (0, 0, 160), (0, 128, 32), (0, 128, 160), (128, 0, 32), (128, 0, 160), (128, 128, 32), (128, 128, 160), (0, 0, 96), (0, 0, 224), (0, 128, 96), (0, 128, 224), (128, 0, 96), (128, 0, 224), (128, 128, 96), (128, 128, 224), (0, 64, 32)]
blur: None
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.degirum.com/axelera/intermediate-guides/model-properties/image-overlay.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
