Tutorials  /  AI/ML

YOLOE Zero-Shot Object Detection & Segmentation Guide

Ccentron Redaktion · May 2026 ·4 min read ·AI/ML, Tutorial

Object detection and segmentation are central tasks in computer vision, powering applications ranging from autonomous driving to medical imaging. Well-known models like the YOLO family are recognized for being fast and precise, but they typically remain limited to a predefined list of object classes. This becomes a drawback in real-world environments where unfamiliar, rare, or newly emerging objects can appear. To address this limitation, more recent research has shifted toward “open-set” approaches that can identify and name virtually any object—including categories never included during training—by relying on prompts such as text descriptions or visual references.

YOLOE is a strong and efficient model designed to behave more like human perception, capable of recognizing essentially any object through multiple prompt styles: text prompts, visual cues, or even with no prompt provided. It inherits the speed and lightweight design that made YOLO popular, but extends it for much more adaptable, real-world usage.

GPU

Need more GPU power for this project?

Dedicated NVIDIA GPUs (RTX A4000 to A100) from German data centers – from €92.59/month, billed by the hour, ready in minutes. Rent a GPU server →

How YOLOE Works

Below is an overview of how YOLOE operates across its three supported prompt modes.

Text Prompts (RepRTA Strategy)

When you describe the target using text (for example, “find all bicycles”), YOLOE applies a method called Re-parameterizable Region-Text Alignment (RepRTA). This improves the model’s ability to connect textual intent with visual regions by introducing a lightweight auxiliary network. At inference time, that helper component is merged into the main model, meaning it adds no extra runtime overhead or latency.

Visual Prompts (SAVPE Strategy)

If you provide a sample region or a visual hint, YOLOE relies on the Semantic-Activated Visual Prompt Encoder (SAVPE). The design separates the process into two paths—one focused on semantic understanding and the other on activating relevant regions. This structured split helps preserve accuracy while keeping the overall mechanism streamlined and fast.

Prompt-Free (LRPC Strategy)

When no prompt is provided, YOLOE relies on Lazy Region-Prompt Contrast (LRPC). Instead of using large, resource-intensive language models, it matches detected objects against an internal set of predefined categories. This keeps performance strong while lowering memory consumption and computational overhead.

YOLOE enables detection and segmentation across a wide range of open prompt types. It achieves this through re-parameterizable region-text alignment for text prompts, SAVPE for efficient visual prompt embeddings, and lazy region-prompt contrast for prompt-free object categorization.

Getting Started with YOLOE: Zero-Shot Object Detection and Segmentation

Below is a step-by-step code walkthrough showing how to use YOLOE in your own projects:

Console
# Step 1: Clone the YOLOE Repository
git clone https://github.com/THU-MIG/yoloe.git
cd yoloe
# Step 1: Clone the YOLOE Repository
git clone https://github.com/THU-MIG/yoloe.git
cd yoloe
Console
# Step 2: Install Dependencies
pip install -r requirements.txt
# Step 2: Install Dependencies
pip install -r requirements.txt
Console
# Step 3: Download Pretrained Models
# Visit https://github.com/THU-MIG/yoloe to download pretrained weights (e.g., YOLOE-v8-S.pth)
# Place them in the appropriate directory (e.g., yoloe/weights/)
# Step 3: Download Pretrained Models
# Visit https://github.com/THU-MIG/yoloe to download pretrained weights (e.g., YOLOE-v8-S.pth)
# Place them in the appropriate directory (e.g., yoloe/weights/)
Console
# Step 4: Prepare Your Dataset
# Place your test images in a folder (e.g., ./data/images/)
# For zero-shot detection, make sure you have text prompts or class descriptions ready
# Step 4: Prepare Your Dataset
# Place your test images in a folder (e.g., ./data/images/)
# For zero-shot detection, make sure you have text prompts or class descriptions ready
Console
# Step 5: Run Inference
python predict_text_prompt.py \
    --source ./data/images/  \
    --checkpoint pretrain/yoloe-v8l-seg.pt \
    --text_prompts "cat, dog, car, person" \
    --device cuda:0
# Step 5: Run Inference
python predict_text_prompt.py \
    --source ./data/images/  \
    --checkpoint pretrain/yoloe-v8l-seg.pt \
    --text_prompts "cat, dog, car, person" \
    --device cuda:0
Console
# Step 6: Visualize Results
# Each image will show:
# - Bounding boxes
# - Segmentation masks
# Step 6: Visualize Results
# Each image will show:
# - Bounding boxes
# - Segmentation masks

Conclusion

In summary, YOLOE stands out as a notable breakthrough that blends speed, adaptability, and straightforward design. It supports every major prompt setting—text-based, visual, or none—without the heavy overhead often associated with more complex model stacks. It represents a meaningful step toward truly intelligent, real-time computer vision systems that can adjust to whatever appears in front of them. On a personal note, I see YOLOE’s practical architecture not only as impressive, but also as a promising move toward real-time AI that can actually be deployed in real applications.

Jetzt 200 € Guthaben sichern

Testen Sie Ihr Setup auf ccloud³

Registrieren Sie sich in der ccloud³ und erhalten Sie 200 € Startguthaben für Ihr Projekt – z. B. für eine PostgreSQL-VM mit automatischen Backups.

centron Redaktion Technische Redaktion

Das Redaktionsteam von centron schreibt Anleitungen aus dem Betriebsalltag: getestet auf unserer eigenen Plattform, betrieben im Rechenzentrum in Hallstadt bei Bamberg.

Kategorie AI/ML
Teilen
Noch offene Fragen?

Unser Team hilft Ihnen bei Ihrem konkreten Setup weiter – von Menschen, die die Plattform selbst betreiben.

War dieses Tutorial hilfreich?

Ihre Antwort wird anonym gespeichert und hilft uns, die Tutorials zu verbessern.

Kommentare

Noch keine Kommentare – stellen Sie die erste Frage zu diesem Tutorial.

Zum Kommentieren anmelden

Kommentare stehen centron-Kunden offen. Melden Sie sich in Ihrem Konto an, um eine Frage zu diesem Tutorial zu stellen.

Weiterlesen

Das könnte Sie auch interessieren

Jetzt kostenlos anfangen

Melden Sie sich an und erhalten Sie in den ersten 60 Tagen ein Guthaben von 200 € bei centron.

Dieses Werbeangebot gilt nur für neue Konten. Angebot ausschließlich für Gewerbetreibende.

Jetzt loslegen Sales kontaktieren