https://github.com/xiaoyan07/SAM_MLoRA
https://github.com/xiaoyan07/SAM_MLoRA
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/xiaoyan07/SAM_MLoRA
- Owner: xiaoyan07
- License: mit
- Created: 2024-04-23T08:21:50.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-28T06:40:09.000Z (7 months ago)
- Last Synced: 2025-05-28T07:36:02.295Z (7 months ago)
- Language: Python
- Size: 2.26 MB
- Stars: 15
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- Awesome-Segment-Anything - [code
README
Multi-LoRA Fine-Tuned Segment Anything Model for Extraction of Urban Man-Made Objects
Xiaoyan LU and
Qihao WENG
[[`Paper`](https://ieeexplore.ieee.org/abstract/document/10637992)]
## Multi-LoRA Fine-Tuned SAM Framework
## The Training Set
1. [DeepGlobe Road Training Dataset ](https://competitions.codalab.org/competitions/18467#participate-get_data): 4696 samples
2. [SpaceNet Building AOI2 and AOI4 Dataset ](https://spacenet.ai/spacenet-buildings-dataset-v2/): 8429 samples
## The Validation Set
1. [DeepGlobe Road Test Dataset ](https://competitions.codalab.org/competitions/18467#participate-get_data): 1530 samples
2. [SpaceNet Building AOI3 and AOI5 Dataset ](https://spacenet.ai/spacenet-buildings-dataset-v2/): 1148 (Paris) and 1101 (Khartoum) samples
3. [The WHU building (Christchurch) dataset](http://gpcv.whu.edu.cn/data/building_dataset.html): 2416 samples
## Weights Download
1. The trained weights of SAM_Adapter, SAM_LoRA (r=96), and SAM_MLoRA (r=32,n=3) are released at [Baidu Drive](https://pan.baidu.com/s/1_uscV5L8mDt4kihwt1iSqg), Code: MODE
2. Or through [Google Drive](https://drive.google.com/drive/folders/1RJ7nZXZSQ6o-u8YnEq-nmQQ3xpeJ35RO?usp=sharing)
## Road Extraction
SAM_Adapter
```
python train_sam_adapter.py --name='b_adapter_sam'
```
SAM_LoRA (r=96)
```
python train_sam_adapter.py --name='b_adapter_sam_lora96_96'
```
SAM_MLoRA (r=32,n=3)
```
python train_sam_adapter.py --name='b_adapter_sam_multi_lora'
```
## Building Extraction
SAM_Adapter
```
python train_sam_adapter_build.py --name='b_adapter_sam_sp24'
```
SAM_LoRA (r=96)
```
python train_sam_adapter_build.py --name='b_adapter_sam_lora96_96_sp24'
```
SAM_MLoRA (r=32,n=3)
```
python train_sam_adapter_build.py --name='b_adapter_sam_multi_lora32_sp24'
```
## Citation
If this code or dataset contributes to your research, please kindly consider citing our paper :)
```
@article{Lu2024MLoRA,
title = {Multi-LoRA Fine-Tuned Segment Anything Model for Urban Man-Made Object Extraction},
author = {Xiaoyan LU and Qihao Weng},
journal = {IEEE Transactions on Geoscience and Remote Sensing},
volume = {62},
pages = {1-19},
year = {2024},
doi = {https://doi.org/10.1109/TGRS.2024.3435745}
}
```