-
Notifications
You must be signed in to change notification settings - Fork 557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: RotatedFasterRCNN: __init__() got an unexpected keyword argument 'bbox_head' #607
Comments
should be put in |
好的,谢谢您的解答 |
base = ['../rotated_faster_rcnn/rotated_faster_rcnn_r50_fpn_1x_dota_le90.py'] model = dict( |
base = ['../rotated_faster_rcnn/rotated_faster_rcnn_r50_fpn_1x_dota_le90.py']
model = dict(
bbox_head=dict(
reg_decoded_bbox=True,
loss_bbox=dict(type='GDLoss', loss_type='gwd', loss_weight=5.0)))
我在configs中的gwd改成rotated_faster_rcnn_r50_fpn_1x_dota_le90.py
然后在test_cfg=dict(
rpn=dict(
nms_pre=2000,
max_per_img=2000,
nms=dict(type='nms', iou_threshold=0.7),
min_bbox_size=0),
rcnn=dict(
nms_pre=2000,
min_bbox_size=0,
score_thr=0.05,
nms=dict(iou_thr=0.1),
max_per_img=2000)),
bbox_head=dict(
reg_decoded_bbox=True,
loss_bbox=dict(type='GDLoss', loss_type='gwd', loss_weight=5.0)))
出现这个 bbox_head,应如何改才能使在roi_head里
…------------------ 原始邮件 ------------------
发件人: "open-mmlab/mmrotate" ***@***.***>;
发送时间: 2022年11月13日(星期天) 上午9:59
***@***.***>;
***@***.******@***.***>;
主题: Re: [open-mmlab/mmrotate] TypeError: RotatedFasterRCNN: __init__() got an unexpected keyword argument 'bbox_head' (Issue #607)
Closed #607 as completed.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
sys.platform: linux
TorchVision: 0.8.1
|
In the new version of the config files, the 'bbox_head' dict is inside 'roi_head'. If one follows the old documentation, it results in this following issue - open-mmlab#607 This way 'bbox_head' is not repeated and the error is solved.
Branch
1.x branch https://mmrotate.readthedocs.io/en/1.x/
📚 The doc issue
sys.platform: linux
Python: 3.7.13 (default, Oct 18 2022, 18:57:03) [GCC 11.2.0]
CUDA available: True
GPU 0: NVIDIA GeForce RTX 2080 Ti
CUDA_HOME: /usr/local/cuda
NVCC: Cuda compilation tools, release 11.1, V11.1.105
GCC: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
PyTorch: 1.7.0
PyTorch compiling details: PyTorch built with:
TorchVision: 0.8.1
OpenCV: 4.6.0
MMCV: 1.7.0
MMCV Compiler: GCC 7.3
MMCV CUDA Compiler: 10.1
MMRotate: 0.3.3+4bbef14
2022-11-10 09:56:49,571 - mmrotate - INFO - Distributed training: False
2022-11-10 09:56:49,861 - mmrotate - INFO - Config:
2022-11-10 09:56:49,861 - mmrotate - INFO - Set random seed to 1427045959, deterministic: False
Traceback (most recent call last):
File "/root/miniconda3/envs/zyf/lib/python3.7/site-packages/mmcv/utils/registry.py", line 69, in build_from_cfg
return obj_cls(**args)
TypeError: init() got an unexpected keyword argument 'bbox_head'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "tools/train.py", line 192, in
main()
File "tools/train.py", line 165, in main
test_cfg=cfg.get('test_cfg'))
File "/root/autodl-tmp/mmrotate/mmrotate/models/builder.py", line 56, in build_detector
cfg, default_args=dict(train_cfg=train_cfg, test_cfg=test_cfg))
File "/root/miniconda3/envs/zyf/lib/python3.7/site-packages/mmcv/utils/registry.py", line 237, in build
return self.build_func(*args, **kwargs, registry=self)
File "/root/miniconda3/envs/zyf/lib/python3.7/site-packages/mmcv/cnn/builder.py", line 27, in build_model_from_cfg
return build_from_cfg(cfg, registry, default_args)
File "/root/miniconda3/envs/zyf/lib/python3.7/site-packages/mmcv/utils/registry.py", line 72, in build_from_cfg
raise type(e)(f'{obj_cls.name}: {e}')
TypeError: RotatedFasterRCNN: init() got an unexpected keyword argument 'bbox_head'
Suggest a potential alternative/fix
TypeError: RotatedFasterRCNN: init() got an unexpected keyword argument 'bbox_head'
The text was updated successfully, but these errors were encountered: