Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,90 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
---
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
# Cloud Adapter Models
|
| 7 |
+
|
| 8 |
+
This repository contains the code and pre-trained model weights for the paper **"Adapting Vision Foundation Models for Robust Cloud Segmentation in Remote Sensing Images"**. The models are specifically designed to perform robust cloud segmentation in remote sensing imagery by leveraging and fine-tuning vision foundation models.
|
| 9 |
+
|
| 10 |
+
## Features
|
| 11 |
+
|
| 12 |
+
- Pre-trained model weights for cloud segmentation tasks.
|
| 13 |
+
- Code for fine-tuning and evaluation of the models on remote sensing datasets.
|
| 14 |
+
- A user-friendly **Gradio Demo** to test the models interactively.
|
| 15 |
+
|
| 16 |
+
## Installation
|
| 17 |
+
|
| 18 |
+
To use the code in this repository, clone it locally and install the required dependencies:
|
| 19 |
+
|
| 20 |
+
```bash
|
| 21 |
+
git clone https://huggingface.co/XavierJiezou/cloud-adapter-models
|
| 22 |
+
cd cloud-adapter-models
|
| 23 |
+
pip install -r requirements.txt
|
| 24 |
+
```
|
| 25 |
+
|
| 26 |
+
## Usage
|
| 27 |
+
|
| 28 |
+
### 1. Download Pre-trained Models
|
| 29 |
+
|
| 30 |
+
The pre-trained model weights are available in the repository. Download the weights and place them in the appropriate directory.
|
| 31 |
+
|
| 32 |
+
```bash
|
| 33 |
+
# Example command to download weights
|
| 34 |
+
wget <link_to_model_weights>
|
| 35 |
+
```
|
| 36 |
+
|
| 37 |
+
### 2. Run the Gradio Demo
|
| 38 |
+
|
| 39 |
+
To interactively test the models using Gradio:
|
| 40 |
+
|
| 41 |
+
```bash
|
| 42 |
+
python demo.py
|
| 43 |
+
```
|
| 44 |
+
|
| 45 |
+
This will launch a web interface where you can upload remote sensing images and view the segmentation results.
|
| 46 |
+
|
| 47 |
+
### 3. Fine-tune the Model
|
| 48 |
+
|
| 49 |
+
You can fine-tune the models on your own datasets. Refer to the `train.py` script for instructions and configuration options.
|
| 50 |
+
|
| 51 |
+
```bash
|
| 52 |
+
python train.py --config configs/config.yaml
|
| 53 |
+
```
|
| 54 |
+
|
| 55 |
+
### 4. Evaluate the Model
|
| 56 |
+
|
| 57 |
+
Evaluate the model on your test set using the `evaluate.py` script:
|
| 58 |
+
|
| 59 |
+
```bash
|
| 60 |
+
python evaluate.py --weights <path_to_weights> --data <path_to_test_data>
|
| 61 |
+
```
|
| 62 |
+
|
| 63 |
+
## Gradio Demo
|
| 64 |
+
|
| 65 |
+
The Gradio demo allows users to upload remote sensing images, run cloud segmentation, and visualize the results. It can be easily modified to suit custom datasets or tasks.
|
| 66 |
+
|
| 67 |
+
### Example Screenshot:
|
| 68 |
+
*Add a screenshot of the demo interface here if available.*
|
| 69 |
+
|
| 70 |
+
## Citation
|
| 71 |
+
|
| 72 |
+
If you find this repository helpful, please consider citing the paper:
|
| 73 |
+
|
| 74 |
+
```latex
|
| 75 |
+
@{cloud-adapter,
|
| 76 |
+
title={Adapting Vision Foundation Models for Robust Cloud Segmentation in Remote Sensing Images},
|
| 77 |
+
author={Xuechao Zou and Shun Zhang and Kai Li and Shiying Wang and Junliang Xing and Lei Jin and Congyan Lang and Pin Tao},
|
| 78 |
+
year={2024},
|
| 79 |
+
eprint={2411.13127},
|
| 80 |
+
archivePrefix={arXiv},
|
| 81 |
+
primaryClass={cs.CV},
|
| 82 |
+
url={https://arxiv.org/abs/2411.13127}
|
| 83 |
+
}
|
| 84 |
+
```
|
| 85 |
+
|
| 86 |
+
## Acknowledgements
|
| 87 |
+
|
| 88 |
+
This project builds upon vision foundation models and uses open-source libraries for training and evaluation. Special thanks to the research community for their contributions to remote sensing and computer vision.
|
| 89 |
+
|
| 90 |
+
|