Skip to content
ModelsThatRun

YOLOv9

Academia Sinica's YOLO with programmable gradient information, five sizes from t to e on COCO's 80 classes, run through Ultralytics. GPL-3.0 and AGPL-3.0.

Size

Conditional for size t: code AGPL-3.0-only, weights GPL-3.0-only. Measured on our RTX 4090: 18.9 ms median, 523 MiB VRAM peak. We scored it 37.7 box AP on COCO val2017. PyTorch weights, 5 MB.

License

Conditional

Code
AGPL-3.0-onlychecked 21 Nov 2026
Weights
GPL-3.0-onlyall sizes, checked 21 Nov 2026

The authors' repository is GPL-3.0 and Ultralytics, whose code runs it, is AGPL-3.0: shipping it in a product means releasing your source.

On our RTX 4090, measured

18.9ms median

p90 23.3 ms, fp16, batch 1, 640x448

VRAM peak
523 MiB
Status
Runs as is

Phases of one call

Pre-processing
1.2 ms
Network
13.3 ms
Post-processing
1.0 ms

Split by the official package's own timer over 20 calls, with a synchronize after each phase. Its timer leaves out about 3.1 ms of the 18.6 ms call there, such as converting the input and building the result, so the phases don't add up to the median.

Environment, 22 Nov 2026

NVIDIA GeForce RTX 4090, driver 580.173.02, CUDA 13.0, torch 2.14.1+cu130, Python 3.12.9, ultralytics==8.4.189. Baseline 1065 MiB. 10 warm-up + 100 timed. Scope: predict(): pre-processing, forward pass and post-processing; input file decoded beforehand.

TensorRT fp16: 6.0 msour engine, measured

Accuracy

37.7box APmeasured

COCO val2017, box AP, 5,000 images, fp16, pycocotools==2.0.11 · 21 Nov 2026

Paper 38.3 COCO mAP50-95Ultralytics YOLOv9 docs, detection performance table (mAPval 50-95)

Weights

PyTorch

Size
5 MB
sha256
410e3caca789aa8fec19971c05577616cbb963a416bcd0228171b2dff7f718f7
Download t weights

Same photos and one score threshold for every model of this task. Failures are marked.

Use it when

You want the paper's GELAN-based YOLO sizes with Ultralytics' tooling: all five scored within 1.1 box AP of Ultralytics' docs, and ran 6.0 to 8.3 ms a call on TensorRT.

Avoid it when

You need a license without copyleft (GPL-3.0 weights, AGPL-3.0 code), or the small sizes fast in PyTorch: t and s took about 19 ms a call there, slower than its own m and c (16 ms).

Sizes

SizeLatencyVRAMAccuracyWeightsRunsLicense
t18.9 ms640x448523 MiB37.7 box AP, measured38.3 COCO mAP50-95 paper5 MBAs isConditional
s18.9 ms640x448540 MiB46.1 box AP, measured46.8 COCO mAP50-95 paper15 MBAs isConditional
m16.2 ms640x448659 MiB51.0 box AP, measured51.4 COCO mAP50-95 paper39 MBAs isConditional
c15.9 ms640x448692 MiB52.3 box AP, measured53 COCO mAP50-95 paper49 MBAs isConditional
e24.6 ms640x4481.1 GiB54.6 box AP, measured55.6 COCO mAP50-95 paper112 MBAs isConditional

Runtimes

Measured on our RTX 4090. Each row is our own measurement, timed under the same protocol and scored through that runtime. The TensorRT engine is built from the authors' own ONNX export of the released weights, with the settings their docs give. The card at the top and the charts use the PyTorch row.

Runtime, size tLatency (input under it)VRAM peakAccuracy (on that runtime)
PyTorchfp16 · torch 2.14.1+cu13018.9 ms640x448523 MiB37.7 box AP, fp16
TensorRT10.16.1.11 · fp166.0 ms640x640563 MiB37.8 box AP, fp16
How the TensorRT engine was made, 22 Nov 2026

TensorRT 10.16.1.11, runs as is. Exported with ultralytics YOLO.export format=engine quantize=16 imgsz=640 device=0, opset 18; ONNX sha256 450761b0c68e…. Engine sha256 9e666c4fea28…, 6 MB, built in 227 s. Builder settings: api ultralytics==8.4.189, which builds with TensorRT's Python API, flags ["FP16"], other the package's own settings, input 1x3x640x640, static, workspace TensorRT's default. NVIDIA GeForce RTX 4090, driver 580.173.02, CUDA 13.0, torch 2.14.1+cu130, ultralytics==8.4.189. 10 warm-up + 100 timed, median of 3 runs. Scope: predict(): pre-processing, forward pass and post-processing; input file decoded beforehand.

