Ir para o conteúdo
ModelListadosExterno
Baixar

Medical Adapter Zoo

Welcome to Medical Adapters Zoo (Med-Adpt Zoo)!

TipoOtherVersãoRevision dd7cda6Cnota

Fonte do modelo

Tipo
Other
Tamanho do arquivo
40,7 MB
Versão
vRevision dd7cda6
Atualizado
10 de out. de 2026
Downloads
0
Fonte
Hugging Face

Descrição da fonte

Welcome to Medical Adapters Zoo (Med-Adpt Zoo)!

Med-Adpt Zoo Map 🐘🐊🦍🦒🦨🦜🦥

Lung Nodule (CT)

Melanoma (Skin Photo)

OpticCup (Fundus Image)

OpticDisc (Fundus Image)

Thyroid Nodule (UltraSound)

Aorta (Abdominal Image)

Esophagus (Abdominal Image)

Gallbladder (Abdominal Image)

Inferior Vena Cava (Abdominal Image)

Left Adrenal Gland (Abdominal Image)

Right Adrenal Gland (Abdominal Image)

Left Kidney (Abdominal Image)

Right kidney (Abdominal Image)

Liver (Abdominal Image)

Pancreas (Abdominal Image)

Spleen (Abdominal Image)

Stomach (Abdominal Image)

Portal Vein and Splenic Vein (Abdominal Image)

Edematous Tissue (Brain Tumor mpMRI)

Enhancing Tumor (Brain Tumor mpMRI)

Necrotic (Brain Tumor mpMRI)

Inferior Alveolar Nerve (CBCT)

Surgical Instrument (Surgical Video)

Kidney Tumor (MRI)

Liver (Liver Tumor CE-MRI)

Tumor (Liver Tumor CE-MRI)

Mandible (XRay)

Retina Vessel (Fundus Image)

White Blood Cell (MicroScope)

Download the Adapters you need here

What

Here are the pre-trained Adapters to transfer SAM (Segment Anything Model) for segmenting various organs/lesions from the medical images. Check our paper: Medical SAM Adapter for the details.

Why

SAM (Segment Anything Model) is one of the most popular open models for image segmentation. Unfortunately, it does not perform well on the medical images. An efficient way to solve it is using Adapters, i.e., some layers with a few parameters to be added to the pre-trained SAM model to fine-tune it to the target down-stream tasks. Medical image segmentation includes many different organs, lesions, and abnormalities as the targets. So we are training different adapters for each of the targets, and sharing them here for the easy usage in the community.

Download an adapter for your target disease—trained on organs, lesions, and abnormalities—and effortlessly enhance SAM.

One adapter transfers your SAM to a medical domain expert. Give it a try!

How to Use

  1. Download the code of our MedSAM-Adapter here.
  2. Download the weights of the original SAM model.
  3. Load the original model and our adapter for downstream tasks.
import torch
import torchvision.transforms as transforms

import cfg
from utils import *

# set your own configs
args = cfg.parse_args()
GPUdevice = torch.device('cuda', args.gpu_device)

# load the original SAM model 
net = get_network(args, args.net, use_gpu=args.gpu, gpu_device=GPUdevice, distribution = args.distributed)
net.eval()

sam_weights = 'checkpoint/sam/sam_vit_b_01ec64.pth'    # load the original SAM weight
with open(sam_weights, "rb") as f:
    state_dict = torch.load(f)
    new_state_dict = {k: v for k, v in state_dict.items() if k in net.state_dict() and net.state_dict()[k].shape == v.shape}
    net.load_state_dict(new_state_dict, strict = False)

# load task-specific adapter
adapter_path = 'OpticCup_Fundus_SAM_1024.pth'
checkpoint_file = os.path.join(adapter_path)
assert os.path.exists(checkpoint_file)
loc = 'cuda:{}'.format(args.gpu_device)
checkpoint = torch.load(checkpoint_file, map_location=loc)

state_dict = checkpoint['state_dict']
if args.distributed != 'none':
    from collections import OrderedDict
    new_state_dict = OrderedDict()
    for k, v in state_dict.items():
        # name = k[7:] # remove `module.`
        name = 'module.' + k
        new_state_dict[name] = v
    # load params
