coma icon indicating copy to clipboard operation
coma copied to clipboard

How to save a mesh to RGB image?

Open yyuanl opened this issue 5 years ago • 1 comments

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.

yyuanl avatar Nov 29 '19 08:11 yyuanl

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

anuragranj avatar Jan 17 '20 10:01 anuragranj