Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FANet

[IEEE Transactions on Image Processing'26] Pytorch implementation of FANet: Fovea Attention Network for Robust Aerial Geo-localization Across Diverse Weather Conditions.

FANet is a fovea-inspired, all-weather, image-only cross-view geo-localization framework for robust matching between drone-view and satellite-view images. The core idea is to decouple global weather robustness and local geometric–semantic discriminability, enabling the model to resist appearance shifts, occlusions, texture degradation, and cross-view misalignments caused by dark, over-exposure, rain, snow, fog, and motion blur. More details can be found at our paper: FANet: Fovea Attention Network for Robust Aerial Geo-localization Across Diverse Weather Conditions

CUDA Memory: We recommend using a GPU with at least 24 GB of memory. Our experiments were conducted on an NVIDIA RTX A6000 GPU.


News

  • [2026-04-24] Paper Accepted.
  • [2026-06-21] The Dockerfile is now available.
  • [2026-06-22] The checkpoints have been released at Baidu Yun[qh43]!
  • [2026-06-22] The code is now available. Welcome to communicate!

TODO

  • Provide environment configuration files, including requirements.txt
  • Provide Dockerfile and containerized running instructions
  • Release pretrained model weights and runtime assets
  • Release testing and evaluation scripts
  • Release training scripts
  • Provide dataset preparation instructions and preprocessing scripts
  • Provide complete reproduction instructions for the main experimental results

Installation

Create a Python environment and install dependencies:

pip install -r requirements.txt

Organize dataset folder as follows:

|-- dataset/
|    |-- University-Release/
|        |-- test/
|            |-- query_drone/
|            |-- query_satellite/
|            |-- ...
|        |-- train/
|            |-- drone/
|            |-- satellite/
|            |-- ...
|    |-- SUES/
|        |-- Training/
|            |-- 150/
|            |-- 200/
|            |-- ...
|        |-- Testing/
|            |-- 150/
|            |-- 200/
|            |-- ...
|    |-- CVUSA/
|        |-- train/
|            |-- satellite/
|            |-- street/
|        |-- val/
|            |-- satellite/
|            |-- street/

Models and Weights

  • The Models and Weights are released.
  • Download The Trained Model Weights:Baidu Yun[qh43].

Organize SAM folder as follows:

|-- segment/
|    |-- checkpoint/
|        |-- sam_vit_h_4b8939.pth
|    |-- segment_anything/
|    |-- ...
|-- image_folder.py/
|-- model.py/
|-- ...

Training

Before training, place the required pretrained files:

resnet50-0676ba61.pth
resnet50_ibn_a-d9d0bb7b.pth
segment/segment_anything/
segment/checkpoint/sam_vit_h_4b8939.pth

Run with the provided script:

DATA_DIR=/path/to/University-Release/train \
GPU_IDS=0 \
FANET_RUN_NAME=fanet_best_reproduce \
bash scripts/train_fanet.sh

The script is equivalent to:

python train.py \
  --name fanet_best_reproduce \
  --experiment_name fanet_best_reproduce \
  --data_dir /path/to/University-Release/train \
  --views=3 \
  --droprate=0.5 \
  --extra_Google \
  --share \
  --stride=1 \
  --h=256 \
  --w=256 \
  --lr=0.005 \
  --gpu_ids=0 \
  --norm=spade \
  --iaa \
  --focal \
  --multi_weather \
  --btnk 0 1 1 0 0 0 0 \
  --conv_norm=none \
  --reptile \
  --adain=a \
  --seed=1

Training outputs are written to:

model/fanet_best_reproduce/
log/fanet_best_reproduce/

Evaluation

Before evaluation, place the final checkpoint at:

model/best_ckpt/net_best.pth

Run dark-weather D2S evaluation with the provided script:

TEST_DIR=/path/to/University-Release/test \
GPU_IDS=0 \
bash scripts/test_fanet_dark.sh

The script is equivalent to:

python test_iaa_all.py \
  --name best_ckpt \
  --test_dir /path/to/University-Release/test \
  --batchsize 128 \
  --gpu_ids 0 \
  --iaa \
  --weather dark \
  --modes d2s

Notes

  • Source code is released without datasets or large checkpoint files.
  • Use the paths above as examples and replace them with local dataset locations.

Docker

Two Docker images are available on GitHub Container Registry:

  • ghcr.io/jahawn-wen/fanet:train: training image.
  • ghcr.io/jahawn-wen/fanet:best: evaluation image with the best checkpoint.

Training

docker pull ghcr.io/jahawn-wen/fanet:train

docker run --gpus '"device=0"' --ipc=host -it --rm \
  -e GPU_IDS=0 \
  -e FANET_RUN_NAME=fanet_train \
  -v /absolute/path/to/University-Release/train:/data/train:ro \
  -v /absolute/path/to/fanet_outputs:/outputs \
  ghcr.io/jahawn-wen/fanet:train \
  train-fanet

Training outputs are saved under:

/outputs/model/<FANET_RUN_NAME>/
/outputs/log/<FANET_RUN_NAME>/

Evaluation

docker pull ghcr.io/jahawn-wen/fanet:best

docker run --gpus all --ipc=host -it --rm \
  -v /absolute/path/to/University-Release/test:/data/test:ro \
  ghcr.io/jahawn-wen/fanet:best \
  python test_iaa_all.py \
    --name best_ckpt \
    --test_dir /data/test \
    --batchsize 128 \
    --gpu_ids 0 \
    --iaa \
    --weather dark \
    --modes d2s

Docker Notes

  • The dataset is not included in the images.
  • NVIDIA Container Toolkit is required for GPU support.

Reference

If you use FANet in your research, please cite it by the following BibTeX entry:

@article{wen2026fanet,
  title={FANet: Fovea Attention Network for Robust Aerial Geo-localization Across Diverse Weather Conditions},
  author={Wen, Jiahao and Yu, Hang and Zheng, Zhedong},
  journal={IEEE Transactions on Image Processing},
  year={2026},
  publisher={IEEE}
}

✨ Acknowledgement

About

[IEEE Transactions on Image Processing'26] Pytorch implementation of FANet: Fovea Attention Network for Robust Aerial Geo-localization Across Diverse Weather Conditions

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages