Due to the presence of artifacts in digitized histopathology images, tissue regions that are important for diagnosis can be unclear or even completely unusable. As a result, artifacts may interfere with an accurate diagnosis by pathologists or lead to erroneous analyses by deep learning algorithms. By detecting commonly found artifacts, it is possible to improve the process of automated diagnosis. Images with too many artifacts can automatically be rejected by our quality control system, potentially saving many hours of manual inspection.
The system detects the following artifact types:
- Tissue folds
- Ink
- Dust
- Air bubbles
- Marker
- Out-of-focus
An interactive demo is accessible via Grand-Challenge:
To be able to make use of the demo, please click on Request Access
.
The following slides were contained in the training data:
Tissue | Stain | Whole slide scanner | #Slides | #Annotations |
---|---|---|---|---|
Breast | HE CD3 CD45RO CD8 |
3DHistech Pannoramic 250 Flash II Hamamatsu NanoZoomer-XR C12000-01 Philips Ultrafast Scanner |
47 | 1456 |
Bonemarrow | HE PAS |
3DHistech P1000 scanners | 8 | 71 |
Colon | CK20 | 3DHistech Pannoramic 250 Flash II | 25 | 735 |
Kidney | HE PAS |
Leica Aperio XT ScanScope 3DHistech P1000 scanners |
9 | 211 |
Lymphoma | HE | 3DHistech P1000 scanners | 9 | 48 |
Pancreas | CD3 CK81 CKPAN CD8 |
3DHistech Pannoramic 250 Flash II 3DHistech P1000 scanners |
10 | 451 |
Prostate | HE | Leica Aperio AT2 Hamamatsu C9600-12 3DHistech P1000 scanners |
20 | 166 |
Ovary | HE P53 Ki67 |
3DHistech P1000 scanners | 9 | 71 |
Miscellaneous | HE Ki67 |
3DHistech P1000 scanners | 5 | 69 |
Prepare a configuration file (e.g., named config.yml
):
# paths to checkpoints and output folder
artifact_network: /.../path/to/checkpoints/artifact_network.pth
quality_network: /.../path/to/checkpoints/quality_score_network.ckpt
output_folder: /.../path/to/output/directory
# architecure settings
architecture: deeplabv3plus
encoder_name: efficientnet-b2
encoder_weights: imagenet
use_batchnorm: true
pooling: avg
dropout: 0.4
spacing: 4.0
# torch settings
device: cuda
workers: 4
# tissue settings
minimum_region: 5000
minimum_hole: 1000
remove_mask: true
# artifact settings
overlap: 256
tile_size: 1024
tissue_spacing: 4.0
region_threshold: 10.0
hole_threshold: 200.0
num_classes: 7
# slides to process
input_path: /.../path/to/input/folder/*.tif
# tissue-background segmentation mask
mask_path: /.../path/to/tissue-background-masks/folder/{image}_tb_mask.tif
Run infer.py
using the Docker image:
#!/usr/bin/env bash
cd "/home/user/source/artifact-segmentation/"
git pull
python3.7 /home/user/source/artifact-segmentation/src/infer.py \
--config /.../path/to/config/config.yml
Copy (and change paramaters of) the configuration file training.yml
:
Run train.py
using the Docker image:
#!/usr/bin/env bash
cd "/home/user/source/artifact-segmentation/"
git pull
python3.7 /home/user/source/artifact-segmentation/src/train.py \
--config /.../path/to/config/training.yml
Successfully tested using the following settings:
--gpu-count="1"
--require-gpu-mem="11G"
--require-cpus="2"
--require-mem="48G"