I built a library that expresses 3D Gaussian Splatting photometric rendering residuals as GTSAM factors for visual SLAM: gtsam-splatfactors
The idea: Camera poses live in iSAM2, and each keyframe has a photometric factor that renders the Gaussian map from the candidate pose and computes pixel-level residuals. This gives you differentiable-rendering-quality tracking with all the factor graph benefits (loop closure, incremental updates, uncertainty, multi-sensor fusion).
Example:
```python
from gsplat_slam import GaussianSplatFactor
factor = GaussianSplatFactor(
gaussian_map=my_map,
target_image=keyframe_rgb,
K=intrinsics,
pixel_indices=sampled_pixels,
W=640, H=480,
)
gtsam_factor = factor.as_gtsam_factor(pose_key, noise_model)
graph.add(gtsam_factor)
```
This enables things that pure gradient-descent 3DGS-SLAM can't do:
- Add a loop closure factor and iSAM2 corrects all downstream poses
- Fuse with IMU preintegration factors for robust tracking
- Get proper marginal covariances on pose estimates
Currently uses numerical Jacobians (planning to switch to analytical via gsplat's autograd). Tested on TUM-RGBD.
Posting here in case it's interesting to the community or there's feedback on the factor design.
I built a library that expresses 3D Gaussian Splatting photometric rendering residuals as GTSAM factors for visual SLAM: gtsam-splatfactors
The idea: Camera poses live in iSAM2, and each keyframe has a photometric factor that renders the Gaussian map from the candidate pose and computes pixel-level residuals. This gives you differentiable-rendering-quality tracking with all the factor graph benefits (loop closure, incremental updates, uncertainty, multi-sensor fusion).
Example:
```python
from gsplat_slam import GaussianSplatFactor
factor = GaussianSplatFactor(
gaussian_map=my_map,
target_image=keyframe_rgb,
K=intrinsics,
pixel_indices=sampled_pixels,
W=640, H=480,
)
gtsam_factor = factor.as_gtsam_factor(pose_key, noise_model)
graph.add(gtsam_factor)
```
This enables things that pure gradient-descent 3DGS-SLAM can't do:
Currently uses numerical Jacobians (planning to switch to analytical via gsplat's autograd). Tested on TUM-RGBD.
Posting here in case it's interesting to the community or there's feedback on the factor design.