Home

Awesome

<div align="center"> <img src="./assets/yolo_logo.png" width=60%> <br> <a href="https://scholar.google.com/citations?hl=zh-CN&user=PH8rJHYAAAAJ">Tianheng Cheng</a><sup><span>2,3,*</span></sup>, <a href="https://linsong.info/">Lin Song</a><sup><span>1,📧,*</span></sup>, <a href="https://yxgeee.github.io/">Yixiao Ge</a><sup><span>1,🌟,2</span></sup>, <a href="http://eic.hust.edu.cn/professor/liuwenyu/"> Wenyu Liu</a><sup><span>3</span></sup>, <a href="https://xwcv.github.io/">Xinggang Wang</a><sup><span>3,📧</span></sup>, <a href="https://scholar.google.com/citations?user=4oXBp9UAAAAJ&hl=en">Ying Shan</a><sup><span>1,2</span></sup> </br>

* Equal contribution 🌟 Project lead 📧 Corresponding author

<sup>1</sup> Tencent AI Lab, <sup>2</sup> ARC Lab, Tencent PCG <sup>3</sup> Huazhong University of Science and Technology <br>

<div>

arxiv paper arxiv paper <a href="https://colab.research.google.com/github/AILab-CVC/YOLO-World/blob/master/inference.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> demo Replicate hfpaper license yoloworldseg yologuide deploy

</div> </div>

Notice

YOLO-World is still under active development!

We recommend that everyone use English to communicate on issues, as this helps developers from around the world discuss, share experiences, and answer questions together.

For business licensing and other related inquiries, don't hesitate to contact yixiaoge@tencent.com.

🔥 Updates

