Commit
·
890b999
1
Parent(s):
4ce632b
Fix parameter naming in generate3d function for clarity and consistency. Updated rgb and xyz parameters to rgb_image and xyz_image respectively in the mesh export call.
Browse files- inference.py +2 -2
inference.py
CHANGED
@@ -16,10 +16,10 @@ def generate3d(model, rgb_image, xyz_image, device="cpu"):
|
|
16 |
glb_path = base_path + ".glb"
|
17 |
|
18 |
# Export mesh using CRM model (generates .obj and textures)
|
19 |
-
model.export_mesh_wt_uv(obj_path,
|
20 |
|
21 |
# Load and convert to GLB
|
22 |
mesh = Mesh.load(obj_path, device=torch.device("cpu"))
|
23 |
mesh.write(glb_path)
|
24 |
|
25 |
-
return glb_path
|
|
|
16 |
glb_path = base_path + ".glb"
|
17 |
|
18 |
# Export mesh using CRM model (generates .obj and textures)
|
19 |
+
model.export_mesh_wt_uv(obj_path, rgb_image, xyz_image, device)
|
20 |
|
21 |
# Load and convert to GLB
|
22 |
mesh = Mesh.load(obj_path, device=torch.device("cpu"))
|
23 |
mesh.write(glb_path)
|
24 |
|
25 |
+
return glb_path
|