-
Notifications
You must be signed in to change notification settings - Fork 783
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
Training custom dataset on kangaroo #203
Comments
@voqtuyen Class loss is always 0 as you only have 1 class. You cannot get it wrong. For correct prediction, please use Full Yolo and train more to reduce the loss further. |
Thanks @experiencor for your reply, i will try a re-training as your suggestion |
Hi @experiencor , I see that during training the recall decreases overtime? I think it's quite strange and it results in my wrong prediction result, is it supposed to be normal? |
Hi @voqtuyen, I find that the warmup stage is quite confusing so I changed the code to auto handle this case. The training process is now simply |
Hi @experiencor, Thanks for your quick reply, i will give it a try then! |
Hi @experiencor, |
@voqtuyen Yes, your result is normal to me. One way to address this issue to include non-kangaroo images in the dataset. You can get some from COCO too. The network will learn to recognize non-kangaroo and not just label every animal as a kangaroo. The size of the file is normal and Keras try to save 64-bit double. You may find out how to save in 32-bit. |
Hi @experiencor , |
@voqtuyen Yes. You need to combine the images and the annotations (put them in common folders). Then set labels in config.json to like ["kangaroo", "dog", "cat"]. It will learn a detector which can distinguish those three animals. If you just want to detect kangaroo, you can make blank annotations for those additional images then put ["kangaroo"] in the labels settings. |
Thanks @experiencor, I see that you divide the network into 2 parts: backend and frontend so that you can easily change the CNN architecture and also easily change the config of the last prediction layer, so my question is given a full model, how can i extract only the backend or frontend as you did (full_yolo_backend.h5)? Thanks very much! |
@voqtuyen It's straight-forward but involves quite an effort. Make the backend submodel, make the frontend submodel, combine them to make the full model, load the weight to the full model, save each submodel separately. I did all these steps in the constructor of YOLO in frontend.py except for the last two steps. You probably need a jupyter notebook to make your life easier. |
I followed the tutorial on how to train custom dataset and i chose kangaroo.
Here is the log:
The loss class is always 0, and the final model cannot predict the kangaroo correctly. Any suggestions on how to resolve it? Thanks so much!
The text was updated successfully, but these errors were encountered: