Spaces:
Paused
Paused
chdir before calls to ppsurf
Browse files
app.py
CHANGED
|
@@ -17,6 +17,10 @@ def run_on_gpu(input_point_cloud_viewer,
|
|
| 17 |
gen_subsample_manifold_iter,
|
| 18 |
gen_refine_iter):
|
| 19 |
print('Started inference at {}'.format(datetime.datetime.now()))
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
call_base = ['python', 'ppsurf/pps.py', 'rec']
|
| 21 |
call_args = ['pps.py',
|
| 22 |
'rec',
|
|
@@ -50,7 +54,14 @@ def main():
|
|
| 50 |
'''
|
| 51 |
|
| 52 |
def convert_to_ply(input_point_cloud_upload: str):
|
| 53 |
-
print('
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
input_shape = input_point_cloud_upload
|
| 55 |
if not input_shape.endswith('.ply'):
|
| 56 |
# load file
|
|
@@ -64,6 +75,8 @@ def main():
|
|
| 64 |
mesh.export(input_shape)
|
| 65 |
|
| 66 |
# show in viewer
|
|
|
|
|
|
|
| 67 |
input_tabs.selected = 'pc_viewer'
|
| 68 |
input_point_cloud_viewer.value = input_shape
|
| 69 |
|
|
|
|
| 17 |
gen_subsample_manifold_iter,
|
| 18 |
gen_refine_iter):
|
| 19 |
print('Started inference at {}'.format(datetime.datetime.now()))
|
| 20 |
+
|
| 21 |
+
import os
|
| 22 |
+
os.chdir(os.path.dirname('./ppsurf'))
|
| 23 |
+
|
| 24 |
call_base = ['python', 'ppsurf/pps.py', 'rec']
|
| 25 |
call_args = ['pps.py',
|
| 26 |
'rec',
|
|
|
|
| 54 |
'''
|
| 55 |
|
| 56 |
def convert_to_ply(input_point_cloud_upload: str):
|
| 57 |
+
print(subprocess.check_output(['ls', '-l']))
|
| 58 |
+
|
| 59 |
+
import os
|
| 60 |
+
os.chdir(os.path.dirname('./ppsurf'))
|
| 61 |
+
|
| 62 |
+
print(subprocess.check_output(['ls', '-l']))
|
| 63 |
+
|
| 64 |
+
print('Inputs:', input_point_cloud_upload)
|
| 65 |
input_shape = input_point_cloud_upload
|
| 66 |
if not input_shape.endswith('.ply'):
|
| 67 |
# load file
|
|
|
|
| 75 |
mesh.export(input_shape)
|
| 76 |
|
| 77 |
# show in viewer
|
| 78 |
+
print(input_tabs)
|
| 79 |
+
print(input_point_cloud_viewer)
|
| 80 |
input_tabs.selected = 'pc_viewer'
|
| 81 |
input_point_cloud_viewer.value = input_shape
|
| 82 |
|