-
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
Yolo is not able to load pre-trained weights file #234
Comments
Hey, so there's a difference in the models used and the pretrained weights. On the one hand, you have the weights for the backend that is used (e.g. full yolo or tiny yolo). The path to their weight file is hard coded into On the other hand, you have weights for the whole model used, i.e., the backend plus some additional conv layers for the box detection (the backend is a classifier). In your config, you can specify a path to weights for that whole model. This is useful if you did some epochs of warmup training and want to load the weights from this warmup training as a start for your proper training. |
As far as I can tell, what I currently have in the yolo root folder for So are you suggesting that I download the full weights files, instead of just the backend weights? If so, I'm assuming I should get the weights from this link in the README, which is the link right after this:
Because I was under the impression that these would already be trained for Raccoons, but I guess if they're going to be retrained for my dataset anyway that would make sense, this is transfer learning after all. |
Well it depends on what you would like to train. If it looks similar to raccoons (and has only a single label!) you might can use these weights. Otherwise I would suggest you just leave this field blank or you do some epochs of warmup training, save the weights (with the |
Thanks, doing that made it train successfully. The issue now is that it doesn't detect anything, but I'm guessing that is either an indication that my dataset is not robust enough or I need to mess around with the network configurations... |
can anyone please share the frontend and backend pretained weights as it is not available now in the link mentioned above |
Hello, I'm trying to train yolo on my own dataset for tadpole detection, but it can't seem to load the weights that I specify in the config.json file.
I tried using the "Full Yolo" architecture paired with the full_yolo_backend.h5 file, and now also tried "Tiny Yolo" with the tiny_yolo_backend.h5 file, neither worked.
The error I get is always some variation of:
ValueError: You are trying to load a weight file containing 16 layers into a model with 2 layers.
The weights file is in the keras-yolo2 root directory. This is my config.json:
Any advice on how I might resolve this and get it to load the weights file? Thanks!
The text was updated successfully, but these errors were encountered: