The official PyTorch implementation of LKGL (Accepted by IEEE TCSVT).
Cross-view geo-localization (CVGL), which aims to match ground- or drone-view imagery with satellite maps, has emerged as a fundamental task in remote sensing, with broad applications in urban monitoring and unmanned aerial vehicle (UAV) localization. Despite remarkable progress, existing approaches rely heavily on metric-based comparisons of global image features, which often leads to mismatches in regions with highly similar global appearances but distinct local structures. To address this limitation, this work introduces a novel CVGL framework, termed LKGL, which integrates two complementary methods. First, the global--local feature matching (GLFM) method computes similarity at both holistic and localized levels and integrates a reliability-based filtering mechanism to remove ambiguous or low-confidence local correspondences, thereby enhancing robustness against confusing global patterns. Second, the keypoint-guided feature pyramid network (KGFPN) integrates multiscale features with spatial priors derived from keypoint maps through attention-based interactions between shallow and deep layers. This design further enhances local feature expressiveness and structural sensitivity. Together, the GLFM and KGFPN enable LKGL to balance global contextual information with fine-grained local cues, achieving state-of-the-art performance on University-1652 and SUES-200. The source code is released on https://github.com/OrigamiSL/LKGL.
You can easily set up the environment using Conda and the provided LKGL.yml file.
conda env create -f LKGL.yml
conda activate LKGL- Python: 3.9.23
- PyTorch: 2.6.0+cu118
- NumPy: 2.0.2
- CUDA Toolkit: 11.8
We evaluate our models on four datasets: University-1652, SUES-200, Multi-weather University-1652, and DenseUAV.
- University-1652: Request from the official repository at layumi/University1652-Baseline.
- SUES-200: Download from Reza-Zhu/SUES-200-Benchmark.
- DenseUAV: Request details can be found at Dmmm1997/DenseUAV.
- Multi-weather University-1652: This dataset is simulated and derived from the original University-1652 dataset.
University-1652 & Multi-weather University-1652
├── University-1652
│ ├── train
│ │ ├── drone
│ │ ├── google
│ │ ├── satellite
│ │ └── street
│ ├── test
│ │ ├── 4K_drone
│ │ ├── gallery_drone
│ │ ├── gallery_satellite
│ │ ├── gallery_street
│ │ ├── query_drone
│ │ ├── query_satellite
│ │ └── query_street
SUES-200
Note: You need to split the origin dataset into the appropriate format using the sample4geo/dataset/SUES-200/split_datasets.py script. The processed format should be:
├─ SUES-200
├── Training
├── 150/
├── 200/
├── 250/
└── 300/
├── Testing
├── 150/
├── 200/
├── 250/
└── 300/
DenseUAV
├── DenseUAV
│ ├── Dense_GPS_ALL.txt
│ ├── Dense_GPS_test.txt
│ ├── Dense_GPS_train.txt
│ ├── train
│ │ ├── drone
│ │ └── satellite
│ ├── test
│ │ ├── query_drone
│ │ └── gallery_satellite
Please download the necessary pre-trained weights and place them in the pretrained/ directory before training.
- ALIKED-N(16, rot): Provided at pretrained/aliked-n16rot.pth.
- ConvNeXt-Base: Download here and save to
pretrained/convnext_base_22k_1k_224.pth. - DINOv2-Base: Download here and save to
pretrained/dinov2_vitb14_pretrain.pth.
⚠️ Note on Dataset Paths: Before running any script below, please open the script and modify theDATA_PATHvariable to point to the corresponding dataset's location on your machine.
To train and test the standard LKGL model, run the following scripts:
- University-1652:
bash vote_university.sh - SUES-200:
bash vote_sues200.sh
To train and test the LKGL-D variant, use the scripts below:
- University-1652:
bash vote_uni_dinov2.sh - SUES-200:
bash vote_sues_dinov2.sh - DenseUAV:
bash vote_denseuav.sh - Multi-weather University-1652:
bash train_test_multi_weather_uni.sh
