Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Zhang-Haojie/WeSAM
[CVPR 2024] Code for "Improving the Generalization of Segmentation Foundation Model under Distribution Shift via Weakly Supervised Adaptation"
https://github.com/Zhang-Haojie/WeSAM
Last synced: about 1 month ago
JSON representation
[CVPR 2024] Code for "Improving the Generalization of Segmentation Foundation Model under Distribution Shift via Weakly Supervised Adaptation"
- Host: GitHub
- URL: https://github.com/Zhang-Haojie/WeSAM
- Owner: zhang-haojie
- License: mit
- Created: 2023-11-30T04:22:13.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-08-18T07:01:15.000Z (5 months ago)
- Last Synced: 2024-08-19T07:53:39.356Z (5 months ago)
- Language: Python
- Homepage:
- Size: 18.8 MB
- Stars: 123
- Watchers: 6
- Forks: 8
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- Awesome-Segment-Anything - [code
README
Improving the Generalization of Segmentation Foundation Model under Distribution Shift via Weakly Supervised Adaptation
## 🎈 News
- [2024.2.27] Our work has been accepted to CVPR 2024 🎉
- [2024.3.1] Training and inference code released## 🚀 Introduction
Segment Anything Model was pre-trained on a large-scale dataset but exhibits awkward performance on diverse downstream segmentation tasks. We adapt SAM through weak supervision to enhance its generalization capabilities.
## 📻 Overview
The proposed self-training architecture with anchor network regularization and contrastive loss regularization. Red arrows indicates the backpropagation flow.
## 📆 TODO
- [x] Release code
## 🎮 Getting Started
### 1. Install Environment
see [INSTALL](INSTALL.md).
### 2. Prepare Dataset and Checkpoints
see [PREPARE](PREPARE.md).
### 3. Adapt with Weak Supervision
```
# 1 modify configs/config.py
# Prompt type: box, point, coarse# 2 adapt
python adaptation.py
```### 4. Validation
```
python validate.py --ckpt /path/to/checkpoint
```## 🖼️ Visualization
## 🎫 License
The content of this project itself is licensed under [LICENSE](LICENSE).
## 💡 Acknowledgement
- [SAM](https://github.com/facebookresearch/segment-anything)
- [lightning-sam](https://github.com/luca-medeiros/lightning-sam)
- [SAM-LoRA](https://github.com/JamesQFreeman/Sam_LoRA)
## 🖊️ Citation
If you find this project useful in your research, please consider cite:
```BibTeX
@inproceedings{zhang2024improving,
title={Improving the generalization of segmentation foundation model under distribution shift via weakly supervised adaptation},
author={Zhang, Haojie and Su, Yongyi and Xu, Xun and Jia, Kui},
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
pages={23385--23395},
year={2024}
}
```