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

Output mesh render is blank #41

Open
hbinol opened this issue Jul 23, 2020 · 10 comments
Open

Output mesh render is blank #41

hbinol opened this issue Jul 23, 2020 · 10 comments

Comments

@hbinol
Copy link

hbinol commented Jul 23, 2020

Hi,

Thank you so much for your great work!

I have an issue. When I run the following command:

python -m demo --img_path ./input_images/000001.jpg --out_folder ./RingNet_output --save_obj_file=True

Output file does not show any mesh result in 2D images like below:

000001

On the other hand, it produces the mesh like below:

image_000013_mesh_not_perfect

opendr version is 0.77.

I would like to ask how can I get the predicted (output of the model) vertex coordinates or landmark coordinates (points) of the original 2D input image?

@xing-shuai
Copy link

xing-shuai commented Aug 13, 2020

I got the same issue. my opendr version is still 0.77.
I have compared the code between hmr and ringnet, the only difference is ringnet using psbody.mesh which is an old fork of mesh.
Anyway, this issue is somehow related to psbody.mesh in my case. when debugging demo.py into function render_model, I always got a "Segmentation fault" error

image

Finally, I use pymesh2 to load and save mesh data instead of using psbody.mesh.

# from psbody.mesh import Mesh
import pymesh


def main(config, template_mesh):
      ...
      if config.save_obj_file:
             # mesh = Mesh(v=vertices[0], f=template_mesh.f)
             # mesh.write_obj(config.out_folder + '/mesh/' + config.img_path.split('/')[-1][:-4] + '.obj')
             mesh = pymesh.form_mesh(vertices[0], template_mesh.faces)
             pymesh.save_mesh(config.out_folder + '/mesh/' + config.img_path.split('/')[-1][:-4] + '.obj', mesh)
      ...

if __name__ == '__main__':
      ...
      template_mesh = pymesh.load_mesh('./flame_model/FLAME_sample.obj')
      renderer = vis_util.SMPLRenderer(faces=template_mesh.faces)
      ...

hope this helps. 😃 😃 😃

image

@perfectworld0415
Copy link

can U send me the pre-trained modle?I can not download it. [email protected]

@perfectworld0415
Copy link

I got the same issue. my opendr version is still 0.77.
I have compared the code between hmr and ringnet, the only difference is ringnet using psbody.mesh which is an old fork of mesh.
Anyway, this issue is somehow related to psbody.mesh in my case. when debugging demo.py into function render_model, I always got a "Segmentation fault" error

image

Finally, I use pymesh2 to load and save mesh data instead of using psbody.mesh.

# from psbody.mesh import Mesh
import pymesh


def main(config, template_mesh):
      ...
      if config.save_obj_file:
             # mesh = Mesh(v=vertices[0], f=template_mesh.f)
             # mesh.write_obj(config.out_folder + '/mesh/' + config.img_path.split('/')[-1][:-4] + '.obj')
             mesh = pymesh.form_mesh(vertices[0], template_mesh.faces)
             pymesh.save_mesh(config.out_folder + '/mesh/' + config.img_path.split('/')[-1][:-4] + '.obj', mesh)
      ...

if __name__ == '__main__':
      ...
      template_mesh = pymesh.load_mesh('./flame_model/FLAME_sample.obj')
      renderer = vis_util.SMPLRenderer(faces=template_mesh.faces)
      ...

hope this helps.

image

can U send me the pre-trained model? I can not download it. My email is [email protected]

@xing-shuai
Copy link

can U send me the pre-trained modle?I can not download it. [email protected]

官网注册是可以下载的呀,已发。

@shriyakak
Copy link

shriyakak commented Nov 17, 2020

this issue is somehow related to psbody.mesh in my case. when debugging demo.py into function render_model, I always got a "Segmentation fault" error

Hey Xing,

I'm also facing the same issue, I tried downloading the Pymesh2 but getting many errors. How did you download it?
Did you face any issues while downloading pymesh2? Also, Pymesh2 is not compatible with python 2.7 and Ringnet code is using python 2.7

Python 2.7
Ubuntu 18.04

@shriyakak
Copy link

Hi,

Thank you so much for your great work!

I have an issue. When I run the following command:

python -m demo --img_path ./input_images/000001.jpg --out_folder ./RingNet_output --save_obj_file=True

Output file does not show any mesh result in 2D images like below:

000001

On the other hand, it produces the mesh like below:

image_000013_mesh_not_perfect

opendr version is 0.77.

I would like to ask how can I get the predicted (output of the model) vertex coordinates or landmark coordinates (points) of the original 2D input image?

Hey how did you fix the issue?

@highway007
Copy link

this issue is somehow related to psbody.mesh in my case. when debugging demo.py into function render_model, I always got a "Segmentation fault" error

Hey Xing,

I'm also facing the same issue, I tried downloading the Pymesh2 but getting many errors. How did you download it?
Did you face any issues while downloading pymesh2? Also, Pymesh2 is not compatible with python 2.7 and Ringnet code is using python 2.7

Python 2.7
Ubuntu 18.04

Here is a py2.7 pymesh release,and work for mehttps://github.com/PyMesh/PyMesh/releases

@wbensvage
Copy link

this issue is somehow related to psbody.mesh in my case. when debugging demo.py into function render_model, I always got a "Segmentation fault" error

Hey Xing,
I'm also facing the same issue, I tried downloading the Pymesh2 but getting many errors. How did you download it?
Did you face any issues while downloading pymesh2? Also, Pymesh2 is not compatible with python 2.7 and Ringnet code is using python 2.7
Python 2.7
Ubuntu 18.04

Here is a py2.7 pymesh release,and work for mehttps://github.com/PyMesh/PyMesh/releases

Hi @highway007 , your reply looks so promising and I do appreciate that. But the link "https://github.com/PyMesh/PyMesh/releases" you provide seems no content anymore. And I also get the problem when installing the pymesh2 with python 2.7. So can I know is there any other way we can overcome this?

@bruinxiong
Copy link

I got the same issue. my opendr version is still 0.77.
I have compared the code between hmr and ringnet, the only difference is ringnet using psbody.mesh which is an old fork of mesh.
Anyway, this issue is somehow related to psbody.mesh in my case. when debugging demo.py into function render_model, I always got a "Segmentation fault" error

image

Finally, I use pymesh2 to load and save mesh data instead of using psbody.mesh.

# from psbody.mesh import Mesh
import pymesh


def main(config, template_mesh):
      ...
      if config.save_obj_file:
             # mesh = Mesh(v=vertices[0], f=template_mesh.f)
             # mesh.write_obj(config.out_folder + '/mesh/' + config.img_path.split('/')[-1][:-4] + '.obj')
             mesh = pymesh.form_mesh(vertices[0], template_mesh.faces)
             pymesh.save_mesh(config.out_folder + '/mesh/' + config.img_path.split('/')[-1][:-4] + '.obj', mesh)
      ...

if __name__ == '__main__':
      ...
      template_mesh = pymesh.load_mesh('./flame_model/FLAME_sample.obj')
      renderer = vis_util.SMPLRenderer(faces=template_mesh.faces)
      ...

hope this helps. 😃 😃 😃

image

Thanks for your suggestion. It works for me!
In order to install PyMesh2 successfully, please follow this https://pymesh.readthedocs.io/en/latest/installation.html or https://github.com/PyMesh/PyMesh

@bruinxiong
Copy link

After I replace psbody.mesh with pymesh2, I show another visualization result as follow.
000013
Python 3.7.6
TensorFlow-gpu 1.15.2
Ubuntu 18.04

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

7 participants