WongKinYiu / ScaledYOLOv4

Scaled-YOLOv4: Scaling Cross Stage Partial Network
GNU General Public License v3.0
2.02k stars 574 forks source link

Dental panoramic detection: Overfitting problem #281

Open gksruf opened 3 years ago

gksruf commented 3 years ago

Hello. I am not an expert in deep learning and seeking for an help. I am trying to customize YOLOv4 with two pathologic lesions on dental panoramic radiographs. Class 1 has total of 455 (384 training set & 71 test set) and Class 2 has total of 1441 images (1223 training set & 218 test set). All dental panoramic images seems similar in general because people have similar bone structure. However, two different lesions are usually located in the apex of the tooth and they are both pretty small in the large panoramic radiograph. Since labeled lesions are small, we cropped the image when training and tested them. However, the resulting graph looks like below:

image

It overfits very soon. What should I do to fix this problem? Should I try to change masks, anchors, classes, or num in "yolov4.cfg"? Would it help improve the problem? Especially, I am thinking about changing anchors and I wonder how. Or should I use YOLOv3 instead of v4? or could I change v4 more shallower using darknet? Please help me solve the problem. Thank you and have a great day!

huyhoangle86 commented 3 years ago

Do you have dev set or validation set ?

xcc-1921 commented 3 years ago

I am poor at English. You may change the 'batch_size' in 'utils/dataset' or training cmd.(batch_size>1)(16 or 64 maybe) The lower it is,the result may have problem.

xcc-1921 commented 3 years ago

Some training model of yolov4 design for little object. You can use other ‘.cfg’ or ‘weights’.(I can't remember which cfg or weights)