Spaces:
Paused
Paused
Chao Xu
commited on
Commit
โข
09ac26d
1
Parent(s):
afbb6e9
change path
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ import subprocess
|
|
15 |
|
16 |
subprocess.run(["sh", os.path.join(elev_est_dir, "install.sh")], cwd=elev_est_dir)
|
17 |
|
18 |
-
|
19 |
import shutil
|
20 |
import torch
|
21 |
import fire
|
@@ -299,12 +299,14 @@ def stage2_run(models, device, tmp_dir,
|
|
299 |
zero123_infer(models['turncam'], tmp_dir, indices=rerun_all, device=device, ddim_steps=stage2_steps, scale=scale)
|
300 |
|
301 |
dataset = tmp_dir
|
302 |
-
os.
|
|
|
|
|
303 |
|
304 |
bash_script = f'CUDA_VISIBLE_DEVICES={_GPU_INDEX} python exp_runner_generic_blender_val.py --specific_dataset_name {dataset} --mode export_mesh --conf confs/one2345_lod0_val_demo.conf --is_continue'
|
305 |
print(bash_script)
|
306 |
os.system(bash_script)
|
307 |
-
os.chdir(
|
308 |
|
309 |
ply_path = os.path.join(tmp_dir, f"meshes_val_bg/lod0/mesh_00340000_gradio_lod0.ply")
|
310 |
mesh_path = os.path.join(tmp_dir, "mesh.obj")
|
|
|
15 |
|
16 |
subprocess.run(["sh", os.path.join(elev_est_dir, "install.sh")], cwd=elev_est_dir)
|
17 |
|
18 |
+
import inspect
|
19 |
import shutil
|
20 |
import torch
|
21 |
import fire
|
|
|
299 |
zero123_infer(models['turncam'], tmp_dir, indices=rerun_all, device=device, ddim_steps=stage2_steps, scale=scale)
|
300 |
|
301 |
dataset = tmp_dir
|
302 |
+
main_dir_path = os.path.dirname(os.path.abspath(
|
303 |
+
inspect.getfile(inspect.currentframe())))
|
304 |
+
os.chdir(os.path.join(code_dir, 'SparseNeuS_demo_v1/'))
|
305 |
|
306 |
bash_script = f'CUDA_VISIBLE_DEVICES={_GPU_INDEX} python exp_runner_generic_blender_val.py --specific_dataset_name {dataset} --mode export_mesh --conf confs/one2345_lod0_val_demo.conf --is_continue'
|
307 |
print(bash_script)
|
308 |
os.system(bash_script)
|
309 |
+
os.chdir(main_dir_path)
|
310 |
|
311 |
ply_path = os.path.join(tmp_dir, f"meshes_val_bg/lod0/mesh_00340000_gradio_lod0.ply")
|
312 |
mesh_path = os.path.join(tmp_dir, "mesh.obj")
|