Skip to content

roryclear/yolov9

Repository files navigation

tinygrad implementation of: https://github.com/WongKinYiu/yolov9

Setup:

pip install -r requirements.txt

Inference on single image:

python yolov9.py {link or path to an image} {model variant}

Live WebGPU inference

python compile_to_webgpu.py
python -m http.server 8080

open localhost:8080

Testing performance

python test_jit.py

for faster inference use tinygrad's BEAM search:

BEAM=2 python test_jit.py

this will result in a longer initial run time as the searches are performed and cached. For visibility on the process use:

BEAM=2 DEBUG=2 python test_jit.py

Speed (M3 Macbook Air)

with BEAM=2:

Model Resolution FPS
t 320 198.56
t 640 78.08
t 960 39.41
t 1280 25.27
t 1536 16.48
s 320 97.11
s 640 33.31
s 960 17.85
s 1280 12.24
s 1536 7.94
m 320 46.09
m 640 15.81
m 960 7.73
m 1280 5.01
m 1536 3.37
c 320 35.72
c 640 13.55
c 960 5.82
c 1280 4.22
c 1536 2.58
e 320 20.36
e 640 7.49
e 960 3.25
e 1280 2.25
e 1536 1.43

without BEAM=2:

Model Resolution FPS
t 320 139.94
t 640 71.06
t 960 22.38
t 1280 17.31
t 1536 9.72
s 320 63.21
s 640 26.24
s 960 10.09
s 1280 6.09
s 1536 3.31
m 320 27.28
m 640 9.53
m 960 3.61
m 1280 1.49
m 1536 0.89
c 320 17.37
c 640 6.25
c 960 2.50
c 1280 1.27
c 1536 0.74
e 320 8.36
e 640 3.36
e 960 1.38
e 1280 0.74
e 1536 0.42

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published