LeslieZhoa / HeadSwap

This is a HeadSwap project not only face
MIT License
28 stars 9 forks source link

Pretrained models missing file needed for BFM #3

Closed realisticdreamer114514 closed 3 weeks ago

realisticdreamer114514 commented 1 year ago

After I set up /pretrained_models/BFM folder and run inference.py I got this error:

Traceback (most recent call last):
  File "C:\Users\User\anaconda3\envs\simswap\lib\site-packages\scipy\io\matlab\mio.py", line 39, in _open_file
    return open(file_like, mode), True
FileNotFoundError: [Errno 2] No such file or directory: 'pretrained_models/BFM\\similarity_Lm3D_all.mat'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "inference.py", line 172, in <module>
    'pretrained_models/BFM')
  File "inference.py", line 20, in __init__
    Process.__init__(self,params_path,bfm_folder)
  File "D:\HeadSwap\process\process_func.py", line 24, in __init__
    self.lm3d_std = load_lm3d(bfm_folder)
  File "D:\HeadSwap\model\third\Deep3dRec\preprocess.py", line 8, in load_lm3d
    Lm3D = loadmat(osp.join(bfm_folder, 'similarity_Lm3D_all.mat'))
  File "C:\Users\User\anaconda3\envs\simswap\lib\site-packages\scipy\io\matlab\mio.py", line 222, in loadmat
    with _open_file_context(file_name, appendmat) as f:
  File "C:\Users\User\anaconda3\envs\simswap\lib\contextlib.py", line 81, in __enter__
    return next(self.gen)
  File "C:\Users\User\anaconda3\envs\simswap\lib\site-packages\scipy\io\matlab\mio.py", line 17, in _open_file_context
    f, opened = _open_file(file_like, appendmat, mode)
  File "C:\Users\User\anaconda3\envs\simswap\lib\site-packages\scipy\io\matlab\mio.py", line 45, in _open_file
    return open(file_like, mode), True
FileNotFoundError: [Errno 2] No such file or directory: 'pretrained_models/BFM\\similarity_Lm3D_all.mat'

In the distribution of Basel Face Model (241,347 kB) there is no similarity_Lm3D_all.mat. Please specify which files are needed in BFM folder other than 01_MorphableModel.mat and Exp_Pca.bin from Deep3DFaceRecon_pytorch

LeslieZhoa commented 1 year ago

Hi @realisticdreamer114514 you can find the other model here Good luck!!!