SoftTeacher icon indicating copy to clipboard operation
SoftTeacher copied to clipboard

将Detector更换为cascade,会出现TypeError: _bbox_forward() missing 1 required positional argument: 'rois'

Open lihuikenny opened this issue 4 years ago • 3 comments

thirdparty/mmdetection-2.17.0/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'

怎么样快速修复这个问题呢?谢谢

lihuikenny avatar Nov 28 '21 08:11 lihuikenny

可以参考这个https://github.com/microsoft/SoftTeacher/issues/106 我没想到比较优雅的实现方式。。

MendelXu avatar Nov 29 '21 02:11 MendelXu

我其实还是不太理解,为啥会缺少,缺少stage参数,是不是在head中判断,如果是teacher模型就不要进行simple_test_bboxes。按理说,teacher模型和student模型是一样的,什么原因导致缺失了stage参数。因为对这部分原理不太了解,所以,不知道怎么修改代码。还请相助,谢谢


发件人: MendelXu @.> 发送时间: 2021年11月29日 10:10 收件人: microsoft/SoftTeacher @.> 抄送: lihuikenny @.>; Author @.> 主题: Re: [microsoft/SoftTeacher] 将Detector更换为cascade,会出现TypeError: _bbox_forward() missing 1 required positional argument: 'rois' (Issue #123)

可以参考这个https://github.com/microsoft/SoftTeacher/issues/106,我没想到比较优雅的实现方式。。https://github.com/microsoft/SoftTeacher/issues/106%EF%BC%8C%E6%88%91%E6%B2%A1%E6%83%B3%E5%88%B0%E6%AF%94%E8%BE%83%E4%BC%98%E9%9B%85%E7%9A%84%E5%AE%9E%E7%8E%B0%E6%96%B9%E5%BC%8F%E3%80%82%E3%80%82

― You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/microsoft/SoftTeacher/issues/123#issuecomment-981229778, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALD4VKODS2JABDOHBDGN77DUOLOJXANCNFSM5I5A6ASQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

lihuikenny avatar Nov 29 '21 03:11 lihuikenny

其实是因为_bbox_forward函数需要显式地传入stage参数,你可以看看mmdetection里面cascade roi head的实现。

MendelXu avatar Nov 29 '21 03:11 MendelXu