Implementation of paper -YOLOv9: Learning What You Want to Learn Using Programmable Gradient Information
- ✅YOLOv9-c (face) trained on WIDERFace [26.02]
Docker environment (recommended)
Expand
#create the docker container, you can change the share memory size if you have more.
nvidia-docker run --name yolov9 -it -v your_coco_path/:/coco/ -v your_code_path/:/yolov9 --shm-size=64g nvcr.io/nvidia/pytorch:21.11-py3
#apt install required packages
apt update
apt install -y zip htop screen libgl1-mesa-glx
#pip install required packages
pip install seaborn thop
#go to code folder
cd/yolov9
PR curve:
Losses and mAP:
Confusion matrix:
Data preparation
-
Downloaddataset:
-
Download pretrainedyolov9-c.ptmodel.
Single GPU training
#train model
python train_dual.py --workers 8 --device 0 --batch 12 --data data/widerface.yaml --img 640 --cfg models/detect/yolov9-c.yaml --weights'yolov9-c.pt'--name yolov9-c --hyp hyp.scratch-high.yaml --min-items 0 --epochs 100 --close-mosaic 15
MS COCO
Model | Test Size | APval | AP50val | AP75val | Param. | FLOPs |
---|---|---|---|---|---|---|
YOLOv9-S | 640 | 46.8% | 63.4% | 50.7% | 7.2M | 26.7G |
YOLOv9-M | 640 | 51.4% | 68.1% | 56.1% | 20.1M | 76.8G |
YOLOv9-C | 640 | 53.0% | 70.2% | 57.8% | 25.5M | 102.8G |
YOLOv9-E | 640 | 55.6% | 72.8% | 60.6% | 58.1M | 192.5G |
Expand
Custom training:WongKinYiu#30 (comment)
ONNX export:WongKinYiu#2 (comment)WongKinYiu#40 (comment)
TensorRT inference:WongKinYiu#34 (comment)WongKinYiu#79 (comment)
Hugging Face demo:WongKinYiu#45 (comment)
CoLab demo:WongKinYiu#18
ONNXSlim export:WongKinYiu#37
YOLOv9 ByteTrack:WongKinYiu#78 (comment)
YOLOv9 counting:WongKinYiu#84 (comment)
AnyLabeling tool:WongKinYiu#48 (comment)
@article{wang2024yolov9,
title={{YOLOv9}: Learning What You Want to Learn Using Programmable Gradient Information},
author={Wang, Chien-Yao and Liao, Hong-Yuan Mark},
booktitle={arXiv preprint arXiv:2402.13616},
year={2024}
}
@article{chang2023yolor,
title={{YOLOR}-Based Multi-Task Learning},
author={Chang, Hung-Shuo and Wang, Chien-Yao and Wang, Richard Robert and Chou, Gene and Liao, Hong-Yuan Mark},
journal={arXiv preprint arXiv:2309.16921},
year={2023}
}
Parts of code ofYOLOR-Based Multi-Task Learningare released in the repository.