-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
yolov3-spp.cfg Support #16
Comments
@glenn-jocher Thank you for answering. SPP means spatial pyramid pooling. As the spp cfg needs the maxpool (stride=1) layer, so it should not work correctly if this layer is not implemented in the model.py file. |
@happog
|
Re-opening this. I gave this a shot, trying to simply add support for a maxpool layer as it should be (in models.py): elif module_def['type'] == 'maxpool':
stride = int(module_def['stride'])
kernel_size = int(module_def['size'])
pad = (kernel_size - 1) / 2
maxpool_layer = nn.MaxPool2d(stride=stride, kernel_size=kernel_size, padding=pad)
modules.add_module('maxpool_%d' % i, maxpool_layer) And this indeed works, however network performance is actually significantly worse so I'm obviously doing something wrong. |
I added support for yolov3-tiny using the maxpool layer (and implementing a fix to the routing layer, and modifying the stride calculation in models.py yolo forward) in #51, so if yolov3-spp was suffering from issues before perhaps these are now resolved as well. I'll try to run inference with yolov3-spp and see the result now:
Ok, results look comparable to yolov3. Well SPP certainly seems to be working, though this limited anecdotal evidence makes it hard to conclude whether it represents an improvement over standard yolov3, or if there are pytorch implementation issues. To resolve implementation issues I must compare against darknet directly. I'll try that now. Hmm, ok still inconclusive.
Strangely enough tie used to get 1.00 also using the repo originally. |
What was the conclusion here? Does Yolov3-SPP work now with reasonable performance and precision? |
@LukeAI works perfectly. Yolov3-SPP is the default model for all operations now in train.py, detect.py and test.py. It acheives .607 mAP as you can see: https://github.com/ultralytics/yolov3#map. |
Ah yes, thankyou! Why do you think this repo. achieves slightly higher accuracy? |
should we use yolove-1cls or yolov3-spp-1cls for single class and image size of 512*512? does it make difference? all default size in the code is 416 which is in yolov3-1cl |
@sanazss |
Could you add support for yolov3-spp model? https://github.com/pjreddie/darknet/blob/master/cfg/yolov3-spp.cfg
The text was updated successfully, but these errors were encountered: