Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -2,12 +2,15 @@ import gradio as gr
|
|
2 |
from depth_detection import depth_detection
|
3 |
from mesh_network import mesh_network
|
4 |
from point_cloud import point_cloud
|
|
|
5 |
|
6 |
def reconstruction3d(input_image):
|
7 |
|
8 |
new_image, output = depth_detection(input_image,pad=16)
|
9 |
pcd_img = point_cloud(new_image, output)
|
10 |
output_mesh = mesh_network(pcd_img)
|
|
|
|
|
11 |
return output_mesh
|
12 |
|
13 |
|
|
|
2 |
from depth_detection import depth_detection
|
3 |
from mesh_network import mesh_network
|
4 |
from point_cloud import point_cloud
|
5 |
+
import open3d as o3d
|
6 |
|
7 |
def reconstruction3d(input_image):
|
8 |
|
9 |
new_image, output = depth_detection(input_image,pad=16)
|
10 |
pcd_img = point_cloud(new_image, output)
|
11 |
output_mesh = mesh_network(pcd_img)
|
12 |
+
output_path = f'./meshdepth12.obj'
|
13 |
+
o3d.io.write_triangle_mesh(output_path)
|
14 |
return output_mesh
|
15 |
|
16 |
|