Closed IAmSuyogJadhav closed 6 years ago
Hi @IAmSuyogJadhav,
Yes, you can. Download links: https://www.adrianbulat.com/downloads/python-fan/2DFAN-4.pth.tar https://www.adrianbulat.com/downloads/python-fan/3DFAN-4.pth.tar https://www.adrianbulat.com/downloads/python-fan/depth.pth.tar
You can copy them in your home folder in .face_alignment folder (You can also check your existing installation just to be sure, its hidden by default).
Thanks! Got it✌️
@1adrianb sorry, I cannot open the download links you provided, can you upload the models to onedrive or google cloud or something like that?
it loos like the compressed model has damaged , hope anyone can help, thanks~
@visonpon The files are not tar archives. You should open them directly inside PyTorch
import torch
data = torch.load('2DFAN-4.pth.tar')
I don't know why .pth.tar
is chosen. It should be .pth
.
thanks~ @ashafaei i haved solved this error as you adviced.
Let me make a conclusion that how we can download the model files in advance and load them. After you use pip install face-alignment
install the face-alignment package 1.0.0
, the default face-alignment data directory is /root/.face_alignment/data
if you are using the root in a docker. In general, you can use cd ~ && pwd
to check the detailed user data directory, and the directory where you should put per-trained model files will be [user_data_dir]/.face_alignment/data
, i.e., using
cd $(cd ~ && pwd)/.face_alignment/data
to directly access the directory. If the directory does not exist, you can make it by yourself.
The necessary model files are as follows:
https://www.adrianbulat.com/downloads/python-fan/2DFAN-4.pth.tar
https://www.adrianbulat.com/downloads/python-fan/3DFAN-4.pth.tar
https://www.adrianbulat.com/downloads/python-fan/depth.pth.tar
https://www.adrianbulat.com/downloads/python-fan/s3fd_convert.pth
Sounds good。
When I run
, it downloads the models for the first time and takes quite a while. Is there any way I can skip this? Like manually downloading the required files and putting them in a specified folder?