{"id":27870876,"url":"https://github.com/visionxlab/earth-adapter","last_synced_at":"2025-08-30T12:13:06.924Z","repository":{"id":286927761,"uuid":"962131818","full_name":"VisionXLab/Earth-Adapter","owner":"VisionXLab","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-29T10:27:41.000Z","size":4174,"stargazers_count":21,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-29T10:35:41.051Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/VisionXLab.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-07T17:41:03.000Z","updated_at":"2025-05-29T10:27:45.000Z","dependencies_parsed_at":"2025-04-09T03:23:47.314Z","dependency_job_id":"772a5cfe-487f-4935-9dc6-37eed8b07532","html_url":"https://github.com/VisionXLab/Earth-Adapter","commit_stats":null,"previous_names":["visionxlab/earth-adapter"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/VisionXLab/Earth-Adapter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VisionXLab%2FEarth-Adapter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VisionXLab%2FEarth-Adapter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VisionXLab%2FEarth-Adapter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VisionXLab%2FEarth-Adapter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VisionXLab","download_url":"https://codeload.github.com/VisionXLab/Earth-Adapter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VisionXLab%2FEarth-Adapter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272847012,"owners_count":25003114,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-30T02:00:09.474Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-04T23:27:50.585Z","updated_at":"2025-08-30T12:13:06.905Z","avatar_url":"https://github.com/VisionXLab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ch1 align=\"center\"\u003e\u003cimg src=\"assets/logo.png\" alt=\"Earth-Adapter Logo\" width=\"35\" style=\"vertical-align: middle; margin-right: 10px\"/\u003eEarth-Adapter: Bridge the Geospatial Domain Gaps with Mixture of Frequency Adaptation\u003c/h1\u003e\n  \u003cp align=\"center\"\u003e\n      \u003ca href='https://scholar.google.com.hk/citations?user=zBM8_XkAAAAJ\u0026hl=zh-CN\u0026oi=ao' style='text-decoration: none' \u003eXiaoxing Hu\u003c/a\u003e\u003csup\u003e\u003c/sup\u003e\u0026emsp;\n      \u003ca href='https://scholar.google.com/citations?user=cWip8QgAAAAJ\u0026hl=zh-CN' style='text-decoration: none' \u003eZiyang Gong\u003c/a\u003e\u003csup\u003e\u003c/sup\u003e\u0026emsp;  \n      \u003ca href='https://scholar.google.com/citations?user=3nMDEBYAAAAJ\u0026hl=zh-CN\u0026oi=ao' style='text-decoration: none' \u003eYupei Wang\u003c/a\u003e\u003csup\u003e\u003c/sup\u003e\u0026emsp;  \n      \u003ca href='https://scholar.google.com/citations?user=62c9GI0AAAAJ\u0026hl=zh-CN\u0026oi=ao' style='text-decoration: none' \u003eYuru Jia\u003c/a\u003e\u003csup\u003e\u003c/sup\u003e\u0026emsp;\u003cbr\u003e\n      \u003ca href='https://scholar.google.com/citations?user=EyZqU9gAAAAJ\u0026hl=zh-CN\u0026oi=ao' style='text-decoration: none' \u003eGen Luo\u003c/a\u003e\u003csup\u003e\u003c/sup\u003e\u0026emsp;\n      \u003ca href='https://yangxue0827.github.io/' style='text-decoration: none' \u003eXue Yang\u003c/a\u003e\u003csup\u003e\u003c/sup\u003e\u0026emsp;\n      \u003c!-- \u003ch3 align='center'\u003eCVPR 2025\u003c/h3\u003e --\u003e\n      \u003cdiv align=\"center\"\u003e\n      \u003c!-- \u003c!-- \u003ca href='https://arxiv.org/abs/2501.04440'\u003e\u003cimg src='https://img.shields.io/badge/arXiv-2501.04440-brown.svg?logo=arxiv\u0026logoColor=white'\u003e\u003c/a\u003e --\u003e\n      \u003c!-- \u003ca href='https://github.com/zhasion/RSAR'\u003e\u003cimg src='https://img.shields.io/badge/Github-page-yellow.svg?logo=Github\u0026logoColor=white'\u003e\u003c/a\u003e\n      \u003ca href='https://drive.google.com/file/d/1v-HXUSmwBQCtrq0MlTOkCaBQ_vbz5_qs/view?usp=sharing'\u003e\u003cimg src='https://img.shields.io/badge/GoogleDrive-dataset-blue.svg?logo=GoogleDrive\u0026logoColor=white'\u003e\u003c/a\u003e --\u003e\n      \u003c!-- \u003ca href='https://pan.baidu.com/s/1DVUNBuWrhJRg0H1qhwtfEQ?pwd=rsar'\u003e\u003cimg src='https://img.shields.io/badge/BaiduNetdisk-dataset-blue.svg?logo=baidu\u0026logoColor=white'\u003e\u003c/a\u003e\n      \u003c!-- \u003ca href='https://zhuanlan.zhihu.com/p/16758735545'\u003e\u003cimg src='https://img.shields.io/badge/Zhihu-chinese_article-blue.svg?logo=zhihu\u0026logoColor=white'\u003e\u003c/a\u003e --\u003e\n\t  \u003c/div\u003e\n    \u003cp align='center'\u003e\n        If you find our work helpful, please consider giving us a ⭐!\n    \u003c/p\u003e\n   \u003c/p\u003e\n\u003c/p\u003e\n\n\u003c!-- [![Paper](https://img.shields.io/badge/arXiv-XXXX.XXXXX-b31b1b.svg)](https://arxiv.org/abs/XXXX.XXXXX)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE) --\u003e\n\nOfficial PyTorch implementation of [Earth Adapter: Bridge the Geospatial Domain Gaps with Mixture of Frequency Adaptation]\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"assets/Earth-Adapter.png\" width=\"100%\"/\u003e\n\u003c/div\u003e\n\n\n## Notice\nThis 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.\n\n## TODO\n- [x] complete training and evaluation instruction\n- [x] paper link\n- [ ] demo.ipynb\n- [x] data and weight on huggingface \u0026 google drive\n- [ ] extended experiment on supervised in-domain semantic segmentation\n- [ ] extended experiment on cross-earth benchmark\n- [ ] bug fix...\n\n## 📖 Introduction\n\nThis 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.\n\nPaper: [Paper Link](http://arxiv.org/abs/2504.06220)\n\n## 🛠️ Requirements\n\n- Python \u003e= 3.8\n- PyTorch \u003e= 1.10\n- CUDA \u003e= 11.0 (if using GPU)\n- Other dependencies in `requirements.txt`\n\n## 🚀 Installation\n\n- Clone this repository and install dependencies:\n\n```bash\n# Clone the repo\ngit clone https://github.com/VisionXLab/Earth-Adapter.git\ncd Earth-Adapter\n\n# Create virtual environment\nconda create -n earth-adapter python=3.9 -y\n\nconda activate earth-adapter\n\n# Install PyTorch according to your own CUDA version\npip install torch==2.1.1 torchvision==0.16.1 torchaudio==2.1.1 --index-url https://download.pytorch.org/whl/cu121\n\n\n# Install other dependencies\npip install -U openmim\nmim install mmengine\nmim install \"mmcv\u003e=2.0.0\"\npip install \"mmsegmentation\u003e=1.0.0\"\npip install \"mmdet\u003e=3.0.0\"\npip install xformers=='0.0.23'\npip install -r requirements.txt\npip install future tensorboard\n```\n\n## 📂 Dataset Preparation\n\n\n- 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.)\n- Construct the data as follows:\n\n```bash\nEarth-Adapter/\n|-- data/\n|---|--- loveda_uda\n|---|--- potsdamRGB\n|---|--- vaihingen\n```\n\n## 🔥 Usage\n- If you encounter a version mismatch of mmseg or mmdet during use, such as an error such as ``xxx\u003c=mmcv\u003cxxx``, please modify it directly in ``__init__.py``(in mmseg and mmdet) and change it to ``xxx\u003c=mmcv\u003c=xxx``.\n### Training\n- Down the `dinov2_converted.pth` model from |[Baidu Cloud](https://pan.baidu.com/s/1vZm9VvSgRmPeXfu-21nudA?pwd=ys74)|[Hugging Face](https://huggingface.co/wsdwJohn1231/Earth-Adapter)|[Google Drive](https://drive.google.com/drive/folders/1UnOOYtGV6jJi39TSnzsPowZK5z-CdZ8K?usp=sharing)|,put the `dinov2_converted.pth` in the `checkpoints` folder.\n```bash\n./tools/train.sh\n```\n\n### Evaluation\nThe Checkpoint can be downloaded from |[Baidu Cloud](https://pan.baidu.com/s/1vZm9VvSgRmPeXfu-21nudA?pwd=ys74)|[Hugging Face](https://huggingface.co/wsdwJohn1231/Earth-Adapter)|[Google Drive](https://drive.google.com/drive/folders/1UnOOYtGV6jJi39TSnzsPowZK5z-CdZ8K?usp=sharing)|,put the checkpoint in the `checkpoints` folder. Then run:\n```bash\n./tools/test.sh\n```\n\u003c!-- \nTo evaluate the trained model, run:\n\n```bash\npython eval.py --checkpoint path/to/checkpoint.pth\n```\n\n### Demo\n\nTo run inference on a single image:\n\n```bash\npython demo.py --input path/to/image.jpg --output path/to/output.jpg\n```\n--\u003e \n## 📊 Results\n\n### Main Results\n![Sample Result](assets/main_result.png)\n![Sample Result](assets/IoU_result.png)\n### Quantitative Results\n![Sample Result](assets/trade-off.png)\n![Sample Result](assets/ab_1.png)\n\n### Visualization\n![Sample Result](assets/vis1.png)\n![Sample Result](assets/vis2.png)\n\n\n## 📜 Citation\n\nIf you find our work helpful, please cite our paper:\n\n```bibtex\n@article{hu2025earth,\n  title={Earth-Adapter: Bridge the Geospatial Domain Gaps with Mixture of Frequency Adaptation},\n  author={Hu, Xiaoxing and Gong, Ziyang and Wang, Yupei and Jia, Yuru and Luo, Gen and Yang, Xue},\n  journal={arXiv preprint arXiv:2504.06220},\n  year={2025}\n}\n@article{gong2024crossearth,\n  title={Crossearth: Geospatial vision foundation model for domain generalizable remote sensing semantic segmentation},\n  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},\n  journal={arXiv preprint arXiv:2410.22629},\n  year={2024}\n}\n```\n\n## 📝 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🙌 Acknowledgments\n\nOur work is inspired by [Rein](https://github.com/w1oves/Rein). We are grateful for their outstanding work and code.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvisionxlab%2Fearth-adapter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvisionxlab%2Fearth-adapter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvisionxlab%2Fearth-adapter/lists"}