Chasel-Tsui / mmdet-rfla

ECCV22: RFLA
MIT License
254 stars 23 forks source link

PRPNHead not found #7

Closed XiaoyuWant closed 1 year ago

XiaoyuWant commented 1 year ago

When running the train script, error happens:

Traceback (most recent call last):
  File "/root/mmdetection/mmdet-rfla/tools/train.py", line 15, in <module>
    from mmdet.apis import set_random_seed, train_detector
  File "/root/mmdetection/mmdet-rfla/mmdet/apis/__init__.py", line 1, in <module>
    from .inference import (async_inference_detector, inference_detector,
  File "/root/mmdetection/mmdet-rfla/mmdet/apis/inference.py", line 11, in <module>
    from mmdet.datasets import replace_ImageToTensor
  File "/root/mmdetection/mmdet-rfla/mmdet/datasets/__init__.py", line 10, in <module>
    from .utils import (NumClassCheckHook, get_loading_pipeline,
  File "/root/mmdetection/mmdet-rfla/mmdet/datasets/utils.py", line 9, in <module>
    from mmdet.models.dense_heads import PRPNHead, GARPNHead, RPNHead
ImportError: cannot import name 'PRPNHead' from 'mmdet.models.dense_heads' (/root/mmdetection/mmdet-rfla/mmdet/models/dense_heads/__init__.py)

The problem is from mmdet.models.dense_heads import PRPNHead, GARPNHead, RPNHead. The PRPNHead is not found in dense_heads, and is also not registered in init file. Wonder if you missed to add this module?

Chasel-Tsui commented 1 year ago

When running the train script, error happens:

Traceback (most recent call last):
  File "/root/mmdetection/mmdet-rfla/tools/train.py", line 15, in <module>
    from mmdet.apis import set_random_seed, train_detector
  File "/root/mmdetection/mmdet-rfla/mmdet/apis/__init__.py", line 1, in <module>
    from .inference import (async_inference_detector, inference_detector,
  File "/root/mmdetection/mmdet-rfla/mmdet/apis/inference.py", line 11, in <module>
    from mmdet.datasets import replace_ImageToTensor
  File "/root/mmdetection/mmdet-rfla/mmdet/datasets/__init__.py", line 10, in <module>
    from .utils import (NumClassCheckHook, get_loading_pipeline,
  File "/root/mmdetection/mmdet-rfla/mmdet/datasets/utils.py", line 9, in <module>
    from mmdet.models.dense_heads import PRPNHead, GARPNHead, RPNHead
ImportError: cannot import name 'PRPNHead' from 'mmdet.models.dense_heads' (/root/mmdetection/mmdet-rfla/mmdet/models/dense_heads/__init__.py)

The problem is from mmdet.models.dense_heads import PRPNHead, GARPNHead, RPNHead. The PRPNHead is not found in dense_heads, and is also not registered in init file. Wonder if you missed to add this module?

Thanks for your comment! It is a bug. You can delete the PRPNHead then this problem can be solved.