Commit
·
2625296
1
Parent(s):
68935d6
Update vertex color assignment in generate3d function to utilize original colors
Browse files- Modified mesh creation to set vertex colors to orig_colors, enhancing the visual fidelity of the generated mesh.
- Removed previous reliance on nearest neighbor color mapping, streamlining the color assignment process.
- inference.py +1 -1
inference.py
CHANGED
@@ -90,7 +90,7 @@ def generate3d(model, rgb, ccm, device):
|
|
90 |
# new_colors = orig_colors[idxs[:, 0]]
|
91 |
|
92 |
# Create the new mesh with colors
|
93 |
-
mesh = trimesh.Trimesh(vertices=verts, faces=faces, vertex_colors=
|
94 |
|
95 |
# === Export OBJ/MTL/PNG ===
|
96 |
obj_path = tempfile.NamedTemporaryFile(suffix=".obj", delete=False).name
|
|
|
90 |
# new_colors = orig_colors[idxs[:, 0]]
|
91 |
|
92 |
# Create the new mesh with colors
|
93 |
+
mesh = trimesh.Trimesh(vertices=verts, faces=faces, vertex_colors=orig_colors)
|
94 |
|
95 |
# === Export OBJ/MTL/PNG ===
|
96 |
obj_path = tempfile.NamedTemporaryFile(suffix=".obj", delete=False).name
|