pySLAM
Hybrid Python/C++ visual SLAM pipeline with classic and deep-learning front-ends
License
GPL-3.0
Overview
pySLAM is a hybrid Python/C++ visual SLAM framework by Luigi Freda that runs full SLAM — feature tracking, keyframe mapping, loop closing, relocalization and volumetric dense reconstruction — on monocular, stereo and RGB-D inputs. Its defining feature is modularity: dozens of interchangeable local features (from ORB and SIFT to SuperPoint, XFeat and LightGlue), multiple loop-closing and place-recognition back-ends, and optional depth-prediction and semantic-mapping modules make it a working laboratory for modern SLAM research and teaching.
pySLAM implements the complete visual SLAM stack with an emphasis on swappable components. The front-end supports over twenty local feature detectors/descriptors, both handcrafted (ORB, SIFT, AKAZE, BRISK) and learned (SuperPoint, DISK, ALIKED, XFeat), with matching via classic ratio tests or learned matchers such as LightGlue and LoFTR. The back-end provides sparse bundle adjustment on g2o, loop closing with several aggregation methods (DBoW2/3, VLAD, NetVLAD-style global descriptors), and pose-graph optimization. Beyond sparse SLAM it offers monocular depth prediction (e.g. DepthAnything), volumetric dense reconstruction with TSDF/Gaussian-splatting options, and semantic mapping that fuses per-frame segmentation into the map. Performance-critical pieces run in C++ with Python bindings, keeping the codebase hackable for research and coursework while remaining fast enough for live camera use.
Why it matters
pySLAM has become the reference playground for visual SLAM: it is one of very few systems where classic ORB-SLAM-style pipelines and modern deep front-ends coexist behind one interface, letting researchers and students benchmark handcrafted versus learned components in a full working system rather than in isolation.
Problem it solves
Evaluating a new feature, matcher or loop-closing method inside a complete SLAM system normally means invasive surgery on a monolithic C++ codebase. pySLAM makes each component a plug-in, so experiments and teaching labs go from idea to running SLAM in hours.
Key takeaways
- Full visual SLAM: tracking, local mapping, loop closing, relocalization and dense reconstruction
- Monocular, stereo and RGB-D support with 20+ swappable feature detectors and matchers
- Learned components first-class: SuperPoint, XFeat, LightGlue, LoFTR, DepthAnything and more
- Volumetric dense mapping with TSDF and Gaussian-splatting back-ends
- Semantic mapping module fuses segmentation into the 3D map
Who it is for
- SLAM researchers benchmarking components
- Graduate students learning visual SLAM hands-on
- Perception engineers prototyping camera-based localization
- Educators running SLAM courses
Limitations
- Research-grade code — not hardened for production deployment on robots
- Python layers cap real-time performance versus optimized C++ systems on weak hardware
- GPL-3.0 license restricts use in closed-source products
- Full installation with all deep-learning extras is heavy and CUDA-dependent