Yolov5: Yolov5l and Yolov5x results on custom dataset results

Created on 29 Oct 2020  路  6Comments  路  Source: ultralytics/yolov5

鉂擰uestion

Hello Dear @glenn-jocher

I have 12000 images with single class. I have got best results with yolov5l via transfer learning and multi-scale training.

I wonder why I get lower results with yolo5x. Normally I should get higher results, right?
Also, I train the network first with transfer learning, multi-scale and default values. Then I fine-tune the model with coco finetune.yaml and the results are getting better. I evolve the model with the best weight I got. Do you think this order makes sense?
Also, python train.py --img 640 --batch 16 --epochs 3 --data coco128.yaml --cfg yolov5s.yaml --weights yolov5s.pt is transfer learning or strach training ? I think it is strach training because training takes longer than transfer training.

Thanks in advance for your help

Additional context

Stale question

All 6 comments

@jaqub-manuel there seem to be various questions merged togethor in your issue. I can't comment on your workflow other than to say that smaller models will overfit faster than larger models, so if you think you have a better result from a smaller model this is a likely indicator that you have not trained the larger model long enough.

@jaqub-manuel also, python train.py --weights yolov5s.pt by definition starts from the weights in yolov5s.pt. Training from scratch is done by python train.py --weights ''

You should start from the custom training tutorial which explains all of this.
https://github.com/ultralytics/yolov5/wiki/Train-Custom-Data

@glenn-jocher, I have trained yolov5l with 1000 epochs, and yolov5x with 2000 epochs. I am still getting best result with yolo5l.
In yolov5x, generally after 400 epochs, preciison increases, but recall decreases. What should be wrong ?

@jaqub-manuel also, python train.py --weights yolov5s.pt by definition starts from the weights in yolov5s.pt. Training from scratch is done by python train.py --weights ''

You should start from the custom training tutorial which explains all of this.
https://github.com/ultralytics/yolov5/wiki/Train-Custom-Data

python train.py --img 640 --batch 16 --epochs 3 --data coco128.yaml --cfg yolov5s.yaml --weights yolov5s.pt (In custom dataset trainig), I did not see any changes adding or removing --cfg file when use --weights yolov5s or m,l,x.. I have tried many times.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@glenn-jocher, I have trained yolov5l with 1000 epochs, and yolov5x with 2000 epochs. I am still getting best result with yolo5l.
In yolov5x, generally after 400 epochs, preciison increases, but recall decreases. What should be wrong ?

This is probably because both False Positives and True Positives decrease, but False Positives decrease faster.

Was this page helpful?
0 / 5 - 0 ratings