face-alignment icon indicating copy to clipboard operation
face-alignment copied to clipboard

At least one stride in the given numpy array is negative

Open moldach opened this issue 3 years ago • 3 comments

I'm trying to use the first-order-model's crop-video.py which calls face-alignment and I'm getting the following error:

(venv) mtg@mtg-ThinkPad-P53:~/r-projects/first-order-model$ python crop-video.py --inp drivers/laugh1.mp4 
Downloading: "https://www.adrianbulat.com/downloads/python-fan/s3fd-619a316812.pth" to /home/mtg/.cache/torch/hub/checkpoints/s3fd-619a316812.pth
100%|██████████████████████████████| 85.7M/85.7M [00:18<00:00, 4.77MB/s]
Downloading: "https://www.adrianbulat.com/downloads/python-fan/2DFAN4-cd938726ad.zip" to /home/mtg/.cache/torch/hub/checkpoints/2DFAN4-cd938726ad.zip
100%|██████████████████████████████████████████████████████████████████| 91.9M/91.9M [00:14<00:00, 6.42MB/s]
WARNING:root:Warning: the frame size for reading (1080, 1920) is different from the source frame size (1920, 1080).
0it [00:00, ?it/s]
Traceback (most recent call last):
  File "crop-video.py", line 154, in <module>
    commands = process_video(args)
  File "crop-video.py", line 96, in process_video
    bboxes =  extract_bbox(frame, fa)
  File "crop-video.py", line 22, in extract_bbox
    bboxes = fa.face_detector.detect_from_image(frame[..., ::-1])
  File "/home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages/face_alignment/detection/sfd/sfd_detector.py", line 44, in detect_from_image
    bboxlist = detect(self.face_detector, image, device=self.device)[0]
  File "/home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages/face_alignment/detection/sfd/detect.py", line 15, in detect
    img = torch.from_numpy(img).to(device, dtype=torch.float32)
ValueError: At least one stride in the given numpy array is negative, and tensors with negative strides are not currently supported. (You can probably work around this by making a copy of your array  with array.copy().) (venv) mtg@mtg-ThinkPad-P53:~/r-projects/first-order-model$ python crop-video.py --inp drivers/laugh1.mp4 
Downloading: "https://www.adrianbulat.com/downloads/python-fan/s3fd-619a316812.pth" to /home/mtg/.cache/torch/hub/checkpoints/s3fd-619a316812.pth
100%|██████████████████████████████| 85.7M/85.7M [00:18<00:00, 4.77MB/s]
Downloading: "https://www.adrianbulat.com/downloads/python-fan/2DFAN4-cd938726ad.zip" to /home/mtg/.cache/torch/hub/checkpoints/2DFAN4-cd938726ad.zip
100%|██████████████████████████████████████████████████████████████████| 91.9M/91.9M [00:14<00:00, 6.42MB/s]
WARNING:root:Warning: the frame size for reading (1080, 1920) is different from the source frame size (1920, 1080).
0it [00:00, ?it/s]
Traceback (most recent call last):
  File "crop-video.py", line 154, in <module>
    commands = process_video(args)
  File "crop-video.py", line 96, in process_video
    bboxes =  extract_bbox(frame, fa)
  File "crop-video.py", line 22, in extract_bbox
    bboxes = fa.face_detector.detect_from_image(frame[..., ::-1])
  File "/home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages/face_alignment/detection/sfd/sfd_detector.py", line 44, in detect_from_image
    bboxlist = detect(self.face_detector, image, device=self.device)[0]
  File "/home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages/face_alignment/detection/sfd/detect.py", line 15, in detect
    img = torch.from_numpy(img).to(device, dtype=torch.float32)
ValueError: At least one stride in the given numpy array is negative, and tensors with negative strides are not currently supported. (You can probably work around this by making a copy of your array  with array.copy().) 

Any idea what's going wrong here?

moldach avatar Mar 17 '21 01:03 moldach

@moldach could you please install it from source, the issue should be fixed on master. I will push the changes to pip this weekend.

1adrianb avatar Mar 17 '21 01:03 1adrianb

Okay, @1adrianb I've also tried to install it from source like this, but I also get the same error:

