FuxiCV / MeInGame

MeInGame: Create a Game Character Face from a Single Portrait, AAAI 2021
MIT License
653 stars 120 forks source link

No module named 'face_alignment.models' #12

Open Laborant opened 3 years ago

Laborant commented 3 years ago

Please help me, tell how fix it python main.py -m test -i demo /home/b/anaconda3/envs/fit/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint8 = np.dtype([("qint8", np.int8, 1)]) /home/b/anaconda3/envs/fit/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_quint8 = np.dtype([("quint8", np.uint8, 1)]) /home/b/anaconda3/envs/fit/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint16 = np.dtype([("qint16", np.int16, 1)]) /home/b/anaconda3/envs/fit/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_quint16 = np.dtype([("quint16", np.uint16, 1)]) /home/b/anaconda3/envs/fit/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint32 = np.dtype([("qint32", np.int32, 1)]) /home/b/anaconda3/envs/fit/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. np_resource = np.dtype([("resource", np.ubyte, 1)]) /home/b/anaconda3/envs/fit/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint8 = np.dtype([("qint8", np.int8, 1)]) /home/b/anaconda3/envs/fit/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_quint8 = np.dtype([("quint8", np.uint8, 1)]) /home/b/anaconda3/envs/fit/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint16 = np.dtype([("qint16", np.int16, 1)]) /home/b/anaconda3/envs/fit/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_quint16 = np.dtype([("quint16", np.uint16, 1)]) /home/b/anaconda3/envs/fit/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint32 = np.dtype([("qint32", np.int32, 1)]) /home/b/anaconda3/envs/fit/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. np_resource = np.dtype([("resource", np.ubyte, 1)]) Traceback (most recent call last): File "main.py", line 10, in <module> from uv_inpainting import UVInpainting File "/home/b/MeInGame/uv_inpainting.py", line 25, in <module> from lib.image_cropper import ImageCropper File "/home/b/MeInGame/lib/image_cropper.py", line 7, in <module> from lib import face_align File "/home/b/MeInGame/lib/face_align.py", line 9, in <module> from face_alignment.models import FAN, ResNetDepth ModuleNotFoundError: No module named 'face_alignment.models'

Laborant commented 3 years ago

My conda list

Name Version Build Channel

_libgcc_mutex 0.1 main
_tflow_select 2.1.0 gpu
absl-py 0.11.0 pyhd3eb1b0_1
astor 0.8.1 py36h06a4308_0
blas 1.0 mkl
bzip2 1.0.8 h7b6447c_0
c-ares 1.17.1 h27cfd23_0
ca-certificates 2021.1.19 h06a4308_0
certifi 2020.12.5 py36h06a4308_0
cmake 3.19.6 h973ab73_0
coverage 5.5 py36h27cfd23_2
cudatoolkit 10.1.243 h6bb024c_0
cudnn 7.6.5 cuda10.1_0
cupti 10.1.168 0
cycler 0.10.0 pypi_0 pypi cython 0.29.22 py36h2531618_0
dataclasses 0.8 pypi_0 pypi decorator 4.4.2 pypi_0 pypi dlib 19.21.1 pypi_0 pypi expat 2.2.10 he6710b0_2
face-alignment 1.3.3 pypi_0 pypi fvcore 0.1.3.post20210227 pypi_0 pypi gast 0.2.2 pypi_0 pypi google-pasta 0.2.0 py_0
grpcio 1.36.0 py36h2157cd5_1
h5py 2.10.0 py36hd6299e0_1
hdf5 1.10.6 hb1b8bf9_0
imageio 2.9.0 pypi_0 pypi importlib-metadata 2.0.0 py_1
intel-openmp 2020.2 254
iopath 0.1.4 pypi_0 pypi joblib 1.0.1 pypi_0 pypi keras-applications 1.0.8 py_1
keras-preprocessing 1.1.2 pyhd3eb1b0_0
kiwisolver 1.3.1 pypi_0 pypi krb5 1.18.2 h173b8e3_0
ld_impl_linux-64 2.33.1 h53a641e_7
libcurl 7.71.1 h20c2e04_1
libedit 3.1.20191231 h14c3975_1
libffi 3.3 he6710b0_2
libgcc-ng 9.1.0 hdf63c60_0
libgfortran-ng 7.3.0 hdf63c60_0
libprotobuf 3.14.0 h8c45485_0
libssh2 1.9.0 h1ba5d50_1
libstdcxx-ng 9.1.0 hdf63c60_0
libuv 1.40.0 h7b6447c_0
llvmlite 0.35.0 pypi_0 pypi lz4-c 1.9.3 h2531618_0
markdown 3.3.4 py36h06a4308_0
matplotlib 3.3.4 pypi_0 pypi mkl 2020.2 256
mkl-service 2.3.0 py36he8ac12f_0
mkl_fft 1.3.0 py36h54f3939_0
mkl_random 1.1.1 py36h0573a6f_0
ncurses 6.2 he6710b0_1
networkx 2.5 pypi_0 pypi numba 0.52.0 pypi_0 pypi numpy 1.19.5 pypi_0 pypi opencv-python 4.5.1.48 pypi_0 pypi openssl 1.1.1j h27cfd23_0
pillow 8.1.1 pypi_0 pypi pip 21.0.1 py36h06a4308_0
portalocker 2.2.1 pypi_0 pypi protobuf 3.14.0 py36h2531618_1
pyparsing 2.4.7 pypi_0 pypi python 3.6.13 hdb3f193_0
python-dateutil 2.8.1 pypi_0 pypi pytorch3d 0.2.0 pypi_0 pypi pywavelets 1.1.1 pypi_0 pypi pyyaml 5.4.1 pypi_0 pypi readline 8.1 h27cfd23_0
rhash 1.4.1 h3c74f83_1
scikit-image 0.17.2 pypi_0 pypi scikit-learn 0.24.1 pypi_0 pypi scipy 1.5.2 py36h0b6359f_0
setuptools 52.0.0 py36h06a4308_0
six 1.15.0 py36h06a4308_0
sqlite 3.33.0 h62c20be_0
tabulate 0.8.9 pypi_0 pypi tensorboard 1.14.0 py36hf484d3e_0
tensorflow 1.14.0 gpu_py36h3fb9ad6_0
tensorflow-base 1.14.0 gpu_py36he45bfe2_0
tensorflow-estimator 1.14.0 py_0
tensorflow-gpu 1.14.0 pypi_0 pypi termcolor 1.1.0 py36h06a4308_1
threadpoolctl 2.1.0 pypi_0 pypi tifffile 2020.9.3 pypi_0 pypi tk 8.6.10 hbc83047_0
torch 1.4.0+cu100 pypi_0 pypi torchvision 0.5.0+cu100 pypi_0 pypi tqdm 4.58.0 pypi_0 pypi werkzeug 1.0.1 pyhd3eb1b0_0
wheel 0.36.2 pyhd3eb1b0_0
wrapt 1.12.1 py36h7b6447c_1
xz 5.2.5 h7b6447c_0
yacs 0.1.8 pypi_0 pypi zipp 3.4.0 pyhd3eb1b0_0
zlib 1.2.11 h7b6447c_3
zstd 1.4.5 h9ceee32_0

