Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Issue with demo.py #20

Open
ss8319 opened this issue Aug 6, 2024 · 1 comment
Open

Issue with demo.py #20

ss8319 opened this issue Aug 6, 2024 · 1 comment

Comments

@ss8319
Copy link

ss8319 commented Aug 6, 2024

Hi,

Thanks for your work here.

I am running the demo.py file using the downloaded my_video.avi that was shared. Can u advice what should be fixed?

To recreate my setup

conda create -n contrast python=3.9

conda activate contrast

pip install -r requirements.txt 

pip install facenet-pytorch
(contrast) azureuser@boneage-v100:~/cloudfiles/code/Users/contrast-phys/contrast-phys$ python demo/demo.py
Traceback (most recent call last):
  File "/mnt/batch/tasks/shared/LS_root/mounts/clusters/boneage-v100/code/Users/contrast-phys/contrast-phys/demo/demo.py", line 10, in <module>
    face_list, fps = face_detection(video_path='./S1_Bright Place_No Compress_Chinese.mp4')
  File "/mnt/batch/tasks/shared/LS_root/mounts/clusters/boneage-v100/code/Users/contrast-phys/contrast-phys/demo/face_detection.py", line 47, in face_detection
    face_list = np.transpose(face_list, (3,0,1,2)) # (C, T, H, W)
  File "<__array_function__ internals>", line 200, in transpose
  File "/anaconda/envs/contrast/lib/python3.9/site-packages/numpy/core/fromnumeric.py", line 668, in transpose
    return _wrapfunc(a, 'transpose', axes)
  File "/anaconda/envs/contrast/lib/python3.9/site-packages/numpy/core/fromnumeric.py", line 57, in _wrapfunc
    return bound(*args, **kwds)
ValueError: axes don't match array
@zhaodongsun
Copy link
Owner

Hi, it seems you used your own video in the demo. You can print the shape of face_list to check if the video is correctly loaded.

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

No branches or pull requests

2 participants