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

FileNotFoundError when loading SMPL model in gen_novel_pose.py #5

Open
bring-nirachornkul opened this issue Oct 9, 2024 · 0 comments

Comments

@bring-nirachornkul
Copy link

I am encountering a FileNotFoundError when trying to run the script gen_novel_pose.py to generate animation videos. The issue seems to be related to the path used for the SMPL model file. Here are the details:

python main/gsm/gen_novel_pose.py --network /mnt/DATA/Phongsiri/text-to-image/GSM/gsm_checkpoints/DeepFashion.pkl --outdir output --seq ../../assets/seq_novel_pose.npy --z_seeds 58 --reload_modules True

Error Message:

File "/mnt/DATA/Phongsiri/text-to-image/GSM/main/gsm/utils/graphics_utils.py", line 443, in load_model
    shell_base_verts, _faces, _aux = load_obj(base_shell_path, load_textures=False)
File "/mnt/DATA/Phongsiri/text-to-image/GSM/main/gsm/pytorch3d/pytorch3d/io/obj_io.py", line 225, in load_obj
    with _open_file(f, path_manager, "r") as f:
File "/mnt/DATA/Phongsiri/text-to-image/GSM/main/gsm/pytorch3d/pytorch3d/io/utils.py", line 28, in _open_file
    f = path_manager.open(f, mode)
File "/home/STUDENTS/pn0111/miniconda3/envs/gsm/lib/python3.10/site-packages/iopath/common/file_io.py", line 1062, in open
    bret = handler._open(path, mode, buffering=buffering, **kwargs)  # type: ignore
File "/home/STUDENTS/pn0111/miniconda3/envs/gsm/lib/python3.10/site-packages/iopath/common/file_io.py", line 645, in _open
    return open(  # type: ignore
FileNotFoundError: [Errno 2] No such file or directory: '../../assets/smpl/smpl_uv_no_hands_feet_ear.obj'

What I've Tried:

  • Verified that the file smpl_uv_no_hands_feet_ear.obj does exist in the assets/smpl directory.
  • Checked the relative path, and tried changing it to both an absolute path and a more straightforward relative path, but the issue persists.
  • The symbolic link was also verified to ensure it wasn’t broken, and the file has appropriate read permissions.

Environment:

  • Python Version: 3.10
  • PyTorch Version: 2.4.0
  • OS: Linux (x86_64)
  • CUDA Version: 12.4
  • RTX A6000 48 GB

Additional Notes:

  • The script also prints a warning regarding torch.load with weights_only=False. Is there any known compatibility issue with the .pkl files when used in this mode?
  • The issue may be related to how the path manager is handling paths for opening the .obj files.

Request: Could you please help investigate why the path is not being resolved properly despite the file being present? Any suggestions for handling this more gracefully or recommendations for alternative paths are appreciated.

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

1 participant