emoca
emoca copied to clipboard
Wrong checkpoint paths for emotion recognition
I tried to run python demos/test_emotion_recognition_on_images.py --model_type 3dmm --model_name EMOCA-emorec
but always get an error that the model checkpoint does not exist - independent which model I choose.
my working directory is gdl_apps/EmotionRecognition
For example:
FileNotFoundError: [Errno 2] No such file or directory: '/is/cluster/work/rdanecek/emoca/finetune_deca/2021_11_09_19-05-01_5101174495546322475_ExpDECA_Affec_clone_NoRing_EmoB_F2_DeSegrend_BlackB_Aug_early/detail/checkpoints/last.ckpt'
Hello, I've faced the same problem, it seems like a bug during the loading process of DECA model. Have you sloved it?
I know, we don't need DECA in emotion recognition, you can set 'deca_checkpoint' in assets/EmotionRecognition/face_reconstruction_based/EMOCA-emorec/cfg.yaml as null
Does this mean that this part can be cleared? @Moon0316
Sorry for late answering. @JSHZT I will check the hint from @Moon0316 the next days and will close the issue if its works.
Hello,Has the problem been solved?
I had the problem and got a solution. open the file gdl_apps.EmotionRecognition.utils.io, in def replace_asset_dirs(cfg, output_dir : Path, ): (about line 50) find if 'deca_cfg' in cfg.keys(): (about line 52) change to if 'deca_cfg' in cfg.model.keys(): second, at def load_model(output_dir): (about line 77) print cfg. find the key of error route. The key is "cfg.model.deca_checkpoint". Assign it your checkpoint route. After modifying 2 points above, save io.py and run demo code. It could carry out.
I got the same problem and solved it by set: assets/EmotionRecognition/face_reconstruction_based/EMOCA-emorec/cfg.yaml line 31:as /your_path/emoca-release-EMOCA_v2/assets/EMOCA/models/DECA/detail/checkpoints/deca-epoch=00-val_loss/dataloader_idx_0=2.2233.ckpt
Even after changing the line 31 as the correct .ckpt path still gives same error.
@magictower can you please elaborate the second point a bit more exactly what are we supposed to do in the load_model function