Estimated on other GPUs

Estimate, not measured. Worked out from our RTX 4090 run and NVIDIA's spec sheets. Each kind of GPU work is scaled by that GPU's peak for it: tensor cores at the precision the kernels used, CUDA cores, or memory bandwidth. The CPU's part of each call is kept at what it took on our Intel Core i7-10700K. How we estimate

Where a call's time goes on our RTX 4090: CPU and kernel launches 87%, memory-bound 7%, tensor cores, FP16 (FP32 accumulate) 3%, tensor cores, TF32 2%.

GeForce (13)
GPUFitsLatency
GeForce RTX 5090Blackwell, 32 GB GDDR7Yes≈ 18–19 ms
GeForce RTX 5080Blackwell, 16 GB GDDR7Yes≈ 19 ms
GeForce RTX 5070 TiBlackwell, 16 GB GDDR7Yes≈ 20 ms
GeForce RTX 5070Blackwell, 12 GB GDDR7Yes≈ 20–21 ms
GeForce RTX 5060 Ti 16GBBlackwell, 16 GB GDDR7Yes≈ 21–23 ms
GeForce RTX 5060Blackwell, 8 GB GDDR7Yes≈ 21–24 ms
GeForce RTX 4080Ada Lovelace, 16 GB GDDR6XYes≈ 19–20 ms
GeForce RTX 4070 TiAda Lovelace, 12 GB GDDR6XYes≈ 20–21 ms
GeForce RTX 4070Ada Lovelace, 12 GB GDDR6XYes≈ 20–22 ms
GeForce RTX 3090Ampere, 24 GB GDDR6XYes≈ 20 ms
GeForce RTX 3080Ampere, 10 GB GDDR6XYes≈ 20–21 ms
GeForce RTX 3070 TiAmpere, 8 GB GDDR6XYes≈ 21–22 ms
GeForce RTX 3070Ampere, 8 GB GDDR6Yes≈ 21–23 ms
Workstation (4)
GPUFitsLatency
RTX PRO 6000 Blackwell Workstation EditionBlackwell, 96 GB GDDR7Yes≈ 18 ms
RTX PRO 6000 Blackwell Max-Q Workstation EditionBlackwell, 96 GB GDDR7Yes≈ 18 ms
RTX 6000 Ada GenerationAda Lovelace, 48 GB GDDR6Yes≈ 19 ms
RTX A6000Ampere, 48 GB GDDR6Yes≈ 19 ms
Data center (6)
GPUFitsLatency
B200 (HGX, one GPU)Blackwell, 180 GB HBM3EYes≈ 17–18 ms
H200 SXMHopper, 141 GB HBM3eYes≈ 17–18 ms
H100 SXMHopper, 80 GB HBM3Yes≈ 17–18 ms
A100 SXM 80GBAmpere, 80 GB HBM2eYes≈ 18–19 ms
L40SAda Lovelace, 48 GB GDDR6Yes≈ 19 ms
L4Ada Lovelace, 24 GB GDDR6Yes≈ 19–23 ms

CPU only

Measured by us with no GPU on an Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz, 8 cores, 94.2 GiB of memory: the same official code with the GPU hidden, in fp32 on 8 threads. Before it was timed, its output on the timing input was checked against the GPU's. These numbers say what to expect without a GPU. They aren't compared with any GPU's, here or in the charts. How we measure on a CPU

SizeRuntimeLatency on the CPURAM peak
tPyTorch2.14.1 · fp32 · 8 threads38.1 ms640x448815 MiB
tONNX Runtime1.31.1 · fp32 · 8 threads37.5 ms640x640877 MiB
sPyTorch2.14.1 · fp32 · 8 threads66.2 ms640x448861 MiB
sONNX Runtime1.31.1 · fp32 · 8 threads74.9 ms640x640944 MiB
mPyTorch2.14.1 · fp32 · 8 threads144 ms640x448999 MiB
mONNX Runtime1.31.1 · fp32 · 8 threads156 ms640x6401.1 GiB
cPyTorch2.14.1 · fp32 · 8 threads195 ms640x4481.0 GiB
cONNX Runtime1.31.1 · fp32 · 8 threads205 ms640x6401.2 GiB
ePyTorch2.14.1 · fp32 · 8 threads615 ms640x4481.6 GiB
eONNX Runtime1.31.1 · fp32 · 8 threads456 ms640x6402.5 GiB

ONNX Runtime rows run the authors' own ONNX export with their own ONNX Runtime code, whose pre-processing may differ from the PyTorch code's, so their input can differ too.

