How to open CAMELYON lymph node whole-slide images from S3 in a Jupyter notebook
The slides and masks are tiled BigTIFF pyramids, and tifffile.TiffFile(path) opens one and reports its levels without loading pixels. In a Scigantic notebook the camelyon-dataset bucket is mounted at /mnt/archive, so you read tiles from multi-gigabyte slides without copying them.
The code on this page runs in a Scigantic hosted notebook, where the dataset is mounted read-only at /mnt/archive. The same path is in the SCIGANTIC_MOUNT_PATH environment variable and linked from ~/archive. The public source is s3://camelyon-dataset (AWS us-west-2, public, no account needed).
Open CAMELYON16 and CAMELYON17 on SciganticOpen the sample notebook: Comparing pathology features across organs
Code
Open a CAMELYON17 mask and read its shape
import os
import tifffile
with tifffile.TiffFile(os.path.join(os.environ['SCIGANTIC_MOUNT_PATH'], 'CAMELYON17/masks/patient_060_node_3_mask.tif')) as tf:
print(tf.series[0].shape, tf.series[0].dtype)
Run on 2026-11-15 in the Scigantic notebook image against the mounted data. It returned: tifffile: series shape (197226, 96651) dtype uint8, 9 pages
What the files are
CAMELYON is the lymph node metastasis challenge data from Radboud University Medical Center: H&E whole-slide images of sentinel lymph nodes for breast cancer metastasis detection.
CAMELYON16 has 399 slides from two centers with lesion-level annotations. CAMELYON17 has 1,000 slides from five centers (200 patients, five nodes each) with patient-level pN-stage labels in stages.csv.
How the files are laid out
| Path under the mount | What it holds |
|---|---|
| CAMELYON16/images/ | 399 slides named normal_NNN.tif, tumor_NNN.tif and test_NNN.tif, 0.3 to 4 GB each. |
| CAMELYON16/evaluation/reference.csv | Per-slide ground truth for all 399 slides, including the test set. |
| CAMELYON17/images/patient_NNN_node_M.tif | 1,000 slides, flat, not split by center; 0.2 to 9.4 GB each. |
| CAMELYON17/stages.csv | Patient pN-stage and per-slide labels for the 100 training patients. |
| CAMELYON17/masks/, CAMELYON17/annotations/ | Masks for 100 slides (0 background, 1 normal tissue, 2 tumor) and ASAP XML lesion annotations for 50. |
Size, format and license
| Format | Tiled JPEG-compressed BigTIFF pyramids, ASAP XML annotations, CSV labels |
|---|---|
| Size | About 1,399 slides, roughly 3.74 TB |
| License | CC0 |
| Provider | Radboud University Medical Center, on AWS Open Data |
| Public source | s3://camelyon-dataset (AWS us-west-2, public, no account needed) |
| Notebook image | Pathology (tifffile, OpenSlide and pyvips preinstalled) |
Things to know before you read it
- Never read level 0 of a slide in full. It can be about 100,000 by 200,000 pixels; read tiles, or a downsampled level.
- Annotation XML coordinates are always level-0 pixels. Scale them by the downsample of the level you draw on, and subtract
Exclusionpolygons fromTumorpolygons. - Twenty CAMELYON16 tumor slides are not exhaustively annotated, and the normal-tissue mask labels were generated automatically.
- OpenSlide opens most slides, but some CAMELYON17 files are plain tiled TIFF that it rejects. tifffile reads both.
Run it
Start a notebook from the CAMELYON16 and CAMELYON17 archive page. The data is mounted when the notebook opens, so the code above runs as written and nothing is downloaded first. For a longer worked example, open the sample notebook Comparing pathology features across organs.
Related guides
- How to open IDC cervical cancer whole-slide DICOM images in a Jupyter notebook
- How to load CMMD mammography DICOM files and clinical data in a Jupyter notebook
- How to open OME-Zarr volumes in a Jupyter notebook
- How to browse CZ CryoET Data Portal datasets in a Jupyter notebook
Last checked 2026-11-21. All dataset guides.