Hostname: page-component-74656f9884-c52kr Total loading time: 0 Render date: 2026-11-06T22:11:33.926Z Has data issue: false hasContentIssue false

A dynamic SLAM system with YOLOv7 segmentation and geometric constraints for indoor environments

Published online by Cambridge University Press:  30 June 2025

Yewei Shen
Affiliation:
School of Mechanical and Automotive Engineering, Shanghai University of Engineering Science, Shanghai, China
Xinguang Zhang*
Affiliation:
School of Mechanical and Automotive Engineering, Shanghai University of Engineering Science, Shanghai, China
*
Corresponding author: Xinguang Zhang; Email: jixieyuan123456@163.com
Rights & Permissions [Opens in a new window]

Abstract

With the rapid advancements in robotics and autonomous driving, SLAM (simultaneous localization and mapping) has become a crucial technology for real-time localization and map creation, seeing widespread application across various domains. However, SLAM’s performance in dynamic environments is often compromised due to the presence of moving objects, which can introduce errors and inconsistencies in localization and mapping. To overcome these challenges, this paper presents a visual SLAM system that employs dynamic feature point rejection. The system leverages a lightweight YOLOv7 model for detecting dynamic objects and performing semantic segmentation. Additionally, it incorporates optical flow tracking and multiview geometry techniques to identify and eliminate dynamic feature points. This approach effectively mitigates the impact of dynamic objects on the SLAM process, while maintaining the integrity of static feature points, ultimately enhancing the system’s robustness and accuracy in dynamic environments. Finally, we evaluate our method on the TUM RGB-D dataset and in real-world scenarios. The experimental results demonstrate that our approach significantly reduces both the root mean square error (RMSE) and standard deviation (Std) compared to the ORB-SLAM2 algorithm.

Information

Type
Research Article
Copyright
© The Author(s), 2025. Published by Cambridge University Press
Figure 0

Figure 1. The overall framework based on ORB-SLAM2 framework, colored parts are additions.

Figure 1

Figure 2. The process of removing dynamic feature points.

Figure 2

Figure 3. Improved network framework of YOLOv7, where the colored modules are improved modules.

Figure 3

Table I. Ablation study results on COCO 2017 Subset. G denotes GhostConv replacement, C denotes CBAM integration. Standard training settings were used. P, R, mAP measured at IoU threshold 0.5.

Figure 4

Figure 4. Results of dynamic mask segmentation.

Figure 5

Figure 5. Multiview geometry preserve static points:This module is executed when the percentage of dynamic target frames in the image exceeds a threshold.

Figure 6

Figure 6. Multi-view geometric dynamic feature judgment principle.

Figure 7

Table II. Absolute trajectory error (ATE RMSE & SD, in meters) comparison on TUM RGB-D dynamic sequences.

Figure 8

Table III. Relative pose error (RPE) – translation (RMSE & SD, in meters) comparison.

Figure 9

Table IV. Relative pose error (RPE) – rotation (RMSE & SD, in degrees) comparison.

Figure 10

Table V. Computational time comparison (Average seconds per frame on TUM RGB-D).

Figure 11

Figure 7. Dynamic feature point removal and mapping on TUM “walking_xyz.” (a,c) ORB-SLAM2 retains features on the person. (b,d) OurSLAM removes features within the person mask. (e,g) ORB-SLAM2 map/trajectory shows significant errors due to dynamic points. (f,h) OurSLAM produces a cleaner map and more accurate trajectory.

Figure 12

Figure 8. Trajectory error plots (ATE and RPE trans.) comparing ORB-SLAM2 and OurSLAM on “walking_xyz” (top row) and “walking_half” (bottom row) sequences. Error plots show significantly lower errors for OurSLAM.

Figure 13

Figure 9. Comparison of dense map building results in a low dynamic environment (“sitting_static”).

Figure 14

Figure 10. Comparison of dense map building results in a highly dynamic environment (“walking_xyz”).

Figure 15

Figure 11. Dynamic feature point rejection in a real environment. (a) View from the camera with a person walking. (b) OurSLAM running, showing tracked features (green dots). Features on the walking person (within the detected mask, not shown explicitly) are correctly excluded from tracking.

Figure 16

Figure 12. Handling dynamic objects with static priors. (a) Scene where a person walks while holding a cup. (b) OurSLAM correctly identifies both the person and the cup as dynamic (due to association with the moving person and geometric inconsistency) and excludes their features from tracking.