-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Is there a bug in the OHEMSampler? #3677
Conversation
fix the bug in the ohem_sampler
Codecov Report
@@ Coverage Diff @@
## master #3677 +/- ##
==========================================
- Coverage 61.10% 61.06% -0.05%
==========================================
Files 216 216
Lines 15222 15318 +96
Branches 2530 2608 +78
==========================================
+ Hits 9302 9354 +52
- Misses 5458 5498 +40
- Partials 462 466 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
self.bbox_roi_extractor = context.bbox_roi_extractor[ | ||
context.current_stage] | ||
self.bbox_head = context.bbox_head[context.current_stage] | ||
self.bbox_head = self.context.bbox_head[self.context.current_stage] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is something wrong with the OHEM usage in cascade rcnn. May I ask if you would like to fix that? If not, you can add an assertion here and I will fix it soon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is something wrong with the OHEM usage in cascade rcnn. May I ask if you would like to fix that? If not, you can add an assertion here and I will fix it soon.
Yes, I'd like to fix that, but I only have time on weekends.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem
I fixed the OHEM usage problem in cascade rcnn,please have a check
I got the error(TypeError: forward() missing 1 required positional argument: 'x_reg') when i used the OHEMSampler in the DoublehandRCNN, so I checkd the ohem_sampler.py and double_roi_head.py.
line 27(double_roi_head.py) :
cls_score, bbox_pred = self.bbox_head(bbox_cls_feats, bbox_reg_feats)
line 37(ohem_sampler.py):
cls_score, _ = self.bbox_head(bbox_feats)
the arguments are different.
in the meantime, self.with_shared_head is in the double_roi_head.py but not in the ohem_sampler.py
so I did some fixes