-
Notifications
You must be signed in to change notification settings - Fork 150
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
Add detection_threshold arg for all Lightning adapters #987
Comments
@potipot @fstroth @ai-fast-track wdyt? |
Sounds good to me, we should go forward with this. |
@Anjum48 would you like to submit a PR? |
Ah, this is actually the way it should be. When calculating COCOMetric (or mAP), we don't put the confidence threshold on detections but keep the best 100 of them for each image. |
Ah wait, so are you saying that we should keep the threshold to 0? |
Thanks for the clarification @potipot! I guess I was coming from the angle that a custom metric may need a confidence threshold, hence the need for this (in my case I implemented the F2 score from this ongoing competition. I guess there might be some complexity in the future if you are using something like:
where |
yes exactly, I think it should be up to the metric to handle the predictions. For running inference here we use the same underlying functions of |
Ok @FraPochetti , @fstroth @ai-fast-track what do you guys think? I'm happy to close the PR as @potipot's suggestion makes a lot of sense |
as a counter argument for exposing that variable in model (or rather LightningModel) init - when user sets |
I don't think there is a need to close the PR. |
Hi @Anjum48, first of all, thanks again for all the effort here. We truly appreciate that. We have been discussing internally and, eventually, we have come to the conclusion that @potipot's idea makes the most sense. Once again, I hope you understand, and thanks for the exchange! |
No problems at all, I totally agree with you guys. Thanks for the great discourse - I learnt a lot! 😊 I'll go ahead and close the PR |
🚀 Feature
Is your feature request related to a problem? Please describe.
At the moment, the detection threshold for inside
validation_step
is at or near zero for Lightning adapters. This results in pessimistic validation performance due to false positives.icevision/icevision/models/ross/efficientdet/lightning/model_adapter.py
Line 50 in 9abbb09
icevision/icevision/models/ultralytics/yolov5/lightning/model_adapter.py
Line 51 in 9abbb09
Describe the solution you'd like
A clear and concise description of what you want to happen.
Add a kwarg in the init of the Lightning adapter
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Happy to submit a PR if you guys agree
The text was updated successfully, but these errors were encountered: