microsoft / SoftTeacher

Semi-Supervised Learning, Object Detection, ICCV2021
MIT License
892 stars 123 forks source link

Cascade RCNN with Soft Teacher does not run: _bbox_forward() missing 1 required positional argument: 'rois' #228

Open planaria158 opened 1 year ago

planaria158 commented 1 year ago

When trying to run Cascade RCNN with Soft Teacher, I get the following exception:

File "/...../python3.8/site-packages/mmdet/models/roi_heads/test_mixins.py", line 89, in simple_test_bboxes bbox_results = self._bbox_forward(x, rois) TypeError: _bbox_forward() missing 1 required positional argument: 'rois'

This problem was raised previously in #123 and #106, but neither was fully answered. Apparently Cascade RCNN's ROI heads will somehow use the incorrect test function.

There was never a satisfactory answer to how to fix this problem other than a cryptic response: "The dirty way I used before is that the feature and teacher on the teacher side are passed into the head as parameters, and then the teacher is used to make judgments in the head.."

  1. Has anyone successfully run Cascade RCNN with Soft Teacher?
  2. Does anyone know the fix to make the above problem work with Cascade RCNN?

Thank you in advance! Cheers, Mark