Spaces:
Runtime error
Runtime error
bgr
Browse files- 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[..., [
|
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")
|