Home/Computer Vision/SAM-Adapter-PyTorch
SAM-Adapter-PyTorch logo

SAM-Adapter-PyTorch

tianrun-chen/SAM-Adapter-PyTorch

Adapting Meta AI's Segment Anything to Downstream Tasks with Adapters and Prompts

GraphCanon updated today · GitHub synced today

1.6k stars123 forksLast push 3mo Python MIT

Decision brief

SAM-Adapter-PyTorch facilitates downstream task adaptation for SAM through adapters and prompts, specialized in camouflaged object detection with PyTorch.

Good fit when

  • Need to adapt SAM to specific tasks like detecting camouflaged objects
  • Working on fine-tuning models using adapter modules within the PyTorch framework

Avoid when

  • Looking for a toolset that primarily focuses on training from scratch rather than adapting pre-trained models
  • Interested in frameworks other than PyTorch

Observed Jul 12, 2026 · Source: enrich:decision_facts

Verify the decision

Maintenance and security

Full trust report
Maintenance
Slowing (98d since push)
As of today
Provenance
Not a fork · Personal account
As of today
Security (OSV)
No lockfile
As of 1mo

Public GitHub metadata and optional OSV scans. Signals, not a guarantee. Trust methodology.

Install

pip install SAM-Adapter-PyTorch
PyPI

How it fits your stack(1)

Typed graph edges - alternatives, integrations, successors, and dependencies. Ranked by relationship type, not raw GitHub stars.

Relationship graph

Optional deeper exploration of typed edges and category neighbours.

Similar tools

Same-category neighbours not already linked as typed edges.

Evidence and technical details

Sourced facts, taxonomy, compatibility claims, README excerpt, and machine-readable endpoints.

Overview

A PyTorch-based repository that facilitates the adaptation of the Segment Anything Model (SAM) for downstream tasks such as camouflaged object detection through the use of adapters and prompts.

Capability facts

Languages
python

Source: github.language · Aug 24, 2026

Categories

Compatibility

Sourced claims from the README excerpt - not unsourced marketing copy.

Python runtimePython

Source: README excerpt (regex_v1, Aug 24, 2026)

CUDA_VISIBLE_DEVICES=0,1,2,3 python -m torch.distributed.launch --nnodes 1 --nproc_per_node 4 loadddptrain.py --con
Source link

Tags

README

Quick Start

  1. Download the dataset and put it in ./load.
  2. Download the pre-trained SAM(Segment Anything) and put it in ./pretrained.
  3. Training:
CUDA_VISIBLE_DEVICES=0,1,2,3 python -m torch.distributed.launch --nnodes 1 --nproc_per_node 4 loadddptrain.py --config configs/demo.yaml

!Please note that the SAM model consume much memory. We use 4 x A100 graphics card for training. If you encounter the memory issue, please try to use graphics cards with larger memory!

  1. Evaluation:
python test.py --config [CONFIG_PATH] --model [MODEL_PATH]

For agents

This page has a .md twin and JSON over the API.

Was this helpful?

Anonymous feedback helps us improve pages and translations.