TL;DR
This paper introduces ConvFocus, a novel convolutional neural network that automatically assesses and quantifies out-of-focus (OOF) regions in whole-slide images (WSIs) for digital pathology. By developing a robust semi-synthetic data generation pipeline and demonstrating ConvFocus's high correlation with pathologist annotations, the authors show its potential to improve WSI quality control and prevent OOF-induced errors in AI-driven cancer detection.
What Problem Does This Paper Address?
Digital pathology, while offering numerous benefits like remote access and AI analysis, faces a significant challenge: out-of-focus (OOF) artifacts introduced during the slide digitization process. These OOF regions, ranging from global slide-level blur to localized cellular blur, can be difficult and time-consuming for pathologists to identify, leading to workflow delays due to rescanning. Furthermore, OOF can severely degrade the performance of AI algorithms designed for cancer detection, leading to misclassifications. Existing methods for OOF detection are often limited in their granularity, scanner-agnosticism, and ability to account for the clinical relevance of focus quality.
Methods
The core of this work is the development of ConvFocus, a convolutional neural network (CNN) designed to detect and grade OOF regions with high granularity. To overcome the challenge of limited manually annotated OOF data, the authors devised a semi-synthetic data generation process. This involved:
- Manual Annotation of In-focus Patches: Non-pathologist raters identified and labeled approximately 166,000 patches as "in-focus" from real WSIs.
- Synthetic OOF Generation: These in-focus patches were then synthetically blurred to create 30 different levels of OOF, ranging from nearly in-focus to strongly out-of-focus.
- Realistic Artifact Simulation: Crucially, the synthetic blurring process mimicked real-world OOF effects by using a "Bokeh" blurring kernel (inspired by photography) and also incorporated Poisson noise and JPEG compression artifacts, which are common in digitized pathology images. This approach aimed to create more realistic OOF simulations than traditional Gaussian blurring.
The ConvFocus network itself is based on a modified Inception (v3) architecture, adapted for patch-based processing of large WSIs.
Datasets
- Training and Validation Data: 26,526 different whole-slide images were used. Of these, 8,135 slides had surgical site information. The majority (26,099 slides) were scanned with an Aperio AT2, and 427 with a Hamamatsu NanoZoomer XR, both at 40X magnification.
- Test Data: 7 prostate resection and 4 lymph node biopsy slides were used, stained with H&E and immunohistochemistry. These were scanned on both the Aperio AT2 and Hamamatsu NanoZoomer S360 scanners, resulting in two test sets of 7 WSIs each. Pathologists manually annotated 37,715 patches from these slides with OOF grades from 0 (in-focus) to 6 (very strong OOF).
- Z-stack Data: 21 WSIs from a single lymph node biopsy slide, acquired with varying z-axis increments, were used to evaluate ConvFocus's performance across different focal depths.
Key Insights and Ideas
- Bokeh Blurring for Realism: The use of Bokeh blurring, rather than just Gaussian blurring, better mimics real-world OOF artifacts, leading to improved model performance.
- Importance of Realistic Artifacts: Simply blurring images is insufficient. Incorporating Poisson noise and JPEG compression artifacts into synthetic data generation significantly improves the model's ability to generalize to real OOF.
- Fine-Grained OOF Classification: The ability to distinguish between 30 OOF classes (compared to typical 6-12) is crucial for accurately assessing focus quality and its impact.
- OOF Impact on AI: OOF demonstrably degrades the performance of AI cancer detection algorithms, highlighting the need for robust OOF assessment.
- Exponential Relationship: Human perception of OOF severity follows an exponential relationship with blur magnitude, not a linear one, which informed the synthetic data generation.
Key Results
- High Correlation with Pathologists: ConvFocus achieved high Spearman rank correlation coefficients of 0.81 and 0.94 on the two scanners in the test sets, indicating strong agreement with pathologist-graded focus quality.
- Generalization: The model trained on semi-synthetic data generalized well to real OOF regions across different tissue types, stains, and scanners.
- Impact on Cancer Detection: A state-of-the-art breast cancer detector (LYNA) showed a consistent decrease in performance (measured by AUC) as the predicted OOF degree increased, both for real and synthetically blurred OOF.
- Z-stack Validation: ConvFocus correctly predicted increasing OOF as z-levels moved away from the in-focus plane, showing a "v"-shaped trend.
- Granularity Advantage: The 30-class OOF prediction of ConvFocus offers significantly finer granularity than prior methods.
Limitations and Future Work
- Dataset Size and Diversity: The cost of manual grading limited the size and diversity of the test dataset in terms of stains, tissue types, and scanners. Future work should validate generalizability with more annotators and diverse datasets.
- Scanner-Agnostic Metrics: The current evaluation is confounded by scanner-specific OOF quality. Developing scanner-agnostic or tissue-independent metrics is a key area for future research.
- Magnification: The current work focuses on 40X magnification. Extending the analysis to lower magnifications (e.g., 20X) is a subject for future work.
- Z-stack Asymmetry: Further analysis is needed to understand the observed asymmetry in the z-stack OOF predictions, which could be due to scanner inaccuracies or ConvFocus limitations.
Summary updated