From the authors

In their words, with their numbers. Ours are in the cards at the top of this page.

Paper

YOLOv9: Learning What You Want to Learn Using Programmable Gradient Information

Chien-Yao Wang, I-Hau Yeh, Hong-Yuan Mark Liao

arXiv 2402.13616, 21 Feb 2024

Abstract

Today's deep learning methods focus on how to design the most appropriate objective functions so that the prediction results of the model can be closest to the ground truth. Meanwhile, an appropriate architecture that can facilitate acquisition of enough information for prediction has to be designed. Existing methods ignore a fact that when input data undergoes layer-by-layer feature extraction and spatial transformation, large amount of information will be lost. This paper will delve into the important issues of data loss when data is transmitted through deep networks, namely information bottleneck and reversible functions. We proposed the concept of programmable gradient information (PGI) to cope with the various changes required by deep networks to achieve multiple objectives. PGI can provide complete input information for the target task to calculate objective function, so that reliable gradient information can be obtained to update network weights. In addition, a new lightweight network architecture -- Generalized Efficient Layer Aggregation Network (GELAN), based on gradient path planning is designed. GELAN's architecture confirms that PGI has gained superior results on lightweight models. We verified the proposed GELAN and PGI on MS COCO dataset based object detection. The results show that GELAN only uses conventional convolution operators to achieve better parameter utilization than the state-of-the-art methods developed based on depth-wise convolution. PGI can be used for variety of models from lightweight to large. It can be used to obtain complete information, so that train-from-scratch models can achieve better results than state-of-the-art models pre-trained using large datasets, the comparison results are shown in Figure 1. The source codes are at: https://github.com/WongKinYiu/yolov9.

README

Copied from the authors' repository at commit 5b1ea9a on 23 Nov 2026. Numbers and license claims in it are theirs, not measured or checked by us. We removed badges, replaced images with links and adjusted headings.

Implementation of paper - YOLOv9: Learning What You Want to Learn Using Programmable Gradient Information

Figure performance

Performance

MS COCO

ModelTest SizeAPvalAP50valAP75valParam.FLOPs
YOLOv9-T64038.3%53.1%41.3%2.0M7.7G
YOLOv9-S64046.8%63.4%50.7%7.1M26.4G
YOLOv9-M64051.4%68.1%56.1%20.0M76.3G
YOLOv9-C64053.0%70.2%57.8%25.3M102.1G
YOLOv9-E64055.6%72.8%60.6%57.3M189.0G
Expand

Custom training: https://github.com/WongKinYiu/yolov9/issues/30#issuecomment-1960955297

ONNX export: https://github.com/WongKinYiu/yolov9/issues/2#issuecomment-1960519506 https://github.com/WongKinYiu/yolov9/issues/40#issue-2150697688 https://github.com/WongKinYiu/yolov9/issues/130#issue-2162045461

ONNX export for segmentation: https://github.com/WongKinYiu/yolov9/issues/260#issue-2191162150

TensorRT inference: https://github.com/WongKinYiu/yolov9/issues/143#issuecomment-1975049660 https://github.com/WongKinYiu/yolov9/issues/34#issue-2150393690 https://github.com/WongKinYiu/yolov9/issues/79#issue-2153547004 https://github.com/WongKinYiu/yolov9/issues/143#issue-2164002309

QAT TensorRT: https://github.com/WongKinYiu/yolov9/issues/327#issue-2229284136 https://github.com/WongKinYiu/yolov9/issues/253#issue-2189520073

TensorRT inference for segmentation: https://github.com/WongKinYiu/yolov9/issues/446

TFLite: https://github.com/WongKinYiu/yolov9/issues/374#issuecomment-2065751706

OpenVINO: https://github.com/WongKinYiu/yolov9/issues/164#issue-2168540003

C# ONNX inference: https://github.com/WongKinYiu/yolov9/issues/95#issue-2155974619

C# OpenVINO inference: https://github.com/WongKinYiu/yolov9/issues/95#issuecomment-1968131244

OpenCV: https://github.com/WongKinYiu/yolov9/issues/113#issuecomment-1971327672

Hugging Face demo: https://github.com/WongKinYiu/yolov9/issues/45#issuecomment-1961496943

CoLab demo: https://github.com/WongKinYiu/yolov9/pull/18

ONNXSlim export: https://github.com/WongKinYiu/yolov9/pull/37

YOLOv9 ROS: https://github.com/WongKinYiu/yolov9/issues/144#issue-2164210644

YOLOv9 ROS TensorRT: https://github.com/WongKinYiu/yolov9/issues/145#issue-2164218595

