Stable-X commited on
Commit
754415a
·
verified ·
1 Parent(s): ee7fb00

Update app_fine.py

Browse files
Files changed (1) hide show
  1. app_fine.py +1 -1
app_fine.py CHANGED
@@ -485,7 +485,7 @@ def generate_and_extract_glb(
485
  target_fitnesses = []
486
  pcd = o3d.geometry.PointCloud()
487
  mesh = outputs['mesh'][0]
488
- idxs = torch.randperm(mesh.vertices.shape[0])[:min(50000, pointcloud.shape[0])]
489
  pcd.points = o3d.utility.Vector3dVector(mesh.vertices[idxs].cpu().numpy())
490
  distance = np.array(pcd.points) - np.array(pcd.points).mean(axis=0)[None]
491
  scale = np.linalg.norm(distance, axis=1).max()
 
485
  target_fitnesses = []
486
  pcd = o3d.geometry.PointCloud()
487
  mesh = outputs['mesh'][0]
488
+ idxs = torch.randperm(mesh.vertices.shape[0])[:min(50000, mesh.vertices.shape[0])]
489
  pcd.points = o3d.utility.Vector3dVector(mesh.vertices[idxs].cpu().numpy())
490
  distance = np.array(pcd.points) - np.array(pcd.points).mean(axis=0)[None]
491
  scale = np.linalg.norm(distance, axis=1).max()