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