contrast-phys icon indicating copy to clipboard operation
contrast-phys copied to clipboard

Issue with demo.py

Open ss8319 opened this issue 6 months ago • 1 comments

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

ss8319 avatar Aug 06 '24 02:08 ss8319