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

cannot stat '/content/3DDFA_V2/crop_samples/img/*': No such file or directory #49

Open
pivcec opened this issue Feb 28, 2024 · 6 comments

Comments

@pivcec
Copy link

pivcec commented Feb 28, 2024

am trying to follow tutorial video and run colab from:

https://colab.research.google.com/github/camenduru/PanoHead-colab/blob/main/PanoHead_custom_colab.ipynb#scrollTo=v9wpwlGfiX2e

after running second block of code, the following error is produced:

/content/3DDFA_V2
/content/3DDFA_V2/bfm/bfm.py:34: FutureWarning: In the future `np.long` will be defined as the corresponding NumPy scalar.
  self.keypoints = bfm.get('keypoints').astype(np.long)  # fix bug
Traceback (most recent call last):
  File "/content/3DDFA_V2/recrop_images.py", line 322, in <module>
    main(args)
  File "/content/3DDFA_V2/recrop_images.py", line 183, in main
    tddfa = TDDFA(gpu_mode=gpu_mode, **cfg)
  File "/content/3DDFA_V2/TDDFA.py", line 34, in __init__
    self.bfm = BFMModel(
  File "/content/3DDFA_V2/bfm/bfm.py", line 34, in __init__
    self.keypoints = bfm.get('keypoints').astype(np.long)  # fix bug
  File "/usr/local/lib/python3.10/dist-packages/numpy/__init__.py", line 328, in __getattr__
    raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'long'. Did you mean: 'log'?
cp: cannot stat '/content/3DDFA_V2/crop_samples/img/*': No such file or directory
@ramshamashood
Copy link

I have same error need solution of this problem

@BuTTerK3ks
Copy link

On my local machine i installed numpy==1.23.5 which resolved the issue. numpy.long was removed in version 1.24.0

@bobgus39
Copy link

bobgus39 commented Jun 4, 2024

It doesn't work with numpy==1.23.5 as well

@Animus777
Copy link

It doesn't work with numpy==1.23.5 as well

I works for me with this version in Colab.

@Yeadon8888
Copy link

I have run !pip install --force-reinstall numpy==1.23.5
but still bug when i run the second like this
/content/3DDFA_V2
0% 0/1 [00:00<?, ?it/s]
Traceback (most recent call last):
File "/content/3DDFA_V2/recrop_images.py", line 322, in
main(args)
File "/content/3DDFA_V2/recrop_images.py", line 291, in main
cv2.imwrite(os.path.join(args.out_dir, os.path.basename(img_path).replace(".png",".jpg")), cropped_img)
cv2.error: OpenCV(4.8.0) /io/opencv/modules/imgcodecs/src/loadsave.cpp:787: error: (-215:Assertion failed) !_img.empty() in function 'imwrite'

cp: cannot stat '/content/3DDFA_V2/crop_samples/img/*': No such file or directory

@Animus777
Copy link

Animus777 commented Jul 16, 2024

I have run !pip install --force-reinstall numpy==1.23.5
but still bug when i run the second like this

You have to run it AFTER the first cell. Like this:

  1. Run first cell. Let it finish.
  2. run !pip install --force-reinstall numpy==1.23.5 (after finishing it'll ask you to restart runtime. Accept.)
  3. Run second cell (DO NOT run first one again.)

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

6 participants