anuragranj / coma

Convolutional Mesh Autoencoders for Generating 3D Faces
Other
454 stars 100 forks source link

How to save a mesh to RGB image? #25

Open yyuanl opened 4 years ago

yyuanl commented 4 years ago

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 commented 4 years ago

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