mtg@mtg-ThinkPad-P53:~/r-projects/first-order-model$ source venv/bin/activate
(venv) mtg@mtg-ThinkPad-P53:~/r-projects/first-order-model$ cd face-alignment/
(venv) mtg@mtg-ThinkPad-P53:~/r-projects/first-order-model/face-alignment$ pip install -r requirements.txt 
Requirement already satisfied: opencv-python in /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages (from -r requirements.txt (line 1)) (4.5.1.48)
Requirement already satisfied: scipy>=0.17.0 in /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages (from -r requirements.txt (line 2)) (1.1.0)
Requirement already satisfied: scikit-image in /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages (from -r requirements.txt (line 3)) (0.17.2)
Requirement already satisfied: numba in /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages (from -r requirements.txt (line 4)) (0.53.0)
Requirement already satisfied: numpy>=1.8.2 in /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages (from scipy>=0.17.0->-r requirements.txt (line 2)) (1.19.5)
Requirement already satisfied: setuptools in /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages (from numba->-r requirements.txt (line 4)) (28.8.0)
Requirement already satisfied: llvmlite<0.37,>=0.36.0rc1 in /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages (from numba->-r requirements.txt (line 4)) (0.36.0)
Requirement already satisfied: PyWavelets>=1.1.1 in /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages (from scikit-image->-r requirements.txt (line 3)) (1.1.1)
Requirement already satisfied: pillow!=7.1.0,!=7.1.1,>=4.3.0 in /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages (from scikit-image->-r requirements.txt (line 3)) (5.2.0)
Requirement already satisfied: imageio>=2.3.0 in /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages (from scikit-image->-r requirements.txt (line 3)) (2.3.0)
Requirement already satisfied: networkx>=2.0 in /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages (from scikit-image->-r requirements.txt (line 3)) (2.1)
Requirement already satisfied: matplotlib!=3.0.0,>=2.0.0 in /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages (from scikit-image->-r requirements.txt (line 3)) (2.2.2)
Requirement already satisfied: tifffile>=2019.7.26 in /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages (from scikit-image->-r requirements.txt (line 3)) (2020.9.3)
Requirement already satisfied: six>=1.10 in /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages (from matplotlib!=3.0.0,>=2.0.0->scikit-image->-r requirements.txt (line 3)) (1.11.0)
Requirement already satisfied: pytz in /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages (from matplotlib!=3.0.0,>=2.0.0->scikit-image->-r requirements.txt (line 3)) (2018.5)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages (from matplotlib!=3.0.0,>=2.0.0->scikit-image->-r requirements.txt (line 3)) (2.2.0)
Requirement already satisfied: cycler>=0.10 in /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages (from matplotlib!=3.0.0,>=2.0.0->scikit-image->-r requirements.txt (line 3)) (0.10.0)
Requirement already satisfied: kiwisolver>=1.0.1 in /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages (from matplotlib!=3.0.0,>=2.0.0->scikit-image->-r requirements.txt (line 3)) (1.0.1)
Requirement already satisfied: python-dateutil>=2.1 in /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages (from matplotlib!=3.0.0,>=2.0.0->scikit-image->-r requirements.txt (line 3)) (2.7.3)
Requirement already satisfied: decorator>=4.1.0 in /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages (from networkx>=2.0->scikit-image->-r requirements.txt (line 3)) (4.3.0)
(venv) mtg@mtg-ThinkPad-P53:~/r-projects/first-order-model/face-alignment$ python setup.py install
/home/mtg/.pyenv/versions/3.6.3/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
  warnings.warn(msg)
