Inferensys

Glossary

Artifact Detection

An automated quality control step that identifies and excludes image regions containing tissue folds, air bubbles, or pen marks before analysis.
Security analyst reviewing fraud detection AI on multiple screens, alert dashboards visible, dark mode monitoring setup.
AUTOMATED QUALITY CONTROL

What is Artifact Detection?

Artifact detection is an automated computational quality control process that identifies and localizes non-biological irregularities in digital pathology images before diagnostic analysis.

Artifact detection is a pre-analytical deep learning step that automatically identifies and segments image regions containing tissue folds, air bubbles, pen marks, or out-of-focus areas within whole slide images. By flagging these distortions, the system prevents corrupted data from entering the diagnostic pipeline, ensuring that downstream classification models only process valid tissue.

Modern artifact detection leverages convolutional neural networks trained on annotated artifact masks to perform pixel-level segmentation of irregularities. This automated gatekeeping step is critical for computational pathology workflows, as artifacts can mimic morphological features and cause false-positive diagnoses if not excluded prior to slide-level classification or biomarker quantification.

QUALITY CONTROL

Key Characteristics of Artifact Detection Systems

Artifact detection serves as a critical pre-analytical gatekeeper in computational pathology, preventing non-biological image regions from corrupting downstream diagnostic models.

01

Automated Quality Gate

Artifact detection acts as a pre-analytical filter that automatically identifies and excludes image regions containing non-diagnostic material before any tissue analysis occurs.

  • Operates as a binary classifier on extracted patches: artifact vs. viable tissue
  • Prevents garbage-in, garbage-out failures in slide-level classification
  • Typically runs as the first step in a pathology pipeline, before tissue segmentation or feature extraction
  • Reduces manual quality control review time by 90%+ in high-throughput labs
02

Common Artifact Categories

Detection systems must generalize across a taxonomy of common preparation and scanning defects that appear in whole slide images.

  • Tissue folds: Overlapping tissue sections creating dense, hyperchromatic regions
  • Air bubbles: Circular voids introduced during coverslipping, appearing as bright empty spaces
  • Pen marks: Deliberate annotations from pathologists that can confuse diagnostic models
  • Blur and out-of-focus regions: Scanner autofocus failures producing non-diagnostic patches
  • Dust and debris: Particulate matter on the slide or scanner optics
03

Training Data Strategy

Building robust artifact detectors requires carefully curated datasets that represent the full diversity of real-world slide preparation artifacts.

  • Requires pixel-level annotations or patch-level labels from trained histotechnicians
  • Must span multiple scanner vendors (Leica, Hamamatsu, Philips) to avoid hardware-specific overfitting
  • Class imbalance is severe: artifacts typically represent <5% of total tissue area
  • Focal loss is commonly used to address this imbalance during training
  • Synthetic artifact generation via data augmentation can supplement scarce real examples
04

Integration with MIL Pipelines

Artifact detection directly feeds into Multiple Instance Learning workflows by filtering the bag of patches before aggregation.

  • Artifact patches are excluded from the bag rather than assigned a zero weight
  • Prevents attention mechanisms from erroneously focusing on pen marks as diagnostic features
  • Reduces computational load by eliminating 30-50% of non-informative patches
  • Must operate at inference speed compatible with real-time slide analysis (<2 minutes per gigapixel WSI)
05

Evaluation Metrics

Artifact detection performance is measured using metrics that account for the severe class imbalance inherent in quality control tasks.

  • Precision: Critical to avoid discarding viable diagnostic tissue (false positives)
  • Recall: Essential to catch all artifacts that could corrupt downstream analysis (false negatives)
  • F1-score at the patch level is the standard aggregate metric
  • Slide-level pass/fail accuracy: Whether the system correctly flags a slide as requiring re-scanning
  • Area under the Precision-Recall curve is preferred over ROC-AUC for imbalanced data
06

Domain Generalization Challenge

Artifact detectors must maintain performance across unseen domains—new laboratories, staining protocols, and scanner models not represented in training data.

  • Stain color and intensity vary dramatically between institutions
  • Stain normalization is often applied as a pre-processing step before artifact classification
  • Self-supervised pre-training on diverse histology data improves out-of-distribution robustness
  • Continuous monitoring for concept drift is necessary as new artifact types emerge in production
ARTIFACT DETECTION

Frequently Asked Questions

Explore the critical automated quality control mechanisms that identify and exclude non-biological image regions—such as tissue folds, air bubbles, and pen marks—before diagnostic analysis begins.

Artifact detection is an automated quality control process that identifies and segments non-diagnostic regions within digitized whole slide images (WSIs) before computational analysis. These artifacts—including tissue folds, air bubbles, pen marks, blur, and out-of-focus areas—are introduced during slide preparation, staining, or scanning. The detection system typically employs a convolutional neural network trained to perform pixel-level semantic segmentation, classifying every pixel as either valid tissue or artifact. By excluding these regions from downstream tasks like tumor classification or biomarker quantification, artifact detection prevents false predictions and ensures that only high-quality tissue is analyzed. Modern implementations often use architectures like U-Net or DeepLab with custom loss functions that heavily penalize false negatives, as missing an artifact can corrupt an entire slide-level diagnosis.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.