Deep Learning Adaptation Framework
1.5k 2026-04-18

tianrun-chen/SAM-Adapter-PyTorch

A PyTorch-based framework to adapt Meta AI's Segment Anything Model (SAM) for improved performance on challenging downstream computer vision tasks using adapters and prompts.

Core Features

Adapts SAM (including SAM2, SAM3) for various downstream tasks.
Enhances performance in underperformed scenes like camouflage, shadow, and medical image segmentation.
Utilizes adapter-based fine-tuning for efficient model customization.
Provides pre-trained models and links to relevant datasets.
Compatible with PyTorch 1.13.0 and Python 3.8.

Quick Start

pip install -r requirements.txt

Detailed Introduction

SAM-Adapter is a research-oriented framework built on PyTorch, designed to overcome the limitations of Meta AI's Segment Anything Model (SAM) in specialized and challenging computer vision scenarios. By integrating lightweight adapters and prompt engineering, it enables SAM to achieve superior segmentation results in tasks such as camouflaged object detection, shadow detection, and medical image analysis (e.g., polyp segmentation). The project supports the latest iterations of SAM (SAM2, SAM3), offering a flexible and powerful solution for researchers and developers to fine-tune foundational segmentation models for domain-specific applications where out-of-the-box SAM performance may be suboptimal.

OSS Alternative

Explore the best open source alternatives to commercial software.

© 2026 OSS Alternative. hotgithub.com - All rights reserved.