microsoft / RegionCLIP

[CVPR 2022] Official code for "RegionCLIP: Region-based Language-Image Pretraining"

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

KeyError: 'Non-existent config key: MODEL.CLIP'

QHCV opened this issue · comments

I have the following problem. Can a friend help me solve it.

AssertionError: Config file '../configs/LVISv1-InstanceSegmentation/CLIP_fast_rcnn_R_50_C4_custom_img.yaml' does not exist!
root@autodl-container-b8bc118052-eb86b211:~/autodl-fs/code# sh test.sh
Command Line Args: Namespace(config_file='./configs/LVISv1-InstanceSegmentation/CLIP_fast_rcnn_R_50_C4_custom_img.yaml', resume=False, eval_only=True, num_gpus=1, num_machines=1, machine_rank=0, dist_url='tcp://127.0.0.1:49152', opts=['MODEL.WEIGHTS', './pretrained_ckpt/regionclip/regionclip_pretrained-cc_rn50x4.pth', 'MODEL.CLIP.TEXT_EMB_PATH', './pretrained_ckpt/concept_emb/lvis_1203_cls_emb_rn50x4.pth', 'MODEL.CLIP.OFFLINE_RPN_CONFIG', './configs/LVISv1-InstanceSegmentation/mask_rcnn_R_50_FPN_1x.yaml', 'MODEL.CLIP.TEXT_EMB_DIM', '640', 'MODEL.RESNETS.DEPTH', '200', 'MODEL.ROI_BOX_HEAD.POOLER_RESOLUTION', '18', '\'])
Traceback (most recent call last):
File "/root/autodl-fs/code/./tools/train_net.py", line 170, in
launch(
File "/root/autodl-fs/code/detectron2/detectron2/engine/launch.py", line 84, in launch
main_func(*args)
File "/root/autodl-fs/code/./tools/train_net.py", line 133, in main
cfg = setup(args)
File "/root/autodl-fs/code/./tools/train_net.py", line 125, in setup
cfg.merge_from_file(args.config_file)
File "/root/autodl-fs/code/detectron2/detectron2/config/config.py", line 69, in merge_from_file
self.merge_from_other_cfg(loaded_cfg)
File "/root/miniconda3/lib/python3.9/site-packages/fvcore/common/config.py", line 132, in merge_from_other_cfg
return super().merge_from_other_cfg(cfg_other)
File "/root/miniconda3/lib/python3.9/site-packages/yacs/config.py", line 217, in merge_from_other_cfg
_merge_a_into_b(cfg_other, self, self, [])
File "/root/miniconda3/lib/python3.9/site-packages/yacs/config.py", line 478, in _merge_a_into_b
_merge_a_into_b(v, b[k], root, key_list + [k])
File "/root/miniconda3/lib/python3.9/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.CLIP'

I meet the same problem. Do you solve it now?

detectron2 installation error. Use the following command to install:
pip install -e .

Thank you for your reply!
Yes. I realize that there are some mistakes in detectron2.
I try to install it by following the introduction file. But it doesn't work by the message "metadata-generation-failed".
I solve this problem by using the following command:

!python3.10 -m pip install setuptools==59.0.1

And it works.