Cuogeihong / CEASC

The official implementation of CEASC
Apache License 2.0
106 stars 13 forks source link

调用configs/UAV/dynamic_fasterrcnn_res18_visdrone.py报错 #22

Closed yyq0828 closed 1 year ago

yyq0828 commented 1 year ago

您好,我在复现您的代码的时候,通过python tools/train.py configs/UAV/dynamic_fasterrcnn_res18_visdrone.py --work-dir work这个命令,但是运行出现了如下的报错 2023-11-24 00:02:16,742 - mmdet - INFO - Set random seed to 72903423, deterministic: False Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/mmcv/utils/registry.py", line 66, in build_from_cfg return obj_cls(*args) File "/usr/local/lib/python3.8/dist-packages/mmdet/models/detectors/faster_rcnn.py", line 19, in init super(FasterRCNN, self).init( File "/usr/local/lib/python3.8/dist-packages/mmdet/models/detectors/two_stage.py", line 41, in init self.rpn_head = build_head(rpnhead) File "/usr/local/lib/python3.8/dist-packages/mmdet/models/builder.py", line 40, in build_head return HEADS.build(cfg) File "/usr/local/lib/python3.8/dist-packages/mmcv/utils/registry.py", line 234, in build return self.build_func(args, **kwargs, registry=self) File "/usr/local/lib/python3.8/dist-packages/mmcv/cnn/builder.py", line 27, in build_model_from_cfg return build_from_cfg(cfg, registry, default_args) File "/usr/local/lib/python3.8/dist-packages/mmcv/utils/registry.py", line 58, in build_from_cfg raise KeyError( KeyError: 'RPNDYHeadExpand is not in the models registry'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "tools/train.py", line 238, in main() File "tools/train.py", line 208, in main model = build_detector( File "/usr/local/lib/python3.8/dist-packages/mmdet/models/builder.py", line 58, in build_detector return DETECTORS.build( File "/usr/local/lib/python3.8/dist-packages/mmcv/utils/registry.py", line 234, in build return self.build_func(*args, **kwargs, registry=self) File "/usr/local/lib/python3.8/dist-packages/mmcv/cnn/builder.py", line 27, in build_model_from_cfg return build_from_cfg(cfg, registry, default_args) File "/usr/local/lib/python3.8/dist-packages/mmcv/utils/registry.py", line 69, in build_from_cfg raise type(e)(f'{obj_cls.name}: {e}') KeyError: "FasterRCNN: 'RPNDYHeadExpand is not in the models registry'",我不太清楚我哪里配置的有问题,我运行别的配置文件是可以正常的训练的。麻烦您看看,非常感谢您。

yyq0828 commented 1 year ago

这个问题目前已经解决了,发现存在的问题是setuptools版本太高,通过降低版本解决问题 参考链接:https://blog.csdn.net/petSym/article/details/82840636 ,重新执行setup.py即可解决问题,Install Sparse Convolution Implementation时也没有问题了