Kenny-Li2023 commented 3 years ago

(face_meln) user02@lthpc:~/liweijie/MeInGame$ python main.py -m test -i demo 2021-03-10 18:02:11.886652: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda-10.0/lib64:/usr/local/cuda-10.0/lib64:/usr/local/lib: 2021-03-10 18:02:11.886720: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine. Traceback (most recent call last): File "main.py", line 10, in from uv_inpainting import UVInpainting File "/home/user02/liweijie/MeInGame/uv_inpainting.py", line 25, in from lib.image_cropper import ImageCropper File "/home/user02/liweijie/MeInGame/lib/image_cropper.py", line 7, in from lib import face_align File "/home/user02/liweijie/MeInGame/lib/face_align.py", line 9, in from face_alignment.models import FAN, ResNetDepth ModuleNotFoundError: No module named 'face_alignment.models'

Has your problem been solved? How to solve it?

Laborant commented 3 years ago

(face_meln) user02@lthpc:~/liweijie/MeInGame$ python main.py -m test -i demo 2021-03-10 18:02:11.886652: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda-10.0/lib64:/usr/local/cuda-10.0/lib64:/usr/local/lib: 2021-03-10 18:02:11.886720: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine. Traceback (most recent call last): File "main.py", line 10, in from uv_inpainting import UVInpainting File "/home/user02/liweijie/MeInGame/uv_inpainting.py", line 25, in from lib.image_cropper import ImageCropper File "/home/user02/liweijie/MeInGame/lib/image_cropper.py", line 7, in from lib import face_align File "/home/user02/liweijie/MeInGame/lib/face_align.py", line 9, in from face_alignment.models import FAN, ResNetDepth ModuleNotFoundError: No module named 'face_alignment.models'

Has your problem been solved? How to solve it?

Unfortunately i don't found how fix it yet, if you know how solved this please tell me

Kenny-Li2023 commented 3 years ago

(face_meln) user02@lthpc:~/liweijie/MeInGame$ python main.py -m test -i demo 2021-03-10 18:02:11.886652: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda-10.0/lib64:/usr/local/cuda-10.0/lib64:/usr/local/lib: 2021-03-10 18:02:11.886720: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine. Traceback (most recent call last): File "main.py", line 10, in from uv_inpainting import UVInpainting File "/home/user02/liweijie/MeInGame/uv_inpainting.py", line 25, in from lib.image_cropper import ImageCropper File "/home/user02/liweijie/MeInGame/lib/image_cropper.py", line 7, in from lib import face_align File "/home/user02/liweijie/MeInGame/lib/face_align.py", line 9, in from face_alignment.models import FAN, ResNetDepth ModuleNotFoundError: No module named 'face_alignment.models'

Has your problem been solved? How to solve it?

Unfortunately i don't found how fix it yet, if you know how solved this please tell me

I have solved this problem. You should uninstall face_alignment first, and then install face_alignment==1.1.1.

Laborant commented 3 years ago

install face_alignment==1.1.1

This worked! Thank you so much!