An open API service indexing awesome lists of open source software.

https://github.com/visionxlab/earth-adapter


https://github.com/visionxlab/earth-adapter

Last synced: 9 months ago
JSON representation

Awesome Lists containing this project

README

          



Earth-Adapter LogoEarth-Adapter: Bridge the Geospatial Domain Gaps with Mixture of Frequency Adaptation



Xiaoxing Hu
Ziyang Gong
Yupei Wang
Yuru Jia

Gen Luo
Xue Yang







If you find our work helpful, please consider giving us a ⭐!


Official PyTorch implementation of [Earth Adapter: Bridge the Geospatial Domain Gaps with Mixture of Frequency Adaptation]



## Notice
This repository is still being organized and refined. If you encounter any issues while using it, please contact |Email: xiaoxinghhh@gmail.com|WeChat: 15717699268| or submit an issue. Thank you for your attention.

## TODO
- [x] complete training and evaluation instruction
- [x] paper link
- [ ] demo.ipynb
- [x] data and weight on huggingface & google drive
- [ ] extended experiment on supervised in-domain semantic segmentation
- [ ] extended experiment on cross-earth benchmark
- [ ] bug fix...

## 📖 Introduction

This repository contains the official implementation of [Earth Adapter: Bridge the Geospatial Domain Gaps with Mixture of Frequency Adaptation]. Our method achieves state-of-the-art performance on 8 widely-used cross-domain geospatial benchmarks. The code is still under development, and we are currently providing the model, weights, and dataset.

Paper: [Paper Link](http://arxiv.org/abs/2504.06220)

## 🛠️ Requirements

- Python >= 3.8
- PyTorch >= 1.10
- CUDA >= 11.0 (if using GPU)
- Other dependencies in `requirements.txt`

## 🚀 Installation

- Clone this repository and install dependencies:

```bash
# Clone the repo
git clone https://github.com/VisionXLab/Earth-Adapter.git
cd Earth-Adapter

# Create virtual environment
conda create -n earth-adapter python=3.9 -y

conda activate earth-adapter

# Install PyTorch according to your own CUDA version
pip install torch==2.1.1 torchvision==0.16.1 torchaudio==2.1.1 --index-url https://download.pytorch.org/whl/cu121

# Install other dependencies
pip install -U openmim
mim install mmengine
mim install "mmcv>=2.0.0"
pip install "mmsegmentation>=1.0.0"
pip install "mmdet>=3.0.0"
pip install xformers=='0.0.23'
pip install -r requirements.txt
pip install future tensorboard
```

## 📂 Dataset Preparation

- Download the LoveDA, ISPRS Potsdam, ISPRS Vaihingen at the |[Baidu Cloud](https://pan.baidu.com/s/1WGoVqLuJTJXc2AVDyBxXYQ?pwd=s6rk)|[Hugging Face](https://huggingface.co/datasets/wsdwJohn1231/Geo_dataset)|[Google Drive](https://drive.google.com/drive/folders/1mybm0u8TWV25xG4b0nN-ehIMse84j9XK?usp=sharing)| (We have processed the images and labels, dividing them into 512x512 patches. You may also perform the same processing on your own dataset.)
- Construct the data as follows:

```bash
Earth-Adapter/
|-- data/
|---|--- loveda_uda
|---|--- potsdamRGB
|---|--- vaihingen
```

## 🔥 Usage
- If you encounter a version mismatch of mmseg or mmdet during use, such as an error such as ``xxx<=mmcv
## 📊 Results

### Main Results
![Sample Result](assets/main_result.png)
![Sample Result](assets/IoU_result.png)
### Quantitative Results
![Sample Result](assets/trade-off.png)
![Sample Result](assets/ab_1.png)

### Visualization
![Sample Result](assets/vis1.png)
![Sample Result](assets/vis2.png)

## 📜 Citation

If you find our work helpful, please cite our paper:

```bibtex
@article{hu2025earth,
title={Earth-Adapter: Bridge the Geospatial Domain Gaps with Mixture of Frequency Adaptation},
author={Hu, Xiaoxing and Gong, Ziyang and Wang, Yupei and Jia, Yuru and Luo, Gen and Yang, Xue},
journal={arXiv preprint arXiv:2504.06220},
year={2025}
}
@article{gong2024crossearth,
title={Crossearth: Geospatial vision foundation model for domain generalizable remote sensing semantic segmentation},
author={Gong, Ziyang and Wei, Zhixiang and Wang, Di and Ma, Xianzheng and Chen, Hongruixuan and Jia, Yuru and Deng, Yupeng and Ji, Zhenming and Zhu, Xiangwei and Yokoya, Naoto and others},
journal={arXiv preprint arXiv:2410.22629},
year={2024}
}
```

## 📝 License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## 🙌 Acknowledgments

Our work is inspired by [Rein](https://github.com/w1oves/Rein). We are grateful for their outstanding work and code.