Dataset Viewer
Auto-converted to Parquet
text
stringlengths
23
30
TCGA-CH-5761-11A-01-TS1
TCGA-56-7731-11A-01-TS1
TCGA-DX-A6YX-01Z-00-DX5
TCGA-85-8071-01Z-00-DX1
TCGA-AA-A01V-01A-01-BS1
TCGA-30-1856-01A-01-TS1
TCGA-CJ-4634-01Z-00-DX1
TCGA-AG-A01N-01A-02-BS2
TCGA-EI-7004-01A-01-TS1
TCGA-85-7710-01A-01-TS1
TCGA-CH-5791-01A-01-TS1
TCGA-VR-AA4D-01Z-00-DX1
TCGA-41-2571-01A-01-TS1
TCGA-E9-A1RA-01Z-00-DX1
TCGA-06-0160-01A-01-TS1
TCGA-02-0025-01A-01-BS1
TCGA-BR-8059-01Z-00-DX1
TCGA-2G-AAGM-01Z-00-DX1
TCGA-06-0185-01A-01-TS1
TCGA-P3-A5Q6-01A-01-TS1
BLGSP-71-06-00076-01A-01-S2-HE
TCGA-SR-A6MY-01A-01-TS1
TCGA-GM-A2DI-11A-01-TS1
TCGA-BJ-A0Z2-01Z-00-DX1
TCGA-HC-7077-01A-01-TS1
TCGA-DE-A4M8-01A-02-TSB
BLGSP-71-23-00370-11A-01-S1-HE
TCGA-08-0518-01Z-00-DX3
TCGA-EK-A2RK-01A-01-TS1
TCGA-BH-A0H7-01A-01-MSA
TCGA-A8-A0A7-01Z-00-DX1
TCGA-CJ-4884-11A-01-TS1
TCGA-AA-A01Q-01Z-00-DX1
TCGA-BH-A201-01A-01-TSA
TCGA-DO-A1JZ-01A-01-TSA
BLGSP-71-32-00693-01-CD5
TCGA-CF-A5UA-01Z-00-DX1
TCGA-B0-4841-11A-01-TS1
TCGA-F9-A97G-01Z-00-DX1
TCGA-AK-3453-01A-01-BS1
TCGA-FC-A8O0-01Z-00-DX1
TCGA-DU-5874-01A-01-BS1
TCGA-N5-A4RV-01Z-00-DX1
TCGA-EJ-5524-01A-01-TS1
TCGA-HC-8256-01Z-00-DX1
TCGA-BH-A0BS-01A-01-TSA
TCGA-P3-A6T8-01Z-00-DX1
TCGA-21-5787-01A-01-BS1
TCGA-CJ-4895-01Z-00-DX1
HCM-CSHL-0091-C25-01A-01-S2-HE
TCGA-DJ-A1QE-01Z-00-DX1
TCGA-24-1553-01A-01-TS1
TCGA-VP-A875-01Z-00-DX1
TCGA-BR-6458-01A-01-TS1
TCGA-58-A46L-01Z-00-DX1
TCGA-CV-7238-11A-01-TS1
TCGA-13-0757-01A-01-TS1
TCGA-62-A46P-01Z-00-DX1
TCGA-AG-3582-01A-01-BS1
TCGA-08-0518-01Z-00-DX7
TCGA-06-0130-01A-01-BS1
TCGA-BA-6870-01A-01-BS1
TCGA-AX-A06B-01Z-00-DX1
TCGA-02-0084-01A-01-BS1
TCGA-02-0048-01A-01-BS1
TCGA-X7-A8DF-01A-01-TS1
TCGA-76-6193-01A-01-TS1
TCGA-FY-A3R9-01A-01-TS1
TCGA-BR-7704-01Z-00-DX1
TCGA-YL-A8SF-01Z-00-DX1
TCGA-14-1453-01Z-00-DX3
TCGA-BH-A18S-11A-04-TSD
TCGA-ED-A97K-01Z-00-DX1
TCGA-C5-A2M1-01Z-00-DX1
TCGA-XF-AAN3-01Z-00-DX1
TCGA-AM-5821-01A-01-TS1
BLGSP-71-32-00702-01-BCL6
TCGA-02-0089-01A-01-BS1
TCGA-XF-AAN2-01Z-00-DX1
TCGA-DX-A6BH-01Z-00-DX2
TCGA-BR-8380-01A-01-BS1
TCGA-CV-7236-01A-01-TS1
TCGA-E9-A1RE-01Z-00-DX1
TCGA-06-0188-01A-01-TS1
TCGA-44-7662-01A-01-TS1
TCGA-3A-A9IC-01Z-00-DX1
TCGA-DH-5142-01A-01-BS1
TCGA-16-1460-01A-01-TS1
TCGA-BP-5180-01A-01-BS1
TCGA-HT-7468-01A-01-TS1
TCGA-DY-A1DG-01Z-00-DX1
TCGA-13-1511-01A-01-BS1
TCGA-E2-A10E-01Z-00-DX1
TCGA-BR-8286-01Z-00-DX1
TCGA-BP-4344-11A-01-TS1
TCGA-FC-7708-01Z-00-DX1
TCGA-A8-A07R-01A-02-BS2
TCGA-J8-A3O2-06A-01-TS1
TCGA-EA-A3HS-01Z-00-DX1
TCGA-02-0034-01A-01-BS1
End of preview. Expand in Data Studio

Overview

This dataset consists of 242 images from The Cancer Genome Atlas (TCGA) pathology dataset manually annotated for segmentation of tissue (i.e. pixel-level annotation of presence or absence of tissue).

Each image is a full TCGA slide (mostly H&E) downsampled to 10 microns per pixel (MPP) and saved as a PNG.

Each image has a corresponding mask, which is also saved as a PNG where each pixel corresponds to the pixel at the same position in the 10 MPP image. The pixel values of the image mask are either 0 (no tissue) or 255 (tissue).

We also include text files train-slides.txt and test-slides.txt which provide a suggested train/test split of 194 training images (~80%) and 48 test images (~20%).

The slides were selected from TCGA to contain representative artifacts like pen markings, ink, air bubbles, cracks, and slide labels -- artifacts that often cause standard tissue segmentation algorithms to fail.

The slides are predominantly H&E and include both FFPE and frozen samples.

The data annotation schema purposefully includes all tissue present, including necrotic tissue and tissue that is partially occluded (e.g., by pen marking or anatomic ink). In our applications, we combine this model with other artifact detection models to build a scene graph representation of slide content -- including overall tissue area, as well as other overlay masks like cell or tissue type, artifact presence, etc.

Usage

As an example of how to read in these images in Python with cv2:

from typing import Iterable, Literal, Tuple
from pathlib import Path

import cv2
import numpy as np
import numpy.typing as npt

_DATA_PATH = Path("/path/to/tcga-tissue-segmentation")

def get_image_and_mask(slide_name: str) -> Tuple[npt.NDArray[np.uint8], npt.NDArray[np.bool_]]:
    image_png = slide_name + ".png"
    image_path = _DATA_PATH / "images" / image_png
    mask_path = _DATA_PATH / "masks" / image_png
    # image is a numpy array of RGB values 0-255 (H x W x 3)
    image = cv2.cvtColor(cv2.imread(str(image_path)), cv2.COLOR_BGR2RGB)
    # mask is a numpy array of booleans (H x W) where True represents tissue presence and False represents tissue absence
    mask = cv2.imread(str(mask_path), cv2.IMREAD_GRAYSCALE) > 0
    return image, mask

def get_images_and_masks(split: Literal["train", "test"]) -> Iterable[Tuple[npt.NDArray[np.uint8], npt.NDArray[np.bool_]]]:
    with open(_DATA_PATH / f"{split}-slides.txt", "rt") as f:
        slide_names = f.read().splitlines()
    for slide_name in slide_names:
        yield get_image_and_mask(slide_name)

Acknowledgements

We are grateful to the TCGA Research Network from which the slides originally used here are sourced.

Per their citation request (https://www.cancer.gov/ccg/research/genome-sequencing/tcga/using-tcga-data/citing),

The results shown here are in whole or part based upon data generated by the TCGA Research Network: https://www.cancer.gov/tcga.

Downloads last month
86

Models trained or fine-tuned on conflux-xyz/tcga-tissue-segmentation