tianrun-chen/SAM-Adapter-PyTorch
PyTorch implementation for fine-tuning the Segment Anything Model on downstream tasks like camouflaged object detection and medical image segmentation.

SAM-Adapter adapts Meta AI’s Segment Anything foundation model to underperformed downstream scenes by integrating adapters and prompts into the model’s architecture. The approach enables fine-tuning SAM on specialized tasks such as camouflage detection, shadow detection, polyp segmentation, and other medical imaging applications. The project supports multiple SAM versions (SAM, SAM2, SAM3) and provides configurations for ViT-H, ViT-L, and ViT-B backbones.
Frequently asked
- What is tianrun-chen/SAM-Adapter-PyTorch?
- PyTorch implementation for fine-tuning the Segment Anything Model on downstream tasks like camouflaged object detection and medical image segmentation.
- Is SAM-Adapter-PyTorch open source?
- Yes — tianrun-chen/SAM-Adapter-PyTorch is open source, released under the MIT license.
- What language is SAM-Adapter-PyTorch written in?
- tianrun-chen/SAM-Adapter-PyTorch is primarily written in Python.
- How popular is SAM-Adapter-PyTorch?
- tianrun-chen/SAM-Adapter-PyTorch has 1.5k stars on GitHub.
- Where can I find SAM-Adapter-PyTorch?
- tianrun-chen/SAM-Adapter-PyTorch is on GitHub at https://github.com/tianrun-chen/SAM-Adapter-PyTorch.