# DK-SLAM: Monocular Visual SLAM with Deep Keypoint Learning, Tracking, and Loop Closing
## 5 Discussion  
DK-SLAM is designed to enhance monocular visual SLAM performance in real-world scenarios by leveraging learned local features. Real-world scenarios suffer from unpredictable illumination variations. Handcrafted features, reliant on low-level image information, are susceptible to complex lighting, leading to performance degradation. Existing works [10; 11; 28] integrate learned features into VSLAM directly without any refinement. However, these learned features are primarily developed for static tasks (e.g., image matching, structure from motion), whereas VSLAM operates in dynamic scenes with illumination changes and variable motion. To address the above challenges, we modify VSLAM performance through the following three dimensions:  
First, we modify the training of learned features. Most learned features [10; 14; 21; 22] are trained on static RGB datasets (e.g., COCO), whose domain differs from real-world SLAM scenarios. Deep models often degrade when tested on different domain data [62]. To address this, we employ Model-Agnostic Meta-Learning (MAML) to improve extractor generalization. MAML approximates inner and outer loop gradients as a second-order gradient, enabling faster convergence to a global minimum. The global minimum of error implies the model's optimal generalization performance. We conduct ablation studies to verify MAML's impact on local feature performance. The ablation result in Table 3 demonstrates that the proposed MAML-based training achieves a 12.76% reduction in translation error and a 10.71% reduction in rotation error for VSLAM systems. Table 4 demonstrates that MAML-based training also increases the number of feature matchings. Second, we present a novel feature tracking method with local photometric constraints. Monocular VSLAMs [4; 5] set a constant velocity model to initialize feature matching ranges and initial pose. However, real-world motions rarely conform to a constant velocity model. The flawed motion model induces significant errors in a feature matching range across adjacent frames. Incorrect feature matching can lead to catastrophic failures in VSLAM systems. Meanwhile, traditional VSLAM uses low-level handcrafted cues (e.g., keypoint orientation/scale) to filter matches. Learned features lack such mechanisms, relying solely on descriptor Euclidean distance [14]. To resolve this, we propose a local photometric  
Figure 10: Comparison of tracking time of ORB-SLAM3, DK-SLAM, and SuperPoint-SLAM. tracking method inspired by a semi-direct approach [2]. By incorporating pixel-intensity constraints around keypoints, our method generates a more accurate feature matching range than the constant velocity model. In Table 3, the ablation results indicate that the absence of local photometric constraints makes the proposed SLAM prone to localization failures. This may be attributed to sharp turns in the scene, which cause the constant velocity motion model to yield inaccurate feature correspondences. Such behavior is also visualized in Figure 8.  
Third, we design an online BoW for learned features. Existing offline BoW models are trained on preprocessed datasets. However, learned local features suffer from generalization gaps, and offline BoWs exist in distribution shifts between training and test sets. To address this, we adopt an online BoW approach that continuously trains the vocabulary using real-time data, thereby mitigating the negative impact caused by data distribution discrepancies. Additionally, learned descriptors are floating-point vectors, which incur high computational costs during BoW construction. We therefore convert 256-dimensional floating-point vectors into binary vectors. This reduces the computational cost on BoW building. However, the proposed DK-SLAM still exhibits limitations. As shown in runtime Figure 10, DK-SLAM operates less efficiently than ORB-SLAM3. This inefficiency stems from the learned features running on the GPU while data processing remains CPU-bound. Frequent data transfer between CPU and GPU degrades SLAM performance.