running install
running bdist_egg
running egg_info
writing face_alignment.egg-info/PKG-INFO
writing dependency_links to face_alignment.egg-info/dependency_links.txt
writing requirements to face_alignment.egg-info/requires.txt
writing top-level names to face_alignment.egg-info/top_level.txt
reading manifest file 'face_alignment.egg-info/SOURCES.txt'
writing manifest file 'face_alignment.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/face_alignment
creating build/bdist.linux-x86_64/egg/face_alignment/detection
creating build/bdist.linux-x86_64/egg/face_alignment/detection/blazeface
copying build/lib/face_alignment/detection/blazeface/detect.py -> build/bdist.linux-x86_64/egg/face_alignment/detection/blazeface
copying build/lib/face_alignment/detection/blazeface/net_blazeface.py -> build/bdist.linux-x86_64/egg/face_alignment/detection/blazeface
copying build/lib/face_alignment/detection/blazeface/blazeface_detector.py -> build/bdist.linux-x86_64/egg/face_alignment/detection/blazeface
copying build/lib/face_alignment/detection/blazeface/utils.py -> build/bdist.linux-x86_64/egg/face_alignment/detection/blazeface
copying build/lib/face_alignment/detection/blazeface/__init__.py -> build/bdist.linux-x86_64/egg/face_alignment/detection/blazeface
creating build/bdist.linux-x86_64/egg/face_alignment/detection/dlib
copying build/lib/face_alignment/detection/dlib/dlib_detector.py -> build/bdist.linux-x86_64/egg/face_alignment/detection/dlib
copying build/lib/face_alignment/detection/dlib/__init__.py -> build/bdist.linux-x86_64/egg/face_alignment/detection/dlib
copying build/lib/face_alignment/detection/core.py -> build/bdist.linux-x86_64/egg/face_alignment/detection
creating build/bdist.linux-x86_64/egg/face_alignment/detection/folder
copying build/lib/face_alignment/detection/folder/folder_detector.py -> build/bdist.linux-x86_64/egg/face_alignment/detection/folder
copying build/lib/face_alignment/detection/folder/__init__.py -> build/bdist.linux-x86_64/egg/face_alignment/detection/folder
creating build/bdist.linux-x86_64/egg/face_alignment/detection/sfd
copying build/lib/face_alignment/detection/sfd/detect.py -> build/bdist.linux-x86_64/egg/face_alignment/detection/sfd
copying build/lib/face_alignment/detection/sfd/net_s3fd.py -> build/bdist.linux-x86_64/egg/face_alignment/detection/sfd
copying build/lib/face_alignment/detection/sfd/sfd_detector.py -> build/bdist.linux-x86_64/egg/face_alignment/detection/sfd
copying build/lib/face_alignment/detection/sfd/bbox.py -> build/bdist.linux-x86_64/egg/face_alignment/detection/sfd
copying build/lib/face_alignment/detection/sfd/__init__.py -> build/bdist.linux-x86_64/egg/face_alignment/detection/sfd
copying build/lib/face_alignment/detection/__init__.py -> build/bdist.linux-x86_64/egg/face_alignment/detection
copying build/lib/face_alignment/utils.py -> build/bdist.linux-x86_64/egg/face_alignment
copying build/lib/face_alignment/api.py -> build/bdist.linux-x86_64/egg/face_alignment
copying build/lib/face_alignment/__init__.py -> build/bdist.linux-x86_64/egg/face_alignment
byte-compiling build/bdist.linux-x86_64/egg/face_alignment/detection/blazeface/detect.py to detect.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/face_alignment/detection/blazeface/net_blazeface.py to net_blazeface.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/face_alignment/detection/blazeface/blazeface_detector.py to blazeface_detector.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/face_alignment/detection/blazeface/utils.py to utils.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/face_alignment/detection/blazeface/__init__.py to __init__.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/face_alignment/detection/dlib/dlib_detector.py to dlib_detector.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/face_alignment/detection/dlib/__init__.py to __init__.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/face_alignment/detection/core.py to core.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/face_alignment/detection/folder/folder_detector.py to folder_detector.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/face_alignment/detection/folder/__init__.py to __init__.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/face_alignment/detection/sfd/detect.py to detect.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/face_alignment/detection/sfd/net_s3fd.py to net_s3fd.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/face_alignment/detection/sfd/sfd_detector.py to sfd_detector.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/face_alignment/detection/sfd/bbox.py to bbox.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/face_alignment/detection/sfd/__init__.py to __init__.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/face_alignment/detection/__init__.py to __init__.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/face_alignment/utils.py to utils.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/face_alignment/api.py to api.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/face_alignment/__init__.py to __init__.cpython-36.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying face_alignment.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying face_alignment.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying face_alignment.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying face_alignment.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying face_alignment.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying face_alignment.egg-info/zip-safe -> build/bdist.linux-x86_64/egg/EGG-INFO
creating 'dist/face_alignment-1.3.3-py3.6.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing face_alignment-1.3.3-py3.6.egg
Copying face_alignment-1.3.3-py3.6.egg to /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages
Adding face-alignment 1.3.3 to easy-install.pth file

