gangweix commited on
Commit
95fa0a1
·
verified ·
1 Parent(s): 0c34b7d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -128,9 +128,6 @@ def main(share=True):
128
  o3d.io.write_point_cloud(ply_path, pcd)
129
  vertices = np.asarray(pcd.points)
130
  vertex_colors = (np.asarray(pcd.colors) * 255).astype(np.uint8)
131
- # vertices = vertices * np.array([1, -1, -1], dtype=np.float32)
132
- # vertices[:, 2] = -vertices[:, 2]
133
- # vertices[:, 1] = -vertices[:, 1]
134
  mesh = trimesh.PointCloud(vertices=vertices, colors=vertex_colors)
135
  glb_path = os.path.join(output_path, 'pointcloud.glb')
136
  mesh.export(glb_path)
@@ -179,10 +176,10 @@ def main(share=True):
179
  # Right: 3D point cloud + depth
180
  with gr.Column():
181
  with gr.Tabs():
182
- with gr.Tab("Depth"):
183
- depth_map = ImageSlider(label="Depth Map with Slider View", elem_id='img-display-output', position=0.5)
184
  with gr.Tab("3D View"):
185
  model_3d = gr.Model3D(display_mode="solid", label="3D Point Map", clear_color=[1,1,1,1], height="60vh")
 
 
186
  with gr.Tab("Download"):
187
  download_files = gr.File(type='filepath', label="Download Files")
188
 
 
128
  o3d.io.write_point_cloud(ply_path, pcd)
129
  vertices = np.asarray(pcd.points)
130
  vertex_colors = (np.asarray(pcd.colors) * 255).astype(np.uint8)
 
 
 
131
  mesh = trimesh.PointCloud(vertices=vertices, colors=vertex_colors)
132
  glb_path = os.path.join(output_path, 'pointcloud.glb')
133
  mesh.export(glb_path)
 
176
  # Right: 3D point cloud + depth
177
  with gr.Column():
178
  with gr.Tabs():
 
 
179
  with gr.Tab("3D View"):
180
  model_3d = gr.Model3D(display_mode="solid", label="3D Point Map", clear_color=[1,1,1,1], height="60vh")
181
+ with gr.Tab("Depth"):
182
+ depth_map = ImageSlider(label="Depth Map with Slider View", elem_id='img-display-output', position=0.5)
183
  with gr.Tab("Download"):
184
  download_files = gr.File(type='filepath', label="Download Files")
185