luigifreda/pyslam

pySLAM is a hybrid Python/C++ Visual SLAM pipeline supporting monocular, stereo, and RGB-D cameras. It provides a broad set of modern local and global feature extractors, multiple loop-closure strategies, a volumetric reconstruction module, integrated depth-prediction models, and semantic segmentation capabilities for enhanced scene understanding.

What it solves

pySLAM is a modular research framework for Visual SLAM (Simultaneous Localization And Mapping). It solves the complexity of prototyping and experimenting with different VO/SLAM techniques by providing a single environment that integrates a wide variety of local and global features, depth prediction models, and semantic segmentation tools, supporting monocular, stereo, and RGBD cameras.

How it works

The project uses a hybrid Python/C++ architecture. A modular sparse-SLAM core is implemented in both languages, allowing users to choose between high-performance (C++) or high-flexibility (Python) modes. The pipeline integrates:

  • Feature Tracking: A range of classical and modern local features and matchers.
  • Loop Closing: Descriptor aggregators (BoW, VLAD) and global descriptors (NetVLAD, CosPlace, etc.) to detect previously visited locations.
  • Volumetric Reconstruction: A pipeline that uses depth and color images to produce dense reconstructions via TSDF with voxel hashing or incremental Gaussian Splatting.
  • AI Integration: Built-in support for depth prediction models (e.g., DepthAnythingV2) and semantic segmentation models (e.g., Segformer, YOLO) for scene understanding.
  • 3D Scene Inference: A feed-forward pipeline for reconstructing 3D scenes from multiple images using models like DUSt3R and Mast3r.

Who it’s for

It is primarily designed for researchers and developers working on Visual Odometry (VO) and SLAM who need a flexible baseline to prototype new algorithms, test different feature extractors, or integrate modern AI-based depth and semantic models.

Highlights

  • Hybrid Implementation: Interoperable Python and C++ cores for balancing speed and flexibility.
  • Comprehensive AI Support: Integrated depth prediction and semantic segmentation models.
  • Multi-Camera Support: Works with monocular, stereo, and RGBD setups.
  • Dense Mapping: Supports volumetric integration and Gaussian Splatting for high-quality 3D reconstructions.
  • Extensive Dataset Support: Built-in compatibility with over 10 major datasets (KITTI, TUM, EuRoC, etc.).
  • Graph Optimization: Integration with g2o and GTSAM for trajectory optimization.

Related

  • Project
  • Project
  • Project
  • Project
  • Project