Tianxiaomo / pytorch-YOLOv4

PyTorch ,ONNX and TensorRT implementation of YOLOv4
Apache License 2.0
4.46k stars 1.49k forks source link

Training yolo on a custom dataset. #505

Open makramhamad opened 2 years ago

makramhamad commented 2 years ago

I am trying to overfit yolov4 model on a small dataset. I have followed instructions from the repo and changed annotations format as it is suggested by the repo. Dataset has only two classes it is ball and person. I make changes in cfg.yolov4 accordingly but when I run the training code, it does not train at all and shows following output after evaluation on validation dataset. please anyone guide me what am I doing wrong. P.S I have trained yolov5 on same dataset that goes great. image

ElHouas commented 2 years ago

Hey @makramhamad,

I have the same issue when training for a custom dataset with 8 classes. Have you solved it?

Thanks

makramhamad commented 2 years ago

@ElHouas Hi, I solved it after increasing the dataset size. I was overfitting it on some 10-20 images but when i increased number of images results started improving with each epoch.

ElHouas commented 2 years ago

@makramhamad Thanks for your quick response. I would like to know if you made any additional changes to make it work using a custom dataset. I am still not availble to get better numbers even using a large dataset.

Thanks

ingbeeedd commented 2 years ago

This is the result of running with the original project when training with coco dataset.

image

Wang-Zhenxing commented 2 years ago

This is the result of running with the original project when training with coco dataset.

image

I have the same issue when training for a custom dataset. Have you solved it?