Skip to content
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

inconsistency of mmcv or mmdetection? #16

Open
chengjiun opened this issue Jul 8, 2020 · 1 comment
Open

inconsistency of mmcv or mmdetection? #16

chengjiun opened this issue Jul 8, 2020 · 1 comment

Comments

@chengjiun
Copy link

I met this problem running demo/inference_demo.ipynb. It seems to be caused by a mismatch version of mmcv/mmdetection installed. It is fine if I switched back to use mmdetection config file ('faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py') with weights ('faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth').
The mmdetection==2.2.0+977dacb and mmcv==1.0rc were installed by directly compiled followed the mmdetection homepage.
Which version of mmcv and mmdetection should I use?

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-7-8ef91ae9ee21> in <module>
      1 # build the model from a config file and a checkpoint file
----> 2 model = init_detector(str(config_file), str(checkpoint_file), device='cuda:0')

~/Softwares/mmdetection/mmdet/apis/inference.py in init_detector(config, checkpoint, device)
     31                         f'but got {type(config)}')
     32     config.model.pretrained = None
---> 33     model = build_detector(config.model, test_cfg=config.test_cfg)
     34     if checkpoint is not None:
     35         checkpoint = load_checkpoint(model, checkpoint)

~/Softwares/mmdetection/mmdet/models/builder.py in build_detector(cfg, train_cfg, test_cfg)
     65 def build_detector(cfg, train_cfg=None, test_cfg=None):
     66     """Build detector."""
---> 67     return build(cfg, DETECTORS, dict(train_cfg=train_cfg, test_cfg=test_cfg))

~/Softwares/mmdetection/mmdet/models/builder.py in build(cfg, registry, default_args)
     30         return nn.Sequential(*modules)
     31     else:
---> 32         return build_from_cfg(cfg, registry, default_args)
     33 
     34 

~/Softwares/mmcv/mmcv/utils/registry.py in build_from_cfg(cfg, registry, default_args)
    165         for name, value in default_args.items():
    166             args.setdefault(name, value)
--> 167     return obj_cls(**args)

TypeError: __init__() got an unexpected keyword argument 'bbox_roi_extractor'
@songguanglu
Copy link
Collaborator

Hi, the inference code of TSD is not adaptive to the demo/inference_demo.ipynb and we will modify it in the next commit. Can you train with the TSD configuration?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants