Spaces:
Runtime error
Runtime error
try rec without subprocess
Browse files
app.py
CHANGED
@@ -23,20 +23,27 @@ def run_on_gpu(input_point_cloud: gr.utils.NamedString,
|
|
23 |
type(gen_subsample_manifold_iter), type(gen_refine_iter))
|
24 |
|
25 |
import os
|
26 |
-
|
|
|
|
|
|
|
27 |
|
28 |
in_file = 'data/{}'.format(input_point_cloud.name)
|
29 |
out_file = 'results/rec/{}'.format(input_point_cloud.name)
|
30 |
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
|
|
|
|
|
|
|
|
40 |
print('Finished inference at {}'.format(datetime.datetime.now()))
|
41 |
|
42 |
result_3d_model = out_file
|
|
|
23 |
type(gen_subsample_manifold_iter), type(gen_refine_iter))
|
24 |
|
25 |
import os
|
26 |
+
import sys
|
27 |
+
# os.chdir(os.path.dirname('./ppsurf'))
|
28 |
+
sys.path.append(os.path.abspath('ppsurf'))
|
29 |
+
from ppsurf.pps import cli_main
|
30 |
|
31 |
in_file = 'data/{}'.format(input_point_cloud.name)
|
32 |
out_file = 'results/rec/{}'.format(input_point_cloud.name)
|
33 |
|
34 |
+
args = [
|
35 |
+
'pps.py', 'rec',
|
36 |
+
in_file,
|
37 |
+
out_file,
|
38 |
+
'--gen_resolution_global', str(gen_resolution_global),
|
39 |
+
'--padding_factor', str(padding_factor),
|
40 |
+
'--gen_subsample_manifold_iter', str(gen_subsample_manifold_iter),
|
41 |
+
'--gen_refine_iter', str(gen_refine_iter),
|
42 |
+
]
|
43 |
+
|
44 |
+
sys.argv = args
|
45 |
+
cli_main()
|
46 |
+
# subprocess.run(call_base + call_args)
|
47 |
print('Finished inference at {}'.format(datetime.datetime.now()))
|
48 |
|
49 |
result_3d_model = out_file
|