I try to run landmark demo using resnet50 model in model zoo,command like:
%run demo/test_landmark_detector.py \
--checkpoint checkpoint/landmark_resnet50.pth --config configs/landmark_detect/landmark_detect_resnet.py \
it turns out
TypeError Traceback (most recent call last)
/share1/home/sxj/Project/mmfashion/demo/test_landmark_detector.py in ()
99
100 if name == 'main':
--> 101 main()
/share1/home/sxj/Project/mmfashion/demo/test_landmark_detector.py in main()
75 # 1100765 11001100 256256 resize to 224224
76 # build model and load checkpoint
---> 77 model = build_landmark_detector(cfg.model)
78 print('model built')
79 load_checkpoint(model, args.checkpoint)
/share1/home/sxj/Project/mmfashion/mmfashion/models/builder.py in _build_module(cfg, registry, default_args)
28 for name, value in default_args.items():
29 args.setdefault(name, value)
---> 30 return obj_type(**args)
31
32
/share1/home/sxj/Project/mmfashion/mmfashion/models/builder.py in _build_module(cfg, registry, default_args)
28 for name, value in default_args.items():
29 args.setdefault(name, value)
---> 30 return obj_type(**args)
31
32
TypeError: init() got an unexpected keyword argument 'layer_setting'
But run
%run demo/run_landmark_detector.py \
--checkpoint checkpoint/landmark_vgg16.pth --config configs/landmark_detect/landmark_detect_vgg.py \
is OK.
I would appreciate it if you can help me
I try to run landmark demo using resnet50 model in model zoo,command like: %run demo/test_landmark_detector.py \ --checkpoint checkpoint/landmark_resnet50.pth --config configs/landmark_detect/landmark_detect_resnet.py \ it turns out TypeError Traceback (most recent call last) /share1/home/sxj/Project/mmfashion/demo/test_landmark_detector.py in()
99
100 if name == 'main':
--> 101 main()
/share1/home/sxj/Project/mmfashion/demo/test_landmark_detector.py in main() 75 # 1100765 11001100 256256 resize to 224224 76 # build model and load checkpoint ---> 77 model = build_landmark_detector(cfg.model) 78 print('model built') 79 load_checkpoint(model, args.checkpoint)
/share1/home/sxj/Project/mmfashion/mmfashion/models/builder.py in build_landmark_detector(cfg) 77 78 def build_landmark_detector(cfg): ---> 79 return build(cfg, LANDMARKDETECTOR) 80 81
/share1/home/sxj/Project/mmfashion/mmfashion/models/builder.py in build(cfg, registry, default_args) 36 return nn.Sequential(*modules) 37 else: ---> 38 return _build_module(cfg, registry, default_args) 39 40
/share1/home/sxj/Project/mmfashion/mmfashion/models/builder.py in _build_module(cfg, registry, default_args) 28 for name, value in default_args.items(): 29 args.setdefault(name, value) ---> 30 return obj_type(**args) 31 32
/share1/home/sxj/Project/mmfashion/mmfashion/models/landmark_detector/landmark_detector.py in init(self, backbone, global_pool, landmark_feature_extractor, visibility_classifier, landmark_regression, pretrained) 17 super(LandmarkDetector, self).init() 18 ---> 19 self.backbone = builder.build_backbone(backbone) 20 self.global_pool = builder.build_global_pool(global_pool) 21 self.landmark_feature_extractor = \
/share1/home/sxj/Project/mmfashion/mmfashion/models/builder.py in build_backbone(cfg) 40 41 def build_backbone(cfg): ---> 42 return build(cfg, BACKBONES) 43 44
/share1/home/sxj/Project/mmfashion/mmfashion/models/builder.py in build(cfg, registry, default_args) 36 return nn.Sequential(*modules) 37 else: ---> 38 return _build_module(cfg, registry, default_args) 39 40
/share1/home/sxj/Project/mmfashion/mmfashion/models/builder.py in _build_module(cfg, registry, default_args) 28 for name, value in default_args.items(): 29 args.setdefault(name, value) ---> 30 return obj_type(**args) 31 32
TypeError: init() got an unexpected keyword argument 'layer_setting'
But run %run demo/run_landmark_detector.py \ --checkpoint checkpoint/landmark_vgg16.pth --config configs/landmark_detect/landmark_detect_vgg.py \ is OK. I would appreciate it if you can help me