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

KeyError: 'Non-existent config key: MODEL.DENSEPOSE_ON' #5169

Closed
FurkanGozukara opened this issue Dec 5, 2023 · 1 comment
Closed

KeyError: 'Non-existent config key: MODEL.DENSEPOSE_ON' #5169

FurkanGozukara opened this issue Dec 5, 2023 · 1 comment

Comments

@FurkanGozukara
Copy link

FurkanGozukara commented Dec 5, 2023

I have installed like below

pip install git+https://github.com/facebookresearch/detectron2.git

it is working

the problem is when I try like below I am getting below error

I think you fixed this issue how?

@andrewjong @malcolmgarner-movement @ak9250

import cv2
import torch
from detectron2.engine import DefaultPredictor
from detectron2.config import get_cfg
from detectron2.utils.visualizer import Visualizer
from detectron2.data import MetadataCatalog

def setup_cfg():
    cfg = get_cfg()
    cfg.merge_from_file("densepose_rcnn_R_101_FPN_DL_s1x.yaml")
    cfg.MODEL.WEIGHTS = "model_final_844d15.pkl"
    cfg.MODEL.DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
    return cfg
Traceback (most recent call last):
  File "G:\magic_animate\compose_densepose\pose_maker.py", line 45, in <module>
    process_video('ex1.mp4', 'output_video.mp4')
  File "G:\magic_animate\compose_densepose\pose_maker.py", line 18, in process_video
    cfg = setup_cfg()
  File "G:\magic_animate\compose_densepose\pose_maker.py", line 11, in setup_cfg
    cfg.merge_from_file("densepose_rcnn_R_50_FPN_s1x.yaml")
  File "G:\magic_animate\compose_densepose\detectron2\venv\lib\site-packages\detectron2\config\config.py", line 69, in merge_from_file
    self.merge_from_other_cfg(loaded_cfg)
  File "G:\magic_animate\compose_densepose\detectron2\venv\lib\site-packages\fvcore\common\config.py", line 132, in merge_from_other_cfg
    return super().merge_from_other_cfg(cfg_other)
  File "G:\magic_animate\compose_densepose\detectron2\venv\lib\site-packages\yacs\config.py", line 217, in merge_from_other_cfg
    _merge_a_into_b(cfg_other, self, self, [])
  File "G:\magic_animate\compose_densepose\detectron2\venv\lib\site-packages\yacs\config.py", line 478, in _merge_a_into_b
    _merge_a_into_b(v, b[k], root, key_list + [k])
  File "G:\magic_animate\compose_densepose\detectron2\venv\lib\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.DENSEPOSE_ON'
Press any key to continue . . .
@github-actions github-actions bot added the needs-more-info More info is needed to complete the issue label Dec 5, 2023
Copy link

github-actions bot commented Dec 5, 2023

You've chosen to report an unexpected problem or bug. Unless you already know the root cause of it, please include details about it by filling the issue template.
The following information is missing: "Instructions To Reproduce the Issue and Full Logs"; "Your Environment";

@github-actions github-actions bot removed the needs-more-info More info is needed to complete the issue label Dec 5, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant