Papers › SA-Med2D-20M Dataset: Segment Anything in 2D Medical Imaging with 20 Million masks

SA-Med2D-20M Dataset: Segment Anything in 2D Medical Imaging with 20 Million masks

20 Nov 2023arXiv:2311.11969archive 2025-07-28

Jin Ye, Junlong Cheng, Jianpin Chen, Zhongying Deng, Tianbin Li, Haoyu Wang, Yanzhou Su, Ziyan Huang, Jilong Chen, Lei Jiang, Hui Sun, Min Zhu, Shaoting Zhang, Junjun He, Yu Qiao

Segment Anything Model (SAM) has achieved impressive results for natural image segmentation with input prompts such as points and bounding boxes. Its success largely owes to massive labeled training data. However, directly applying SAM to medical image segmentation cannot perform well because SAM lacks medical knowledge -- it does not use medical images for training. To incorporate medical knowledge into SAM, we introduce SA-Med2D-20M, a large-scale segmentation dataset of 2D medical images built upon numerous public and private datasets. It consists of 4.6 million 2D medical images and 19.7 million corresponding masks, covering almost the whole body and showing significant diversity. This paper describes all the datasets collected in SA-Med2D-20M and details how to process these datasets. Furthermore, comprehensive statistics of SA-Med2D-20M are presented to facilitate the better use of our dataset, which can help the researchers build medical vision foundation models or apply their models to downstream medical applications. We hope that the large scale and diversity of SA-Med2D-20M can be leveraged to develop medical artificial intelligence for enhancing diagnosis, medical image analysis, knowledge sharing, and education. The data with the redistribution license is publicly available at https://github.com/OpenGVLab/SAM-Med2D.

PaperPDFCodeCode Syntology ran

In Syntology View this paper on Syntology: its repositories, every harvested function with whether it ran, its licence and the call to fetch it.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2311.11969")

Code

Syntology Ran 9 of 13 code samples harvested from 1 repository linked to this paper; 4 have no recorded run. Of those that ran: 2 ran · fixture could not drive it; 7 ran with no contract checked.

By repository: official repository: 13 samples from 1 repository, 9 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

OpenGVLab/SAM-Med2D officialmentioned in papermentioned on GitHubpytorchApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

13 samples harvested; 9 ran; 0 honoured the contract we drafted; 4 have no recorded run. Read from Syntology's graph 2026-09-25; that is when this build read the record, not when the samples ran.

2ran · fixture could not drive it
7ran
4unverified

Licence: 0 of the 13 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from OpenGVLab/SAM-Med2D. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

SegMetrics OpenGVLab/SAM-Med2D/metrics.py official repository ran Apache-2.0 (permissive) · 757040dbafc5b5a8 · report
dice OpenGVLab/SAM-Med2D/metrics.py official repository ran Apache-2.0 (permissive) · 3c2ecf169a81938f · report
get_boxes_from_mask OpenGVLab/SAM-Med2D/utils.py official repository ran Apache-2.0 (permissive) · 69b17f3689f7b247 · report
get_rel_pos OpenGVLab/SAM-Med2D/segment_anything/modeling/image_encoder.py official repository ran · fixture could not drive it Apache-2.0 (permissive) · 733d7f0bedcb74c2 · report
init_point_sampling OpenGVLab/SAM-Med2D/utils.py official repository ran Apache-2.0 (permissive) · 89a12fc455e2113d · report
iou OpenGVLab/SAM-Med2D/metrics.py official repository ran Apache-2.0 (permissive) · 5f1cca6dc655957a · report
select_random_points OpenGVLab/SAM-Med2D/utils.py official repository ran Apache-2.0 (permissive) · b6a85575a3999468 · report
stack_dict_batched OpenGVLab/SAM-Med2D/DataLoader.py official repository ran Apache-2.0 (permissive) · 32e8a89b26e59d49 · report
window_partition OpenGVLab/SAM-Med2D/segment_anything/modeling/image_encoder.py official repository ran · fixture could not drive it fingerprinted Apache-2.0 (permissive) · 105fa08885dc36cc · report
build_sam_vit_b OpenGVLab/SAM-Med2D/segment_anything/build_sam.py official repository unverified Apache-2.0 (permissive) · c79820579e477987 · report
build_sam_vit_h OpenGVLab/SAM-Med2D/segment_anything/build_sam.py official repository unverified Apache-2.0 (permissive) · 61dc61b4f44c36d2 · report
build_sam_vit_l OpenGVLab/SAM-Med2D/segment_anything/build_sam.py official repository unverified Apache-2.0 (permissive) · 3fb98a1ac23c9741 · report
window_unpartition OpenGVLab/SAM-Med2D/segment_anything/modeling/image_encoder.py official repository unverified Apache-2.0 (permissive) · 27be441cc8213e52 · report

Tasks

DiversityImage SegmentationMedical Image AnalysisMedical Image SegmentationSegmentationSemantic Segmentation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

SAM

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections