barisgecer / OSTeC

TF implementation of our CVPR 2021 paper: OSTeC: One-Shot Texture Completion
https://openaccess.thecvf.com/content/CVPR2021/html/Gecer_OSTeC_One-Shot_Texture_Completion_CVPR_2021_paper.html
Other
189 stars 28 forks source link

help: exporting mesh? #12

Closed knoopx closed 2 years ago

knoopx commented 2 years ago

Hello, I tried to capture the trimesh generated by Operator#run:

face = self.get_tmesh(im, reconstruction_dict)
results_dict['face'] = face

and then export it using menpo3d io:

import menpo3d.io as m3dio
...
m3dio.export_textured_mesh(results_dict["face"].tmesh, save_path.replace(ext, ".obj"), extension="obj", overwrite=True)

but the generated mesh is corrupt:

image

any idea why? is there a proper way to do so? tried using original code from Deep3DFaceRecon_pytorch and the mesh is ok but it fails to generate texture due tensor size missmatch.

laolongboy commented 2 years ago

I had the same problem while trying to use original code from Deep3DFaceRecon_pytorch.

RuntimeError: The size of tensor a (35709) must match the size of tensor b (53215) at non-singleton dimension 1
barisgecer commented 2 years ago

In the latest commit, I replaced the topology with full-face topology. Thus this problem should be fixed. Can you try again?

And please use my forked repo for Deep3DFaceRecon_pytorch

barisgecer commented 2 years ago

I believe this issue has now been solved. Please re-open if it is not.