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

DatasetR@1R@5R@10R@1%HitDownload
CVUSA97.0699.2599.4799.85-model
CVACT90.3596.4597.2598.74-model
VIGOR Same-Area71.2691.3894.3299.5282.41model
VIGOR Cross-Area37.5459.5867.3494.2840.66model

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

TransGeoConvNeXtCVUSAVIGOROriCNNDeitMoCo

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}
}