Installed /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages/face_alignment-1.3.3-py3.6.egg
Processing dependencies for face-alignment==1.3.3
Searching for numba==0.53.0
Best match: numba 0.53.0
Adding numba 0.53.0 to easy-install.pth file

Using /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages
Searching for tqdm==4.24.0
Best match: tqdm 4.24.0
Adding tqdm 4.24.0 to easy-install.pth file
Installing tqdm script to /home/mtg/r-projects/first-order-model/venv/bin

Using /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages
Searching for opencv-python==4.5.1.48
Best match: opencv-python 4.5.1.48
Adding opencv-python 4.5.1.48 to easy-install.pth file

Using /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages
Searching for scikit-image==0.17.2
Best match: scikit-image 0.17.2
Adding scikit-image 0.17.2 to easy-install.pth file
Installing skivi script to /home/mtg/r-projects/first-order-model/venv/bin

Using /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages
Searching for scipy==1.1.0
Best match: scipy 1.1.0
Adding scipy 1.1.0 to easy-install.pth file

Using /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages
Searching for numpy==1.19.5
Best match: numpy 1.19.5
Adding numpy 1.19.5 to easy-install.pth file
Installing f2py script to /home/mtg/r-projects/first-order-model/venv/bin
Installing f2py3 script to /home/mtg/r-projects/first-order-model/venv/bin
Installing f2py3.6 script to /home/mtg/r-projects/first-order-model/venv/bin

Using /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages
Searching for torch==1.8.0
Best match: torch 1.8.0
Adding torch 1.8.0 to easy-install.pth file
Installing convert-caffe2-to-onnx script to /home/mtg/r-projects/first-order-model/venv/bin
Installing convert-onnx-to-caffe2 script to /home/mtg/r-projects/first-order-model/venv/bin

Using /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages
Searching for setuptools==28.8.0
Best match: setuptools 28.8.0
Adding setuptools 28.8.0 to easy-install.pth file
Installing easy_install script to /home/mtg/r-projects/first-order-model/venv/bin
Installing easy_install-3.5 script to /home/mtg/r-projects/first-order-model/venv/bin

Using /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages
Searching for llvmlite==0.36.0
Best match: llvmlite 0.36.0
Adding llvmlite 0.36.0 to easy-install.pth file

Using /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages
Searching for matplotlib==2.2.2
Best match: matplotlib 2.2.2
Adding matplotlib 2.2.2 to easy-install.pth file

Using /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages
Searching for PyWavelets==1.1.1
Best match: PyWavelets 1.1.1
Adding PyWavelets 1.1.1 to easy-install.pth file

Using /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages
Searching for networkx==2.1
Best match: networkx 2.1
Adding networkx 2.1 to easy-install.pth file

Using /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages
Searching for imageio==2.3.0
Best match: imageio 2.3.0
Adding imageio 2.3.0 to easy-install.pth file
Installing imageio_download_bin script to /home/mtg/r-projects/first-order-model/venv/bin
Installing imageio_remove_bin script to /home/mtg/r-projects/first-order-model/venv/bin

Using /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages
Searching for tifffile==2020.9.3
Best match: tifffile 2020.9.3
Adding tifffile 2020.9.3 to easy-install.pth file
Installing lsm2bin script to /home/mtg/r-projects/first-order-model/venv/bin
Installing tifffile script to /home/mtg/r-projects/first-order-model/venv/bin

Using /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages
Searching for Pillow==5.2.0
Best match: Pillow 5.2.0
Adding Pillow 5.2.0 to easy-install.pth file

Using /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages
Searching for dataclasses==0.8
Best match: dataclasses 0.8
Adding dataclasses 0.8 to easy-install.pth file

