Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
673 commits
Select commit Hold shift + click to select a range
75834f0
fix
nushakrishnan Sep 28, 2025
210f55e
naming
nushakrishnan Sep 28, 2025
0b45d8f
rm dummy imu params
nushakrishnan Sep 28, 2025
7ecafcb
upd init
nushakrishnan Sep 28, 2025
1cff2ed
colmap links
nushakrishnan Sep 28, 2025
8fbeab2
delete files from folder
nushakrishnan Sep 28, 2025
4c74190
unused func
nushakrishnan Sep 28, 2025
e5e949f
ruff
nushakrishnan Sep 28, 2025
522bb5c
clear unused fn
nushakrishnan Sep 28, 2025
1e31dc5
ruff
nushakrishnan Sep 28, 2025
3a581ad
mv extraction
nushakrishnan Sep 28, 2025
8ba0a6a
mv
nushakrishnan Sep 28, 2025
bfa8070
vrs
nushakrishnan Sep 28, 2025
beab16b
extract fix
nushakrishnan Sep 28, 2025
1185f6a
del
nushakrishnan Sep 28, 2025
05fa8ca
sync
nushakrishnan Sep 28, 2025
1e80750
importing sync
nushakrishnan Sep 28, 2025
4e1d10b
estimate loading
nushakrishnan Sep 28, 2025
46c3abe
estimate
nushakrishnan Sep 28, 2025
f0341a1
revert
nushakrishnan Sep 28, 2025
4447fb5
estimate class upd
nushakrishnan Sep 28, 2025
a634047
init recon from calib file
nushakrishnan Sep 28, 2025
590f680
sparse eval
nushakrishnan Sep 28, 2025
9f3d8e0
est upd
nushakrishnan Sep 28, 2025
4567c4f
estimate
nushakrishnan Sep 28, 2025
010a108
undistort asl add cameras rm
nushakrishnan Sep 28, 2025
fdb763b
util fn init recon from claib
nushakrishnan Sep 28, 2025
21dbae5
sparse eval
nushakrishnan Sep 28, 2025
5817d5a
ruff
nushakrishnan Sep 28, 2025
73f14b0
est upd
nushakrishnan Sep 28, 2025
04aeab9
ruff
nushakrishnan Sep 28, 2025
d319d94
edits
nushakrishnan Sep 28, 2025
806d9de
lamaria recons
nushakrishnan Sep 28, 2025
59da348
vi recons
nushakrishnan Sep 28, 2025
2677fa1
vi recons
nushakrishnan Sep 28, 2025
3aa6150
renaming
nushakrishnan Sep 28, 2025
df103b4
virecons
nushakrishnan Sep 28, 2025
720559b
vi reconstruction
nushakrishnan Sep 28, 2025
475c500
keyframe selection
nushakrishnan Sep 28, 2025
d36f209
vi recon naming upd
nushakrishnan Sep 28, 2025
acb9932
vi recon
nushakrishnan Sep 28, 2025
6647ab0
run pipeline
nushakrishnan Sep 28, 2025
cdb9af0
mv control point
nushakrishnan Sep 28, 2025
3111204
structs cps
nushakrishnan Sep 28, 2025
9f3175b
mv
nushakrishnan Sep 28, 2025
7579168
fix circular import
nushakrishnan Sep 28, 2025
71ffb66
to vi
nushakrishnan Sep 28, 2025
a31a17b
fix
nushakrishnan Sep 28, 2025
533b10a
vi opt
nushakrishnan Sep 28, 2025
f2b4756
ruff
nushakrishnan Sep 28, 2025
aeba49d
timestamps
nushakrishnan Sep 28, 2025
61b5a6d
timestamps
nushakrishnan Sep 28, 2025
6480840
func
nushakrishnan Sep 28, 2025
67d052f
estimate upd
nushakrishnan Sep 28, 2025
71e881b
timestamp naming
nushakrishnan Sep 28, 2025
ff08e45
cps struct
nushakrishnan Sep 28, 2025
e11c88a
ruff
nushakrishnan Sep 28, 2025
1fcd1fa
sparse eval variables
nushakrishnan Sep 28, 2025
1370755
cleaner sparse eval
nushakrishnan Sep 28, 2025
67524f6
init recon with cameras
nushakrishnan Sep 29, 2025
7e05703
aria
nushakrishnan Sep 29, 2025
0633595
updating est
nushakrishnan Sep 29, 2025
161cae2
naming
nushakrishnan Sep 29, 2025
cc3de83
naming
nushakrishnan Sep 29, 2025
2a160f7
fixes
nushakrishnan Sep 29, 2025
fdb0515
renmaing
nushakrishnan Sep 29, 2025
13af9cd
fixes
nushakrishnan Sep 29, 2025
164c0ae
fixes
nushakrishnan Sep 29, 2025
4b374bb
cp
nushakrishnan Sep 29, 2025
4185886
structs for sparse eval
nushakrishnan Sep 29, 2025
35e2077
result
nushakrishnan Sep 29, 2025
8ba62a3
fix
nushakrishnan Sep 29, 2025
f036160
fixes
nushakrishnan Sep 29, 2025
a63f8ba
fixes
nushakrishnan Sep 29, 2025
b49a0d3
fix
nushakrishnan Sep 29, 2025
73b2989
eval
nushakrishnan Sep 29, 2025
a07d713
add load fn for result
nushakrishnan Sep 29, 2025
7b69dc9
load from file
nushakrishnan Sep 29, 2025
edbfbe0
fix loading
nushakrishnan Sep 29, 2025
e87ff5f
return type
nushakrishnan Sep 29, 2025
9f101e9
return
nushakrishnan Sep 29, 2025
4846d6a
todo
nushakrishnan Sep 29, 2025
9e398f5
readme init
nushakrishnan Sep 29, 2025
1d5e77d
ruff
nushakrishnan Sep 29, 2025
e3d7623
readme
nushakrishnan Sep 29, 2025
2dabcbd
read
nushakrishnan Sep 29, 2025
76b9d9b
readme init, assets
nushakrishnan Sep 29, 2025
1492095
spacing
nushakrishnan Sep 29, 2025
3d212d6
quickstart shell
nushakrishnan Sep 29, 2025
93279f6
req.txt
nushakrishnan Sep 29, 2025
b50c539
proj aria tools
nushakrishnan Sep 29, 2025
abad621
pgt nd traj association
nushakrishnan Sep 29, 2025
38f8469
ts
nushakrishnan Sep 29, 2025
e739267
ruff
nushakrishnan Sep 29, 2025
7de41da
argparser
nushakrishnan Sep 29, 2025
5ae7582
req
nushakrishnan Sep 29, 2025
77dca6a
pr
nushakrishnan Sep 29, 2025
4579c20
op path desc
nushakrishnan Sep 29, 2025
b557af6
fix requirements.txt
B1ueber2y Sep 29, 2025
a16b097
useless str in sensoroptions
nushakrishnan Sep 29, 2025
ae305f5
aria upd
nushakrishnan Sep 29, 2025
e7ba58b
rm stream id
nushakrishnan Sep 29, 2025
d96f919
streamid intro in vrs to asl
nushakrishnan Sep 29, 2025
5f26deb
streamid
nushakrishnan Sep 29, 2025
be0edee
sparse eval result naming
nushakrishnan Sep 29, 2025
d307b53
rm cp reproj std
nushakrishnan Sep 29, 2025
bd0d6a4
sparse
nushakrishnan Sep 29, 2025
084ab39
rm cp reproj std
nushakrishnan Sep 29, 2025
e9cf2dc
Merge branch 'dev' of github.com:cvg/lamaria into dev
nushakrishnan Sep 29, 2025
5706ef6
imu camera
nushakrishnan Sep 29, 2025
c24e3ac
aria imu dummy camera
nushakrishnan Sep 29, 2025
d48c76f
return reconstruction instead of path
nushakrishnan Sep 29, 2025
85ef4bd
init recons
nushakrishnan Sep 29, 2025
5f80383
types
nushakrishnan Sep 29, 2025
5e3f9e3
return
nushakrishnan Sep 29, 2025
7e86ed4
init recons
nushakrishnan Sep 29, 2025
2ede45d
aria
nushakrishnan Sep 29, 2025
3cea488
data input
nushakrishnan Sep 29, 2025
b32f97c
renaming
nushakrishnan Sep 29, 2025
d42622c
upd control point
nushakrishnan Sep 29, 2025
d020ee9
comment
nushakrishnan Sep 29, 2025
9c49ecc
comms
nushakrishnan Sep 29, 2025
6cf98e4
fix
nushakrishnan Sep 29, 2025
1d44bbc
cp
nushakrishnan Sep 29, 2025
e897285
ssparse
nushakrishnan Sep 29, 2025
2bd2787
eval
nushakrishnan Sep 29, 2025
a1039f8
sparse
nushakrishnan Sep 29, 2025
c1d95a2
ruff
nushakrishnan Sep 29, 2025
fef2a95
ruff
nushakrishnan Sep 29, 2025
6e01271
cp tri
nushakrishnan Sep 29, 2025
4893e65
cp
nushakrishnan Sep 29, 2025
5f85c29
cp trii
nushakrishnan Sep 29, 2025
a3ae3d6
fix
nushakrishnan Sep 29, 2025
a1a05d0
ruff
nushakrishnan Sep 29, 2025
a3e2e7a
ruff
nushakrishnan Sep 29, 2025
5067f03
cp summary
nushakrishnan Sep 29, 2025
046586a
abstract TimedReconstruction and refactor I/O.
B1ueber2y Sep 29, 2025
ddda41d
ev
nushakrishnan Sep 29, 2025
826d410
sparse eval
nushakrishnan Sep 29, 2025
a775626
Merge branch 'dev' into shaohui/dev
B1ueber2y Sep 29, 2025
adadd29
format and fix.
B1ueber2y Sep 29, 2025
05fcc3b
format
B1ueber2y Sep 29, 2025
a57e41b
f
nushakrishnan Sep 29, 2025
2fc7835
metrics
nushakrishnan Sep 29, 2025
3d34855
evo eval against mps
nushakrishnan Sep 29, 2025
7b02733
unused import
nushakrishnan Sep 29, 2025
5cec9ed
traj
nushakrishnan Sep 29, 2025
39a8423
traj
nushakrishnan Sep 29, 2025
54c3bb9
eval wrt mps
nushakrishnan Sep 29, 2025
9c8ca1a
evo eval
nushakrishnan Sep 29, 2025
c82690d
ate rmse
nushakrishnan Sep 29, 2025
abc13a2
ruff
nushakrishnan Sep 29, 2025
c625bf4
ruff
nushakrishnan Sep 29, 2025
abd86dd
fix
nushakrishnan Sep 29, 2025
e687790
split estimate and mps in the data init.
B1ueber2y Sep 29, 2025
811e9f7
fix and format
B1ueber2y Sep 29, 2025
80be58d
fix
B1ueber2y Sep 29, 2025
4d34a8b
format
B1ueber2y Sep 29, 2025
41f5f9b
Merge branch 'dev' into shaohui/dev
B1ueber2y Sep 29, 2025
4e74cb1
installation readme
nushakrishnan Sep 29, 2025
f371eeb
minor
B1ueber2y Sep 29, 2025
163f194
vrs installation tools
nushakrishnan Sep 29, 2025
cfaea93
Merge pull request #3 from cvg/shaohui/dev
nushakrishnan Sep 29, 2025
c8b8327
Merge branch 'dev' of github.com:cvg/lamaria into dev
nushakrishnan Sep 29, 2025
db93e99
fix broken impl
B1ueber2y Sep 29, 2025
0b12d3b
format
B1ueber2y Sep 29, 2025
a7bed5f
RGB CAMERA STREAM ID
nushakrishnan Sep 29, 2025
4a52e36
Merge branch 'dev' of github.com:cvg/lamaria into dev
nushakrishnan Sep 29, 2025
5305ca8
mv into pipeline
nushakrishnan Sep 29, 2025
5513115
pyproject toml
nushakrishnan Sep 29, 2025
c4280bf
ruff
nushakrishnan Sep 29, 2025
f6f6eae
readme
nushakrishnan Sep 29, 2025
8001bde
download lamaria
nushakrishnan Sep 29, 2025
0e8aaa7
Download section
nushakrishnan Sep 29, 2025
336961f
more readme
nushakrishnan Sep 29, 2025
995136b
download dataset
nushakrishnan Sep 29, 2025
8340dac
download
nushakrishnan Sep 29, 2025
e9df9ff
readme
nushakrishnan Sep 29, 2025
c15be65
demo data folder
nushakrishnan Sep 29, 2025
6e2d3e9
toml
nushakrishnan Sep 29, 2025
dec0aa8
quick start
nushakrishnan Sep 29, 2025
eb55944
ruff
nushakrishnan Sep 29, 2025
2de021e
read
nushakrishnan Sep 29, 2025
1ba9277
evo fix
nushakrishnan Sep 29, 2025
cdf01f7
readme
nushakrishnan Sep 30, 2025
1d1ab11
fix
nushakrishnan Sep 30, 2025
a7b7b0b
pose recall
nushakrishnan Sep 30, 2025
450f7c1
pgt
nushakrishnan Sep 30, 2025
f6308f7
no need for op path
nushakrishnan Sep 30, 2025
01529bb
space
nushakrishnan Sep 30, 2025
4a3eeb1
array
nushakrishnan Sep 30, 2025
0c0b87b
readme
nushakrishnan Sep 30, 2025
20e2862
pgt
nushakrishnan Sep 30, 2025
6755bb0
ruff
nushakrishnan Sep 30, 2025
d2b735d
Readme
nushakrishnan Sep 30, 2025
f35fd6e
readme
nushakrishnan Sep 30, 2025
c07c27e
readme
nushakrishnan Sep 30, 2025
e07ab9d
readme
nushakrishnan Sep 30, 2025
f83e525
readme
nushakrishnan Sep 30, 2025
11f7638
logo
nushakrishnan Sep 30, 2025
d41aba6
readne
nushakrishnan Sep 30, 2025
4b07bdb
tools
nushakrishnan Sep 30, 2025
f334909
naming consistency
nushakrishnan Sep 30, 2025
66fe2eb
readme
nushakrishnan Sep 30, 2025
d9bf622
fix
nushakrishnan Sep 30, 2025
3d11031
ros1bag
nushakrishnan Sep 30, 2025
2671380
read
nushakrishnan Sep 30, 2025
3333a69
readme
nushakrishnan Sep 30, 2025
42826a4
readme
nushakrishnan Sep 30, 2025
b7b637f
evo bagpy and cvbridge
nushakrishnan Sep 30, 2025
ea77454
llaalalaa
nushakrishnan Sep 30, 2025
0b10ca7
download
nushakrishnan Sep 30, 2025
916b388
readme changes
nushakrishnan Sep 30, 2025
60de167
sizes
nushakrishnan Sep 30, 2025
4de2fbf
fix
nushakrishnan Sep 30, 2025
5da1c3d
collapsed
nushakrishnan Sep 30, 2025
145987c
read
nushakrishnan Sep 30, 2025
eb52368
better
nushakrishnan Sep 30, 2025
c3065d7
train test split
nushakrishnan Sep 30, 2025
0c67fd9
readme
nushakrishnan Sep 30, 2025
871c9fa
readme comments without viz
nushakrishnan Sep 30, 2025
6dc8c33
mps estimate trajec
nushakrishnan Sep 30, 2025
3e91c34
readme
nushakrishnan Sep 30, 2025
aee915a
removing the rudeness from readme
nushakrishnan Sep 30, 2025
748ac9d
rm mps
nushakrishnan Sep 30, 2025
46bf992
mps ocal rm
nushakrishnan Sep 30, 2025
e6a118d
rm mps
nushakrishnan Sep 30, 2025
100cbe3
use mps
nushakrishnan Sep 30, 2025
48b8025
rm mps
nushakrishnan Sep 30, 2025
9460a87
rm has slam drops
nushakrishnan Sep 30, 2025
066035c
make output_dir mandatory.
B1ueber2y Sep 30, 2025
1093ed2
fix.
B1ueber2y Sep 30, 2025
4e7b35b
change example to lighter sequences.
B1ueber2y Sep 30, 2025
de29d77
adapt file structure
B1ueber2y Sep 30, 2025
59604b4
rename pseudo_dense and sparse into pGT and control_points.
B1ueber2y Sep 30, 2025
5289efe
fix readme
B1ueber2y Sep 30, 2025
414af60
update readme
B1ueber2y Sep 30, 2025
21d6227
update demo paths
B1ueber2y Sep 30, 2025
0377cd6
update vi optim
B1ueber2y Sep 30, 2025
262d4f6
update
B1ueber2y Sep 30, 2025
9a99605
update
B1ueber2y Sep 30, 2025
3405124
update
B1ueber2y Sep 30, 2025
5800ec9
add note on imu bottleneck. add ruff==0.12.7 to requirements.txt
B1ueber2y Sep 30, 2025
1e8885a
format
B1ueber2y Sep 30, 2025
b82fbd1
fix
B1ueber2y Sep 30, 2025
88b51af
SE3 type hint.
B1ueber2y Sep 30, 2025
c10748c
optimized
nushakrishnan Sep 30, 2025
aa9c1da
resukt
nushakrishnan Sep 30, 2025
ae3a5be
red
nushakrishnan Sep 30, 2025
f7746b7
fix vi demo script and remove figure.
B1ueber2y Sep 30, 2025
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
18 changes: 13 additions & 5 deletions lamaria/eval/create_empty_recon_from_estimate.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ def add_images_to_reconstruction(
device_calibration_json: Path,
slam_input_imu: int = 1,
):
"""Add images to an existing empty reconstruction from a pose estimate file."""
"""Add images to an existing empty
reconstruction from a pose estimate file."""
pose_data = []
with open(estimate_file) as f:
lines = f.readlines()
Expand Down Expand Up @@ -141,11 +142,18 @@ def create_baseline_reconstruction(

Args:
estimate_file (Path): Path to the pose estimate file.

cp_json_file (Path): Path to the sparse GT json file.
device_calibration_json (Path): Path to the Aria device calibration json file.
output_path (Path): Path to the output folder where the reconstruction will be saved.
slam_input_imu (int, optional): If 1, the poses in the estimate file are IMU poses.
If 0, the poses are left camera poses (monocular-cam0).

device_calibration_json (Path):
Path to the Aria device calibration json file.

output_path (Path): Path to the output folder
where the reconstruction will be saved.

slam_input_imu (int, optional):
If 1, the poses in the estimate file are IMU poses.
If 0, the poses are left camera poses (monocular-cam0).
"""
recon_path = output_path / "reconstruction"
recon_path.mkdir(parents=True, exist_ok=True)
Expand Down
13 changes: 9 additions & 4 deletions lamaria/pipeline/keyframing/keyframe_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ def run(
original_image_dir: Path,
keyframes_dir: Path,
) -> LamariaReconstruction:
"""Entry point to run keyframing and copy keyframes into keyframe directory."""
"""Entry point to run keyframing and
copy keyframes into keyframe directory.
"""

selector = KeyframeSelector(options, data)
kf_recon = selector.run_keyframing()
Expand Down Expand Up @@ -236,9 +238,12 @@ def copy_images_to_keyframes_dir(
images: Path,
output: Path,
) -> Path:
"""Copy images corresponding to keyframes to a separate directory.
Images are expected to be in `images/left` and `images/right` subdirectories.
Check: `extract_images_from_vrs` in `lamaria/utils/general.py` for more details.
"""Copy images corresponding to
keyframes to a separate directory.
Images are expected to be in `images/left`
and `images/right` subdirectories.
Check: `extract_images_from_vrs` in
`lamaria/utils/general.py` for more details.
"""
if self.keyframe_frame_ids is None:
raise ValueError(
Expand Down
20 changes: 13 additions & 7 deletions lamaria/pipeline/keyframing/to_colmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ def _init_data(
estimate: Path | None = None,
mps_folder: Path | None = None,
) -> None:
"""Initializes data providers and extracts images, timestamps and builds per-frame data object.
"""Initializes data providers and extracts images, timestamps
and builds per-frame data object.
Per-frame data is used to create the initial Lamaria reconstruction.
"""

Expand Down Expand Up @@ -136,7 +137,7 @@ def _init_data(
if self.options.mps.use_mps:
timestamps = self._get_mps_timestamps()
closed_loop_data = get_closed_loop_data_from_mps(mps_folder)
pose_timestamps = [l for l, _ in timestamps]
pose_timestamps = [left for left, _ in timestamps]
mps_poses = get_mps_poses_for_timestamps(
closed_loop_data, pose_timestamps
)
Expand Down Expand Up @@ -270,9 +271,10 @@ def _get_mps_timestamps(self, max_diff=1e6) -> list[tuple[int, int]]:
"Unequal number of left and right timestamps"
)
matched = list(zip(L, R))
if not all(abs(l - r) < max_diff for l, r in matched):
if not all(abs(left - right) < max_diff for left, right in matched):
logger.warning(
f"Left and right timestamps differ by more than {max_diff} ns"
f"Left and right timestamps differ "
f"by more than {max_diff} ns"
)
else:
matched = get_matched_timestamps(L, R, max_diff)
Expand Down Expand Up @@ -451,7 +453,9 @@ def _add_online_sensors(self) -> None:
self.data.reconstruction.add_rig(rig)

def _add_device_frames(self) -> None:
"""Adds frame data for each rig, all rigs share same device calibrated sensors"""
"""Adds frame data for each rig,
all rigs share same device calibrated sensors
"""
image_id = 1

rig = self.data.reconstruction.rigs[1]
Expand Down Expand Up @@ -479,7 +483,8 @@ def _add_device_frames(self) -> None:
self.data.reconstruction.add_image(im)

def _add_online_frames(self) -> None:
"""Adds frame data for each rig, each rig has its own online calibrated sensors
"""Adds frame data for each rig, each rig has
its own online calibrated sensors

Frame ID layout:
fid=1 -> (imu=1, left=2, right=3), (image IDs: 1, 2);
Expand All @@ -497,7 +502,8 @@ def _add_online_frames(self) -> None:

images_to_add = []
# Camera ID layout from _add_online_sensors():
# fid=1 -> (imu=1, left=2, right=3); fid=2 -> (imu=4, left=5, right=6); ...
# fid=1 -> (imu=1, left=2, right=3);
# fid=2 -> (imu=4, left=5, right=6); ...
left_cam_id = 3 * fid - 1
right_cam_id = 3 * fid

Expand Down
13 changes: 8 additions & 5 deletions lamaria/pipeline/optim/iterative_global_ba.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ def adjust(
reg_image_ids = mapper.reconstruction.reg_image_ids()
if len(reg_image_ids) < 2:
logger.warning(
"At least two images must be registered for global bundle-adjustment"
"At least two images must be "
"registered for global bundle-adjustment"
)

ba_options = self._configure_ba_options(
Expand Down Expand Up @@ -177,7 +178,9 @@ def adjust(
)

def _configure_ba_options(self, pipeline_options, num_reg_images):
"""Configure bundle adjustment options based on number of registered images"""
"""Configure bundle adjustment options based on
number of registered images and pipeline options.
"""
ba_options = pipeline_options.get_global_bundle_adjustment()
ba_options.print_summary = True
ba_options.refine_rig_from_world = True # Refine rig poses
Expand Down Expand Up @@ -224,17 +227,17 @@ def refine(
# Configure triangulation options
tri_options = pipeline_options.get_triangulation()
mapper.complete_and_merge_tracks(tri_options)
num_retriangulated_observations = mapper.retriangulate(tri_options)
num_retri_obs = mapper.retriangulate(tri_options)
logging.verbose(
1,
f"=> Retriangulated observations: {num_retriangulated_observations}",
f"=> Retriangulated observations: {num_retri_obs}",
)

# Configure mapper options
mapper_options = pipeline_options.get_mapper()

# Iterative refinement
for i in range(pipeline_options.ba_global_max_refinements):
for _i in range(pipeline_options.ba_global_max_refinements):
num_observations = mapper.reconstruction.compute_num_observations()

GlobalBundleAdjustment.run(
Expand Down
2 changes: 1 addition & 1 deletion lamaria/pipeline/optim/residual.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def setup_manifolds_and_constraints(
problem.set_parameter_block_constant(session.imu_from_rig.translation)
if not imu_options.optimize_bias:
constant_idxs = np.arange(3, 9)
for frame_id in session.imu_states.keys():
for frame_id in session.imu_states:
problem.set_manifold(
session.imu_states[frame_id].data,
pyceres.SubsetManifold(9, constant_idxs),
Expand Down
2 changes: 1 addition & 1 deletion lamaria/pipeline/optim/triangulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def pairs_from_frames(recon: pycolmap.Reconstruction):
by_index[k].append(n)

adj_pairs = set()
for idx, seq in by_index.items():
for _idx, seq in by_index.items():
for a, b in zip(seq[:-1], seq[1:]):
adj_pairs.add((a, b))

Expand Down
14 changes: 9 additions & 5 deletions lamaria/utils/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,15 @@ def add_cameras_to_reconstruction(
reconstruction: pycolmap.Reconstruction,
calibration_file: Path,
) -> None:
"""Add Aria cameras to COLMAP reconstruction from calibration json file found on website:
https://lamaria.ethz.ch/slam_datasets
"""Add Aria cameras to COLMAP reconstruction from calibration
json file found on website: https://lamaria.ethz.ch/slam_datasets

Args:
reconstruction (pycolmap.Reconstruction): The COLMAP reconstruction to which cameras will be added
calibration_file (Path): Path to the Aria calibration json file
reconstruction (pycolmap.Reconstruction): The COLMAP reconstruction
to which cameras will be added

calibration_file (Path):
Path to the Aria calibration json file
"""

for i, (key, _) in enumerate(ARIA_CAMERAS):
Expand Down Expand Up @@ -61,7 +64,8 @@ def get_camera_params_for_colmap(
Convert Aria CameraCalibration to COLMAP camera parameters.
Supported models: OPENCV_FISHEYE, FULL_OPENCV, RAD_TAN_THIN_PRISM_FISHEYE
Args:
camera_calibration (CameraCalibration): The projectaria_tools CameraCalibration object
camera_calibration (CameraCalibration):
The projectaria_tools CameraCalibration object
camera_model (str): The COLMAP camera model to use
Returns:
list[float]: The camera parameters in COLMAP format
Expand Down
3 changes: 2 additions & 1 deletion lamaria/utils/control_point.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ def construct_control_points_from_json(
Args:
cp_json_file (Path): Path to the sparse GT JSON file
"""
with open(cp_json_file) as file:
cp_data = json.load(file)

cp_data = json.load(open(cp_json_file))
control_points = {}
for geo_id, data in cp_data["control_points"].items():
tag_ids = data["tag_id"]
Expand Down