{"data":{"slug":"tianrun-chen-sam-adapter-pytorch","name":"SAM-Adapter-PyTorch","tagline":"Adapting Meta AI's Segment Anything to Downstream Tasks with Adapters and Prompts","github_url":"https://github.com/tianrun-chen/SAM-Adapter-PyTorch","owner":"tianrun-chen","repo":"SAM-Adapter-PyTorch","owner_avatar_url":"https://avatars.githubusercontent.com/u/126600557?v=4","primary_language":"Python","stars":1550,"forks":123,"topics":["2d-segmentation","adapter","camouflage-images","camouflaged-object-detection","camouflaged-target-detection","fine-tune","fine-tuning","image-segmentation","image-segmentation-pytorch","segment-anything","segment-anything-model"],"archived":false,"github_pushed_at":"2026-05-17T04:56:00+00:00","maintenance_label":"Slowing","stars_delta_30d":6,"url":"https://www.graphcanon.com/tools/tianrun-chen-sam-adapter-pytorch","markdown_url":"https://www.graphcanon.com/tools/tianrun-chen-sam-adapter-pytorch.md","api_url":"https://www.graphcanon.com/api/graphcanon/tools/tianrun-chen-sam-adapter-pytorch","graph_url":"https://www.graphcanon.com/api/graphcanon/graph?tool=tianrun-chen-sam-adapter-pytorch","description":"Adapting Meta AI's Segment Anything to Downstream Tasks with Adapters and Prompts","homepage_url":null,"license":"MIT","open_issues":66,"watchers":9,"ai_summary":"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.","readme_excerpt":"## Quick Start\n1. Download the dataset and put it in ./load.\n2. Download the pre-trained [SAM(Segment Anything)](https://github.com/facebookresearch/segment-anything) and put it in ./pretrained.\n3. Training:\n```bash\nCUDA_VISIBLE_DEVICES=0,1,2,3 python -m torch.distributed.launch --nnodes 1 --nproc_per_node 4 loadddptrain.py --config configs/demo.yaml\n```\n!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!\n\n\n4. Evaluation:\n```bash\npython test.py --config [CONFIG_PATH] --model [MODEL_PATH]\n```","github_created_at":"2023-04-14T18:33:17+00:00","created_at":"2026-07-11T11:39:09.307352+00:00","updated_at":"2026-08-24T00:02:18.277125+00:00","categories":[{"slug":"computer-vision","name":"Computer Vision","url":"https://www.graphcanon.com/categories/computer-vision","markdown_url":"https://www.graphcanon.com/categories/computer-vision.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/computer-vision"},{"slug":"model-training","name":"Model Training","url":"https://www.graphcanon.com/categories/model-training","markdown_url":"https://www.graphcanon.com/categories/model-training.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/model-training"}],"tags":[{"slug":"2d-segmentation","name":"2d-segmentation"},{"slug":"adapter","name":"adapter"},{"slug":"camouflage-images","name":"camouflage-images"},{"slug":"camouflaged-object-detection","name":"camouflaged-object-detection"},{"slug":"fine-tuning","name":"fine-tuning"},{"slug":"image-segmentation","name":"image-segmentation"}],"trust":{"provenance":{"is_fork":false,"github_id":628028132,"owner_type":"User","methodology":"github_public_v1","parent_repo":null,"near_duplicate_slugs":[]},"computed_at":"2026-08-24T00:02:17.481Z","maintenance":{"label":"Slowing","score":36,"methodology":"github_public_v1","releases_90d":0,"days_since_push":98,"last_release_at":null,"stars_delta_30d":6,"open_issues_delta_30d":0},"security_summary":{"status":"no_lockfile","scanner":null,"low_count":0,"high_count":0,"last_scan_at":"2026-07-11T11:39:10.443Z","medium_count":0,"scan_profile":"none","critical_count":0}},"capability_facts":{"scan":{"source":"repo_scan","observed_at":"2026-08-24T00:02:17.967Z"},"languages":{"value":["python"],"source":"github.language","observed_at":"2026-08-24T00:02:17.967Z"},"license_spdx":{"value":"MIT","source":"github.license","observed_at":"2026-08-24T00:02:17.967Z"}},"decision_facts":{"hosting":null,"pricing":null,"requirements":null,"constraints":null,"when_to_use":["Need to adapt SAM to specific tasks like detecting camouflaged objects","Working on fine-tuning models using adapter modules within the PyTorch framework"],"when_not_to_use":["Looking for a toolset that primarily focuses on training from scratch rather than adapting pre-trained models","Interested in frameworks other than PyTorch"],"source":"enrich:decision_facts","observed_at":"2026-07-12T15:23:09.630Z"},"constraint_facets":null,"decision_summary":[{"label":"Adopt for","value":"SAM-Adapter-PyTorch facilitates downstream task adaptation for SAM through adapters and prompts, specialized in camouflaged object detection with PyTorch."}]}}