else:
    new_state_dict = state_dict

net.load_state_dict(new_state_dict,strict = False)

Authorship

Ziyue Wang (NUS): Adapters Training

Junde Wu (Oxford): Lead the project

Yueming Jin (NUS): Supervisor

Fontes

1 fonte
Hugging FacePrimárioVersão dd7cda6c58bceaa77e71a06f8271b840355d7f53
huggingface.co/mmrech/Medical-Adapter-Zoo/tree/dd7cda6c58bceaa77e71a06f8271b840355d7f53

Verificado 25 de ago.

Artefatos de modelo

29 artefatos

Abdominal_Aorta_sam_128.pth

pth · 40,7 MB · SHA-256 1abe380b0d31…2c8c · Hugging Face

Baixar

Abdominal_Esophagus_sam_128.pth

pth · 40,7 MB · SHA-256 2ed8e611d9d1…191e · Hugging Face

Baixar

Abdominal_Gallbladder_sam_128.pth

pth · 40,7 MB · SHA-256 e65b2bf73a92…296d · Hugging Face

Baixar

Abdominal_Inferior Vena Cava_sam_128.pth

pth · 40,7 MB · SHA-256 0ad5951ca34e…e38c · Hugging Face

Baixar

Abdominal_Left Adrenal Gland_sam_128.pth

pth · 40,7 MB · SHA-256 87a705acff2d…b25f · Hugging Face

Baixar

Abdominal_Left Kidney_sam_128.pth

pth · 40,7 MB · SHA-256 07ce9e3383c5…5ef0 · Hugging Face

Baixar

Abdominal_Liver_sam_128.pth

pth · 40,7 MB · SHA-256 60200392f2af…1f9b · Hugging Face

Baixar

Abdominal_Pancreas_sam_128.pth

pth · 40,7 MB · SHA-256 6917ca6e6174…45cf · Hugging Face

Baixar

Abdominal_Right Adrenal Gland_sam_128.pth

pth · 40,7 MB · SHA-256 222054efc135…4614 · Hugging Face

Baixar

Abdominal_Right Kidney_sam_128.pth

pth · 40,7 MB · SHA-256 fc2de3c772fa…5d74 · Hugging Face

Baixar

Abdominal_Spleen_sam_128.pth

pth · 40,7 MB · SHA-256 8c5a723fc156…1317 · Hugging Face

Baixar

Abdominal_Stomach_sam_128.pth

pth · 40,7 MB · SHA-256 5fdafc88cd5c…282d · Hugging Face

Baixar

Abdominal_Vein_sam_128.pth

pth · 40,7 MB · SHA-256 273d1a185602…75f1 · Hugging Face

Baixar

Brain Tumor_Edematous Tissue_mpMRI_sam_128.pth

pth · 40,7 MB · SHA-256 5414ee71fbf2…bb18 · Hugging Face

Baixar

Brain Tumor_Enhancing Tumor_mpMRI_sam_128.pth

pth · 40,7 MB · SHA-256 8fba558148fd…f8d2 · Hugging Face

Baixar

Brain Tumor_Necrotic_mpMRI_sam_128.pth

pth · 40,7 MB · SHA-256 fabc15eac677…22f9 · Hugging Face

Baixar

Inferior Alveolar Nerve_CBCT_sam_256.pth

pth · 40,7 MB · SHA-256 2d5aaca49d95…eb1f · Hugging Face

Baixar

Kidney Tumor_sam_128.pth

pth · 40,7 MB · SHA-256 39784e5d1c69…95e5 · Hugging Face

Baixar

Liver Tumor_Liver_CE-MRI_sam_128.pth

pth · 40,7 MB · SHA-256 5123b1b0ad0a…6628 · Hugging Face

Baixar

Liver Tumor_Tumor_CE-MRI_sam_128.pth

pth · 40,7 MB · SHA-256 df03cd494da1…af1a · Hugging Face

Baixar

LungNodule_CT_SAM_1024.pth

pth · 40,7 MB · SHA-256 b48ac642d602…42a9 · Hugging Face

Baixar

