# Improved Visual SLAM Algorithm Based on Dynamic Scenes
## 4 Experiments
### Dynamic Environment Trajectory Accuracy Validation Experiment
Panel (**c**) displays the time consumption for each method. As a representative of traditional methods, DS-SLAM utilizes optical flow [25] and geometric constraints [26] to detect dynamic points. In contrast, among deep learning-based methods, DynaSLAM employs a pre-trained image segmentation method (Mask R-CNN) for object detection and segmentation, which differs from the target detection approach used in this paper. By comparing absolute trajectory errors and computation times between these methods, we can effectively validate the positioning accuracy and real-time performance of the algorithm presented in this paper. Table 5 presents the RMSE values for ORB-SLAM2, DS-SLAM, DynaSLAM, and the improved SLAM. Although DynaSLAM achieved higher localization accuracy in certain sequences, its real-time performance was inferior to that of the improved SLAM algorithm because it uses the Mask-RCNN network combined with geometric constraints for dynamic object segmentation, and the Mask-RCNN network's real-time performance was limited by its extended processing time. The improved SLAM demonstrated the ability to address localization inaccuracies in the presence of dynamic disturbances, with experimental results showing significant improvements in both accuracy and robustness. Table 6 compares the runtime efficiency of the improved SLAM and several traditional algorithms when handling the fr3-walking-xyz sequence, detailing the time each algorithm required to process a single image frame. ORB-SLAM2 did not address the detection and removal of dynamic points in dynamic environments, resulting in shorter runtime. The improved SLAM showed significant improvements in positioning accuracy compared to DS-SLAM, with frame processing time being similar. When compared to DynaSLAM, although the positioning accuracy was nearly the same, the improved SLAM exhibited a significant increase in single-frame image processing time. Therefore, the improved SLAM offers substantial advantages in runtime efficiency for dynamic VSLAM algorithms. \begin{table}
\begin{tabular}{c c} \hline \hline
**Method** & **Time Consumption (Unit: ms)** \\ \hline ORB-SLAM2 & 48.8 \\ DS-SLAM & 74.9 \\ DynaSLAM & 311.5 \\ Improved SLAM & 98.4 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Comparison of the average processing time for various traditional algorithms when handling the fr3_walking_xyz sequence. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline \multirow{2}{*}{**Sequence**} & \multicolumn{3}{c}{**ORB-SLAM2**} & \multicolumn{3}{c}{**Improved SLAM**} & \multirow{2}{*}{**Promotion Rate**} \\ \cline{2-2} \cline{5-8}  & **RMSE** & **Mean** & **SD** & **RMSE** & **Mean** & **SD** & **of RMSE (\%)** \\ \hline walking\_xyz & 0.8201 & 0.7330 & 0.3677 & 0.0198 & 0.0174 & 0.0094 & 97.59 \\ walking\_halfsphere & 0.3186 & 0.2770 & 0.1574 & 0.0212 & 0.0180 & 0.0113 & 93.35 \\ walking\_static & 0.3816 & 0.3502 & 0.1515 & 0.0057 & 0.0051 & 0.0026 & 98.51 \\ sitting\_halfsphere & 0.0488 & 0.0454 & 0.0180 & 0.0209 & 0.0196 & 0.0070 & 57.17 \\ sitting\_static & 0.0101 & 0.0089 & 0.0048 & 0.0062 & 0.0053 & 0.0033 & 38.61 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: ATE (m) for ORB-SLAM2 and the enhanced SLAM on the TUM dataset. RMSE denotes the root mean square error, mean represents the average value, median indicates the median, and SD stands for the standard deviation. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Sequence** & **ORB-SLAM2** & **DS-SLAM** & **DynaSLAM** & **Improved SLAM** \\ \hline walking\_xyz & 0.8201 & 0.0357 & 0.0258 & 0.0198 \\ walking\_halfsphere & 0.3186 & 0.0551 & 0.0348 & 0.0212 \\ walking\_static & 0.3816 & 0.0089 & 0.0071 & 0.0057 \\ sitting\_halfsphere & 0.0488 & 0.0225 & 0.0171 & 0.0209 \\ sitting\_static & 0.0101 & 0.0077 & 0.0076 & 0.0062 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Absolute trajectory RMSE (in meters) for various traditional algorithms.