12  Image Quality Control Analysis

13 Image Quality Control Analysis

This chapter analyzes the impact of image quality on AI performance. Phase 1 results indicated that processing artifacts and image quality issues significantly affected AI accuracy.

13.1 Quality Issues Identified in Phase 1

Note for Pathologists: A summary of quality issues encountered during Phase 1 that negatively impacted AI performance. Addressing these is crucial for reliable AI deployment.

### Quality Issues from Phase 1:
From the first phase analysis, the following quality-related issues were identified:
1. **Blurred Images**: 3 images were too blurred for reliable AI analysis
2. **Processing Artifacts**: 4 cores had processing artifacts that affected AI performance
3. **Focus Issues**: 1 case had both blurred and focused slides
4. **Total Excluded**: 7 cores were excluded from agreement analysis due to quality issues

13.2 Recommendations for Quality Control

Pre-Analysis Quality Assessment

Based on Phase 1 findings, implementing quality control before AI analysis is critical.

13.3 Impact of Quality on AI Performance

False Positive/Negative Analysis Related to Quality

Note for Pathologists: Analysis of False Negatives from Phase 1 reveals that the majority were caused by suboptimal image quality, highlighting the direct link between slide quality and AI sensitivity.

### False Negatives (AI missed tumor):
From Phase 1, 8 cores were diagnosed as benign by AI but malignant by pathologists:
- 3 images: Blurred (quality issue)
- 4 images: Processing artifacts (quality issue)
- 1 image: True false negative (confirmed with IHC)
**Quality-related false negatives: 7/8 (87.5%)**
### Quality Impact Summary:
- Quality issues accounted for majority of AI false negatives
- This suggests AI performance is highly dependent on image quality
- Implementing QC could significantly reduce false negative rate

13.4 Proposed Quality Metrics

Note for Pathologists: Proposed quantitative metrics and thresholds for automated quality acceptance.

Proposed Quality Control Metrics
Metric Threshold Description Action_if_Failed
Focus Score > 0.7 Measure of image sharpness (0-1 scale) Flag for review / Re-scan
Artifact Score < 0.2 Percentage of image with artifacts (0-1 scale) Flag for review / Manual diagnosis
Tissue Coverage > 60% Percentage of image containing tissue May be acceptable if diagnostic area present
Staining Quality 0.6 - 0.9 Staining intensity uniformity Flag for review / Check staining protocol
Background Score > 0.8 Clear background without debris Review if combined with other issues

13.5 Implementation Strategy

13.5.1 Phase 1: Retrospective Quality Assessment

Assess Current Image Quality

**Steps:**
1. Run HistoQC on all existing digital slides
2. Generate quality metrics for entire archive
3. Identify systematic quality issues
4. Determine appropriate thresholds for institution
5. Correlate quality metrics with AI performance

13.5.2 Phase 2: Prospective Quality Control

Implement Real-Time QC

**Implementation:**
1. Integrate HistoQC into scanning workflow
2. Automatic quality assessment post-scanning
3. Quality dashboard for lab technologists
4. Alert system for below-threshold images
5. Track quality metrics over time
6. Only send quality-approved images to AI system

13.5.3 Phase 3: Continuous Monitoring

Ongoing Quality Assurance

**Monitoring Plan:**
1. Weekly quality metric reports
2. Identify trends in quality issues
3. Scanner maintenance based on quality decline
4. Operator training for common issues
5. Quarterly review of quality thresholds
6. Document correlation with AI performance

13.6 Quality Control Checklist

Note for Pathologists: A checklist detailing QC tasks at each stage of the digital pathology workflow, assigning responsibilities to ensuring high-quality input for the AI.

Quality Control Workflow Checklist
Stage Task Responsible
Pre-Scanning Verify slide quality under microscope Histotechnologist
Pre-Scanning Check staining quality Histotechnologist
Pre-Scanning Ensure proper tissue mounting Histotechnologist
Post-Scanning Run automated quality assessment Automated System
Post-Scanning Review quality metrics Lab Technologist
Post-Scanning Flag problematic images Lab Technologist
Pre-AI Analysis Verify image passed QC thresholds System / Pathologist
Pre-AI Analysis Manual review of flagged images Pathologist
Post-AI Analysis Track AI performance on QC-passed images System Administrator
Post-AI Analysis Document quality-related issues Pathologist / Admin

13.7 Cost-Benefit of Quality Control

Note for Pathologists: A cost-benefit breakdown showing that the minimal investment in QC software and training is outweighed by significant clinical benefits.


**Benefits of Implementing QC:**
1. **Reduced False Negatives**: Phase 1 showed 87.5% of AI false negatives were quality-related
2. **Improved AI Accuracy**: Only analyze high-quality images
3. **Better Pathologist Confidence**: Knowing images meet quality standards
4. **Reduced Re-work**: Identify issues before diagnosis
5. **Scanner Maintenance**: Early detection of scanner problems
**Costs of Implementing QC:**
1. **Software**: HistoQC is open-source (free)
2. **Computation**: Additional processing time per image (~1-2 minutes)
3. **Storage**: Quality metrics and reports (~1MB per case)
4. **Training**: Staff training on QC workflow (~4 hours)
5. **Monitoring**: Weekly review time (~1 hour/week)
**Net Benefit**: The quality control costs are minimal compared to the benefit of improved diagnostic accuracy and reduced AI errors.

13.8 Integration with HistoQC

Using HistoQC for Automated Quality Assessment

HistoQC is an open-source quality control system for digital pathology that can automatically assess image quality.


### HistoQC Features:
- Automated detection of common artifacts
- Focus quality assessment
- Tissue detection and coverage
- Staining quality evaluation
- Background and pen marking detection
- Generates quality reports and visualizations
### Example HistoQC Integration:
```bash
# Run HistoQC on a directory of images
python -m histoqc.pipeline --config config.ini --nprocesses 4 slides/*.svs
```
### Configuration Recommendations:
1. **Enable Modules**:
   - Brightness/Contrast
   - Blur Detection
   - Bubble Detection
   - Fold Detection
   - Tissue Coverage
2. **Set Thresholds**: Based on institution-specific requirements
3. **Generate Reports**: HTML reports with quality visualizations
4. **Integration Points**:
   - Post-scanning automated trigger
   - Quality database for tracking
   - Dashboard for lab monitoring
   - API for AI system integration

13.9 Summary

Key Recommendations:

  1. Implement HistoQC for automated quality assessment
  2. Define Quality Thresholds based on institutional data
  3. Integrate with Workflow - QC before AI analysis
  4. Monitor Continuously - Track quality metrics over time
  5. Document Impact - Correlate quality with AI performance

Expected Outcomes: - Reduced AI false negatives (potentially 87.5% reduction based on Phase 1) - Improved diagnostic confidence - Earlier detection of technical issues - Better overall workflow efficiency

Critical Success Factor: Quality control must be implemented BEFORE AI analysis, not after.