Visual simultaneous localization and mapping (vSLAM) algorithm based on improved Vision Transformer semantic segmentation in dynamic scenes

Mengyuan Chen, Hangrong Guo, Runbang Qian, Guangqiang Gong, Hao ChengMechanical 2024

Abstract

Traditional visual simultaneous localization and mapping (vSLAM) algorithms often struggle in dynamic environments where moving objects violate the "static world assumption." This paper presents VTD-SLAM, a novel vSLAM algorithm that integrates an improved Vision Transformer for precise semantic segmentation and a background restoration module. By accurately identifying dynamic objects and "inpainting" the resulting occlusions with static data from adjacent frames, VTD-SLAM achieves a 17.1% reduction in trajectory error compared to existing state-of-the-art systems like DynaSLAM.

Introduction

Most visual SLAM systems rely on the assumption that the environment is stationary. When a robot encounters dynamic elements—such as pedestrians or vehicles—these moving objects introduce geometric noise, leading to localization drift and cluttered, "ghosted" maps. While previous dynamic SLAM approaches attempted to mask these objects, they often left data "holes" that reduced the number of trackable features, paradoxically degrading performance. VTD-SLAM addresses this by combining advanced segmentation with intelligent background restoration.

The VTD-SLAM Framework

The VTD-SLAM pipeline is divided into two main stages: the segmentation of potentially dynamic objects and the subsequent culling and background repair.

System overview of VTD-SLAM

As shown in the pipeline above, the system first processes RGB-D frames through a semantic segmentation network (MSNET) to generate masks for potential dynamic objects. Once these objects are identified, the system uses multi-view geometry to confirm actual motion. Confirmed dynamic objects are rejected, and the "missing" background is restored using static information from adjacent frames, allowing for stable feature extraction and pose estimation.

MSNET: Semantic Segmentation with Transformers

A core innovation of VTD-SLAM is the Multivariate Semantic Segmentation Network (MSNET). Unlike traditional CNN-based approaches, MSNET utilizes a Vision Transformer (ViT) architecture to better capture global context and long-range pixel relationships.

Architecture of the MSNET module

The network features a Residual Dual-Pyramid Backbone that extracts multi-scale features, ensuring that both small and large dynamic objects are detected. This is complemented by a Multiclass Feature Transformer segmentation module, which enhances the pixel weights of potential dynamic categories (e.g., people, chairs) and improves segmentation crispness, even in the presence of motion blur.

Background Restoration and Performance

After removing dynamic objects, VTD-SLAM employs an optimal nearest-neighbor pixel-matching method based on the PatchMatch algorithm. By searching adjacent frames for the occluded static background, the system "repairs" the current frame. This restoration is critical because it provides the robot with a complete set of static feature points, which are essential for accurate tracking.

Validation on the TUM RGB-D dataset and real-world tests with a Husky mobile robot demonstrated significant improvements. In highly dynamic scenarios, VTD-SLAM reduced the Root-Mean-Square Error (RMSE) by 17.1% compared to DynaSLAM. Furthermore, qualitative results showed the generation of clean, dense point cloud maps free from the artifacts typically caused by moving subjects.

Conclusion

VTD-SLAM demonstrates that combining Transformer-based semantic segmentation with functional background restoration significantly enhances robot localization in moving environments. While the computational overhead of Transformers remains a challenge for real-time deployment on low-power hardware, the accuracy gains represent a substantial step forward for robust autonomous navigation.

Summary updated

BibTeX
@inproceedings{chen2024visual,
  author = {Mengyuan Chen and Hangrong Guo and Runbang Qian and Guangqiang Gong and Hao Cheng},
  title = {{Visual simultaneous localization and mapping (vSLAM) algorithm based on improved Vision Transformer semantic segmentation in dynamic scenes}},
  booktitle = {Mechanical},
  year = {2024},
  doi = {10.5194/ms-15-1-2024},
}
Figure