Installation Guide
DigiPathAI offers two installation modes depending on your needs. You can install just the UI for viewing whole slide images, or include the full AI pipeline with GPU support for automated segmentation.System Requirements
Basic Requirements (UI Only)
- Python 3.5 or higher
- OpenSlide library installed on your system
- 4GB RAM minimum
Full Pipeline Requirements
- Python 3.5 or higher
- OpenSlide library installed on your system
- NVIDIA GPU with CUDA support (recommended)
- 8GB+ GPU memory for optimal performance
- 16GB+ system RAM
Installing OpenSlide
Before installing DigiPathAI, you need to install the OpenSlide library for your operating system:Installation Options
Choose Your Installation Mode
Select the installation method based on your use case:Installed dependencies:Additional GPU dependencies:
Option 1: UI Only (Viewer)
Install just the web-based viewer without AI capabilities. This is ideal for:- Viewing and exploring WSI images
- Systems without GPU support
- Quick deployment and minimal dependencies
flask==2.2.5- Web server frameworkopenslide-python- Python bindings for OpenSlide
Option 2: Full AI Pipeline (with GPU)
Install the complete package including deep learning models for segmentation:torch- PyTorch deep learning frameworktorchvision- Computer vision utilitiestensorflow-gpu>=1.14,<2- TensorFlow for legacy modelsopencv-python- Image processingimgaug- Image augmentationtqdm- Progress barsmatplotlib- Plotting and visualizationscikit-learn- Machine learning utilitiesscikit-image- Image processing algorithmspydensecrf- Dense CRF post-processingtifffile- TIFF file handlingpandas- Data manipulationwget- Model downloading
Both installation methods install the same DigiPathAI package. If you start with UI-only, you can manually install GPU dependencies later to enable AI features.
Verify Installation
Check that DigiPathAI is properly installed:You should see the command-line help output with available options.Verify the Python module:
GPU Configuration (Optional)
For optimal performance with the AI pipeline, configure your GPU settings:CUDA Setup
Ensure you have CUDA 10.0 or 10.1 installed (required for TensorFlow GPU 1.x):Memory Configuration
The segmentation pipeline automatically configures TensorFlow to allow GPU memory growth. Default settings inSegmentation.py:283:
Upgrading DigiPathAI
To upgrade to the latest version:Troubleshooting
OpenSlide Not Found
If you get “OpenSlide library not found” errors:- Verify OpenSlide is installed:
openslide-show-properties --version - On Windows, ensure OpenSlide bin directory is in PATH
- On Linux, try:
sudo ldconfig
CUDA/GPU Errors
If you encounter GPU-related errors:- Verify CUDA installation:
nvcc --version - Check TensorFlow GPU support:
python -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))" - Consider installing specific CUDA-compatible versions of PyTorch and TensorFlow
Import Errors
If you see import errors for specific packages:Next Steps
Quick Start
Launch the server and run your first segmentation
API Reference
Explore the Python API for programmatic access