yhyang-myron commited on
Commit
81d04f7
·
verified ·
1 Parent(s): f89a9bf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -53,11 +53,12 @@ For a mesh file `mesh.glb` and corresponding face mask `mask.npy`, prepare your
53
  import trimesh
54
  import numpy as np
55
  mesh = trimesh.load("mesh.glb", force="mesh")
 
56
  mesh_parts = []
57
  for part_id in np.unique(mask_npy):
58
  mesh_part = mesh.submesh([mask_npy == part_id], append=True)
59
  mesh_parts.append(mesh_part)
60
- mesh_parts = trimesh.Scene(mesh_parts).export(input_mesh.glb)
61
  ```
62
  The resulting **input_mesh.glb** is your prepared input for HoloPart.
63
  ### Step 2: Click the Decompose Parts button to begin the decomposition process.
 
53
  import trimesh
54
  import numpy as np
55
  mesh = trimesh.load("mesh.glb", force="mesh")
56
+ mask_npy = np.load("mask.npy")
57
  mesh_parts = []
58
  for part_id in np.unique(mask_npy):
59
  mesh_part = mesh.submesh([mask_npy == part_id], append=True)
60
  mesh_parts.append(mesh_part)
61
+ mesh_parts = trimesh.Scene(mesh_parts).export("input_mesh.glb")
62
  ```
63
  The resulting **input_mesh.glb** is your prepared input for HoloPart.
64
  ### Step 2: Click the Decompose Parts button to begin the decomposition process.