Juyong / CaricatureFace

The source code for paper "Landmark Detection and 3D Face Reconstruction for Caricature using a Nonlinear Parametric Model".
575 stars 108 forks source link

.npy file convert to .obj mesh looks wrong #32

Closed ghost closed 2 years ago

ghost commented 2 years ago

I'm sorry i ask the question in the email yesterday, I run the project on win 10. 12 today, i install a ubuntu18.04,and the question remains. I download CariFace_data.zip,CariFace_model.zip and CariFace_exp.zip then extract to directory ./CaricatureFace/data, ./CaricatureFace/model and ./CaricatureFace/exp. run command python train.py --no_train.

in the cariface.py file at line 346, i add code: mesh = om.read_trimesh("mean_face.obj") vertex = points.reshape(3,self.vertex_num).data.cpu().numpy() for i in range(6144): mesh.points()[i] = vertex[:, i] om.write_mesh(str(vrecord[0])+".obj", mesh) 12

RainbowRui commented 2 years ago

Hello, I just copy your code in my workflow, I find the result is correct. Maybe you need to examine whether the related variables (like 'points') have been modified. Screenshot from 2021-12-30 19-58-13 Screenshot from 2021-12-30 20-00-21

RainbowRui commented 2 years ago

3D_results.zip You can see from this file.

ghost commented 2 years ago

I'm surprised all file from github or baidu Drive.

RainbowRui commented 2 years ago

It looks strange. Maybe check the version of openmesh software?

ghost commented 2 years ago

To remember,For some reason, I installed the following version,Could be the reason? torch_1.10.1+cu113 torchaudio_0.10.1+cu113 torchvision_0.11.2+cu113 openmesh_1.1.6

RainbowRui commented 2 years ago

So I do not analyze what error is. If you save '.npy' file then use code to obtain '.obj', is the result great?

NaNillll commented 2 years ago

I find the same problem. I also save '.npy' file generated by test.sh and get mesh using mesh_to_vertex.py. The fianl mesh is wrong, similar to yours. I don't kown why......

NaNillll commented 2 years ago

I also try to just visualize point as point cloud before get mesh, and the result is also wrong, just a mess...

NewtOliver commented 2 years ago

I find the same problem. What to do to solve this problem?