Official PyTorch implementation of YOLOE.
Comparison of performance, training cost, and inference efficiency between YOLOE (Ours) and YOLO-Worldv2 in terms of open text prompts.
YOLOE: Real-Time Seeing Anything.
Ao Wang*, Lihao Liu*, Hui Chen, Zijia Lin, Jungong Han, and Guiguang Ding
We introduce YOLOE(ye), a highly efficient, unified, and open object detection and segmentation model, like human eye, under different prompt mechanisms, like texts, visual inputs, and prompt-free paradigm.
minival set with text (T) / visual (V) prompts.| Model | Size | Prompt | Params | Data | Time | FPS | $AP$ | $AP_r$ | $AP_c$ | $AP_f$ | Log |
|---|---|---|---|---|---|---|---|---|---|---|---|
| YOLOE-v8-S | 640 | T / V | 12M / 13M | OG | 12.0h | 305.8 / 64.3 | 27.9 / 26.2 | 22.3 / 21.3 | 27.8 / 27.7 | 29.0 / 25.7 | T / V |
| YOLOE-v8-M | 640 | T / V | 27M / 30M | OG | 17.0h | 156.7 / 41.7 | 32.6 / 31.0 | 26.9 / 27.0 | 31.9 / 31.7 | 34.4 / 31.1 | T / V |
| YOLOE-v8-L | 640 | T / V | 45M / 50M | OG | 22.5h | 102.5 / 27.2 | 35.9 / 34.2 | 33.2 / 33.2 | 34.8 / 34.6 | 37.3 / 34.1 | T / V |
| YOLOE-11-S | 640 | T / V | 10M / 12M | OG | 13.0h | 301.2 / 73.3 | 27.5 / 26.3 | 21.4 / 22.5 | 26.8 / 27.1 | 29.3 / 26.4 | T / V |
| YOLOE-11-M | 640 | T / V | 21M / 27M | OG | 18.5h | 168.3 / 39.2 | 33.0 / 31.4 | 26.9 / 27.1 | 32.5 / 31.9 | 34.5 / 31.7 | T / V |
| YOLOE-11-L | 640 | T / V | 26M / 32M | OG | 23.5h | 130.5 / 35.1 | 35.2 / 33.7 | 29.1 / 28.1 | 35.0 / 34.6 | 36.5 / 33.8 | T / V |
val set with text (T) / visual (V) prompts.| Model | Size | Prompt | $AP^m$ | $AP_r^m$ | $AP_c^m$ | $AP_f^m$ |
|---|---|---|---|---|---|---|
| YOLOE-v8-S | 640 | T / V | 17.7 / 16.8 | 15.5 / 13.5 | 16.3 / 16.7 | 20.3 / 18.2 |
| YOLOE-v8-M | 640 | T / V | 20.8 / 20.3 | 17.2 / 17.0 | 19.2 / 20.1 | 24.2 / 22.0 |
| YOLOE-v8-L | 640 | T / V | 23.5 / 22.0 | 21.9 / 16.5 | 21.6 / 22.1 | 26.4 / 24.3 |
| YOLOE-11-S | 640 | T / V | 17.6 / 17.1 | 16.1 / 14.4 | 15.6 / 16.8 | 20.5 / 18.6 |
| YOLOE-11-M | 640 | T / V | 21.1 / 21.0 | 17.2 / 18.3 | 19.6 / 20.6 | 24.4 / 22.6 |
| YOLOE-11-L | 640 | T / V | 22.6 / 22.5 | 19.3 / 20.5 | 20.9 / 21.7 | 26.0 / 24.1 |
minival set and FPS is measured on Nvidia T4 GPU with Pytorch.| Model | Size | Params | $AP$ | $AP_r$ | $AP_c$ | $AP_f$ | FPS | Log |
|---|---|---|---|---|---|---|---|---|
| YOLOE-v8-S | 640 | 13M | 21.0 | 19.1 | 21.3 | 21.0 | 95.8 | PF |
| YOLOE-v8-M | 640 | 29M | 24.7 | 22.2 | 24.5 | 25.3 | 45.9 | PF |
| YOLOE-v8-L | 640 | 47M | 27.2 | 23.5 | 27.0 | 28.0 | 25.3 | PF |
| YOLOE-11-S | 640 | 11M | 20.6 | 18.4 | 20.2 | 21.3 | 93.0 | PF |
| YOLOE-11-M | 640 | 24M | 25.5 | 21.6 | 25.5 | 26.1 | 42.5 | PF |
| YOLOE-11-L | 640 | 29M | 26.3 | 22.7 | 25.8 | 27.5 | 34.9 | PF |
| Model | Size | Epochs | $AP^b$ | $AP^b_{50}$ | $AP^b_{75}$ | $AP^m$ | $AP^m_{50}$ | $AP^m_{75}$ | Log |
|---|---|---|---|---|---|---|---|---|---|
| Linear probing | |||||||||
| YOLOE-v8-S | 640 | 10 | 35.6 | 51.5 | 38.9 | 30.3 | 48.2 | 32.0 | LP |
| YOLOE-v8-M | 640 | 10 | 42.2 | 59.2 | 46.3 | 35.5 | 55.6 | 37.7 | LP |
| YOLOE-v8-L | 640 | 10 | 45.4 | 63.3 | 50.0 | 38.3 | 59.6 | 40.8 | LP |
| YOLOE-11-S | 640 | 10 | 37.0 | 52.9 | 40.4 | 31.5 | 49.7 | 33.5 | LP |
| YOLOE-11-M | 640 | 10 | 43.1 | 60.6 | 47.4 | 36.5 | 56.9 | 39.0 | LP |
| YOLOE-11-L | 640 | 10 | 45.1 | 62.8 | 49.5 | 38.0 | 59.2 | 40.6 | LP |
| Full tuning | |||||||||
| YOLOE-v8-S | 640 | 160 | 45.0 | 61.6 | 49.1 | 36.7 | 58.3 | 39.1 | FT |
| YOLOE-v8-M | 640 | 80 | 50.4 | 67.0 | 55.2 | 40.9 | 63.7 | 43.5 | FT |
| YOLOE-v8-L | 640 | 80 | 53.0 | 69.8 | 57.9 | 42.7 | 66.5 | 45.6 | FT |
| YOLOE-11-S | 640 | 160 | 46.2 | 62.9 | 50.0 | 37.6 | 59.3 | 40.1 | FT |
| YOLOE-11-M | 640 | 80 | 51.3 | 68.3 | 56.0 | 41.5 | 64.8 | 44.3 | FT |
| YOLOE-11-L | 640 | 80 | 52.6 | 69.7 | 57.5 | 42.4 | 66.2 | 45.2 | FT |
conda virtual environment is recommended.
conda create -n yoloe python=3.10 -y
conda activate yoloe
pip install -r requirements.txt
pip install -e .
pip install -e lvis-api
pip install -e ml-mobileclip
pip install -e CLIP
If desired objects are not identified, pleaset set a smaller confidence threshold, e.g., for visual prompts with handcrafted shape or cross-image prompts.
# Optional for mirror: export HF_ENDPOINT=https://hf-mirror.com
pip install gradio==4.42.0 gradio_image_prompter==0.1.0 fastapi==0.112.2
python app.py
# Please visit http://127.0.0.1:7860
python predict.py
python predict_vp.py
python predict_pf.py
minival.txt with background images for evaluation.# For evaluation with visual prompt, please obtain the referring data.
python tools/generate_lvis_visual_prompt_data.py
python val.py.python val_vp.pyFor Fixed AP, please refer to the comments in val.py and val_vp.py, and use tools/eval_fixed_ap.py for evaluation.
python val_pe_free.py
python tools/eval_open_ended.py --json ../datasets/lvis/annotations/lvis_v1_minival.json --pred runs/detect/val/predictions.json --fixed
python val_coco.py
The training includes three stages:
For annotations, you can directly use our preprocessed ones or use the following script to obtain the processed annotations with segmentation masks.
# Generate segmentation data
conda create -n sam2 python==3.10.16
conda activate sam2
pip install -r sam2/requirements.txt
pip install -e sam2/
python tools/generate_sam_masks.py --img-path ../datasets/Objects365v1/images/train --json-path ../datasets/Objects365v1/annotations/objects365_train.json --batch
python tools/generate_sam_masks.py --img-path ../datasets/flickr/full_images/ --json-path ../datasets/flickr/annotations/final_flickr_separateGT_train.json
python tools/generate_sam_masks.py --img-path ../datasets/mixed_grounding/gqa/images --json-path ../datasets/mixed_grounding/annotations/final_mixed_train_no_coco.json
# Generate objects365v1 labels
python tools/generate_objects365v1.py
Then, please generate the data and embedding cache for training.
# Generate grounding segmentation cache
python tools/generate_grounding_cache.py --img-path ../datasets/flickr/full_images/ --json-path ../datasets/flickr/annotations/final_flickr_separateGT_train_segm.json
python tools/generate_grounding_cache.py --img-path ../datasets/mixed_grounding/gqa/images --json-path ../datasets/mixed_grounding/annotations/final_mixed_train_no_coco_segm.json
# Generate train label embeddings
python tools/generate_label_embedding.py
python tools/generate_global_neg_cat.py
At last, please download MobileCLIP-B(LT) for text encoder.
wget https://docs-assets.developer.apple.com/ml-research/datasets/mobileclip/mobileclip_blt.pt
# For models with l scale, please change the initialization by referring to the comments in Line 549 in ultralytics/nn/moduels/head.py
# If you want to train YOLOE only for detection, you can use `train.py`
python train_seg.py
# For visual prompt, because only SAVPE is trained, we can adopt the detection pipleline with less training time
# First, obtain the detection model
python tools/convert_segm2det.py
# Then, train the SAVPE module
python train_vp.py
# After training, please use tools/get_vp_segm.py to add the segmentation head
# python tools/get_vp_segm.py
# Generate LVIS with single class for evaluation during training
python tools/generate_lvis_sc.py
# Similar to visual prompt, because only the specialized prompt embedding is trained, we can adopt the detection pipleline with less training time
python tools/convert_segm2det.py
python train_pe_free.py
# After training, please use tools/get_pf_free_segm.py to add the segmentation head
# python tools/get_pf_free_segm.py
After pretraining, YOLOE-v8 / YOLOE-11 can be re-parameterized into the same architecture as YOLOv8 / YOLO11, with zero overhead for transferring.
Only the last conv, ie., the prompt embedding, is trainable.
python train_pe.py
All parameters are trainable, for better performance.
# For models with s scale, please change the epochs to 160 for longer training
python train_pe_all.py
After re-parameterization, YOLOE-v8 / YOLOE-11 can be exported into the identical format as YOLOv8 / YOLO11.
pip install onnx coremltools onnxslim
python export.py
benchmark.sh.tools/benchmark_pf.py.The code base is built with ultralytics, YOLO-World, MobileCLIP, lvis-api, CLIP, and GenerateU.
Thanks for the great implementations!
If our code or models help your work, please cite our paper:
@misc{wang2025yoloerealtimeseeing,
title={YOLOE: Real-Time Seeing Anything},
author={Ao Wang and Lihao Liu and Hui Chen and Zijia Lin and Jungong Han and Guiguang Ding},
year={2025},
eprint={2503.07465},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2503.07465},
}
Official PyTorch implementation of YOLOE.
Comparison of performance, training cost, and inference efficiency between YOLOE (Ours) and YOLO-Worldv2 in terms of open text prompts.
YOLOE: Real-Time Seeing Anything.
Ao Wang*, Lihao Liu*, Hui Chen, Zijia Lin, Jungong Han, and Guiguang Ding
We introduce YOLOE(ye), a highly efficient, unified, and open object detection and segmentation model, like human eye, under different prompt mechanisms, like texts, visual inputs, and prompt-free paradigm.
minival set with text (T) / visual (V) prompts.| Model | Size | Prompt | Params | Data | Time | FPS | $AP$ | $AP_r$ | $AP_c$ | $AP_f$ | Log |
|---|---|---|---|---|---|---|---|---|---|---|---|
| YOLOE-v8-S | 640 | T / V | 12M / 13M | OG | 12.0h | 305.8 / 64.3 | 27.9 / 26.2 | 22.3 / 21.3 | 27.8 / 27.7 | 29.0 / 25.7 | T / V |
| YOLOE-v8-M | 640 | T / V | 27M / 30M | OG | 17.0h | 156.7 / 41.7 | 32.6 / 31.0 | 26.9 / 27.0 | 31.9 / 31.7 | 34.4 / 31.1 | T / V |
| YOLOE-v8-L | 640 | T / V | 45M / 50M | OG | 22.5h | 102.5 / 27.2 | 35.9 / 34.2 | 33.2 / 33.2 | 34.8 / 34.6 | 37.3 / 34.1 | T / V |
| YOLOE-11-S | 640 | T / V | 10M / 12M | OG | 13.0h | 301.2 / 73.3 | 27.5 / 26.3 | 21.4 / 22.5 | 26.8 / 27.1 | 29.3 / 26.4 | T / V |
| YOLOE-11-M | 640 | T / V | 21M / 27M | OG | 18.5h | 168.3 / 39.2 | 33.0 / 31.4 | 26.9 / 27.1 | 32.5 / 31.9 | 34.5 / 31.7 | T / V |
| YOLOE-11-L | 640 | T / V | 26M / 32M | OG | 23.5h | 130.5 / 35.1 | 35.2 / 33.7 | 29.1 / 28.1 | 35.0 / 34.6 | 36.5 / 33.8 | T / V |
val set with text (T) / visual (V) prompts.| Model | Size | Prompt | $AP^m$ | $AP_r^m$ | $AP_c^m$ | $AP_f^m$ |
|---|---|---|---|---|---|---|
| YOLOE-v8-S | 640 | T / V | 17.7 / 16.8 | 15.5 / 13.5 | 16.3 / 16.7 | 20.3 / 18.2 |
| YOLOE-v8-M | 640 | T / V | 20.8 / 20.3 | 17.2 / 17.0 | 19.2 / 20.1 | 24.2 / 22.0 |
| YOLOE-v8-L | 640 | T / V | 23.5 / 22.0 | 21.9 / 16.5 | 21.6 / 22.1 | 26.4 / 24.3 |
| YOLOE-11-S | 640 | T / V | 17.6 / 17.1 | 16.1 / 14.4 | 15.6 / 16.8 | 20.5 / 18.6 |
| YOLOE-11-M | 640 | T / V | 21.1 / 21.0 | 17.2 / 18.3 | 19.6 / 20.6 | 24.4 / 22.6 |
| YOLOE-11-L | 640 | T / V | 22.6 / 22.5 | 19.3 / 20.5 | 20.9 / 21.7 | 26.0 / 24.1 |
minival set and FPS is measured on Nvidia T4 GPU with Pytorch.| Model | Size | Params | $AP$ | $AP_r$ | $AP_c$ | $AP_f$ | FPS | Log |
|---|---|---|---|---|---|---|---|---|
| YOLOE-v8-S | 640 | 13M | 21.0 | 19.1 | 21.3 | 21.0 | 95.8 | PF |
| YOLOE-v8-M | 640 | 29M | 24.7 | 22.2 | 24.5 | 25.3 | 45.9 | PF |
| YOLOE-v8-L | 640 | 47M | 27.2 | 23.5 | 27.0 | 28.0 | 25.3 | PF |
| YOLOE-11-S | 640 | 11M | 20.6 | 18.4 | 20.2 | 21.3 | 93.0 | PF |
| YOLOE-11-M | 640 | 24M | 25.5 | 21.6 | 25.5 | 26.1 | 42.5 | PF |
| YOLOE-11-L | 640 | 29M | 26.3 | 22.7 | 25.8 | 27.5 | 34.9 | PF |
| Model | Size | Epochs | $AP^b$ | $AP^b_{50}$ | $AP^b_{75}$ | $AP^m$ | $AP^m_{50}$ | $AP^m_{75}$ | Log |
|---|---|---|---|---|---|---|---|---|---|
| Linear probing | |||||||||
| YOLOE-v8-S | 640 | 10 | 35.6 | 51.5 | 38.9 | 30.3 | 48.2 | 32.0 | LP |
| YOLOE-v8-M | 640 | 10 | 42.2 | 59.2 | 46.3 | 35.5 | 55.6 | 37.7 | LP |
| YOLOE-v8-L | 640 | 10 | 45.4 | 63.3 | 50.0 | 38.3 | 59.6 | 40.8 | LP |
| YOLOE-11-S | 640 | 10 | 37.0 | 52.9 | 40.4 | 31.5 | 49.7 | 33.5 | LP |
| YOLOE-11-M | 640 | 10 | 43.1 | 60.6 | 47.4 | 36.5 | 56.9 | 39.0 | LP |
| YOLOE-11-L | 640 | 10 | 45.1 | 62.8 | 49.5 | 38.0 | 59.2 | 40.6 | LP |
| Full tuning | |||||||||
| YOLOE-v8-S | 640 | 160 | 45.0 | 61.6 | 49.1 | 36.7 | 58.3 | 39.1 | FT |
| YOLOE-v8-M | 640 | 80 | 50.4 | 67.0 | 55.2 | 40.9 | 63.7 | 43.5 | FT |
| YOLOE-v8-L | 640 | 80 | 53.0 | 69.8 | 57.9 | 42.7 | 66.5 | 45.6 | FT |
| YOLOE-11-S | 640 | 160 | 46.2 | 62.9 | 50.0 | 37.6 | 59.3 | 40.1 | FT |
| YOLOE-11-M | 640 | 80 | 51.3 | 68.3 | 56.0 | 41.5 | 64.8 | 44.3 | FT |
| YOLOE-11-L | 640 | 80 | 52.6 | 69.7 | 57.5 | 42.4 | 66.2 | 45.2 | FT |
conda virtual environment is recommended.
conda create -n yoloe python=3.10 -y
conda activate yoloe
pip install -r requirements.txt
pip install -e .
pip install -e lvis-api
pip install -e ml-mobileclip
pip install -e CLIP
If desired objects are not identified, pleaset set a smaller confidence threshold, e.g., for visual prompts with handcrafted shape or cross-image prompts.
# Optional for mirror: export HF_ENDPOINT=https://hf-mirror.com
pip install gradio==4.42.0 gradio_image_prompter==0.1.0 fastapi==0.112.2
python app.py
# Please visit http://127.0.0.1:7860
python predict.py
python predict_vp.py
python predict_pf.py
minival.txt with background images for evaluation.# For evaluation with visual prompt, please obtain the referring data.
python tools/generate_lvis_visual_prompt_data.py
python val.py.python val_vp.pyFor Fixed AP, please refer to the comments in val.py and val_vp.py, and use tools/eval_fixed_ap.py for evaluation.
python val_pe_free.py
python tools/eval_open_ended.py --json ../datasets/lvis/annotations/lvis_v1_minival.json --pred runs/detect/val/predictions.json --fixed
python val_coco.py
The training includes three stages:
For annotations, you can directly use our preprocessed ones or use the following script to obtain the processed annotations with segmentation masks.
# Generate segmentation data
conda create -n sam2 python==3.10.16
conda activate sam2
pip install -r sam2/requirements.txt
pip install -e sam2/
python tools/generate_sam_masks.py --img-path ../datasets/Objects365v1/images/train --json-path ../datasets/Objects365v1/annotations/objects365_train.json --batch
python tools/generate_sam_masks.py --img-path ../datasets/flickr/full_images/ --json-path ../datasets/flickr/annotations/final_flickr_separateGT_train.json
python tools/generate_sam_masks.py --img-path ../datasets/mixed_grounding/gqa/images --json-path ../datasets/mixed_grounding/annotations/final_mixed_train_no_coco.json
# Generate objects365v1 labels
python tools/generate_objects365v1.py
Then, please generate the data and embedding cache for training.
# Generate grounding segmentation cache
python tools/generate_grounding_cache.py --img-path ../datasets/flickr/full_images/ --json-path ../datasets/flickr/annotations/final_flickr_separateGT_train_segm.json
python tools/generate_grounding_cache.py --img-path ../datasets/mixed_grounding/gqa/images --json-path ../datasets/mixed_grounding/annotations/final_mixed_train_no_coco_segm.json
# Generate train label embeddings
python tools/generate_label_embedding.py
python tools/generate_global_neg_cat.py
At last, please download MobileCLIP-B(LT) for text encoder.
wget https://docs-assets.developer.apple.com/ml-research/datasets/mobileclip/mobileclip_blt.pt
# For models with l scale, please change the initialization by referring to the comments in Line 549 in ultralytics/nn/moduels/head.py
# If you want to train YOLOE only for detection, you can use `train.py`
python train_seg.py
# For visual prompt, because only SAVPE is trained, we can adopt the detection pipleline with less training time
# First, obtain the detection model
python tools/convert_segm2det.py
# Then, train the SAVPE module
python train_vp.py
# After training, please use tools/get_vp_segm.py to add the segmentation head
# python tools/get_vp_segm.py
# Generate LVIS with single class for evaluation during training
python tools/generate_lvis_sc.py
# Similar to visual prompt, because only the specialized prompt embedding is trained, we can adopt the detection pipleline with less training time
python tools/convert_segm2det.py
python train_pe_free.py
# After training, please use tools/get_pf_free_segm.py to add the segmentation head
# python tools/get_pf_free_segm.py
After pretraining, YOLOE-v8 / YOLOE-11 can be re-parameterized into the same architecture as YOLOv8 / YOLO11, with zero overhead for transferring.
Only the last conv, ie., the prompt embedding, is trainable.
python train_pe.py
All parameters are trainable, for better performance.
# For models with s scale, please change the epochs to 160 for longer training
python train_pe_all.py
After re-parameterization, YOLOE-v8 / YOLOE-11 can be exported into the identical format as YOLOv8 / YOLO11.
pip install onnx coremltools onnxslim
python export.py
benchmark.sh.tools/benchmark_pf.py.The code base is built with ultralytics, YOLO-World, MobileCLIP, lvis-api, CLIP, and GenerateU.
Thanks for the great implementations!
If our code or models help your work, please cite our paper:
@misc{wang2025yoloerealtimeseeing,
title={YOLOE: Real-Time Seeing Anything},
author={Ao Wang and Lihao Liu and Hui Chen and Zijia Lin and Jungong Han and Guiguang Ding},
year={2025},
eprint={2503.07465},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2503.07465},
}