open-mmlab / OpenMMLabCourse

OpenMMLab course index and stuff
https://open-mmlab.github.io/OpenMMLabCourse/
Other
1.04k stars 129 forks source link

Evaluation of Self Supervised Pre training Model: "Detecting" Problems in Downstream Tasks #28

Closed majintao1994 closed 1 year ago

majintao1994 commented 2 years ago

After I have extracted the weights of the pre training model, I need to ask the following questions when using this backone.pth to train the downstream detection tasks. What's wrong? Thank you

error: Traceback (most recent call last): File "/home/work/mmselftest/mmself/tools/train.py", line 187, in main() File "/home/work/mmselftest/mmself/tools/train.py", line 161, in main test_cfg=cfg.get('test_cfg')) File "/home/work/mmselftest/mmself/mmdet/models/builder.py", line 77, in build_detector return build(cfg, DETECTORS, dict(train_cfg=train_cfg, test_cfg=test_cfg)) File "/home/work/mmselftest/mmself/mmdet/models/builder.py", line 34, in build return build_from_cfg(cfg, registry, default_args) File "/home/ty/anaconda3/envs/trt2/lib/python3.7/site-packages/mmcv/utils/registry.py", line 182, in build_from_cfg raise type(e)(f'{obj_cls.name}: {e}') TypeError: FasterRCNN: ResNet: init() got an unexpected keyword argument 'init_cfg' my config file; base = 'faster_rcnn_r50_fpn_1x_coco.py'

model = dict( backbone=dict( frozen_stages=-1, init_cfg=dict( type='Pretrained', checkpoint='checkpoints/backbone_200.pth') ) )

optimizer

optimizer = dict( lr=0.02 * (1 / 8) )

Runner type

runner = dict(delete=True, type='IterBasedRunner', max_iters=9000)

checkpoint_config = dict(interval=3000)

evaluation = dict(interval=3000)

BizhuWu commented 1 year ago

Can you give me more details about the version of MMDetection you have installed?