Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YOLO Number of Detection 0, and high loss values... #23

Open
djkim9031 opened this issue Mar 26, 2021 · 0 comments
Open

YOLO Number of Detection 0, and high loss values... #23

djkim9031 opened this issue Mar 26, 2021 · 0 comments

Comments

@djkim9031
Copy link

djkim9031 commented Mar 26, 2021

Hi, thank you for your great content!
I have been working with YOLOv3 model, and my training/val datasets were VOC 2007. so 2500 examples.
Training went smoothly, and at around 120 epochs,
Batch Loss: 39.9973106 Batch xy Loss: 4.36395788 Batch wh Loss: 3.9135325 Batch obj Loss: 21.7637806 Batch class Loss: 9.95604134 was an average batch report.

Given binary_cross_entropy defined that takes the clipped values from 1e-7 ~ 1-1e-7, when things are completely off, the loss is around 16. And as you can see, the batch obj loss is above 16 and class loss is just a bit better. But still it is not as good.

Using the postprocessor class, with iou_thresh=0.5 and score_thresh=0.5, the number of detection is 0.
when I checked the max value for the objectness from y_pred, it was around 0.01.

So, I tweaked score_thresh to 0.01. Only then, the detection was 1 or 2 in many cases. But then predicted classes were mostly "Person". So it seemed like somehow model has a modal collapse where loss value doesn't improve and most predictions are biased towards "person"

Is it perhaps because the model is still under-trained? In your MSCOCO example, it seems like even with 50-ish epochs, and similar loss values as mine(42 in your case), your predictions were quite accurate. Mine is completely off with VOC.

Any suggestions please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant