Annotation & Labeling
Step 4 – Annotation & Labeling: telling the computer what is what
Section titled “Step 4 – Annotation & Labeling: telling the computer what is what”Models cannot guess what is tumor and what is normal unless you tell them. In this step you bring in human knowledge: drawing regions of interest, labeling tiles or patches, or assigning slide-level or case-level labels. These labels connect pixels to ground truth diagnoses, grades, or outcomes.
Technical name: Annotation & Labeling
What this is
Section titled “What this is”Tell the computer what is what on the slide:
- Draw boxes/regions (e.g., tumor, normal, necrosis).
- Mark structures (glands, glomeruli, follicles).
- Mark cells/events (mitoses, plasma cells, eosinophils).
Typical questions
Section titled “Typical questions”- “Can we mark all tumor area for training?”
- “Can residents practice by labeling easier vs harder regions?”
- “Can I export these outlines as a mask?”
Common tasks
Section titled “Common tasks”- ROI drawing for tumor, margin, necrosis.
- Point annotations for individual cells/structures.
- Assign labels (grade, pattern type) to regions/tiles.
- Export polygons, masks, or labeled points.
Core tools (examples)
Section titled “Core tools (examples)”- QuPath — popular for region and cell‑level annotations; exports masks/labels.
- ASAP — viewer plus manual annotation.
- SlideRunner — focuses on point/cell annotation (e.g., mitoses, lymphocytes).
- Cytomine / TissUUmaps — web platforms for collaborative annotation.
Clinician mental model
Section titled “Clinician mental model”Like drawing on the slide with a pen and dictating notes—but in a form a computer can consume and learn from.
Ready-to-use code
Section titled “Ready-to-use code”- LAB-01/02: GeoJSON to masks — export QuPath annotations to GeoJSON, load them with Shapely, run point-in-polygon checks, and rasterize polygons into masks for AI training.