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

Error with pose_align.py on MacBook M3 Max Using Anaconda torch-metal Profile #62

Open
jnakrani opened this issue Jun 19, 2024 · 1 comment

Comments

@jnakrani
Copy link

jnakrani commented Jun 19, 2024

Hello @TZYSJTU

I am experiencing issues running pose_align.py from the MusePose repository on my MacBook M3 Max. Despite following the setup instructions in the README and installing all the required libraries and dependencies, I encounter errors when executing the script.

Environment:

  • OS: macOS
  • Device: MacBook M3 Max
  • Python Environment: Anaconda torch-metal profile
  • Python Version: 3.10
  • MusePose Version: 1.3.1
  • Platform: macOS-14.5-arm64-arm-64bit

I executed the following command:

python pose_align.py --imgfn_refer ./assets/images/ref.png --vidfn ./assets/videos/dance.mp4

###Observation###

  • Multiple warnings about missing modules despite it being installed correctly:
warnings.warn('Fail to import `MultiScaleDeformableAttention` from `mmcv.ops.multi_scale_deform_attn` ')
warnings.warn('The module `mmpose` is not installed. The package will have limited functionality.')
warnings.warn('The module `mmdet` is not installed. The package will have limited functionality.')
  • The script terminates with a NameError indicating that init_detector is not defined:
Traceback (most recent call last):
  File "/Users/jaydip/Documents/BCS/ML/MusePose/pose_align.py", line 556, in <module>
    main()
  File "/Users/jaydip/Documents/BCS/ML/MusePose/pose_align.py", line 551, in main
    run_align_video_with_filterPose.translate_smooth(args)
  File "/Users/jaydip/Documents/BCS/ML/MusePose/pose_align.py", line 270, in run_align_video_with_filterPose.translate_smooth
    detector = DWPoseDetector(
  File "/Users/jaydip/Documents/BCS/ML/MusePose/pose/script/dwpose.py", line 74, in __init__
    self.pose_estimation = Wholebody(det_config, det_ckpt, pose_config, pose_ckpt, device)
  File "/Users/jaydip/Documents/BCS/ML/MusePose/pose/script/wholebody.py", line 51, in __init__
    self.detector = init_detector(det_config, det_ckpt, device=device)
NameError: name 'init_detector' is not defined

Screnshot###

Screenshot 2024-06-19 at 2 48 33 PM

I would appreciate any guidance on resolving these issues. Thank you!

@jnakrani jnakrani changed the title setup issue on mac Error with pose_align.py on MacBook M3 Max Using Anaconda torch-metal Profile Jun 19, 2024
@seinfinity
Copy link

Hello @TZYSJTU

I am experiencing issues running pose_align.py from the MusePose repository on my MacBook M3 Max. Despite following the setup instructions in the README and installing all the required libraries and dependencies, I encounter errors when executing the script.

Environment:

  • OS: macOS
  • Device: MacBook M3 Max
  • Python Environment: Anaconda torch-metal profile
  • Python Version: 3.10
  • MusePose Version: 1.3.1
  • Platform: macOS-14.5-arm64-arm-64bit

I executed the following command:

python pose_align.py --imgfn_refer ./assets/images/ref.png --vidfn ./assets/videos/dance.mp4

###Observation###

  • Multiple warnings about missing modules despite it being installed correctly:
warnings.warn('Fail to import `MultiScaleDeformableAttention` from `mmcv.ops.multi_scale_deform_attn` ')
warnings.warn('The module `mmpose` is not installed. The package will have limited functionality.')
warnings.warn('The module `mmdet` is not installed. The package will have limited functionality.')
  • The script terminates with a NameError indicating that init_detector is not defined:
Traceback (most recent call last):
  File "/Users/jaydip/Documents/BCS/ML/MusePose/pose_align.py", line 556, in <module>
    main()
  File "/Users/jaydip/Documents/BCS/ML/MusePose/pose_align.py", line 551, in main
    run_align_video_with_filterPose.translate_smooth(args)
  File "/Users/jaydip/Documents/BCS/ML/MusePose/pose_align.py", line 270, in run_align_video_with_filterPose.translate_smooth
    detector = DWPoseDetector(
  File "/Users/jaydip/Documents/BCS/ML/MusePose/pose/script/dwpose.py", line 74, in __init__
    self.pose_estimation = Wholebody(det_config, det_ckpt, pose_config, pose_ckpt, device)
  File "/Users/jaydip/Documents/BCS/ML/MusePose/pose/script/wholebody.py", line 51, in __init__
    self.detector = init_detector(det_config, det_ckpt, device=device)
NameError: name 'init_detector' is not defined

Screnshot###

Screenshot 2024-06-19 at 2 48 33 PM

I would appreciate any guidance on resolving these issues. Thank you!

I added from mmdet.apis import init_detector to the dwpose.py file, and the issue was resolved!

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

No branches or pull requests

2 participants