yjh0410 57a928aebf update 1 سال پیش
..
README.md b286568dcb add E2E-YOLOv8 1 سال پیش
build.py 23140f638a update 1 سال پیش
loss.py b286568dcb add E2E-YOLOv8 1 سال پیش
matcher.py 57a928aebf update 1 سال پیش
yolov8_backbone.py 23140f638a update 1 سال پیش
yolov8_basic.py b286568dcb add E2E-YOLOv8 1 سال پیش
yolov8_e2e.py 23140f638a update 1 سال پیش
yolov8_head.py b286568dcb add E2E-YOLOv8 1 سال پیش
yolov8_neck.py b286568dcb add E2E-YOLOv8 1 سال پیش
yolov8_pafpn.py b286568dcb add E2E-YOLOv8 1 سال پیش
yolov8_pred.py b286568dcb add E2E-YOLOv8 1 سال پیش

README.md

End-to-End YOLOv8:

Inspired by YOLOv10, I deploy two parallel detection heads, one using one-to-many assinger (o2m head) and the other using one-to-one assinger (o2o head). To avoid conflicts between the gradients returned by o2o head and o2m head, we truncate the gradients returned from o2o head to the backbone and neck, and only allow the gradients returned from o2m head to update the backbone and neck. This operation is consistent with the practice of YOLOv10. For evaluation, we remove the o2m head and only use o2o head without NMS.

However, I have no GPU to train YOLOv8-E2E.

  • VOC
  • COCO
Model Batch Scale APval
0.5
Weight Logs
YOLOv8-E2E-S 1xb16 640

Train YOLOv8-E2E

Single GPU

Taking training YOLOv8-E2E-S on COCO as the example,

python train.py --cuda -d coco --root path/to/coco -m yolov8_e2e_s -bs 16 --fp16 

Multi GPU

Taking training YOLOv8-E2E-S on COCO as the example,

python -m torch.distributed.run --nproc_per_node=8 train.py --cuda --distributed -d coco --root path/to/coco -m yolov8_e2e_s -bs 256 --fp16 

Test YOLOv8

Taking testing YOLOv8-E2E-S on COCO-val as the example,

python test.py --cuda -d coco --root path/to/coco -m yolov8_e2e_s --weight path/to/yolov8.pth --show 

Evaluate YOLOv8

Taking evaluating YOLOv8-E2E-S on COCO-val as the example,

python eval.py --cuda -d coco --root path/to/coco -m yolov8_e2e_s --weight path/to/yolov8.pth 

Demo

Detect with Image

python demo.py --mode image --path_to_img path/to/image_dirs/ --cuda -m yolov8_e2e_s --weight path/to/weight --show

Detect with Video

python demo.py --mode video --path_to_vid path/to/video --cuda -m yolov8_e2e_s --weight path/to/weight --show --gif

Detect with Camera

python demo.py --mode camera --cuda -m yolov8_e2e_s --weight path/to/weight --show --gif
Model Batch Scale APval
0.5:0.95
APval
0.5
FLOPs
(G)
Params
(M)
Weight Logs
YOLOv8-E2E-S 1xb16 640 26.9 8.9