The accuracy and robustness of Visual SLAM systems can be reduced in highly dynamic environments where objects such as cars or humans are constantly in motion. This issue is compounded by the fact that traditional SLAM systems assume static scenes. In this study, we present a novel front-end solution that significantly improves the accuracy and robustness of existing SLAM systems in both highly dynamic and static scenes. Our approach utilizes a modified video instance segmentation network to extract DOP (Dynamic Object Priori) from multi-frame information. We then use matching points in the static object and background to estimate initial camera motion. To further verify the state of motion of the object, a pre-trained Bayesian network is employed, which fuses multi-view geometry, clustering, and DOP information, to rectify incorrect object categories in DOP. We conducted a comprehensive evaluation of our proposed DOP-SLAM system on two publicly available datasets. The results demonstrate that the approach we have proposed can significantly improve the accuracy and robustness of SLAM systems in both dynamic and static scenes with multiple potential moving objects.