zhang-haojie / wesam

[CVPR 2024] Code for "Improving the Generalization of Segmentation Foundation Model under Distribution Shift via Weakly Supervised Adaptation"

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

image

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

image

The proposed self-training architecture with anchor network regularization and contrastive loss regularization. Red arrows indicates the backpropagation flow.

๐Ÿ“† TODO

  • Release code

๐ŸŽฎ Getting Started

1. Install Environment

see INSTALL.

2. Prepare Dataset and Checkpoints

see PREPARE.

3. Adapt with Weak Supervision

# 1 modify configs/config.py 
# Prompt type: box, point, coarse

# 2 adapt
python adaptation.py

๐Ÿ–ผ๏ธ Demo

COCO Dataset

image

ISIC Dataset

image

OCID Dataset

image

CAMO Dataset

image

COCO-C Dataset

image image

๐ŸŽซ License

The content of this project itself is licensed under LICENSE.

๐Ÿ’ก Acknowledgement

๐Ÿ–Š๏ธ Citation

If you find this project useful in your research, please consider cite:

@article{zhang2023improving,
      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},
      journal={arXiv preprint arXiv:2312.03502},
      year={2023}
}

About

[CVPR 2024] Code for "Improving the Generalization of Segmentation Foundation Model under Distribution Shift via Weakly Supervised Adaptation"

License:MIT License


Languages

Language:Python 100.0%