facebookresearch / adaptive_teacher

This repo provides the source code for "Cross-Domain Adaptive Teacher for Object Detection".
Other
183 stars 36 forks source link

ImportError: cannot import name 'FastRCNNOutputs' from 'detectron2.modeling.roi_heads.fast_rcnn' #3

Closed drickzsy closed 2 years ago

drickzsy commented 2 years ago

There is no FastRCNNOutputs in the detectron installed according to the installation steps, did I install it wrong?

yujheli commented 2 years ago

I think if you install the detectron2 correctly, you should be able to load the library.

krumo commented 2 years ago

Hi @yujheli, I'm also faced with the same problem. In the https://github.com/facebookresearch/detectron2/commit/11528ce083dc9ff83ee3a8f9086a1ef54d2a402f, the class FastRCNNOutputs is removed from detectron2.modeling.roi_heads.fast_rcnn So in the the latest version, detectron2 doesn't have this class. I think it would be better if you could consider to provide the version of detectron2 on which this repo is based.

litingfeng commented 2 years ago

Install previous version solved this problem for me: python -m pip install 'git+https://github.com/facebookresearch/detectron2.git@v0.5'

yujheli commented 2 years ago

I just found the version of detectron2 I was using is v0.3. I will update the readme.

darkhan-s commented 2 years ago

The issue seems to be solved here in a similar project

leoliu37 commented 2 years ago

This is the problem of detecron2 version, I solve it by installing suitable version in https://github.com/facebookresearch/detectron2/releases