Mmdetection: AssertionError:assert isinstance(cfg, dict) and 'type' in cfg

Created on 1 Feb 2020  路  10Comments  路  Source: open-mmlab/mmdetection

image
What caused this error..Is there any solution?

Most helpful comment

where i add this type? is in the mmcv's config.py?

before:
dcn=dict(
modulated=False,
groups=32,
deformable_groups=1,
fallback_on_stride=False),

after:
dcn=dict(

modulated=False,

groups=32,

type='DCN',
deformable_groups=1,
fallback_on_stride=False),

All 10 comments

Traceback (most recent call last):
File "main.py", line 31, in
model_ensemble = get_model(config, model_dir)
File "main.py", line 6, in get_model
model = build_detector(config.model, test_cfg=config.test_cfg)
File "/home/tcexeexe/git/mmdetection-master/mmdet/models/builder.py", line 43, in build_detector
return build(cfg, DETECTORS, dict(train_cfg=train_cfg, test_cfg=test_cfg))
File "/home/tcexeexe/git/mmdetection-master/mmdet/models/builder.py", line 15, in build
return build_from_cfg(cfg, registry, default_args)
File "/home/tcexeexe/git/mmdetection-master/mmdet/utils/registry.py", line 79, in build_from_cfg
return obj_cls(args)
File "/home/tcexeexe/git/mmdetection-master/mmdet/models/detectors/cascade_rcnn.py", line 36, in __init__
self.backbone = builder.build_backbone(backbone)
File "/home/tcexeexe/git/mmdetection-master/mmdet/models/builder.py", line 19, in build_backbone
return build(cfg, BACKBONES)
File "/home/tcexeexe/git/mmdetection-master/mmdet/models/builder.py", line 15, in build
return build_from_cfg(cfg, registry, default_args)
File "/home/tcexeexe/git/mmdetection-master/mmdet/utils/registry.py", line 79, in build_from_cfg
return obj_cls(
args)
File "/home/tcexeexe/git/mmdetection-master/mmdet/models/backbones/resnet.py", line 427, in __init__
gen_attention_blocks=stage_with_gen_attention[i])
File "/home/tcexeexe/git/mmdetection-master/mmdet/models/backbones/resnet.py", line 284, in make_res_layer
(0 in gen_attention_blocks) else None))
File "/home/tcexeexe/git/mmdetection-master/mmdet/models/backbones/resnet.py", line 168, in __init__
bias=False)
File "/home/tcexeexe/git/mmdetection-master/mmdet/models/utils/conv_module.py", line 33, in build_conv_layer
assert isinstance(cfg, dict) and 'type' in cfg
AssertionError

Please follow the Error report issue template.

Please follow the Error report issue template.

OK,but l've solve this problem by add type='DCN' in config.py

I also meet the same problem is any solution?

I also meet the same problem is any solution?

have you try add " type='DCN' "?

where i add this type? is in the mmcv's config.py?

I also solve this problem by adding type='DCN' in config.py

before:
dcn=dict(
modulated=False,
groups=32,
deformable_groups=1,
fallback_on_stride=False),

after:
dcn=dict(
#modulated=False,
#groups=32,
type='DCN',
deformable_groups=1,
fallback_on_stride=False),

where i add this type? is in the mmcv's config.py?

before:
dcn=dict(
modulated=False,
groups=32,
deformable_groups=1,
fallback_on_stride=False),

after:
dcn=dict(

modulated=False,

groups=32,

type='DCN',
deformable_groups=1,
fallback_on_stride=False),

OK, thanks I will try.

I loaded the pretraining model of reppoints_moment_x101_dcn_fpn_2x_mt.py to train my dataset. Why can't I train DCN without type= 'DCN' in config, and can't I load DCN part of the pretrained model with type= 'DCN' @hellock

Was this page helpful?
0 / 5 - 0 ratings