YOLOv9 Julia: https://github.com/WongKinYiu/yolov9/issues/141#issuecomment-1973710107

YOLOv9 MLX: https://github.com/WongKinYiu/yolov9/issues/258#issue-2190586540

YOLOv9 StrongSORT with OSNet: https://github.com/WongKinYiu/yolov9/issues/299#issue-2212093340

YOLOv9 ByteTrack: https://github.com/WongKinYiu/yolov9/issues/78#issue-2153512879

YOLOv9 DeepSORT: https://github.com/WongKinYiu/yolov9/issues/98#issue-2156172319

YOLOv9 counting: https://github.com/WongKinYiu/yolov9/issues/84#issue-2153904804

YOLOv9 speed estimation: https://github.com/WongKinYiu/yolov9/issues/456

YOLOv9 face detection: https://github.com/WongKinYiu/yolov9/issues/121#issue-2160218766

YOLOv9 segmentation onnxruntime: https://github.com/WongKinYiu/yolov9/issues/151#issue-2165667350

Comet logging: https://github.com/WongKinYiu/yolov9/pull/110

MLflow logging: https://github.com/WongKinYiu/yolov9/pull/87

AnyLabeling tool: https://github.com/WongKinYiu/yolov9/issues/48#issue-2152139662

AX650N deploy: https://github.com/WongKinYiu/yolov9/issues/96#issue-2156115760

Conda environment: https://github.com/WongKinYiu/yolov9/pull/93

AutoDL docker environment: https://github.com/WongKinYiu/yolov9/issues/112#issue-2158203480

Installation

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

Evaluation

yolov9-s-converted.pt yolov9-m-converted.pt yolov9-c-converted.pt yolov9-e-converted.pt yolov9-s.pt yolov9-m.pt yolov9-c.pt yolov9-e.pt gelan-s.pt gelan-m.pt gelan-c.pt gelan-e.pt

# evaluate converted yolov9 models
python val.py --data data/coco.yaml --img 640 --batch 32 --conf 0.001 --iou 0.7 --device 0 --weights './yolov9-c-converted.pt' --save-json --name yolov9_c_c_640_val

# evaluate yolov9 models
# python val_dual.py --data data/coco.yaml --img 640 --batch 32 --conf 0.001 --iou 0.7 --device 0 --weights './yolov9-c.pt' --save-json --name yolov9_c_640_val

# evaluate gelan models
# python val.py --data data/coco.yaml --img 640 --batch 32 --conf 0.001 --iou 0.7 --device 0 --weights './gelan-c.pt' --save-json --name gelan_c_640_val

You will get the results:

 Average Precision  (AP) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.530
 Average Precision  (AP) @[ IoU=0.50      | area=   all | maxDets=100 ] = 0.702
 Average Precision  (AP) @[ IoU=0.75      | area=   all | maxDets=100 ] = 0.578
 Average Precision  (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.362
 Average Precision  (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.585
 Average Precision  (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.693
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=  1 ] = 0.392
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets= 10 ] = 0.652
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.702
 Average Recall     (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.541
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.760
 Average Recall     (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.844

Training

Data preparation

bash scripts/get_coco.sh
  • Download MS COCO dataset images (train, val, test) and labels. If you have previously used a different version of YOLO, we strongly recommend that you delete train2017.cache and val2017.cache files, and redownload labels

Single GPU training

# train yolov9 models
python train_dual.py --workers 8 --device 0 --batch 16 --data data/coco.yaml --img 640 --cfg models/detect/yolov9-c.yaml --weights '' --name yolov9-c --hyp hyp.scratch-high.yaml --min-items 0 --epochs 500 --close-mosaic 15

# train gelan models
# python train.py --workers 8 --device 0 --batch 32 --data data/coco.yaml --img 640 --cfg models/detect/gelan-c.yaml --weights '' --name gelan-c --hyp hyp.scratch-high.yaml --min-items 0 --epochs 500 --close-mosaic 15

Multiple GPU training

# train yolov9 models
python -m torch.distributed.launch --nproc_per_node 8 --master_port 9527 train_dual.py --workers 8 --device 0,1,2,3,4,5,6,7 --sync-bn --batch 128 --data data/coco.yaml --img 640 --cfg models/detect/yolov9-c.yaml --weights '' --name yolov9-c --hyp hyp.scratch-high.yaml --min-items 0 --epochs 500 --close-mosaic 15

# train gelan models
# python -m torch.distributed.launch --nproc_per_node 4 --master_port 9527 train.py --workers 8 --device 0,1,2,3 --sync-bn --batch 128 --data data/coco.yaml --img 640 --cfg models/detect/gelan-c.yaml --weights '' --name gelan-c --hyp hyp.scratch-high.yaml --min-items 0 --epochs 500 --close-mosaic 15

Re-parameterization

See reparameterization.ipynb.

Inference

Figure horses prediction
# inference converted yolov9 models
python detect.py --source './data/images/horses.jpg' --img 640 --device 0 --weights './yolov9-c-converted.pt' --name yolov9_c_c_640_detect

# inference yolov9 models
# python detect_dual.py --source './data/images/horses.jpg' --img 640 --device 0 --weights './yolov9-c.pt' --name yolov9_c_640_detect

# inference gelan models
# python detect.py --source './data/images/horses.jpg' --img 640 --device 0 --weights './gelan-c.pt' --name gelan_c_c_640_detect

Citation

@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}
}

Teaser

Parts of code of YOLOR-Based Multi-Task Learning are released in the repository.

Figure multitask
Object Detection

gelan-c-det.pt

object detection

# coco/labels/{split}/*.txt
# bbox or polygon (1 instance 1 line)
python train.py --workers 8 --device 0 --batch 32 --data data/coco.yaml --img 640 --cfg models/detect/gelan-c.yaml --weights '' --name gelan-c-det --hyp hyp.scratch-high.yaml --min-items 0 --epochs 300 --close-mosaic 10
ModelTest SizeParam.FLOPsAPbox
GELAN-C-DET64025.3M102.1G52.3%
YOLOv9-C-DET64025.3M102.1G53.0%
Instance Segmentation

gelan-c-seg.pt

object detection instance segmentation

# coco/labels/{split}/*.txt
# polygon (1 instance 1 line)
python segment/train.py --workers 8 --device 0 --batch 32  --data coco.yaml --img 640 --cfg models/segment/gelan-c-seg.yaml --weights '' --name gelan-c-seg --hyp hyp.scratch-high.yaml --no-overlap --epochs 300 --close-mosaic 10
ModelTest SizeParam.FLOPsAPboxAPmask
GELAN-C-SEG64027.4M144.6G52.3%42.4%
YOLOv9-C-SEG64027.4M145.5G53.3%43.5%
Panoptic Segmentation

gelan-c-pan.pt

object detection instance segmentation semantic segmentation stuff segmentation panoptic segmentation

# coco/labels/{split}/*.txt
# polygon (1 instance 1 line)
# coco/stuff/{split}/*.txt
# polygon (1 semantic 1 line)
python panoptic/train.py --workers 8 --device 0 --batch 32  --data coco.yaml --img 640 --cfg models/panoptic/gelan-c-pan.yaml --weights '' --name gelan-c-pan --hyp hyp.scratch-high.yaml --no-overlap --epochs 300 --close-mosaic 10
ModelTest SizeParam.FLOPsAPboxAPmaskmIoU164k/10ksemanticmIoUstuffPQpanoptic
GELAN-C-PAN64027.6M146.7G52.6%42.5%39.0%/48.3%52.7%39.4%
YOLOv9-C-PAN64028.8M187.0G52.7%43.0%39.8%/-52.2%40.5%
Image Captioning (not yet released)

object detection instance segmentation semantic segmentation stuff segmentation panoptic segmentation image captioning

# coco/labels/{split}/*.txt
# polygon (1 instance 1 line)
# coco/stuff/{split}/*.txt
# polygon (1 semantic 1 line)
# coco/annotations/*.json
# json (1 split 1 file)
python caption/train.py --workers 8 --device 0 --batch 32  --data coco.yaml --img 640 --cfg models/caption/gelan-c-cap.yaml --weights '' --name gelan-c-cap --hyp hyp.scratch-high.yaml --no-overlap --epochs 300 --close-mosaic 10
ModelTest SizeParam.FLOPsAPboxAPmaskmIoU164k/10ksemanticmIoUstuffPQpanopticBLEU@4captionCIDErcaption
GELAN-C-CAP64047.5M-51.9%42.6%42.5%/-56.5%41.7%38.8122.3
YOLOv9-C-CAP64047.5M-52.1%42.6%43.0%/-56.4%42.1%39.1122.0

Acknowledgements

Expand

Alternatives

Changes

First published . Every model's changes

    • Added, with sizes t, s, m, c, and e

Badge for a README

It says the model ran on our RTX 4090 and links to this page. It carries no number, so it never goes out of date.

ModelsThatRun: ran on RTX 4090
[![ModelsThatRun: ran on RTX 4090](https://modelsthatrun.dev/models/yolov9/badge.svg)](https://modelsthatrun.dev/models/yolov9/)

Something wrong on this page, such as a license or a number? Email us.

⇆
InputOutput