How nianticlabs/ace works
ACE trains scene-specific coordinate-regression heads from RGB images and camera poses, then combines each head with a pretrained encoder to predict dense scene coordinates and estimate query-camera poses with DSAC* RANSAC. Dataset preparation, optional visualization, and ensemble/clustering support are additional product branches. The graph follows README workflow statements and SOURCE INDEX references; several implementations were not sampled, so uncertain internal links are omitted.
Main entry points: ace_trainer.py Training orchestration · test_ace.py Evaluation command · dsacstar.cpp RANSAC bindings · dataset.py Image and pose loader
Components 26
Dataset preparation
- 7-Scenes setup
datasets/setup_7scenes.py - 12-Scenes setup
datasets/setup_12scenes.py - Other dataset setup
datasets - Dataset utilities
datasets/dataset_util.py - Image and pose loader
dataset.py
ACE training
- Training command
train_ace.py - Training orchestration
ace_trainer.py - Encoder and regressor
ace_network.py - Coordinate loss
ace_loss.py - Pretrained encoder
ace_encoder_pretrained.pt - Scene head weights
- ACE utilities
ace_util.py
Pose estimation
- Evaluation command
test_ace.py - Pose evaluation metrics
eval_poses.py - Scene coordinates
DSAC* engine
- RANSAC bindings
dsacstar/dsacstar.cpp - Hypotheses and scoring
dsacstar/dsacstar_util.h - Pose derivatives
dsacstar/dsacstar_derivative.h - RANSAC loss
dsacstar/dsacstar_loss.h - Pose and coordinate types
dsacstar/dsacstar_types.h - Thread random numbers
dsacstar/thread_rand.h - Timing utility
dsacstar/stop_watch.h
Visualization
- Training and test rendering
ace_visualizer.py - Rendering geometry
ace_vis_util.py
Other components
- Researcher
- Scene data
Connections 35
- Researcher → 7-Scenes setup: prepares data
README.md - Researcher → 12-Scenes setup: prepares data
README.md - Researcher → Other dataset setup: prepares data
README.md - 7-Scenes setup → Dataset utilities: uses helpers
datasets/setup_7scenes.py - 12-Scenes setup → Dataset utilities: uses helpers
datasets/setup_12scenes.py - Other dataset setup → Dataset utilities: uses helpers
datasets/setup_7scenes.py - Scene data → Image and pose loader: loads images and poses
README.md - Researcher → Training command: starts training
README.md - Training command → Training orchestration: invokes
train_ace.py - Training orchestration → Image and pose loader: loads samples
ace_trainer.py - Training orchestration → Encoder and regressor: trains regressor
ace_trainer.py - Training orchestration → Coordinate loss: computes loss
ace_trainer.py - Training orchestration → Pretrained encoder: loads weights
README.md - Training orchestration → Scene head weights: saves head
README.md - Training orchestration → Training and test rendering: renders progress
ace_trainer.py - Training and test rendering → Rendering geometry: uses geometry
ace_visualizer.py - Researcher → Evaluation command: starts evaluation
README.md - Evaluation command → Image and pose loader: loads query frames
README.md - Evaluation command → Encoder and regressor: predicts coordinates
README.md - Evaluation command → Scene head weights: loads head
README.md - Evaluation command → Pretrained encoder: loads encoder
README.md - Encoder and regressor → Scene coordinates: predicts
README.md - Evaluation command → RANSAC bindings: estimates poses
README.md - Evaluation command → Pose evaluation metrics: evaluates results
README.md - Evaluation command → Training and test rendering: renders results
- RANSAC bindings → Hypotheses and scoring: calls routines
dsacstar/dsacstar.cpp - RANSAC bindings → Pose derivatives: uses derivatives
dsacstar/dsacstar.cpp - RANSAC bindings → RANSAC loss: uses loss
dsacstar/dsacstar.cpp - RANSAC bindings → Pose and coordinate types: uses types
dsacstar/dsacstar.cpp - RANSAC bindings → Thread random numbers: uses random source
dsacstar/dsacstar.cpp - RANSAC bindings → Timing utility: times operations
dsacstar/dsacstar.cpp - Hypotheses and scoring → Thread random numbers: samples randomly
dsacstar/dsacstar_util.h - Pose evaluation metrics → Image and pose loader: reads dataset poses
eval_poses.py - Image and pose loader → Encoder and regressor: provides model inputs
dataset.py - Training orchestration → ACE utilities: uses helpers
ace_trainer.py