Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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.
|