airsplay / py-bottom-up-attention

PyTorch bottom-up attention with Detectron2
Apache License 2.0
229 stars 56 forks source link

Config '../configs/VG-Detection/faster_rcnn_R_101_C4_caffe.yaml' has no VERSION. Assuming it to be compatible with latest v2. #13

Open mamingyang112 opened 4 years ago

mamingyang112 commented 4 years ago

Traceback (most recent call last): File "/Users/mingyang.mmy/Documents/project/multimodel/detect/py-bottom-up-attention/demo/demo_feature_extraction.py", line 47, in cfg.merge_from_file("../configs/VG-Detection/faster_rcnn_R_101_C4_caffe.yaml") File "/Users/mingyang.mmy/opt/anaconda3/envs/python3.7/lib/python3.7/site-packages/detectron2/config/config.py", line 49, in merge_from_file self.merge_from_other_cfg(loaded_cfg) File "/Users/mingyang.mmy/opt/anaconda3/envs/python3.7/lib/python3.7/site-packages/fvcore/common/config.py", line 120, in merge_from_other_cfg return super().merge_from_other_cfg(cfg_other) File "/Users/mingyang.mmy/opt/anaconda3/envs/python3.7/lib/python3.7/site-packages/yacs/config.py", line 217, in merge_from_other_cfg _merge_a_into_b(cfg_other, self, self, []) File "/Users/mingyang.mmy/opt/anaconda3/envs/python3.7/lib/python3.7/site-packages/yacs/config.py", line 478, in _merge_a_into_b _merge_a_into_b(v, b[k], root, key_list + [k]) File "/Users/mingyang.mmy/opt/anaconda3/envs/python3.7/lib/python3.7/site-packages/yacs/config.py", line 478, in _merge_a_into_b _merge_a_into_b(v, b[k], root, key_list + [k]) File "/Users/mingyang.mmy/opt/anaconda3/envs/python3.7/lib/python3.7/site-packages/yacs/config.py", line 491, in _merge_a_into_b raise KeyError("Non-existent config key: {}".format(full_key)) KeyError: 'Non-existent config key: MODEL.PROPOSAL_GENERATOR.HID_CHANNELS' WARNING [08/18 16:15:39 d2.config.compat]: Config '../configs/VG-Detection/faster_rcnn_R_101_C4_caffe.yaml' has no VERSION. Assuming it to be compatible with latest v2.

Process finished with exit code 1

how can i solve it without changing the detectron2 version

Einstone-rose commented 4 years ago

I think you should add the key MODEL.PROPOSAL_GENERATOR.HID_CHANNELS in this file py-bottom-up-attention/detectron2/config/defaults.py

LilyLuo26 commented 4 years ago

I think you should add the key MODEL.PROPOSAL_GENERATOR.HID_CHANNELS in this file py-bottom-up-attention/detectron2/config/defaults.py

I have added the config key MODEL.PROPOSAL_GENERATOR.HID_CHANNELS, but it still returns the output:

Config '/content/py-bottom-up-attention/configs/VG-Detection/faster_rcnn_R_101_C4_caffe.yaml' has no VERSION. Assuming it to be compatible with latest v2. Skip loading parameter 'proposal_generator.rpn_head.conv.weight' to the model due to incompatible shapes: (512, 1024, 3, 3) in the checkpoint but (1024, 1024, 3, 3) in the model! You might want to double check if this is expected. Skip loading parameter 'proposal_generator.rpn_head.conv.bias' to the model due to incompatible shapes: (512,) in the checkpoint but (1024,) in the model! You might want to double check if this is expected. Skip loading parameter 'proposal_generator.rpn_head.objectness_logits.weight' to the model due to incompatible shapes: (12, 512, 1, 1) in the checkpoint but (12, 1024, 1, 1) in the model! You might want to double check if this is expected. Skip loading parameter 'proposal_generator.rpn_head.anchor_deltas.weight' to the model due to incompatible shapes: (48, 512, 1, 1) in the checkpoint but (48, 1024, 1, 1) in the model! You might want to double check if this is expected.

It seems that even add the key, the hid_channel still didn't updated in the model...

JosephGatto commented 4 years ago

I think you should add the key MODEL.PROPOSAL_GENERATOR.HID_CHANNELS in this file py-bottom-up-attention/detectron2/config/defaults.py

What is meant by adding the key? the defaults.py file currently has MODEL.PROPOSAL_GENERATOR.HID_CHANNELS=-1