THU-MIG / yolov10

YOLOv10: Real-Time End-to-End Object Detection
https://arxiv.org/abs/2405.14458
GNU Affero General Public License v3.0
9.4k stars 883 forks source link

cache ram not working #84

Open wer751 opened 3 months ago

jameslahm commented 3 months ago

Thanks for your interest! Could you please provide more details about your setup? In our local environment with 8*3090, each epoch of training YOLOv10-N costs ~1min54s, which is similar to that of YOLOv8-N (~1min54s).

wer751 commented 3 months ago

@jameslahm Thanks. I used 1*3090 to train YOLOv10n (cache ram), each epoch costs 2min 54s, while YOLOv8n (cache ram) costs 30s. The cache can't speed up the training. I called the cache and didn't get accelerated training like v8. Then I used your ultralytics to train v8 (cache), and the speed slowed down, compared with v8 (official), the speed was five times slower. To sum up, although cache code caches data, it cannot fully use the performance of the GPU.

woshicaiji250 commented 3 months ago

too

jameslahm commented 3 months ago

Does the codebase share the same python environment with the v8 (official)?

@jameslahm Thanks. I used 1*3090 to train YOLOv10n (cache ram), each epoch costs 2min 54s, while YOLOv8n (cache ram) costs 30s. The cache can't speed up the training. I called the cache and didn't get accelerated training like v8. Then I used your ultralytics to train v8 (cache), and the speed slowed down, compared with v8 (official), the speed was five times slower. To sum up, although cache code caches data, it cannot fully use the performance of the GPU.

wer751 commented 3 months ago

Yeah. @jameslahm

jameslahm commented 3 months ago

Thanks. Could you please provide the details of how you launch the training in this codebase and the v8 (official)?

wer751 commented 3 months ago

yolo detect train data=data.yaml model=yolov8n.yaml epochs=2 batch=32 cache=ram In this codebase, I didn't pip install ultralytics, used pip install e. Then, I used v8 (official) to train my data. In the v8 (official), to train model in this environment (pip install ultralytics). 1 2

jameslahm commented 3 months ago

@wer751 @woshicaiji250 Thanks! Could you please check if it works after applying these changes? Thank you! image

wer751 commented 3 months ago

Thanks, but it didn't work.

jameslahm commented 3 months ago

Thanks! Could you please apply the below patch and try again? Thank you! diff.patch

wer751 commented 3 months ago

Thanks!The problem has been solved by replacing v8's base.py, and so has your patch. Thank you!