DECA
DECA copied to clipboard
Lack of `template.mtl` file
Hi, these results are very interesting! However I keep getting the following warning:
UserWarning: Mtl file does not exist: /home/jupyter/DECA/data/template.mtl
warnings.warn(f"Mtl file does not exist: {f}")
Where does template.mtl
file should come from?
There is no such file in yours archive, BFM nor FLAME model files.
Am I missing something?
same issue
same issue
Enter on the command line:python demos/demo_reconstruct.py -i TestSamples/examples --saveDepth True --saveObj True
@lin-girl, thanks for answering! I've tried what you've written but I get:
python demos/demo_reconstruct.py -i TestSamples/examples --saveDepth True --saveObj True
creating the FLAME Decoder
trained model found. load /home/jupyter/DECA/data/deca_model.tar
/opt/conda/envs/deca/lib/python3.7/site-packages/pytorch3d/io/obj_io.py:533: UserWarning: Mtl file does not exist: /home/jupyter/DECA/data/template.mtl
warnings.warn(f"Mtl file does not exist: {f}")
0%| | 0/9 [00:00<?, ?it/s]/opt/conda/envs/deca/lib/python3.7/site-packages/torch/nn/functional.py:3458: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.
"See the documentation of nn.Upsample for details.".format(mode)
/opt/conda/envs/deca/lib/python3.7/site-packages/torch/nn/functional.py:3829: UserWarning: Default grid_sample and affine_grid behavior has changed to align_corners=False since 1.3.0. Please specify align_corners=True if the old behavior is desired. See the documentation of grid_sample for details.
"Default grid_sample and affine_grid behavior has changed "
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 9/9 [00:20<00:00, 2.24s/it]
-- please check the results in TestSamples/examples/results
And resulting obj looks as following:
It seems as template.mtl
is not generated but should be delivered somewhere, am I right?
Maybe I set something wrong and you quickly see what might be the issue, thanks helping :)
Add parameter --useTex True
Try this command
python demos/demo_reconstruct.py -i TestSamples/examples --saveDepth True --saveObj True --useTex True
Thanks for answering @Nyquist0 !!!
The results seem different but I still get the following error regarding template.mtl
python demos/demo_reconstruct.py -i TestSamples/examples --saveDepth True --saveObj True --useTex True
creating the FLAME Decoder
trained model found. load /home/jupyter/DECA/data/deca_model.tar
/opt/conda/envs/deca/lib/python3.7/site-packages/pytorch3d/io/obj_io.py:533: UserWarning: Mtl file does not exist: /home/jupyter/DECA/data/template.mtl
warnings.warn(f"Mtl file does not exist: {f}")
0%| | 0/9 [00:00<?, ?it/s]/opt/conda/envs/deca/lib/python3.7/site-packages/torch/nn/functional.py:3458: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.
"See the documentation of nn.Upsample for details.".format(mode)
/opt/conda/envs/deca/lib/python3.7/site-packages/torch/nn/functional.py:3829: UserWarning: Default grid_sample and affine_grid behavior has changed to align_corners=False since 1.3.0. Please specify align_corners=True if the old behavior is desired. See the documentation of grid_sample for details.
"Default grid_sample and affine_grid behavior has changed "
100%|█████████████████████████████████████████████| 9/9 [00:13<00:00, 1.50s/it]
-- please check the results in TestSamples/examples/results
And the resulting obj looks like:
However, resulting _vis
file contains fitted texture, I don't know how to understand this.
Some help on how to obtain an obj with fitted texture, not glued photo will be much appreciated!.
I am having a similar issue regarding the lack of template.mtl
- would appreciate any help on how to resolve this issue.
I am having a similar issue regarding the lack of
template.mtl
- would appreciate any help on how to resolve this issue.
is it raise error from Pillow package? i guess you can follow this https://stackoverflow.com/questions/42462431/oserror-broken-data-stream-when-reading-image-file
from PIL import Image, ImageFile
ImageFile.LOAD_TRUNCATED_IMAGES = True
Hmm, thanks for answering, but it's a raised by pytorch3d.
Maybe I didn't explain it clearly, but the template.mtl
file doesn't really exist anywhere on the disk. Should it be like that?
Hmm, thanks for answering, but it's a raised by pytorch3d. Maybe I didn't explain it clearly, but the
template.mtl
file doesn't really exist anywhere on the disk. Should it be like that?
Hi, have you found the mtl file finally?
@pstorozenko HI , is there only have 5023 vertices in the reconstruction result obj file? But I see that he display have more vertices.
Hi guys, you can solve this error adding a template.mtl file on your own with this info inside: newmtl FaceTexture map_Kd mean_texture.jpg
Hi guys, you can solve this error adding a template.mtl file on your own with this info inside: newmtl FaceTexture map_Kd mean_texture.jpg @Javisda Hi, bro, I met the same issue at Emoca reference. Do you mean that I can write a template.mtl file with newmtl FaceTexture map_Kd mean_texture.jpg which can fix this issue?
Hello @Javisda Can u tell where is map_Kd mean_texture.jpg