Spaces:
Paused
Paused
fix reconstruction maybe
Browse files
app.py
CHANGED
|
@@ -21,21 +21,25 @@ def run_on_gpu(input_point_cloud_viewer,
|
|
| 21 |
import os
|
| 22 |
os.chdir(os.path.dirname('./ppsurf'))
|
| 23 |
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
|
|
|
| 29 |
'--gen_resolution_global', str(gen_resolution_global),
|
| 30 |
'--padding_factor', str(padding_factor),
|
| 31 |
'--gen_subsample_manifold_iter', str(gen_subsample_manifold_iter),
|
| 32 |
'--gen_refine_iter', str(gen_refine_iter),
|
| 33 |
]
|
| 34 |
-
|
| 35 |
-
res = subprocess.run(call_base + call_args)
|
| 36 |
print('Finished inference at {}'.format(datetime.datetime.now()))
|
| 37 |
|
| 38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
|
| 41 |
def main():
|
|
|
|
| 21 |
import os
|
| 22 |
os.chdir(os.path.dirname('./ppsurf'))
|
| 23 |
|
| 24 |
+
in_file = 'data/{}'.format(input_point_cloud_viewer)
|
| 25 |
+
out_file = 'results/rec/{}'.format(input_point_cloud_viewer)
|
| 26 |
+
|
| 27 |
+
call_base = ['python', 'pps.py', 'rec']
|
| 28 |
+
call_args = [in_file,
|
| 29 |
+
out_file,
|
| 30 |
'--gen_resolution_global', str(gen_resolution_global),
|
| 31 |
'--padding_factor', str(padding_factor),
|
| 32 |
'--gen_subsample_manifold_iter', str(gen_subsample_manifold_iter),
|
| 33 |
'--gen_refine_iter', str(gen_refine_iter),
|
| 34 |
]
|
| 35 |
+
subprocess.run(call_base + call_args)
|
|
|
|
| 36 |
print('Finished inference at {}'.format(datetime.datetime.now()))
|
| 37 |
|
| 38 |
+
result_3d_model = out_file
|
| 39 |
+
output_file = out_file
|
| 40 |
+
progress_text = 'done'
|
| 41 |
+
|
| 42 |
+
return result_3d_model, output_file, progress_text
|
| 43 |
|
| 44 |
|
| 45 |
def main():
|