NCJ commited on
Commit
23c99aa
1 Parent(s): 855165f

rotated_normal

Browse files
Files changed (1) hide show
  1. gradio_demo.py +1 -1
gradio_demo.py CHANGED
@@ -99,7 +99,7 @@ def mesh_gen(tmp_dir, simplify, num_inference_steps):
99
  ])
100
  rotated_normal = np.dot(vertex_normals, rotation_matrix.T)
101
  rotated_normal = rotated_normal / np.linalg.norm(rotated_normal)
102
- colors = (-vertex_normals + 1) / 2.0
103
  colors = (colors * 255).astype(np.uint8) # Convert to 8-bit color
104
  # print(colors.shape)
105
  mesh.visual.vertex_colors = colors[..., [2, 1, 0]] # RGB -> BGR
 
99
  ])
100
  rotated_normal = np.dot(vertex_normals, rotation_matrix.T)
101
  rotated_normal = rotated_normal / np.linalg.norm(rotated_normal)
102
+ colors = (-rotated_normal + 1) / 2.0
103
  colors = (colors * 255).astype(np.uint8) # Convert to 8-bit color
104
  # print(colors.shape)
105
  mesh.visual.vertex_colors = colors[..., [2, 1, 0]] # RGB -> BGR