yfeng95 / DECA

DECA: Detailed Expression Capture and Animation (SIGGRAPH 2021)
Other
2.11k stars 420 forks source link

AttributeError: flame_tex_path is missing in utils/config.py #125

Open wildoctopus opened 2 years ago

wildoctopus commented 2 years ago

While executing demo_teaser.py - If we set cfg.model.tex_type = 'FLAME', it ask for flame_tex_path which is missing so getting this error.

creating the FLAME Decoder Traceback (most recent call last): File "demos/demo_teaser.py", line 132, in main(parser.parse_args()) File "demos/demo_teaser.py", line 43, in main deca = DECA(config=deca_cfg, device=device) File "/content/DECA/decalib/deca.py", line 49, in init self._create_model(self.cfg.model) File "/content/DECA/decalib/deca.py", line 83, in _create_model self.flametex = FLAMETex(model_cfg).to(self.device) File "/content/DECA/decalib/models/FLAME.py", line 240, in init tex_path = config.flame_tex_path File "/usr/local/lib/python3.7/dist-packages/yacs/config.py", line 141, in getattr raise AttributeError(name) AttributeError: flame_tex_path

If we set cfg.model.tex_type = 'BFM' , it checks for **.mpz file, so will not generate any error. We need to follow instruction on https://github.com/TimoBolkart/BFM_to_FLAME to get that file. Can't we get the gif of animated expression without that. Seems like its missing some parameters.

S-Tensor commented 2 years ago

@wildoctopus, I'm facing same issue. have you solve the problem ??

ujjawalcse commented 2 years ago

Just add one line after line no.33, cfg.model.flame_tex_path=os.path.join(cfg.deca_dir, 'data', 'FLAME_texture.npz')

and change line no.35 like below, cfg.model.tex_type = 'FLAME' # BFM, FLAME, albedoMM