Challenges of building medical image datasets for development of deep learning software in stroke

Alessandro Fontanella, Wenwen Li, Grant Mair, Antreas Antoniou, Eleanor Platt, Chloé Martin, Paul Armitage, Emanuele Trucco, Joanna M. Wardlaw, Amos StorkeyarXiv 2023 · DOI

Abstract

Despite the large amount of brain CT data generated in clinical practice, the availability of CT datasets for deep learning (DL) research is currently limited. Furthermore, the data can be insufficiently or improperly prepared for machine learning and thus lead to spurious and irreproducible analyses. This lack of access to comprehensive and diverse datasets poses a significant challenge for the development of DL algorithms. In this work, we propose a complete semi-automatic pipeline to address the challenges of preparing a clinical brain CT dataset for DL analysis and describe the process of standardising this heterogeneous dataset. Challenges include handling image sets with different orientations (axial, sagittal, coronal), different image types (to view soft tissues or bones) and dimensions, and removing redundant background. The final pipeline was able to process 5,868/10,659 (45%) CT image datasets. Reasons for rejection include non-axial data (n=1,920), bone reformats (n=687), separated skull base/vault images (n=1,226), and registration failures (n=465). Further format adjustments, including image cropping, resizing and scaling are also needed for DL processing. Of the axial scans that were not localisers, bone reformats or split brains, 5,868/6,333 (93%) were accepted, while the remaining 465 failed the registration process. Appropriate preparation of medical imaging datasets for DL is a costly and time-intensive process.

Introduction

In the development of medical AI, a significant gap exists between highly curated public datasets and the "wild" data encountered in real-world clinical workflows. While public datasets are often clean and uniform, hospital archives are chaotic. When a patient suspected of a stroke undergoes a CT scan, the machine generates a variety of outputs: quick "scout" views (localizers), bone-specific reconstructions, and soft-tissue views, often in varying orientations and resolutions.

Feeding this raw, uncurated clinical data directly into a Deep Learning (DL) model can lead to spurious and irreproducible results. For a DL model to perform reliably, it requires consistent input. This paper addresses the essential task of data curation: systematically transforming thousands of inconsistent clinical scans into a high-quality, standardized training set while maintaining real-world representativeness.

Methods: The Standardization Pipeline

The authors developed an 8-stage semi-automatic pipeline designed to process and standardize brain CT scans from the Third International Stroke Trial (IST-3). This dataset included 10,659 image sets from 3,035 patients across 156 centers and six different scanner manufacturers.

Flowchart of the semi-automatic pipeline for standardizing clinical brain CT scans.

The pipeline consists of the following stages:

  1. Orientation Filtering: Identifying axial images using DICOM metadata tags to ensure anatomical consistency.
  2. Format Conversion: Converting raw DICOM files to the NIfTI format using dcm2niix, with interpolation to ensure uniform slice thickness.
  3. Structural Cleaning: Automatically removing "localizers" and "split scans" (where the brain is captured in separate blocks) that would interfere with later registration steps.
  4. Kernel Selection: Excluding "bone reformats" to retain only soft-tissue kernels necessary for stroke analysis.
  5. Scan Registration: Mapping every scan onto a standardized MRI T1-weighted template using FSL’s FLIRT. This ensures anatomical alignment across the entire dataset.
  6. Background Cropping: Removing non-brain "dead space" (e.g., air, scanner cradle) using the registration bounding box.
  7. Resizing and Padding: Standardizing all images to a consistent 500x400 pixel resolution.
  8. Intensity Scaling: Normalizing Hounsfield Units (HU) to a 0-1 range, specifically windowing for soft tissues (0 to 100 HU).
Distribution of slices, width, and height across the selected CT scans, demonstrating dataset heterogeneity.

Key Insights and Yield

The most striking finding of this study is the high rejection rate required for quality control. Only 45% (5,868 out of 10,659) of the initial image sets were usable for DL. The majority were discarded because they were non-axial, bone-only, or auxiliary scans. This highlights the substantial "noise" present in clinical archives.

Furthermore, the curation process is resource-intensive. The authors estimate that building the pipeline and verifying the data required approximately 250 working person-days. This underscores the often-underestimated cost of data cleaning in medical AI projects.

To automate quality control for registration, the authors employed Principal Component Analysis (PCA) and Gaussian Mixture Modeling on transformation matrices. This allowed for the identification of failed registrations caused by poor patient positioning or excessive head tilt. Additionally, the use of age-specific MRI templates was found to improve registration accuracy in the elderly stroke patient population.

Results

The pipeline successfully produced 5,868 standardized axial scans—one unique scan per patient visit. Among the valid axial scans (excluding localizers and bone reformats), the automated registration and quality control process achieved a 93% success rate (5,868/6,333). The final output consists of images normalized to a 500x400 grid with consistent intensity scaling, ready for immediate use in deep learning frameworks.

Limitations and Future Directions

Despite being semi-automatic, the pipeline still requires significant manual oversight, particularly for identifying split scans and verifying registration clusters. Future iterations could leverage DL-based classifiers to identify scan orientations and kernels more robustly than DICOM metadata, which can be unreliable. While this study focused on CT, extending the pipeline to the sequence-rich environment of MRI is a logical next step. Finally, testing the pipeline's generalizability on contemporary hospital archives outside the IST-3 dataset will be crucial for broader adoption.

Summary updated

BibTeX
@misc{fontanella2023challenges,
  author = {Alessandro Fontanella and Wenwen Li and Grant Mair and Antreas Antoniou and Eleanor Platt and Chloé Martin and Paul Armitage and Emanuele Trucco and Joanna M. Wardlaw and Amos Storkey},
  title = {{Challenges of building medical image datasets for development of deep learning software in stroke}},
  year = {2023},
  eprint = {2309.15081},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2309.15081},
}
Figure