You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#removebg
from transparent_background import Remover
import os
from mmcv.image import imread
from mmpose.apis import inference_topdown, init_model
from mmpose.registry import VISUALIZERS
from mmpose.structures import merge_data_samples
import matplotlib.pyplot as plt
from annotator.dwpose import util
import numpy as np
import cv2
from PIL import Image
#removebg
from transparent_background import Remover
import os
from mmcv.image import imread
from mmpose.apis import inference_topdown, init_model
from mmpose.registry import VISUALIZERS
from mmpose.structures import merge_data_samples
import matplotlib.pyplot as plt
from annotator.dwpose import util
import numpy as np
import cv2
from PIL import Image
temp = remover.process(img, type='[0,0,0]')
Image.fromarray(temp).save('testPose.png')
# inference on a single image
batch_results = inference_topdown(model, 'testPose.png')
os.remove('testPose.png')
pred_instances = batch_results[0].pred_instances
candidate = np.copy(pred_instances.keypoints)
return candidate
def mypose(img, only_cloth=False):
temp = remover.process(img, type='[0,0,0]')
Image.fromarray(temp).save('testPose.png')
if only_cloth:
model_cfg = '/home/ec2-user/cloth2user/weights/rtmpose-x_8xb32-270e_coco-wholebody-384x288_base.py'
ckpt = '/home/ec2-user/cloth2user/weights/trained_pose.pth'
device = 'cuda'
# init model
model = init_model(model_cfg, ckpt, device=device)
Reproduces the problem - error message
Traceback (most recent call last):
File "/home/ec2-user/ootd/OOTDiffusion/run/run_final.py", line 101, in
pose_data_cloth = getPose.mypose(cloth_img, only_cloth=True)
File "/home/ec2-user/ootd/OOTDiffusion/run/utils/getPose.py", line 85, in mypose
model = init_model(model_cfg, ckpt, device=device)
File "/home/ec2-user/cloth2user/DWPose/mmpose/mmpose/apis/inference.py", line 88, in init_model
config = Config.fromfile(config)
File "/opt/conda/envs/ootd_ver02/lib/python3.10/site-packages/mmengine/config/config.py", line 456, in fromfile
cfg_dict, cfg_text, env_variables = Config._file2dict(
File "/opt/conda/envs/ootd_ver02/lib/python3.10/site-packages/mmengine/config/config.py", line 940, in _file2dict
raise e
File "/opt/conda/envs/ootd_ver02/lib/python3.10/site-packages/mmengine/config/config.py", line 880, in _file2dict
base_cfg_path, scope = Config._get_cfg_path(
File "/opt/conda/envs/ootd_ver02/lib/python3.10/site-packages/mmengine/config/config.py", line 1272, in _get_cfg_path
raise e
File "/opt/conda/envs/ootd_ver02/lib/python3.10/site-packages/mmengine/config/config.py", line 1266, in _get_cfg_path
cfg_path = _get_external_cfg_path(package_path, cfg_path)
File "/opt/conda/envs/ootd_ver02/lib/python3.10/site-packages/mmengine/config/utils.py", line 93, in _get_external_cfg_path
model_cfg = _get_cfg_metainfo(package_path, cfg_file)
File "/opt/conda/envs/ootd_ver02/lib/python3.10/site-packages/mmengine/config/utils.py", line 61, in _get_cfg_metainfo
meta_index = load(meta_index_path)
File "/opt/conda/envs/ootd_ver02/lib/python3.10/site-packages/mmengine/fileio/io.py", line 852, in load
with StringIO(file_backend.get_text(file)) as f:
File "/opt/conda/envs/ootd_ver02/lib/python3.10/site-packages/mmengine/fileio/backends/local_backend.py", line 56, in get_text
with open(filepath, encoding=encoding) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/ec2-user/cloth2user/DWPose/mmpose/mmpose/.mim/model-index.yml'
Additional information
No response
The text was updated successfully, but these errors were encountered:
I have the same error when trying to use RTMPose3D:
Traceback (most recent call last):
File "/mmpose/projects/rtmpose3d/demo/body3d_img2pose_demo.py", line 441, in
main()
File "/mmpose/projects/rtmpose3d/demo/body3d_img2pose_demo.py", line 279, in main
pose_estimator = init_model(
File "/mmpose/mmpose/apis/inference.py", line 89, in init_model
config = Config.fromfile(config)
File "/opt/conda/lib/python3.10/site-packages/mmengine/config/config.py", line 461, in fromfile
cfg_dict, cfg_text, env_variables = Config._file2dict(
File "/opt/conda/lib/python3.10/site-packages/mmengine/config/config.py", line 947, in _file2dict
raise e
File "/opt/conda/lib/python3.10/site-packages/mmengine/config/config.py", line 887, in _file2dict
base_cfg_path, scope = Config._get_cfg_path(
File "/opt/conda/lib/python3.10/site-packages/mmengine/config/config.py", line 1279, in _get_cfg_path
raise e
File "/opt/conda/lib/python3.10/site-packages/mmengine/config/config.py", line 1273, in _get_cfg_path
cfg_path = _get_external_cfg_path(package_path, cfg_path)
File "/opt/conda/lib/python3.10/site-packages/mmengine/config/utils.py", line 93, in _get_external_cfg_path
model_cfg = _get_cfg_metainfo(package_path, cfg_file)
File "/opt/conda/lib/python3.10/site-packages/mmengine/config/utils.py", line 61, in _get_cfg_metainfo
meta_index = load(meta_index_path)
File "/opt/conda/lib/python3.10/site-packages/mmengine/fileio/io.py", line 852, in load
with StringIO(file_backend.get_text(file)) as f:
File "/opt/conda/lib/python3.10/site-packages/mmengine/fileio/backends/local_backend.py", line 56, in get_text
with open(filepath, encoding=encoding) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/mmpose/mmpose/.mim/model-index.yml'
Prerequisite
Environment
Name: mmcv
Version: 2.0.0
Summary: OpenMMLab Computer Vision Foundation
Home-page: https://github.com/open-mmlab/mmcv
Author: MMCV Contributors
Author-email: [email protected]
License: UNKNOWN
Location: /opt/conda/envs/ootd_ver02/lib/python3.10/site-packages
Requires: addict, mmengine, numpy, packaging, Pillow, pyyaml, yapf
Name: mmengine
Version: 0.8.4
Summary: Engine of OpenMMLab projects
Home-page: https://github.com/open-mmlab/mmengine
Author: MMEngine Authors
Author-email: [email protected]
License: UNKNOWN
Location: /opt/conda/envs/ootd_ver02/lib/python3.10/site-packages
Requires: addict, matplotlib, numpy, opencv-python, pyyaml, rich, termcolor, yapf
Required-by: mmcv
Reproduces the problem - code sample
import sys
sys.path.append('/home/ec2-user/cloth2user/DWPose/mmpose')
sys.path.append('/home/ec2-user/cloth2user/DWPose/ControlNet-v1-1-nightly')
sys.path.append("/home/ec2-user/cloth2user/transparent-background")
#removebg
from transparent_background import Remover
import os
from mmcv.image import imread
from mmpose.apis import inference_topdown, init_model
from mmpose.registry import VISUALIZERS
from mmpose.structures import merge_data_samples
import matplotlib.pyplot as plt
from annotator.dwpose import util
import numpy as np
import cv2
from PIL import Image
remover = Remover()
def draw_pose(pose, H, W, gray=True):
bodies = pose['bodies']
faces = pose['faces']
hands = pose['hands']
candidate = bodies['candidate']
subset = bodies['subset']
def draw_pose_body(pose, H, W):
bodies = pose['bodies']
def myPoseCandidate(img):
def mypose(img, only_cloth=False):
Reproduces the problem - command or script
import sys
sys.path.append('/home/ec2-user/cloth2user/DWPose/mmpose')
sys.path.append('/home/ec2-user/cloth2user/DWPose/ControlNet-v1-1-nightly')
sys.path.append("/home/ec2-user/cloth2user/transparent-background")
#removebg
from transparent_background import Remover
import os
from mmcv.image import imread
from mmpose.apis import inference_topdown, init_model
from mmpose.registry import VISUALIZERS
from mmpose.structures import merge_data_samples
import matplotlib.pyplot as plt
from annotator.dwpose import util
import numpy as np
import cv2
from PIL import Image
remover = Remover()
def draw_pose(pose, H, W, gray=True):
bodies = pose['bodies']
faces = pose['faces']
hands = pose['hands']
candidate = bodies['candidate']
subset = bodies['subset']
def draw_pose_body(pose, H, W):
bodies = pose['bodies']
def myPoseCandidate(img):
def mypose(img, only_cloth=False):
Reproduces the problem - error message
Traceback (most recent call last):
File "/home/ec2-user/ootd/OOTDiffusion/run/run_final.py", line 101, in
pose_data_cloth = getPose.mypose(cloth_img, only_cloth=True)
File "/home/ec2-user/ootd/OOTDiffusion/run/utils/getPose.py", line 85, in mypose
model = init_model(model_cfg, ckpt, device=device)
File "/home/ec2-user/cloth2user/DWPose/mmpose/mmpose/apis/inference.py", line 88, in init_model
config = Config.fromfile(config)
File "/opt/conda/envs/ootd_ver02/lib/python3.10/site-packages/mmengine/config/config.py", line 456, in fromfile
cfg_dict, cfg_text, env_variables = Config._file2dict(
File "/opt/conda/envs/ootd_ver02/lib/python3.10/site-packages/mmengine/config/config.py", line 940, in _file2dict
raise e
File "/opt/conda/envs/ootd_ver02/lib/python3.10/site-packages/mmengine/config/config.py", line 880, in _file2dict
base_cfg_path, scope = Config._get_cfg_path(
File "/opt/conda/envs/ootd_ver02/lib/python3.10/site-packages/mmengine/config/config.py", line 1272, in _get_cfg_path
raise e
File "/opt/conda/envs/ootd_ver02/lib/python3.10/site-packages/mmengine/config/config.py", line 1266, in _get_cfg_path
cfg_path = _get_external_cfg_path(package_path, cfg_path)
File "/opt/conda/envs/ootd_ver02/lib/python3.10/site-packages/mmengine/config/utils.py", line 93, in _get_external_cfg_path
model_cfg = _get_cfg_metainfo(package_path, cfg_file)
File "/opt/conda/envs/ootd_ver02/lib/python3.10/site-packages/mmengine/config/utils.py", line 61, in _get_cfg_metainfo
meta_index = load(meta_index_path)
File "/opt/conda/envs/ootd_ver02/lib/python3.10/site-packages/mmengine/fileio/io.py", line 852, in load
with StringIO(file_backend.get_text(file)) as f:
File "/opt/conda/envs/ootd_ver02/lib/python3.10/site-packages/mmengine/fileio/backends/local_backend.py", line 56, in get_text
with open(filepath, encoding=encoding) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/ec2-user/cloth2user/DWPose/mmpose/mmpose/.mim/model-index.yml'
Additional information
No response
The text was updated successfully, but these errors were encountered: