Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/cli/convert/tum.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import os
from pathlib import Path
import subprocess
import yaml
from contextlib import contextmanager
import shutil
import tempfile
Expand Down Expand Up @@ -86,6 +85,7 @@ def maybe_extract_tar_or_zip(path):
print(f"Warning: Failed to delete temporary directory '{temp_dir}': {e}")

def get_calibration(input_dir, stereo):
import yaml
calibration = { "cameras": [] }

def convert_distortion(model, coeffs):
Expand Down
10 changes: 8 additions & 2 deletions python/cli/sai_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,14 @@ def parse_args():
return parser.parse_args()

def main():
args = parse_args()
args.func(args)
try:
args = parse_args()
args.func(args)
except ImportError as e:
print(f"\n[ImportError] {e}")
print("Try installing dependencies with")
print(" pip install spectacularAI[full]\n")
raise

if __name__ == '__main__':
main()
8 changes: 1 addition & 7 deletions python/cli/smooth.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@
Post-process a session and generate a smoothed trajectory with all frames
"""
import json

try:
from process.process import parse_input_dir, auto_config
except ImportError:
# hacky: The following mechanism allows using this both as a stand-alone
# script and as a subcommand in sai-cli.
from .process.process import parse_input_dir, auto_config
from .process.process import parse_input_dir, auto_config

def define_args(parser):
parser.add_argument("input", help="Path to folder with session to process")
Expand Down