fix remove edge
Browse files
app.py
CHANGED
@@ -61,13 +61,12 @@ def run(image: np.ndarray, remove_edge: bool = True, max_size: int = 800):
|
|
61 |
|
62 |
if remove_edge:
|
63 |
mask = mask & ~utils3d.numpy.depth_edge(depth, mask=mask, rtol=0.02)
|
64 |
-
mask = mask & (depth > 0)
|
65 |
|
66 |
faces, vertices, vertex_colors, vertex_uvs = utils3d.numpy.image_mesh(
|
67 |
points,
|
68 |
image.astype(np.float32) / 255,
|
69 |
utils3d.numpy.image_uv(width=width, height=height),
|
70 |
-
mask=mask
|
71 |
tri=True
|
72 |
)
|
73 |
vertices, vertex_uvs = vertices * [1, -1, -1], vertex_uvs * [1, -1] + [0, 1]
|
|
|
61 |
|
62 |
if remove_edge:
|
63 |
mask = mask & ~utils3d.numpy.depth_edge(depth, mask=mask, rtol=0.02)
|
|
|
64 |
|
65 |
faces, vertices, vertex_colors, vertex_uvs = utils3d.numpy.image_mesh(
|
66 |
points,
|
67 |
image.astype(np.float32) / 255,
|
68 |
utils3d.numpy.image_uv(width=width, height=height),
|
69 |
+
mask=mask,
|
70 |
tri=True
|
71 |
)
|
72 |
vertices, vertex_uvs = vertices * [1, -1, -1], vertex_uvs * [1, -1] + [0, 1]
|