1adrianb / face-alignment

:fire: 2D and 3D Face alignment library build using pytorch
https://www.adrianbulat.com
BSD 3-Clause "New" or "Revised" License
6.88k stars 1.33k forks source link

RuntimeError: Unrecognized data format #321

Closed ohjarwa closed 1 year ago

ohjarwa commented 1 year ago

Hi! RuntimeError: Unrecognized data format when I use facealignment. The concrete error is below:

Traceback (most recent call last): File "F:\codeplace\FLAME\neural-head-avatars\python_scripts\video_to_dataset.py", line 890, in create_dataset(args) File "F:\codeplace\FLAME\neural-head-avatars\python_scripts\video_to_dataset.py", line 872, in create_dataset converter.annotate_landmarks() File "F:\codeplace\FLAME\neural-head-avatars\python_scripts\video_to_dataset.py", line 495, in annotate_landmarks lmks_face, bboxes_faces = self._annotate_facial_landmarks() File "F:\codeplace\FLAME\neural-head-avatars\python_scripts\video_to_dataset.py", line 379, in _annotate_facial_landmarks fa = face_alignment.FaceAlignment( File "F:\Program\Anaconda3\envs\nhaa\lib\site-packages\face_alignment\api.py", line 84, in init self.face_alignment_net = torch.jit.load( File "F:\Program\Anaconda3\envs\nhaa\lib\site-packages\torch\jit_serialization.py", line 162, in load cpp_module = torch._C.import_ir_module(cu, str(f), map_location, _extra_files) RuntimeError: Unrecognized data format

and my environment: absl-py 1.2.0 pypi_0 pypi aiohttp 3.8.1 pypi_0 pypi aiosignal 1.2.0 pypi_0 pypi argon2-cffi 21.3.0 pypi_0 pypi argon2-cffi-bindings 21.2.0 pypi_0 pypi asttokens 2.0.8 pypi_0 pypi astunparse 1.6.3 pypi_0 pypi async-timeout 4.0.2 pypi_0 pypi attrs 22.1.0 pypi_0 pypi backcall 0.2.0 pypi_0 pypi beautifulsoup4 4.11.1 pypi_0 pypi blas 1.0 mkl https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main bleach 5.0.1 pypi_0 pypi brotlipy 0.7.0 py39h2bbff1b_1003 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main ca-certificates 2022.07.19 haa95532_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main cachetools 5.2.0 pypi_0 pypi certifi 2022.6.15 py39haa95532_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main cffi 1.15.1 py39h2bbff1b_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main charset-normalizer 2.0.4 pyhd3eb1b0_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main chumpy 0.70 pypi_0 pypi colorama 0.4.5 pypi_0 pypi configargparse 1.5.3 pypi_0 pypi cpbd 1.0.7 pypi_0 pypi cryptography 37.0.1 py39h21b164f_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main cudatoolkit 11.3.1 h59b6b97_2 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main cycler 0.11.0 pypi_0 pypi debugpy 1.6.3 pypi_0 pypi decorator 5.1.1 pypi_0 pypi defusedxml 0.7.1 pypi_0 pypi entrypoints 0.4 pypi_0 pypi executing 0.10.0 pypi_0 pypi face-alignment 1.3.4 pypi_0 pypi face-detection-tflite 0.5.0 pypi_0 pypi fastjsonschema 2.16.1 pypi_0 pypi flatbuffers 1.12 pypi_0 pypi fonttools 4.35.0 pypi_0 pypi freetype 2.10.4 hd328e21_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main frozenlist 1.3.1 pypi_0 pypi fsspec 2022.7.1 pypi_0 pypi future 0.18.2 pypi_0 pypi fvcore 0.1.5.post20220512 pypi_0 pypi gast 0.4.0 pypi_0 pypi google-auth 2.10.0 pypi_0 pypi google-auth-oauthlib 0.4.6 pypi_0 pypi google-pasta 0.2.0 pypi_0 pypi grpcio 1.48.0 pypi_0 pypi h5py 3.7.0 pypi_0 pypi idna 3.3 pyhd3eb1b0_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main imageio 2.21.1 pypi_0 pypi importlib-metadata 4.12.0 pypi_0 pypi intel-openmp 2021.4.0 haa95532_3556 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main iopath 0.1.10 pypi_0 pypi ipykernel 6.15.1 pypi_0 pypi ipython 8.4.0 pypi_0 pypi ipython-genutils 0.2.0 pypi_0 pypi ipywidgets 7.7.1 pypi_0 pypi jedi 0.18.1 pypi_0 pypi jinja2 3.1.2 pypi_0 pypi joblib 1.1.0 pypi_0 pypi jpeg 9e h2bbff1b_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main jsonschema 4.10.0 pypi_0 pypi jupyter 1.0.0 pypi_0 pypi jupyter-client 7.3.4 pypi_0 pypi jupyter-console 6.4.4 pypi_0 pypi jupyter-core 4.11.1 pypi_0 pypi jupyterlab-pygments 0.2.2 pypi_0 pypi jupyterlab-widgets 1.1.1 pypi_0 pypi keras 2.9.0 pypi_0 pypi keras-preprocessing 1.1.2 pypi_0 pypi kiwisolver 1.4.4 pypi_0 pypi libclang 14.0.6 pypi_0 pypi libpng 1.6.37 h2a8f88b_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main libtiff 4.2.0 he0120a3_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main libuv 1.40.0 he774522_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main libwebp 1.2.2 h2bbff1b_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main llvmlite 0.39.0 pypi_0 pypi lpips 0.1.4 pypi_0 pypi lxml 4.9.1 pypi_0 pypi lz4-c 1.9.3 h2bbff1b_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main markdown 3.4.1 pypi_0 pypi markupsafe 2.1.1 pypi_0 pypi matplotlib 3.5.3 pypi_0 pypi matplotlib-inline 0.1.5 pypi_0 pypi mistune 0.8.4 pypi_0 pypi mkl 2021.4.0 haa95532_640 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main mkl-service 2.4.0 py39h2bbff1b_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main mkl_fft 1.3.1 py39h277e83a_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main mkl_random 1.2.2 py39hf11a4ad_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main multidict 6.0.2 pypi_0 pypi nbclient 0.6.6 pypi_0 pypi nbconvert 6.5.3 pypi_0 pypi nbformat 5.4.0 pypi_0 pypi nest-asyncio 1.5.5 pypi_0 pypi networkx 2.8.5 pypi_0 pypi nha 0.1.0 dev_0 notebook 6.4.12 pypi_0 pypi numba 0.56.0 pypi_0 pypi numpy 1.21.0 pypi_0 pypi oauthlib 3.2.0 pypi_0 pypi opencv-python 4.6.0.66 pypi_0 pypi openssl 1.1.1q h2bbff1b_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main opt-einsum 3.3.0 pypi_0 pypi packaging 21.3 pypi_0 pypi pandocfilters 1.5.0 pypi_0 pypi parso 0.8.3 pypi_0 pypi pickleshare 0.7.5 pypi_0 pypi pillow 9.2.0 py39hdc2b20a_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main pip 22.1.2 py39haa95532_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main portalocker 2.5.1 pypi_0 pypi prometheus-client 0.14.1 pypi_0 pypi prompt-toolkit 3.0.30 pypi_0 pypi protobuf 3.19.4 pypi_0 pypi psutil 5.9.1 pypi_0 pypi pure-eval 0.2.2 pypi_0 pypi pyasn1 0.4.8 pypi_0 pypi pyasn1-modules 0.2.8 pypi_0 pypi pycparser 2.21 pyhd3eb1b0_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main pygments 2.13.0 pypi_0 pypi pyopenssl 22.0.0 pyhd3eb1b0_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main pyparsing 3.0.9 pypi_0 pypi pyrsistent 0.18.1 pypi_0 pypi pysocks 1.7.1 py39haa95532_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main python 3.9.12 h6244533_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main python-dateutil 2.8.2 pypi_0 pypi pytorch 1.12.1 py3.9_cuda11.3_cudnn8_0 pytorch pytorch-lightning 1.2.4 pypi_0 pypi pytorch-msssim 0.2.1 pypi_0 pypi pytorch-mutex 1.0 cuda pytorch pytorch3d 0.7.0 pypi_0 pypi pywavelets 1.3.0 pypi_0 pypi pywin32 304 pypi_0 pypi pywinpty 2.0.7 pypi_0 pypi pyyaml 6.0 pypi_0 pypi pyzmq 23.2.1 pypi_0 pypi qtconsole 5.3.1 pypi_0 pypi qtpy 2.2.0 pypi_0 pypi requests 2.28.1 py39haa95532_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main requests-oauthlib 1.3.1 pypi_0 pypi rsa 4.9 pypi_0 pypi scikit-image 0.19.3 pypi_0 pypi scikit-learn 1.1.2 pypi_0 pypi scipy 1.9.0 pypi_0 pypi send2trash 1.8.0 pypi_0 pypi setuptools 61.2.0 py39haa95532_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main six 1.16.0 pyhd3eb1b0_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main soupsieve 2.3.2.post1 pypi_0 pypi sqlite 3.39.2 h2bbff1b_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main stack-data 0.4.0 pypi_0 pypi tabulate 0.8.10 pypi_0 pypi tensorboard 2.9.1 pypi_0 pypi tensorboard-data-server 0.6.1 pypi_0 pypi tensorboard-plugin-wit 1.8.1 pypi_0 pypi tensorflow 2.9.1 pypi_0 pypi tensorflow-estimator 2.9.0 pypi_0 pypi tensorflow-io-gcs-filesystem 0.26.0 pypi_0 pypi termcolor 1.1.0 pypi_0 pypi terminado 0.15.0 pypi_0 pypi threadpoolctl 3.1.0 pypi_0 pypi tifffile 2022.8.12 pypi_0 pypi tinycss2 1.1.1 pypi_0 pypi tk 8.6.12 h2bbff1b_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main torchaudio 0.12.1 py39_cu113 pytorch torchscope 0.1.0 pypi_0 pypi torchvision 0.13.1 py39_cu113 pytorch tornado 6.2 pypi_0 pypi tqdm 4.64.0 pypi_0 pypi traitlets 5.3.0 pypi_0 pypi typing_extensions 4.3.0 py39haa95532_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main tzdata 2022a hda174b7_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main urllib3 1.26.11 py39haa95532_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main vc 14.2 h21ff451_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main vs2015_runtime 14.27.29016 h5e58377_2 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main wcwidth 0.2.5 pypi_0 pypi webencodings 0.5.1 pypi_0 pypi werkzeug 2.2.2 pypi_0 pypi wheel 0.37.1 pyhd3eb1b0_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main widgetsnbextension 3.6.1 pypi_0 pypi win_inet_pton 1.1.0 py39haa95532_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main wincertstore 0.2 py39haa95532_2 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main wrapt 1.14.1 pypi_0 pypi xz 5.2.5 h8cc25b3_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main yacs 0.1.8 pypi_0 pypi yarl 1.8.1 pypi_0 pypi zipp 3.8.1 pypi_0 pypi zlib 1.2.12 h8cc25b3_2 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main zstd 1.5.2 h19a0ad4_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main

Thank you!!

1adrianb commented 1 year ago

Apologies for the delay, I would assume you addressed this by know. I was unable to reproduce it under your env. Perhaps an error occurred while downloading the models, in which case re-downloading them, should fix the issue.

Vadim2S commented 1 year ago

I am stuck same issue and found a cure. I my case it is was non-english symbols in user name. Therefore PyTorch can not download weights and fall with this vague error.

The cure is simple (for windows): set TORCH_HOME=c:\.torch_home\ or another pure english-name directory.