-
Notifications
You must be signed in to change notification settings - Fork 2
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
Comparing backbone to original YOLOv5 repo #6
Comments
Hello, When I implemented YOLOv5, I checked the total number of parameters in my implementation against the official models, and they were the same. So I was quite confident that the implementation is correct. I think there are two possible scenarios:
I will check on the two possible reasons above when I have some time. Cheers! |
Hello, It seems that you have matched the wrong weight names. C3 layer in the official repo (link) is the same as CSPDarknetStage layer in my implementation (link). cv3 corresponds to out_conv, not conv1. The correct mapping would be
Maybe I can write a script to convert the weights since some people have requested it before. I will update it here. |
Hello @AlonZolfi, I have added the script to convert YOLOv5 backbone weights. python scripts/convert_yolov5_weights.py {weights_from_this_repo.pth} {save_path.pth} Here are the notes I added to my README
I'm not familiar with the YOLOv5 codebase. You can help me test if the converted weights work correctly with the official YOLOv5 repo. Cheers! |
Hey,
I've been trying to load the pre-trained weights from this repo into the original YOLOv5 (changing state dict key names, etc.).
However, something does not align in the weights shapes, for example on YOLOv5s:
(left - your implementation with names and sizes, right - original YOLOv5)
The first problem occurs In block 0 - a mismatch in the weights shapes as shown in the image above.
I've checked it on the s,m,l , all of them having the same issue.
Could you please check if there's a bug in your implementation?
Thanks!
The text was updated successfully, but these errors were encountered: