Model Architecture Ensemble
DigiPathAI employs an ensemble of three state-of-the-art deep learning architectures to achieve robust tissue segmentation in digital pathology images:DenseNet U-Net
Dense blocks with skip connections for feature reuse
Inception-ResNet
Multi-scale feature extraction with residual connections
DeepLabv3+
Atrous spatial pyramid pooling for multi-scale context
Ensemble Prediction
The final segmentation is produced by combining predictions from all three models:- Each model generates probability maps independently
- Predictions are averaged across all three architectures
- Optional post-processing with Conditional Random Fields (CRF) for refinement
- Robustness: Reduces model-specific biases
- Accuracy: Leverages strengths of different architectures
- Reliability: Consistent performance across diverse tissue types
Model Weights Management
DigiPathAI automatically downloads and caches pretrained model weights on first use.Download Location
Model weights are stored in:{dataset} can be:
digestpath- DigestPath challenge datasetpaip- PAIP challenge datasetcamelyon- Camelyon challenge dataset
Automatic Download
The download process is handled automatically by utility functions:- DigestPath Models
- PAIP Models
- Camelyon Models
~/.DigiPathAI/digestpath_models/digestpath_deeplabv3.h5digestpath_densenet.h5digestpath_inception.h5
Loading Models
Theload_trained_models() function handles model instantiation and weight loading:
helpers/utils.py (427-448)
Model weights are automatically cached after first download. Subsequent runs will use cached weights without re-downloading.
Input Requirements
All three models expect:- Input shape:
(height, width, 3)RGB images - Patch size: 256×256 pixels (default)
- Dynamic input: Models accept
(None, None, 3)for variable-sized inputs - Normalization: Standard ImageNet preprocessing
Output Format
Each model produces:- Shape:
(height, width, 2)probability maps - Classes: 2-class softmax output (background, tissue)
- Range: [0, 1] probabilities per class
Next Steps
DenseNet Details
Learn about DenseNet121 U-Net architecture
Inception Details
Explore Inception-ResNet-v2 U-Net
DeepLab Details
Understand DeepLabv3+ with ASPP