Back to directory

SAM-Adapter: Adapting SAM in Underperformed Scenes

A research implementation that adapts Meta's Segment Anything Model to downstream image-segmentation tasks, such as camouflaged-object and polyp detection, using adapters and prompts.

SAM-Adapter: Adapting SAM in Underperformed Scenes

SAM-Adapter-PyTorch is the official code release for adapting Meta AI's Segment Anything Model, SAM, to downstream segmentation tasks where it otherwise underperforms, using lightweight adapters and prompts rather than retraining the whole model. It was presented at ICCV 2023, and the authors report strong results using the ViT-H version of SAM, with configurations also provided for the smaller ViT-L and ViT-B backbones for GPUs with less memory, at some cost to accuracy.

The codebase includes training and evaluation scripts driven by a YAML configuration file and needs a downloaded pretrained SAM checkpoint and dataset placed in specific local folders; the authors report training on four A100 GPUs due to SAM's memory requirements. Later branches in the same repository add support for adapting the newer SAM2 and SAM3 backbones. It is written in Python, requires PyTorch 1.13, and demonstrated the approach on medical polyp-segmentation data as well as its original camouflaged-object detection task.

More in Models

See all 405
  • mini-AGI

    github.com

    A continual learning language model that trains from scratch on a single 8 GB VRAM GPU, assembling its own architecture and adapting its size to the hardware and data available rather than shipping as a fixed pretrained model.

  • An open-source contrastive-embedding pipeline that maps technical CVE vulnerability descriptions to formal cybersecurity compliance controls in NIST SP 800-53 and CMMC, published with its model generation, fine-tuning and evaluation code.

  • peekaboolean

    github.com

    A small vision-language model, fine-tuned with LoRA on a 500-million-parameter backbone, that answers typed multiple-choice, ordinal-score and yes/no questions about an image with calibrated probabilities, in about 400 milliseconds on a laptop.