Feature Recombination Geo-Localization
April 5, 2024 · View on GitHub
[Project], [Paper, AAAI 2024]
:mega: It has been accepted by AAAI-24
This is a PyTorch implementation of the “Aligning Geometric Spatial Layout in Cross-View Geo-Localization via Feature Recombination”.
(a) Overview of our proposed FRGeo model. (b) Illustration of the proposed Feature Recombination Module (FRM). (c) Illustration of the proposed Weighted (B + 1)-tuple Loss (WBL).
Requirement
- Python >= 3.8, numpy, matplotlib, pillow, ptflops, timm
- PyTorch >= 1.8.1, torchvision >= 0.11.1
Dataset
Please download CVUSA, CVACT and VIGOR. You may need to modify dataset path in "dataloader".
Model Zoo
| Dataset | R@1 | R@5 | R@10 | R@1% | Hit | Download |
|---|---|---|---|---|---|---|
| CVUSA | 97.06 | 99.25 | 99.47 | 99.85 | - | model |
| CVACT | 90.35 | 96.45 | 97.25 | 98.74 | - | model |
| VIGOR Same-Area | 71.26 | 91.38 | 94.32 | 99.52 | 82.41 | model |
| VIGOR Cross-Area | 37.54 | 59.58 | 67.34 | 94.28 | 40.66 | model |
Usage
Training
To train our method on CVUSA for 50 epochs run:
python -u train.py --lr 0.0001 --batch-size 32 --dist-url 'tcp://localhost:8080' --multiprocessing-distributed --world-size 1 --rank 0 --epochs 50 --save_path ./result_cvusa --op sam --wd 0.03 --mining --dataset cvusa --cos --dim 3072 --asam --rho 2.5
To train our method on CVACT for 50 epochs run:
python -u train.py --lr 0.0001 --batch-size 32 --dist-url 'tcp://localhost:8080' --multiprocessing-distributed --world-size 1 --rank 0 --epochs 50 --save_path ./result_cvact --op sam --wd 0.03 --mining --dataset cvact --cos --dim 3072 --asam --rho 2.5
To train our method on VIGOR Same-Area for 50 epochs run:
python -u train.py --lr 0.00005 --batch-size 16 --dist-url 'tcp://localhost:8080' --multiprocessing-distributed --world-size 1 --rank 0 --epochs 50 --save_path ./result_vigor --op sam --wd 0.03 --mining --dataset vigor --cos --dim 3072 --asam --rho 2.5
To train our method on VIGOR Cross-Area for 50 epochs run:
python -u train.py --lr 0.00005 --batch-size 16 --dist-url 'tcp://localhost:8080' --multiprocessing-distributed --world-size 1 --rank 0 --epochs 50 --save_path ./result_vigor_cross --op sam --wd 0.03 --mining --dataset vigor --cos --dim 3072 --asam --rho 2.5 --cross
Evaluation
You should organize the downloaded pre-trained models in the following way:
./result_cvusa
model_best.pth.tar
checkpoint.pth.tar
...
./result_cvact
model_best.pth.tar
checkpoint.pth.tar
...
./result_vigor
model_best.pth.tar
checkpoint.pth.tar
...
./result_vigor_cross
model_best.pth.tar
checkpoint.pth.tar
...
To evaluate our method on CVUSA val run:
python -u train.py --dist-url 'tcp://localhost:8080' --multiprocessing-distributed --world-size 1 --rank 0 --save_path ./result_cvusa --dataset cvusa --dim 3072 -e
To evaluate our method on CVACT _val run:
python -u train.py --dist-url 'tcp://localhost:8080' --multiprocessing-distributed --world-size 1 --rank 0 --save_path ./result_cvact --dataset cvact --dim 3072 -e
To evaluate our method on VIGOR Same-Area run:
python -u train.py --dist-url 'tcp://localhost:8080' --multiprocessing-distributed --world-size 1 --rank 0 --save_path ./result_vigor --dataset vigor --dim 3072 -e
To evaluate our method on VIGOR Cross-Area run:
python -u train.py --dist-url 'tcp://localhost:8080' --multiprocessing-distributed --world-size 1 --rank 0 --save_path ./result_vigor_cross --dataset vigor --dim 3072 --cross -e
Feature Embedding Visualization
Feature embedding visualization of cross-view feature representations learned by ou
Retrieval Example
(a) CVUSA.
(b) CVACT.
(c) VIGOR.
Cross-view image-based retrieval examples on (a) CVUSA, (b) CVACT and (c) VIGOR.
#References and Acknowledgements
TransGeo,ConvNeXt,CVUSA,VIGOR,OriCNN,Deit,MoCo
Please contact us if you have any questions.
Citation
@inproceedings{zhang2024aligning,
title={Aligning Geometric Spatial Layout in Cross-View Geo-Localization via Feature Recombination},
author={Zhang, Qingwang and Zhu, Yingying},
booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
volume={38},
number={7},
pages={7251--7259},
year={2024}
}