Abstract Simultaneous Localization and Mapping (SLAM) is a key technology for mobile robots to perform localization and navigation in unknown environments. The majority of existing visual SLAM systems are predicated on the assumption of a static scene, which can result in suboptimal performance, reduced accuracy, and diminished system robustness in complex dynamic environments. In this paper, we propose SGD-SLAM, an improved SLAM system developed on the ORB-SLAM2 framework, designed for complex dynamic scenes. The system proffers a newly devised methodology that integrates semantic data with geometric data to address challenges to dynamic scenes. First, real-time instance segmentation algorithms are used to obtain semantic information about the surrounding environment and identify prior dynamic objects. Then, epipolar constraints are employed to find potential dynamic points, while the DBSCAN (Density-Based Spatial Clustering of Applications with Noise) clustering algorithm is used to group dynamic points into different clusters and compute the centers of these clusters to obtain geometric information. Finally, a dynamic feature rejection strategy is implemented, combining both semantic and geometric information, to exclude dynamic feature points. The system is tested and evaluated using the TUM dataset. The outcomes illustrate that, in dynamic scenes, the SGD-SLAM system outperforms existing algorithms with respect to enhanced accuracy and robustness.