[2024-11-5]: We update the YOLO-World-Image and you can try it at HuggingFace YOLO-World-Image (Preview Version). It's a preview version and we are still improving it! Detailed documents about training and few-shot inference are coming soon.
[2024-7-8]: YOLO-World now has been integrated into ComfyUI! Come and try adding YOLO-World to your workflow now! You can access it at StevenGrove/ComfyUI-YOLOWorld!
[2024-5-18]: YOLO-World models have been integrated with the FiftyOne computer vision toolkit for streamlined open-vocabulary inference across image and video datasets.
[2024-5-16]: Hey guys! Long time no see! This update contains (1) fine-tuning guide and (2) TFLite Export with INT8 Quantization.
[2024-5-9]: This update contains the real reparameterization 🪄, and it's better for fine-tuning on custom datasets and improves the training/inference efficiency 🚀!
[2024-4-28]: Long time no see! This update contains bugfixs and improvements: (1) ONNX demo; (2) image demo (support tensor input); (2) new pre-trained models; (3) image prompts; (4) simple version for fine-tuning / deployment; (5) guide for installation (include a requirements.txt).
[2024-3-28]: We provide: (1) more high-resolution pre-trained models (e.g., S, M, X) (#142); (2) pre-trained models with CLIP-Large text encoders. Most importantly, we preliminarily fix the fine-tuning without mask-refine and explore a new fine-tuning setting (#160,#76). In addition, fine-tuning YOLO-World with mask-refine also obtains significant improvements, check more details in configs/finetune_coco.
[2024-3-16]: We fix the bugs about the demo (#110,#94,#129, #125) with visualizations of segmentation masks, and release YOLO-World with Embeddings, which supports prompt tuning, text prompts and image prompts.
[2024-3-3]: We add the high-resolution YOLO-World, which supports 1280x1280 resolution with higher accuracy and better performance for small objects!
[2024-2-29]: We release the newest version of YOLO-World-v2 with higher accuracy and faster speed! We hope the community can join us to improve YOLO-World!
[2024-2-28]: Excited to announce that YOLO-World has been accepted by CVPR 2024! We're continuing to make YOLO-World faster and stronger, as well as making it better to use for all.
[2024-2-22]: We sincerely thank RoboFlow and @Skalskip92 for the Video Guide about YOLO-World, nice work!
[2024-2-18]: We thank @Skalskip92 for developing the wonderful segmentation demo via connecting YOLO-World and EfficientSAM. You can try it now at the 🤗 HuggingFace Spaces.
[2024-2-17]: The largest model X of YOLO-World is released, which achieves better zero-shot performance!
[2024-2-17]: We release the code & models for YOLO-World-Seg now! YOLO-World now supports open-vocabulary / zero-shot object segmentation!
[2024-2-15]: The pre-traind YOLO-World-L with CC3M-Lite is released!
[2024-2-14]: We provide the image_demo for inference on images or directories.
[2024-2-10]: We provide the fine-tuning and data details for fine-tuning YOLO-World on the COCO dataset or the custom datasets!
[2024-2-3]: We support the Gradio demo now in the repo and you can build the YOLO-World demo on your own device!
[2024-2-1]: We've released the code and weights of YOLO-World now!
[2024-2-1]: We deploy the YOLO-World demo on HuggingFace 🤗, you can try it now!
[2024-1-31]: We are excited to launch YOLO-World, a cutting-edge real-time open-vocabulary object detector.

TODO

YOLO-World is under active development and please stay tuned ☕️! If you have suggestions📃 or ideas💡,we would love for you to bring them up in the Roadmap ❤️!

YOLO-World 目前正在积极开发中📃,如果你有建议或者想法💡,我们非常希望您在 Roadmap 中提出来 ❤️!

FAQ (Frequently Asked Questions)

We have set up an FAQ about YOLO-World in the discussion on GitHub. We hope everyone can raise issues or solutions during use here, and we also hope that everyone can quickly find solutions from it.

我们在GitHub的discussion中建立了关于YOLO-World的常见问答,这里将收集一些常见问题,同时大家可以在此提出使用中的问题或者解决方案,也希望大家能够从中快速寻找到解决方案

Highlights & Introduction

This repo contains the PyTorch implementation, pre-trained weights, and pre-training/fine-tuning code for YOLO-World.

<div align="center"> <img width=800px src="./assets/yolo_arch.png"> </div> ## Model Zoo

We've pre-trained YOLO-World-S/M/L from scratch and evaluate on the LVIS val-1.0 and LVIS minival. We provide the pre-trained model weights and training logs for applications/research or re-producing the results.

Zero-shot Inference on LVIS dataset

<div><font size=2>
modelPre-train DataSizeAP<sup>mini</su>AP<sub>r</sub>AP<sub>c</sub>AP<sub>f</sub>AP<sup>val</su>AP<sub>r</sub>AP<sub>c</sub>AP<sub>f</sub>weights
YOLO-Worldv2-SO365+GoldG64022.716.320.825.517.311.314.922.7HF Checkpoints 🤗
YOLO-Worldv2-SO365+GoldG1280🔸24.118.722.026.918.814.116.323.8HF Checkpoints 🤗
YOLO-Worldv2-MO365+GoldG64030.025.027.233.423.517.120.030.1HF Checkpoints 🤗
YOLO-Worldv2-MO365+GoldG1280🔸31.624.529.035.125.319.322.031.7HF Checkpoints 🤗
YOLO-Worldv2-LO365+GoldG64033.022.632.035.826.018.623.032.6HF Checkpoints 🤗
🔥 YOLO-Worldv2-LO365+GoldG+CCLiteV264033.423.131.936.626.620.323.233.2HF Checkpoints 🤗
YOLO-Worldv2-LO365+GoldG1280🔸34.629.232.837.227.621.924.234.0HF Checkpoints 🤗
YOLO-Worldv2-L (CLIP-Large) 🔥O365+GoldG64034.022.032.637.427.119.923.933.9HF Checkpoints 🤗
YOLO-Worldv2-L (CLIP-Large) 🔥O365+GoldG800🔸35.528.333.238.828.622.025.135.4HF Checkpoints 🤗
YOLO-Worldv2-LO365+GoldG+CC3M-Lite64032.925.331.135.826.120.622.632.3HF Checkpoints 🤗
YOLO-Worldv2-XO365+GoldG+CC3M-Lite64035.428.732.938.728.420.625.635.0HF Checkpoints 🤗
🔥 YOLO-Worldv2-XO365+GoldG+CC3M-Lite1280🔸37.430.535.240.729.821.126.837.0HF Checkpoints 🤗
YOLO-Worldv2-XLO365+GoldG+CC3M-Lite64036.025.834.139.529.121.126.335.8HF Checkpoints 🤗
</font> </div>

NOTE:

  1. AP<sup>mini</sup>: evaluated on LVIS minival.
  2. AP<sup>val</sup>: evaluated on LVIS val 1.0.
  3. HuggingFace Mirror provides the mirror of HuggingFace, which is a choice for users who are unable to reach.
  4. 🔸: fine-tuning models with the pre-trained data.

Pre-training Logs:

We provide the pre-training logs of YOLO-World-v2. Due to the unexpected errors of the local machines, the training might be interrupted several times.

ModelYOLO-World-v2-SYOLO-World-v2-MYOLO-World-v2-LYOLO-World-v2-X
Pre-training LogPart-1, Part-2Part-1, Part-2Part-1, Part-2Final part

Getting started

1. Installation

YOLO-World is developed based on torch==1.11.0 mmyolo==0.6.0 and mmdetection==3.0.0. Check more details about requirements and mmcv in docs/installation.

Clone Project

git clone --recursive https://github.com/AILab-CVC/YOLO-World.git

Install

pip install torch wheel -q
pip install -e .

2. Preparing Data

We provide the details about the pre-training data in docs/data.

Training & Evaluation

We adopt the default training or evaluation scripts of mmyolo. We provide the configs for pre-training and fine-tuning in configs/pretrain and configs/finetune_coco. Training YOLO-World is easy:

chmod +x tools/dist_train.sh
# sample command for pre-training, use AMP for mixed-precision training
./tools/dist_train.sh configs/pretrain/yolo_world_l_t2i_bn_2e-4_100e_4x8gpus_obj365v1_goldg_train_lvis_minival.py 8 --amp

NOTE: YOLO-World is pre-trained on 4 nodes with 8 GPUs per node (32 GPUs in total). For pre-training, the node_rank and nnodes for multi-node training should be specified.

Evaluating YOLO-World is also easy:

chmod +x tools/dist_test.sh
./tools/dist_test.sh path/to/config path/to/weights 8

NOTE: We mainly evaluate the performance on LVIS-minival for pre-training.

Fine-tuning YOLO-World

<div align="center"> <img src="./assets/finetune_yoloworld.png" width=800px> </div> <div align="center"> <b><p>Chose your pre-trained YOLO-World and Fine-tune it!</p></b> </div>

YOLO-World supports zero-shot inference, and three types of fine-tuning recipes: (1) normal fine-tuning, (2) prompt tuning, and (3) reparameterized fine-tuning.

Deployment

We provide the details about deployment for downstream applications in docs/deployment. You can directly download the ONNX model through the online demo in Huggingface Spaces 🤗.

Demo

See demo for more details

Acknowledgement

We sincerely thank mmyolo, mmdetection, GLIP, and transformers for providing their wonderful code to the community!

Citations

If you find YOLO-World is useful in your research or applications, please consider giving us a star 🌟 and citing it.

@inproceedings{Cheng2024YOLOWorld,
  title={YOLO-World: Real-Time Open-Vocabulary Object Detection},
  author={Cheng, Tianheng and Song, Lin and Ge, Yixiao and Liu, Wenyu and Wang, Xinggang and Shan, Ying},
  booktitle={Proc. IEEE Conf. Computer Vision and Pattern Recognition (CVPR)},
  year={2024}
}

Licence

YOLO-World is under the GPL-v3 Licence and is supported for commercial usage. If you need a commercial license for YOLO-World, please feel free to contact us.