NCJ commited on
Commit
c2d186b
·
verified ·
1 Parent(s): e1e17e1
Files changed (1) hide show
  1. gradio_demo.py +1 -1
gradio_demo.py CHANGED
@@ -92,7 +92,7 @@ def mesh_gen(tmp_dir, simplify, num_inference_steps):
92
  colors = (-vertex_normals + 1) / 2.0
93
  colors = (colors * 255).astype(np.uint8) # Convert to 8-bit color
94
  print(colors.shape)
95
- mesh.visual.vertex_colors = colors[..., [0, 1, 2]]
96
  mesh.export(f"{tmp_dir}/mesh_normal.ply", file_type="ply")
97
 
98
  color_path = ply_to_glb(f"{tmp_dir}/mesh.ply")
 
92
  colors = (-vertex_normals + 1) / 2.0
93
  colors = (colors * 255).astype(np.uint8) # Convert to 8-bit color
94
  print(colors.shape)
95
+ mesh.visual.vertex_colors = colors[..., [2, 1, 0]] # RGB -> BGR
96
  mesh.export(f"{tmp_dir}/mesh_normal.ply", file_type="ply")
97
 
98
  color_path = ply_to_glb(f"{tmp_dir}/mesh.ply")