BCS-DBT 2D Preprocessed
Preprocessed 2D image dataset derived from the BCS-DBT (Breast Cancer Screening – Digital Breast Tomosynthesis) collection. Contains two resolution variants of 2D images extracted from 3D DBT volumes, with per-image classification labels and bounding-box detection annotations in COCO format.
Dataset Variants
| Variant | Folder | Resolution | Image type | Total size |
|---|---|---|---|---|
| bcs-dbt-2d-low | bcs-dbt-2d-low/ |
~970 × 1229 px | Averaged 2D projection per view | 14 GB |
| bcs-dbt-2d-high | bcs-dbt-2d-high/ |
~1940 × 2457 px | Representative slice per view | 50 GB |
Both variants cover the same 5,060 patients / 5,610 studies with identical splits and annotations.
Dataset Statistics
Splits
| Split | Images |
|---|---|
| train | 19,148 |
| val | 1,163 |
| test | 1,721 |
| Total | 22,032 |
Classification Labels (per image)
| Label | ID | Train | Val | Test |
|---|---|---|---|---|
| normal | 0 | 18,232 | 928 | 1,356 |
| actionable | 1 | 716 | 160 | 244 |
| benign | 2 | 124 | 38 | 61 |
| cancer | 3 | 76 | 37 | 60 |
Detection Annotations (annotated images only)
| Split | Annotated images | Bounding boxes |
|---|---|---|
| train | 200 | 224 |
| val | 75 | 75 |
| test | 121 | 136 |
Detection categories: benign (id=1), cancer (id=2).
Views
Each study contributes up to 4 standard mammography views: lcc, lmlo, rcc, rmlo.
Repository Structure
bcs-dbt-2d-high/
├── images/
│ ├── images_train_part00.tar.gz … images_train_part09.tar.gz (10 shards)
│ ├── images_val_part00.tar.gz
│ └── images_test_part00.tar.gz
├── metadata.zip
│ └── [classification/ detection/ manifest.csv]
├── classification/
│ ├── train.csv
│ ├── val.csv
│ └── test.csv
├── detection/
│ ├── train_coco.json
│ ├── val_coco.json
│ └── test_coco.json
└── manifest.csv
bcs-dbt-2d-low/
├── images/
│ ├── images_train_part00.tar.gz … images_train_part02.tar.gz (3 shards)
│ ├── images_val_part00.tar.gz
│ └── images_test_part00.tar.gz
├── metadata.zip
│ └── [classification/ detection/ manifest.csv manifest.parquet]
├── classification/
├── detection/
├── manifest.csv
└── manifest.parquet
Each *.tar.gz shard is independently extractable and under 5 GB. metadata.zip bundles all annotation files for convenience.
Usage
Extract all archives
python3 extract_all.py # extract both variants
python3 extract_all.py bcs-dbt-2d-high # one variant only
python3 extract_all.py --dry-run # preview without writing
This extracts images into images/train/, images/val/, images/test/ and metadata into classification/ and detection/.
Manual extraction
# Metadata
unzip bcs-dbt-2d-high/metadata.zip -d bcs-dbt-2d-high/
# strip the "metadata/" prefix manually or use extract_all.py
# Images (each shard independently)
mkdir -p bcs-dbt-2d-high/images/train
tar -xzf bcs-dbt-2d-high/images/images_train_part00.tar.gz -C bcs-dbt-2d-high/images/train/
# repeat for remaining shards
Load classification CSV
import pandas as pd
df = pd.read_csv("bcs-dbt-2d-high/classification/train.csv")
print(df.columns.tolist())
# ['patient_id', 'study_uid', 'view', 'view_base', 'view_type', 'laterality',
# 'split', 'label', 'label_id', 'n_slices', 'slice_idx', 'is_extra_view',
# 'has_annotation', 'flip_applied', 'p_low', 'p_high', 'png_path']
Key columns:
png_path— relative path to the image file (e.g.images/train/DBT-P00013_DBT-S00163_rmlo_s016.png)label/label_id— classification target (normal=0,actionable=1,benign=2,cancer=3)p_low,p_high— percentile pixel values for windowing/normalizationhas_annotation— whether a bounding box annotation exists in the detection JSON
Load detection annotations (COCO format)
import json
with open("bcs-dbt-2d-high/detection/train_coco.json") as f:
coco = json.load(f)
# coco["categories"]: [{"id": 1, "name": "benign"}, {"id": 2, "name": "cancer"}]
# coco["annotations"][0]:
# {"id": 1, "image_id": 1, "category_id": 1,
# "bbox": [x, y, w, h], "area": ..., "iscrowd": 0}
Image loading
Images are 16-bit grayscale PNG. Use p_low / p_high from the CSV for windowing:
import numpy as np
from PIL import Image
img = np.array(Image.open("bcs-dbt-2d-high/images/train/DBT-P00013_DBT-S00163_rmlo_s016.png"))
# img.dtype == uint16, shape == (H, W)
row = df[df["png_path"] == "images/train/DBT-P00013_DBT-S00163_rmlo_s016.png"].iloc[0]
img_clipped = np.clip(img, row["p_low"], row["p_high"])
img_norm = (img_clipped - row["p_low"]) / (row["p_high"] - row["p_low"])
Image Filename Convention
DBT-P{patient_id}_DBT-S{study_uid}_{view}_{suffix}.png
bcs-dbt-2d-high: suffix = s{slice_idx:03d} e.g. s016
bcs-dbt-2d-low: suffix = avg (averaged projection)
Source Dataset
- Original collection: BCS-DBT on TCIA
- Reference paper: Buda et al., Data from Breast Cancer Screening – Digital Breast Tomosynthesis (BCS-DBT), 2021. DOI: 10.7937/e4wt-cd02
- License: Academic Free License 3.0
Citation
If you use this dataset, please cite the original BCS-DBT collection:
@misc{buda2021bcsdbt,
author = {Buda, Mateusz and others},
title = {Data from Breast Cancer Screening – Digital Breast Tomosynthesis (BCS-DBT)},
year = {2021},
publisher = {The Cancer Imaging Archive},
doi = {10.7937/e4wt-cd02}
}
- Downloads last month
- 94