Update scripts/run_preprocessing.py
Browse files- scripts/run_preprocessing.py +8 -16
scripts/run_preprocessing.py
CHANGED
|
@@ -22,21 +22,13 @@ def main(video_or_images_path: str):
|
|
| 22 |
SCRIPTS = os.path.join(env_paths.CODE_BASE, "scripts")
|
| 23 |
MICA = os.path.join(env_paths.CODE_BASE, "src", "pixel3dmm", "preprocessing", "MICA")
|
| 24 |
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
)
|
| 34 |
-
except subprocess.CalledProcessError as e:
|
| 35 |
-
print(f"ERROR: {e.cmd!r} exited with {e.returncode}", file=sys.stderr)
|
| 36 |
-
print("---- STDOUT ----", file=sys.stderr)
|
| 37 |
-
print(e.stdout, file=sys.stderr)
|
| 38 |
-
print("---- STDERR ----", file=sys.stderr)
|
| 39 |
-
sys.exit(e.returncode)
|
| 40 |
-
|
| 41 |
if __name__ == "__main__":
|
| 42 |
tyro.cli(main)
|
|
|
|
| 22 |
SCRIPTS = os.path.join(env_paths.CODE_BASE, "scripts")
|
| 23 |
MICA = os.path.join(env_paths.CODE_BASE, "src", "pixel3dmm", "preprocessing", "MICA")
|
| 24 |
|
| 25 |
+
run_and_check(
|
| 26 |
+
[sys.executable, "-u", "run_cropping.py", "--video_or_images_path", video_or_images_path],
|
| 27 |
+
cwd=SCRIPTS,
|
| 28 |
+
)
|
| 29 |
+
run_and_check(
|
| 30 |
+
[sys.executable, "-u", "demo.py", "-video_name", vid_name],
|
| 31 |
+
cwd=MICA,
|
| 32 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
if __name__ == "__main__":
|
| 34 |
tyro.cli(main)
|