Back to all articles
Healthcare

Deep Learning for Medical Imaging: Building Datasets and Labeling Them Well

Daniel ReedDecember 19, 20255 min read

How to build medical imaging AI datasets: intended use, representative multi-site data, DICOM de-identification, labeling strategy, quality control and splits.

Deep Learning for Medical Imaging: Building Datasets and Labeling Them Well

Deep learning models for medical imaging are only as good as the images and labels they learn from. Teams often spend most of a project on data: finding the right studies, removing identifiers, agreeing what counts as a positive finding and getting experts to label consistently. This guide focuses on that data work for medical imaging AI: dataset design, de-identification, labeling strategy, quality control and splitting data for honest evaluation.

For an overview of imaging AI uses and regulation, see our guide to AI in medical imaging.

Start with the intended use

Define the clinical task, such as detecting a specific finding on chest radiographs, the patient population, the imaging modality, scanners and protocols, and how the model will be used. Those choices determine which studies you need and how they should be labeled. The Good Machine Learning Practice guiding principles published by FDA, Health Canada and the UK MHRA in October 2021 call for datasets that are representative of the intended patient population and for training data that is independent of test data.

Designing the dataset

  • Sources: multiple sites where possible, to capture different patients, scanners and workflows.
  • Variety: scanner manufacturers, protocols, image quality and common artifacts the model will meet in practice.
  • Prevalence: enough positive cases to learn from, while keeping a test set that reflects real-world prevalence.
  • Hard cases: look-alike findings and difficult negatives, not just obvious examples.
  • Metadata: age, sex, site, scanner and other attributes needed to check performance across groups.

De-identification

Medical images carry identifiers in DICOM header fields and sometimes in the pixels themselves, such as burned-in names or dates. Use the DICOM standard's confidentiality profiles as a guide for header de-identification, check pixel data for burned-in text, and follow HIPAA de-identification rules or obtain appropriate authorization. Keep a secure, separate key if you need to link back to clinical outcomes. Our guide to PHI de-identification methods covers the HIPAA side.

Labeling strategy

DecisionOptions
Label typeStudy-level classification, bounding boxes, segmentation masks or measurements
Reference standardExpert reads, consensus panels, pathology or follow-up outcomes
Who labelsSubspecialty radiologists, trained annotators with expert review, or a mix
Number of readersSingle read for training data, multiple reads or adjudication for test data
Source of labelsNew expert labels, or labels extracted from reports, which are cheaper but noisier

Write a labeling guide with definitions, examples and edge cases before labeling starts, and train labelers on it. Disagreement between experts is normal in imaging; measure it, and use adjudication for the test set so evaluation rests on the most reliable labels.

Quality control

  • Measure agreement between labelers on a shared sample and retrain where it is low.
  • Review a random sample of labels and all labels on hard cases.
  • Check for leakage, such as text annotations or markers in images that reveal the answer.
  • Track dataset versions so every model can be traced to the exact data and labels used.

Splitting data for honest evaluation

Split by patient, never by image, so the same person does not appear in both training and test sets. Hold out at least one test set that the development team does not tune against, and where possible test on data from a site or scanner not used in training. Report performance overall and by site, scanner, age, sex and other relevant groups. Our guide to clinical AI model validation covers the evaluation methods.

Medical imaging AI

Building an imaging dataset or labeling pipeline?

We design multi-site datasets, de-identification, labeling guides and quality control so imaging models are trained and tested on reliable data.

Prefer to pick a time? Book a call directly

Conclusion

Medical imaging AI succeeds or fails on its data. Define the intended use first, build representative multi-site datasets, de-identify headers and pixels, write a labeling guide, measure agreement and adjudicate test labels, and split by patient with an untouched external test set. If you are building an imaging dataset or labeling pipeline, talk to our team, or read about multimodal AI in medical imaging.

Frequently asked questions

How much data does a medical imaging AI model need?

It depends on the task, the variety of cases and the label type. More important than raw volume is enough positive and difficult cases, variety across sites and scanners, and a representative test set.

Can radiology reports be used as labels?

Yes, labels extracted from reports are common for training because they are cheap, but they are noisier. Use expert reads or adjudication for the test set.

How do you de-identify medical images?

Remove or replace identifying DICOM header fields, guided by the DICOM confidentiality profiles, check pixels for burned-in identifiers and follow HIPAA de-identification rules.

Why split imaging data by patient?

Because images from the same patient are similar. If they appear in both training and test sets, performance looks better than it really is.

data labelingradiology aiimaging datasetsdeep learningmedical imaging AI
Share:

Related Articles

Ready to Work with Our Team?

Connect with our team to explore how AI expertise can transform your business.