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

How to save a mesh to RGB image? #25

Open
yyuanl opened this issue Nov 29, 2019 · 1 comment
Open

How to save a mesh to RGB image? #25

yyuanl opened this issue Nov 29, 2019 · 1 comment

Comments

@yyuanl
Copy link

yyuanl commented Nov 29, 2019

Hi author,
Thanks for your work .I run your code successfully.But how to save the predicted mesh, a two dimension narray (5023, 3), to a ordinary RGB image to visualize the mesh like your paper figure 2.
I try code as fllows:

    vec = predictions[0]   # vec.shape = (5023, 3), is a narray
    predict_mesh = facedata.vec2mesh(vec)
    predict_mesh.show()

However, there is nothing to happen.
Therefore, could you provide some advices? Thanks you again.

@anuragranj
Copy link
Owner

You could use a library like opendr to render the mesh to image and save it as RGB.

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

2 participants