-
Notifications
You must be signed in to change notification settings - Fork 7
Code release #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Code release #1
Changes from 250 commits
Commits
Show all changes
673 commits
Select commit
Hold shift + click to select a range
75834f0
fix
nushakrishnan 210f55e
naming
nushakrishnan 0b45d8f
rm dummy imu params
nushakrishnan 7ecafcb
upd init
nushakrishnan 1cff2ed
colmap links
nushakrishnan 8fbeab2
delete files from folder
nushakrishnan 4c74190
unused func
nushakrishnan e5e949f
ruff
nushakrishnan 522bb5c
clear unused fn
nushakrishnan 1e31dc5
ruff
nushakrishnan 3a581ad
mv extraction
nushakrishnan 8ba0a6a
mv
nushakrishnan bfa8070
vrs
nushakrishnan beab16b
extract fix
nushakrishnan 1185f6a
del
nushakrishnan 05fa8ca
sync
nushakrishnan 1e80750
importing sync
nushakrishnan 4e1d10b
estimate loading
nushakrishnan 46c3abe
estimate
nushakrishnan f0341a1
revert
nushakrishnan 4447fb5
estimate class upd
nushakrishnan a634047
init recon from calib file
nushakrishnan 590f680
sparse eval
nushakrishnan 9f3d8e0
est upd
nushakrishnan 4567c4f
estimate
nushakrishnan 010a108
undistort asl add cameras rm
nushakrishnan fdb763b
util fn init recon from claib
nushakrishnan 21dbae5
sparse eval
nushakrishnan 5817d5a
ruff
nushakrishnan 73f14b0
est upd
nushakrishnan 04aeab9
ruff
nushakrishnan d319d94
edits
nushakrishnan 806d9de
lamaria recons
nushakrishnan 59da348
vi recons
nushakrishnan 2677fa1
vi recons
nushakrishnan 3aa6150
renaming
nushakrishnan df103b4
virecons
nushakrishnan 720559b
vi reconstruction
nushakrishnan 475c500
keyframe selection
nushakrishnan d36f209
vi recon naming upd
nushakrishnan acb9932
vi recon
nushakrishnan 6647ab0
run pipeline
nushakrishnan cdb9af0
mv control point
nushakrishnan 3111204
structs cps
nushakrishnan 9f3175b
mv
nushakrishnan 7579168
fix circular import
nushakrishnan 71ffb66
to vi
nushakrishnan a31a17b
fix
nushakrishnan 533b10a
vi opt
nushakrishnan f2b4756
ruff
nushakrishnan aeba49d
timestamps
nushakrishnan 61b5a6d
timestamps
nushakrishnan 6480840
func
nushakrishnan 67d052f
estimate upd
nushakrishnan 71e881b
timestamp naming
nushakrishnan ff08e45
cps struct
nushakrishnan e11c88a
ruff
nushakrishnan 1fcd1fa
sparse eval variables
nushakrishnan 1370755
cleaner sparse eval
nushakrishnan 67524f6
init recon with cameras
nushakrishnan 7e05703
aria
nushakrishnan 0633595
updating est
nushakrishnan 161cae2
naming
nushakrishnan cc3de83
naming
nushakrishnan 2a160f7
fixes
nushakrishnan fdb0515
renmaing
nushakrishnan 13af9cd
fixes
nushakrishnan 164c0ae
fixes
nushakrishnan 4b374bb
cp
nushakrishnan 4185886
structs for sparse eval
nushakrishnan 35e2077
result
nushakrishnan 8ba62a3
fix
nushakrishnan f036160
fixes
nushakrishnan a63f8ba
fixes
nushakrishnan b49a0d3
fix
nushakrishnan 73b2989
eval
nushakrishnan a07d713
add load fn for result
nushakrishnan 7b69dc9
load from file
nushakrishnan edbfbe0
fix loading
nushakrishnan e87ff5f
return type
nushakrishnan 9f101e9
return
nushakrishnan 4846d6a
todo
nushakrishnan 9e398f5
readme init
nushakrishnan 1d5e77d
ruff
nushakrishnan e3d7623
readme
nushakrishnan 2dabcbd
read
nushakrishnan 76b9d9b
readme init, assets
nushakrishnan 1492095
spacing
nushakrishnan 3d212d6
quickstart shell
nushakrishnan 93279f6
req.txt
nushakrishnan b50c539
proj aria tools
nushakrishnan abad621
pgt nd traj association
nushakrishnan 38f8469
ts
nushakrishnan e739267
ruff
nushakrishnan 7de41da
argparser
nushakrishnan 5ae7582
req
nushakrishnan 77dca6a
pr
nushakrishnan 4579c20
op path desc
nushakrishnan b557af6
fix requirements.txt
B1ueber2y a16b097
useless str in sensoroptions
nushakrishnan ae305f5
aria upd
nushakrishnan e7ba58b
rm stream id
nushakrishnan d96f919
streamid intro in vrs to asl
nushakrishnan 5f26deb
streamid
nushakrishnan be0edee
sparse eval result naming
nushakrishnan d307b53
rm cp reproj std
nushakrishnan bd0d6a4
sparse
nushakrishnan 084ab39
rm cp reproj std
nushakrishnan e9cf2dc
Merge branch 'dev' of github.com:cvg/lamaria into dev
nushakrishnan 5706ef6
imu camera
nushakrishnan c24e3ac
aria imu dummy camera
nushakrishnan d48c76f
return reconstruction instead of path
nushakrishnan 85ef4bd
init recons
nushakrishnan 5f80383
types
nushakrishnan 5e3f9e3
return
nushakrishnan 7e86ed4
init recons
nushakrishnan 2ede45d
aria
nushakrishnan 3cea488
data input
nushakrishnan b32f97c
renaming
nushakrishnan d42622c
upd control point
nushakrishnan d020ee9
comment
nushakrishnan 9c49ecc
comms
nushakrishnan 6cf98e4
fix
nushakrishnan 1d44bbc
cp
nushakrishnan e897285
ssparse
nushakrishnan 2bd2787
eval
nushakrishnan a1039f8
sparse
nushakrishnan c1d95a2
ruff
nushakrishnan fef2a95
ruff
nushakrishnan 6e01271
cp tri
nushakrishnan 4893e65
cp
nushakrishnan 5f85c29
cp trii
nushakrishnan a3ae3d6
fix
nushakrishnan a1a05d0
ruff
nushakrishnan a3e2e7a
ruff
nushakrishnan 5067f03
cp summary
nushakrishnan 046586a
abstract TimedReconstruction and refactor I/O.
B1ueber2y ddda41d
ev
nushakrishnan 826d410
sparse eval
nushakrishnan a775626
Merge branch 'dev' into shaohui/dev
B1ueber2y adadd29
format and fix.
B1ueber2y 05fcc3b
format
B1ueber2y a57e41b
f
nushakrishnan 2fc7835
metrics
nushakrishnan 3d34855
evo eval against mps
nushakrishnan 7b02733
unused import
nushakrishnan 5cec9ed
traj
nushakrishnan 39a8423
traj
nushakrishnan 54c3bb9
eval wrt mps
nushakrishnan 9c8ca1a
evo eval
nushakrishnan c82690d
ate rmse
nushakrishnan abc13a2
ruff
nushakrishnan c625bf4
ruff
nushakrishnan abd86dd
fix
nushakrishnan e687790
split estimate and mps in the data init.
B1ueber2y 811e9f7
fix and format
B1ueber2y 80be58d
fix
B1ueber2y 4d34a8b
format
B1ueber2y 41f5f9b
Merge branch 'dev' into shaohui/dev
B1ueber2y 4e74cb1
installation readme
nushakrishnan f371eeb
minor
B1ueber2y 163f194
vrs installation tools
nushakrishnan cfaea93
Merge pull request #3 from cvg/shaohui/dev
nushakrishnan c8b8327
Merge branch 'dev' of github.com:cvg/lamaria into dev
nushakrishnan db93e99
fix broken impl
B1ueber2y 0b12d3b
format
B1ueber2y a7bed5f
RGB CAMERA STREAM ID
nushakrishnan 4a52e36
Merge branch 'dev' of github.com:cvg/lamaria into dev
nushakrishnan 5305ca8
mv into pipeline
nushakrishnan 5513115
pyproject toml
nushakrishnan c4280bf
ruff
nushakrishnan f6f6eae
readme
nushakrishnan 8001bde
download lamaria
nushakrishnan 0e8aaa7
Download section
nushakrishnan 336961f
more readme
nushakrishnan 995136b
download dataset
nushakrishnan 8340dac
download
nushakrishnan e9df9ff
readme
nushakrishnan c15be65
demo data folder
nushakrishnan 6e2d3e9
toml
nushakrishnan dec0aa8
quick start
nushakrishnan eb55944
ruff
nushakrishnan 2de021e
read
nushakrishnan 1ba9277
evo fix
nushakrishnan cdf01f7
readme
nushakrishnan 1d1ab11
fix
nushakrishnan a7b7b0b
pose recall
nushakrishnan 450f7c1
pgt
nushakrishnan f6308f7
no need for op path
nushakrishnan 01529bb
space
nushakrishnan 4a3eeb1
array
nushakrishnan 0c0b87b
readme
nushakrishnan 20e2862
pgt
nushakrishnan 6755bb0
ruff
nushakrishnan d2b735d
Readme
nushakrishnan f35fd6e
readme
nushakrishnan c07c27e
readme
nushakrishnan e07ab9d
readme
nushakrishnan f83e525
readme
nushakrishnan 11f7638
logo
nushakrishnan d41aba6
readne
nushakrishnan 4b07bdb
tools
nushakrishnan f334909
naming consistency
nushakrishnan 66fe2eb
readme
nushakrishnan d9bf622
fix
nushakrishnan 3d11031
ros1bag
nushakrishnan 2671380
read
nushakrishnan 3333a69
readme
nushakrishnan 42826a4
readme
nushakrishnan b7b637f
evo bagpy and cvbridge
nushakrishnan ea77454
llaalalaa
nushakrishnan 0b10ca7
download
nushakrishnan 916b388
readme changes
nushakrishnan 60de167
sizes
nushakrishnan 4de2fbf
fix
nushakrishnan 5da1c3d
collapsed
nushakrishnan 145987c
read
nushakrishnan eb52368
better
nushakrishnan c3065d7
train test split
nushakrishnan 0c67fd9
readme
nushakrishnan 871c9fa
readme comments without viz
nushakrishnan 6dc8c33
mps estimate trajec
nushakrishnan 3e91c34
readme
nushakrishnan aee915a
removing the rudeness from readme
nushakrishnan 748ac9d
rm mps
nushakrishnan 46bf992
mps ocal rm
nushakrishnan e6a118d
rm mps
nushakrishnan 100cbe3
use mps
nushakrishnan 48b8025
rm mps
nushakrishnan 9460a87
rm has slam drops
nushakrishnan 066035c
make output_dir mandatory.
B1ueber2y 1093ed2
fix.
B1ueber2y 4e7b35b
change example to lighter sequences.
B1ueber2y de29d77
adapt file structure
B1ueber2y 59604b4
rename pseudo_dense and sparse into pGT and control_points.
B1ueber2y 5289efe
fix readme
B1ueber2y 414af60
update readme
B1ueber2y 21d6227
update demo paths
B1ueber2y 0377cd6
update vi optim
B1ueber2y 262d4f6
update
B1ueber2y 9a99605
update
B1ueber2y 3405124
update
B1ueber2y 5800ec9
add note on imu bottleneck. add ruff==0.12.7 to requirements.txt
B1ueber2y 1e8885a
format
B1ueber2y b82fbd1
fix
B1ueber2y 88b51af
SE3 type hint.
B1ueber2y c10748c
optimized
nushakrishnan aa9c1da
resukt
nushakrishnan ae3a5be
red
nushakrishnan f7746b7
fix vi demo script and remove figure.
B1ueber2y File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| **/__pycache__/ | ||
| .DS_Store |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| # Default configuration for run_pipeline.py | ||
|
|
||
| output_path: /output | ||
|
|
||
| sensor: | ||
| camera_model: RAD_TAN_THIN_PRISM_FISHEYE | ||
|
|
||
| keyframing: | ||
| max_rotation: 20.0 | ||
| max_distance: 1.0 | ||
| max_elapsed: 1e9 # 1 second in ns | ||
|
|
||
| triangulation: | ||
| feature_conf: aliked-n16 | ||
| matcher_conf: aliked+lightglue | ||
| retrieval_conf: netvlad | ||
| num_retrieval_matches: 5 | ||
|
|
||
| # relaxed triangulation | ||
| # https://github.com/colmap/colmap/blob/dbdb3cd5a9a90a01b7e1096905ba2ffc34a68b82/src/colmap/sfm/incremental_triangulator.h | ||
nushakrishnan marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| merge_max_reproj_error: 15.0 | ||
| complete_max_reproj_error: 15.0 | ||
| min_angle: 1.0 | ||
|
|
||
| # https://github.com/colmap/colmap/blob/dbdb3cd5a9a90a01b7e1096905ba2ffc34a68b82/src/colmap/sfm/incremental_mapper.h | ||
nushakrishnan marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| filter_max_reproj_error: 15.0 | ||
| filter_min_tri_angle: 1.0 | ||
|
|
||
| optimization: | ||
| general: | ||
| use_callback: true | ||
| max_num_iterations: 10 | ||
| normalize_reconstruction: false | ||
| minimizer_progress_to_stdout: true | ||
| update_state_every_iteration: true | ||
|
|
||
| cam: | ||
| feature_std: 1.0 | ||
| optimize_focal_length: false | ||
| optimize_principal_point: false | ||
| optimize_extra_params: false | ||
| optimize_cam_from_rig: false | ||
|
|
||
| imu: | ||
| optimize_scale: false | ||
| optimize_gravity: false | ||
| optimize_imu_from_rig: false | ||
| optimize_bias: true | ||
| gyro_infl: 1.0 | ||
| acc_infl: 1.0 | ||
| integration_noise_density: 0.05 | ||
|
|
||
| mps: | ||
| use_mps: false | ||
| use_online_calibration: false # relevant only when use_mps is true (for online calib file) | ||
| has_slam_drops: false | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| import logging | ||
|
|
||
| formatter = logging.Formatter( | ||
| fmt="[%(asctime)s %(name)s %(levelname)s] %(message)s", | ||
| datefmt="%Y/%m/%d %H:%M:%S", | ||
| ) | ||
| handler = logging.StreamHandler() | ||
| handler.setFormatter(formatter) | ||
|
|
||
| logger = logging.getLogger(__name__) | ||
| logger.setLevel(logging.INFO) | ||
| logger.addHandler(handler) | ||
| logger.propagate = False |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,182 @@ | ||
| from __future__ import annotations | ||
|
|
||
| from dataclasses import dataclass, field, replace | ||
| from typing import Optional | ||
| from omegaconf import OmegaConf, open_dict | ||
|
|
||
| def _structured_merge_to_obj(cls, section) -> object: | ||
| """ | ||
| Merge a YAML section onto a structured | ||
| config made from the dataclass `cls`, | ||
| then return a dataclass instance. | ||
| """ | ||
| base = OmegaConf.structured(cls) | ||
| merged = OmegaConf.merge(base, section or {}) | ||
| return OmegaConf.to_object(merged) | ||
|
|
||
|
|
||
| # General options | ||
| @dataclass(slots=True) | ||
| class MPSOptions: | ||
| use_mps: bool = False | ||
nushakrishnan marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| use_online_calibration: bool = False # when use_mps is true (for online calib file) | ||
| has_slam_drops: bool = False # check vrs json metadata file for each sequence | ||
|
|
||
| @classmethod | ||
| def load( | ||
| cls, | ||
| cfg: Optional[OmegaConf] = None | ||
| ) -> MPSOptions: | ||
| if cfg is None: | ||
| return cls() | ||
|
|
||
| return _structured_merge_to_obj(cls, cfg) | ||
|
|
||
|
|
||
| @dataclass(slots=True) | ||
| class SensorOptions: | ||
| left_cam_stream_id: str = "1201-1" | ||
| right_cam_stream_id: str = "1201-2" | ||
| right_imu_stream_id: str = "1202-1" | ||
| camera_model: str = "RAD_TAN_THIN_PRISM_FISHEYE" | ||
|
|
||
| @classmethod | ||
| def load( | ||
| cls, | ||
| cfg: Optional[OmegaConf] = None | ||
| ) -> "SensorOptions": | ||
| if cfg is None: | ||
| return cls() | ||
|
|
||
| obj: SensorOptions = _structured_merge_to_obj(cls, cfg) | ||
| return obj | ||
|
|
||
|
|
||
| # Estimate to COLMAP options | ||
| @dataclass(slots=True) | ||
| class EstimateToColmapOptions: | ||
| mps: MPSOptions = field(default_factory=MPSOptions) | ||
| sensor: SensorOptions = field(default_factory=SensorOptions) | ||
|
|
||
| @classmethod | ||
| def load( | ||
| cls, | ||
| cfg_mps: Optional[OmegaConf] = None, | ||
| cfg_sensor: Optional[OmegaConf] = None, | ||
| ) -> EstimateToColmapOptions: | ||
|
|
||
| if cfg_mps is None or cfg_sensor is None: | ||
| return cls() | ||
|
|
||
| base = cls() | ||
| return replace( | ||
| base, | ||
| mps=MPSOptions.load(cfg_mps), | ||
| sensor=SensorOptions.load(cfg_sensor) | ||
| ) | ||
|
|
||
|
|
||
| # Keyframing options | ||
| @dataclass(slots=True) | ||
| class KeyframeSelectorOptions: | ||
| max_rotation: float = 20.0 # degrees | ||
| max_distance: float = 1.0 # meters | ||
| max_elapsed: int = int(1e9) # 1 second in ns | ||
|
|
||
| @classmethod | ||
| def load( | ||
| cls, | ||
| cfg: Optional[OmegaConf] = None | ||
| ) -> "KeyframeSelectorOptions": | ||
| if cfg is None: | ||
| return cls() | ||
|
|
||
| cfg = OmegaConf.create(cfg) | ||
| with open_dict(cfg): | ||
| if "max_elapsed" in cfg and isinstance(cfg.max_elapsed, float): | ||
| cfg.max_elapsed = int(cfg.max_elapsed) | ||
|
|
||
| obj: KeyframeSelectorOptions = _structured_merge_to_obj(cls, cfg) | ||
| return obj | ||
|
|
||
|
|
||
| # Triangulation options | ||
| @dataclass(slots=True) | ||
| class TriangulatorOptions: | ||
| feature_conf: str = "aliked-n16" | ||
| matcher_conf: str = "aliked+lightglue" | ||
| retrieval_conf: str = "netvlad" | ||
| num_retrieval_matches: int = 5 | ||
|
|
||
| # colmap defaults | ||
| merge_max_reproj_error: float = 4.0 | ||
| complete_max_reproj_error: float = 4.0 | ||
| min_angle: float = 1.5 | ||
|
|
||
| filter_max_reproj_error: float = 4.0 | ||
| filter_min_tri_angle: float = 1.5 | ||
|
|
||
| @classmethod | ||
| def load( | ||
| cls, | ||
| cfg: Optional[OmegaConf] = None | ||
| ) -> "TriangulatorOptions": | ||
| if cfg is None: | ||
| return cls() | ||
|
|
||
| return _structured_merge_to_obj(cls, cfg) | ||
|
|
||
|
|
||
| # Optimization options | ||
| @dataclass(slots=True) | ||
| class OptCamOptions: | ||
| feature_std: float = 1.0 # in pixels | ||
| optimize_focal_length: bool = False | ||
| optimize_principal_point: bool = False | ||
| optimize_extra_params: bool = False | ||
| optimize_cam_from_rig: bool = False | ||
|
|
||
| @dataclass(slots=True) | ||
| class OptIMUOptions: | ||
| gyro_infl: float = 1.0 | ||
| acc_infl: float = 1.0 | ||
| integration_noise_density: float = 0.05 | ||
|
|
||
| optimize_scale: bool = False | ||
| optimize_gravity: bool = False | ||
| optimize_imu_from_rig: bool = False | ||
| optimize_bias: bool = False | ||
|
|
||
| @dataclass(slots=True) | ||
| class OptOptions: | ||
| use_callback: bool = True | ||
| max_num_iterations: int = 10 | ||
| normalize_reconstruction: bool = False | ||
| minimizer_progress_to_stdout: bool = True | ||
| update_state_every_iteration: bool = True | ||
|
|
||
| @dataclass(slots=True) | ||
| class VIOptimizerOptions: | ||
| cam: OptCamOptions = field(default_factory=OptCamOptions) | ||
| imu: OptIMUOptions = field(default_factory=OptIMUOptions) | ||
| optim: OptOptions = field(default_factory=OptOptions) | ||
|
|
||
| @classmethod | ||
| def load( | ||
| cls, | ||
| cfg: Optional[OmegaConf] = None | ||
| ) -> "VIOptimizerOptions": | ||
| if cfg is None: | ||
| return cls() | ||
|
|
||
| base = cls() | ||
| cam = _structured_merge_to_obj(OptCamOptions, cfg.cam) | ||
| imu = _structured_merge_to_obj(OptIMUOptions, cfg.imu) | ||
| optim = _structured_merge_to_obj(OptOptions, cfg.general) | ||
|
|
||
| return replace( | ||
| base, | ||
| cam=cam, | ||
| imu=imu, | ||
| optim=optim, | ||
| ) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,107 @@ | ||
| from pathlib import Path | ||
| from typing import Optional, Sequence | ||
| from omegaconf import OmegaConf, DictConfig | ||
|
|
||
| from .options import ( | ||
| EstimateToColmapOptions, | ||
| VIOptimizerOptions, | ||
| TriangulatorOptions, | ||
| KeyframeSelectorOptions, | ||
| ) | ||
|
|
||
| class PipelineOptions: | ||
| def __init__(self) -> None: | ||
| self._output_path: Path = Path("output/") | ||
B1ueber2y marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| self._estimate_to_colmap_options: EstimateToColmapOptions = EstimateToColmapOptions() | ||
| self._keyframing_options: KeyframeSelectorOptions = KeyframeSelectorOptions() | ||
| self._triangulator_options: TriangulatorOptions = TriangulatorOptions() | ||
| self._vi_optimizer_options: VIOptimizerOptions = VIOptimizerOptions() | ||
|
|
||
| def load( | ||
| self, | ||
| yaml: Path | str, | ||
| cli_overrides: Optional[Sequence[str]] = None, | ||
| ) -> None: | ||
| """Load configuration from a YAML file and apply any overrides.""" | ||
| cfg = OmegaConf.load(str(yaml)) | ||
| if cli_overrides: | ||
| cfg = OmegaConf.merge(cfg, OmegaConf.from_dotlist(list(cli_overrides))) | ||
| OmegaConf.resolve(cfg) | ||
|
|
||
| self._update_from_cfg(cfg) | ||
|
|
||
| def _update_from_cfg(self, cfg: DictConfig) -> None: | ||
| """Update object attributes from a config.""" | ||
| self._estimate_to_colmap_options = EstimateToColmapOptions.load( | ||
| cfg.mps, | ||
| cfg.sensor, | ||
| ) | ||
| self._keyframing_options = KeyframeSelectorOptions.load(cfg.keyframing) | ||
| self._triangulator_options = TriangulatorOptions.load(cfg.triangulation) | ||
| self._vi_optimizer_options = VIOptimizerOptions.load(cfg.optimization) | ||
|
|
||
| out = cfg.get("output_path", None) | ||
| self._output_path = Path(out) if out is not None else Path("/output/") | ||
|
|
||
| @property | ||
| def output_path(self) -> Path: | ||
| """Get the parent output path.""" | ||
| return self._output_path | ||
|
|
||
| @output_path.setter | ||
| def output_path(self, path: Path) -> None: | ||
| """Set the parent output path.""" | ||
| self._output_path = path | ||
|
|
||
| # Properties for estimate to COLMAP | ||
| @property | ||
| def estimate_to_colmap_options(self) -> EstimateToColmapOptions: | ||
| return self._estimate_to_colmap_options | ||
|
|
||
| @property | ||
| def images(self) -> Path: | ||
nushakrishnan marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| return self._output_path / "images" | ||
|
|
||
| @property | ||
| def colmap_model(self) -> Path: | ||
nushakrishnan marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| return self._output_path / "initial_recon" | ||
|
|
||
| # Properties for keyframing | ||
| @property | ||
| def keyframing_options(self) -> KeyframeSelectorOptions: | ||
| return self._keyframing_options | ||
|
|
||
| @property | ||
| def keyframes(self) -> Path: | ||
nushakrishnan marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| return self._output_path / "keyframes" | ||
|
|
||
| @property | ||
| def kf_model(self) -> Path: | ||
nushakrishnan marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| return self._output_path / "keyframed_recon" | ||
|
|
||
| # Properties for triangulation | ||
| @property | ||
| def triangulator_options(self) -> TriangulatorOptions: | ||
| return self._triangulator_options | ||
|
|
||
| @property | ||
| def hloc(self) -> Path: | ||
nushakrishnan marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| return self._output_path / "hloc" | ||
|
|
||
| @property | ||
| def pairs_file(self) -> Path: | ||
| return self._output_path / "hloc" / "pairs.txt" | ||
|
|
||
| @property | ||
| def tri_model(self) -> Path: | ||
nushakrishnan marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| return self._output_path / "triangulated_recon" | ||
|
|
||
| # Properties for visual-inertial optimization | ||
| @property | ||
| def vi_optimizer_options(self) -> VIOptimizerOptions: | ||
| return self._vi_optimizer_options | ||
|
|
||
| @property | ||
| def optim_model(self) -> Path: | ||
nushakrishnan marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| return self._output_path / "optim_recon" | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.