Mandible_XRay_sam_1024.pth

pth · 40,7 MB · SHA-256 8c00a5deffd6…d1a3 · Hugging Face

Baixar

Melanoma_Photo_SAM_1024.pth

pth · 40,7 MB · SHA-256 8dbbe8c2c8d0…f3c9 · Hugging Face

Baixar

OpticCup_Fundus_SAM_1024.pth

pth · 40,7 MB · SHA-256 adfc7638da6b…e231 · Hugging Face

Baixar

OpticDisc_Fundus_SAM_1024.pth

pth · 40,7 MB · SHA-256 a1e39b25aa17…1af1 · Hugging Face

Baixar

Retina Vessel_Fundus_sam_1024.pth

pth · 40,7 MB · SHA-256 301fd199192d…baad · Hugging Face

Baixar

Surgical_Instrument_Video_SAM_1024.pth

pth · 40,7 MB · SHA-256 8bf6c64158f3…e237 · Hugging Face

Baixar

ThyroidNodule_UltraSound_SAM_1024.pth

pth · 40,7 MB · SHA-256 4321927a2451…1c54 · Hugging Face

Baixar

White Blood Cell_MicroScope_sam_1024.pth

pth · 40,7 MB · SHA-256 58aba2e779e8…32f4 · Hugging Face

Baixar

Trechos de fonte

2 trechos

--- license: apache-2.0 pipeline_tag: image-segmentation tags: - medical - segmentation - ct - mri - image - sam language: - en library_name: adapter-transformers --- Welcome to Medical Adapters Zoo (Med-Adpt Zoo)! ## Med-Adpt Zoo Map 🐘🐊🦍🦒🦨🦜🦥 Lung Nodule (CT) Melanoma (Skin Photo) OpticCup (Fundus Image) OpticDisc (Fundus Image) Thyroid Nodule (UltraSound) Aorta (Abdominal Image) Esophagus (Abdominal Image) Gallbladder (Abdominal Image) Inferior Vena Cava (Abdominal Image) Left Adrenal Gland (Abdominal Image) Right Adrenal Gland (Abdominal Image) Left Kidney (Abdominal Image) Right kidney (Abdominal Image) Liver (Abdominal Image) Pancreas (Abdominal Image) Spleen (Abdominal Image) Stomach (Abdominal Image) Portal Vein and Splenic Vein (Abdominal Image) Edematous Tissue (Brain Tumor mpMRI) Enhancing Tumor (Brain Tumor mpMRI) Necrotic (Brain Tumor mpMRI) Inferior Alveolar Nerve (CBCT) Surgical Instrument (Surgical Video) Kidney Tumor (MRI) Liver (Liver Tumor CE-MRI) Tumor (Liver Tumor CE-MRI) Mandible (XRay) Retina Vessel (Fundus Image) White Blood Cell (MicroScope) Download the Adapters you need [here](https://huggingface.co/KidsWithTokens/Medical-Adapter-Zoo/tree/main) ## What Here are the pre-trained Adapters to transfer [SAM](https://segment-anything.com) (Segment Anything Model) for segmenting various organs/lesions from the medical images. Check our paper: [Medical SAM Adapter](https://arxiv.org/abs/2304.12620) for the details. ## Why SAM (Segment Anything Model) is one of the most popular open models for image segmentation. Unfortunately, it does not perform well on the medical images. An efficient way to solve it is using Adapters, i.e., some layers with a few parameters to be added to the pre-trained SAM model to fine-tune it to the target down-stream tasks. Medical image segmentation includes many different organs, lesions, and abnormalities as the targets. So we are training different adapters for each of the targets, and sharing them here for the easy usage in the community. Download an adapter for your target disease—trained on organs, lesions, and abnormalities—and effortlessly enhance SAM. One adapter transfers your SAM to a medical domain expert. Give it a try! ## How to Use 1. Download the code of our MedSAM-Adapter [here](https://github.com/KidsWithTokens/Medical-SAM-Adapter). 2. Download the w...

Source context: 0 downloads · 0 likes · Pipeline image-segmentation · Library adapter-transformers · Repo mmrech/Medical-Adapter-Zoo