Skip to content

Artifact detection

This section describes artifact detection methods available in HistoKit. These methods identify regions of whole-slide images (WSIs) affected by histopathological and scanning artifacts that may compromise the reliability of downstream image analysis.

Available methods

Method Detects Notes License Citation
GrandQC Tissue folds, dark spots and foreign objects, pen marks, air bubbles and edges, and out-of-focus regions. Deep learning-based multi-class artifact segmentation using an EfficientNet-B0 encoder and a U-Net++ decoder. HistoKit extends the original inference procedure with overlapping patches and configurable Constant or Gaussian prediction blending to reduce patch boundary discontinuities. Requires pretrained model weights. CC BY-NC-SA 4.0 Weng et al., 2024

Tissue segmentation

Artifact detection can be performed either within previously segmented tissue regions or across the entire whole-slide image.

Providing a tissue mask is recommended to reduce unnecessary computations in background regions.

Third-party methods and licensing

Some artifact detection methods integrate third-party algorithms and pretrained models. Their use is subject to the original licensing terms and citation requirements, which may differ from the HistoKit license.

Please refer to the documentation of each method for details.

Adding a new method

HistoKit provides a modular architecture that allows users to integrate custom artifact detection algorithms, configuration classes, output collectors, and saving mechanisms.

To document a new method, create a Markdown file in:

​text docs/examples/artifact_detection/ ​

and add it to the Artifact detection section in mkdocs.yml.

The documentation should include:

  • Method overview and algorithm description.
  • Configuration parameters and default values.
  • Model requirements and download instructions, if applicable.
  • Usage examples and tutorials.
  • Supported artifact classes and visualization colors.
  • Output format and available collectors.
  • References, licensing information, and acknowledgements.