Using /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages
Searching for typing-extensions==3.7.4.3
Best match: typing-extensions 3.7.4.3
Adding typing-extensions 3.7.4.3 to easy-install.pth file

Using /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages
Searching for python-dateutil==2.7.3
Best match: python-dateutil 2.7.3
Adding python-dateutil 2.7.3 to easy-install.pth file

Using /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages
Searching for pytz==2018.5
Best match: pytz 2018.5
Adding pytz 2018.5 to easy-install.pth file

Using /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages
Searching for kiwisolver==1.0.1
Best match: kiwisolver 1.0.1
Adding kiwisolver 1.0.1 to easy-install.pth file

Using /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages
Searching for six==1.11.0
Best match: six 1.11.0
Adding six 1.11.0 to easy-install.pth file

Using /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages
Searching for pyparsing==2.2.0
Best match: pyparsing 2.2.0
Adding pyparsing 2.2.0 to easy-install.pth file

Using /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages
Searching for cycler==0.10.0
Best match: cycler 0.10.0
Adding cycler 0.10.0 to easy-install.pth file

Using /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages
Searching for decorator==4.3.0
Best match: decorator 4.3.0
Adding decorator 4.3.0 to easy-install.pth file

Using /home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages
Finished processing dependencies for face-alignment==1.3.3
(venv) mtg@mtg-ThinkPad-P53:~/r-projects/first-order-model/face-alignment$ cd ..
(venv) mtg@mtg-ThinkPad-P53:~/r-projects/first-order-model$ python crop-video.py --inp drivers/laugh1.mp4
WARNING:root:Warning: the frame size for reading (1080, 1920) is different from the source frame size (1920, 1080).
0it [00:00, ?it/s]
Traceback (most recent call last):
  File "crop-video.py", line 154, in <module>
    commands = process_video(args)
  File "crop-video.py", line 96, in process_video
    bboxes =  extract_bbox(frame, fa)
  File "crop-video.py", line 22, in extract_bbox
    bboxes = fa.face_detector.detect_from_image(frame[..., ::-1])
  File "/home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages/face_alignment/detection/sfd/sfd_detector.py", line 44, in detect_from_image
    bboxlist = detect(self.face_detector, image, device=self.device)[0]
  File "/home/mtg/r-projects/first-order-model/venv/lib/python3.6/site-packages/face_alignment/detection/sfd/detect.py", line 15, in detect
    img = torch.from_numpy(img).to(device, dtype=torch.float32)
ValueError: At least one stride in the given numpy array is negative, and tensors with negative strides are not currently supported. (You can probably work around this by making a copy of your array  with array.copy().) 

pip freeze

(venv) mtg@mtg-ThinkPad-P53:~/r-projects/first-order-model$ pip freeze
cffi==1.11.5
cloudpickle==0.5.3
cycler==0.10.0
dask==0.18.2
dataclasses==0.8
decorator==4.3.0
face-alignment==1.3.3
imageio==2.3.0
kiwisolver==1.0.1
llvmlite==0.36.0
matplotlib==2.2.2
networkx==2.1
numba==0.53.0
numpy==1.19.5
opencv-python==4.5.1.48
pandas==0.23.4
Pillow==5.2.0
pycparser==2.18
pygit==0.1
pyparsing==2.2.0
python-dateutil==2.7.3
pytz==2018.5
PyWavelets==1.1.1
PyYAML==5.1
scikit-image==0.17.2
scikit-learn==0.19.2
scipy==1.1.0
six==1.11.0
tifffile==2020.9.3
toolz==0.9.0
torch==1.8.0
torchvision==0.2.1
tqdm==4.24.0
typing-extensions==3.7.4.3

moldach avatar Mar 17 '21 21:03 moldach

It doesn't like that you have installed the latest version: Current version: https://github.com/1adrianb/face-alignment/blob/2bcfcc6ea20d0104d48942737639827fd3d5e816/face_alignment/detection/sfd/detect.py#L15

Line present in the error: img = torch.from_numpy(img).to(device, dtype=torch.float32)

1adrianb avatar Mar 17 '21 22:03 1adrianb