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

Fix incorrect path to Wholebody models + update README #21

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

barakyo
Copy link

@barakyo barakyo commented Dec 11, 2024

Background

When trying this out I encountered the following error:

Traceback (most recent call last):
  File "/home/user/StableAnimator/DWPose/skeleton_extraction.py", line 6, in <module>
    from dwpose_utils.dwpose_detector import dwpose_detector_aligned
  File "/home/user/StableAnimator/DWPose/dwpose_utils/dwpose_detector.py", line 57, in <module>
    dwpose_detector_aligned = DWposeDetectorAligned(device=device)
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/StableAnimator/DWPose/dwpose_utils/dwpose_detector.py", line 13, in __init__
    self.pose_estimation = Wholebody()
                           ^^^^^^^^^^^
  File "/home/user/StableAnimator/DWPose/dwpose_utils/wholebody.py", line 17, in __init__
    self.session_det = ort.InferenceSession(path_or_bytes=onnx_det, providers=providers)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/mambaforge/envs/stableanimator/lib/python3.11/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 465, in __init__
    self._create_inference_session(providers, provider_options, disabled_optimizers)
  File "/home/user/mambaforge/envs/stableanimator/lib/python3.11/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 526, in _create_inference_session
    sess = C.InferenceSession(session_options, self._model_path, True, self._read_config_from_model)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
onnxruntime.capi.onnxruntime_pybind11_state.NoSuchFile: [ONNXRuntimeError] : 3 : NO_SUCHFILE : Load model from path/checkpoints/DWPose/yolox_l.onnx failed:Load model path/checkpoints/DWPose/yolox_l.onnx failed. File doesn't exist

It was because the path for the Wholebody models had a path/ prefix. I removed this path and ran it from the root project dir and the command worked. Because of that, I also updated the README to show that you should run it from the root project dir.

@Francis-Rings
Copy link
Owner

Hi, thank you for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants