Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ghost opened this issue Dec 30, 2021 · 9 comments
Closed

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

ghost opened this issue Dec 30, 2021 · 9 comments

Comments

@ghost
Copy link

ghost commented Dec 30, 2021

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
Copy link
Collaborator

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
Copy link
Collaborator

3D_results.zip
You can see from this file.

@ghost
Copy link
Author

ghost commented Dec 30, 2021

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

@RainbowRui
Copy link
Collaborator

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

@ghost
Copy link
Author

ghost commented Dec 30, 2021

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
Copy link
Collaborator

RainbowRui commented Dec 30, 2021

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

@NaNillll
Copy link

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
Copy link

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

@NewtOliver
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants