CellViT Inference Pipeline for Whole Slide Images (WSI) in Memory
Project description
CellViT/CellViT++ Inference
Documentation
The full documentation is available at: https://tio-ikim.github.io/CellViT-Inference/
The code can be assessed here: https://github.com/TIO-IKIM/CellViT-Inference
Documentation Sections
| Section | Description |
|---|---|
| 📚 Installation Guide | Detailed installation instructions for various environments |
| 📝 Usage Documentation | Comprehensive guide on how to use CellViT-Inference |
| 💡 Examples | Sample configurations and use cases |
Installation
Hardware Requirements
- 🚀 CUDA-capable GPU: A GPU with at least 24 GB VRAM (48 GB recommended for faster inference, e.g., RTX-A6000). We performed experiments using one NVIDIA A100 with 80GB VRAM.
- 🧠 Memory: Minimum 32 GB RAM.
- 💾 Storage: At least 30 GB disk space.
- 🖥️ CPU: Minimum of 16 CPU cores.
Prerequisites
Before installing the package, ensure that the following prerequisites are met:
Binaries
- libvips - Image processing library
- openslide - Whole slide image library
- gcc/g++ - C/C++ compilers
- libopencv-core-dev - OpenCV core development files
- libopencv-imgproc-dev - OpenCV image processing modules
- libsnappy-dev - Compression library
- libgeos-dev - Geometry engine library
- llvm - Compiler infrastructure
- libjpeg-dev - JPEG image format library
- libpng-dev - PNG image format library
- libtiff-dev - TIFF image format library
On Linux-based systems, you can install these using:
sudo apt-get install libvips openslide gcc g++ libopencv-core-dev libopencv-imgproc-dev libsnappy-dev libgeos-dev llvm libjpeg-dev libpng-dev libtiff-dev
Package installation
To install the package, follow these steps:
-
Ensure that all prerequisites are installed as outlined above.
-
Verify that OpenSlide (https://openslide.org/) is installed and accessible. If using conda, you can install it with:
conda install -c conda-forge openslide
-
Install PyTorch for your system by following the instructions at https://pytorch.org/get-started/locally/. Ensure that PyTorch >= 2.0 is installed. To view available versions and their corresponding CUDA versions, visit https://pytorch.org/get-started/previous-versions/. CellViT-Inference has been tested with PyTorch 2.2.2 and CUDA 12.1, such that we installed it via:
pip install torch==2.2.2 torchvision==0.17.2 torchaudio==2.2.2 --index-url https://download.pytorch.org/whl/cu121
[!IMPORTANT]
This might differ for your system -
Install the CellViT-Inference package using pip:
pip install cellvit
Optional
To enable hardware-accelerated libraries, you can install the following optional dependencies:
- CuPy (CUDA accelerated NumPy): https://cupy.dev/
- cuCIM (RAPIDS cuCIM library): https://github.com/rapidsai/cucim
Check your installation and the system
To verify a successful installation, run the following command:
cellvit-check
The output should confirm that all required libraries are installed and accessible. If any libraries are missing, refer to the installation instructions for the respective library. This command will also check for optional dependencies and will print a warning if they are not installed. Installing these optional libraries is not required.
If using a virtual environment, ensure it is activated before running the command.
Examples and Usage
A thorough guideline on how to configure and run inference is provided in the Usage Documentation.
Additional examples can be found in the Examples Documentation.
Citation
CellViT++
@misc{horst2025cellvitenergyefficientadaptivecell,
title = {CellViT++: Energy-Efficient and Adaptive Cell Segmentation and
Classification Using Foundation Models},
author = {Fabian Hörst and Moritz Rempe and Helmut Becker and Lukas Heine and
Julius Keyl and Jens Kleesiek},
year = {2025},
eprint = {2501.05269},
archivePrefix = {arXiv},
primaryClass = {cs.CV},
url = {https://arxiv.org/abs/2501.05269},
}
CellViT
@ARTICLE{Horst2024,
title = {{CellViT}: Vision Transformers for precise cell segmentation and
classification},
author = {Hörst, Fabian and Rempe, Moritz and Heine, Lukas and Seibold,
Constantin and Keyl, Julius and Baldini, Giulia and Ugurel, Selma
and Siveke, Jens and Grünwald, Barbara and Egger, Jan and
Kleesiek, Jens},
journal = {Med. Image Anal.},
volume = {94},
pages = {103143},
month = {may},
year = {2024},
keywords = {Cell segmentation; Deep learning; Digital pathology; Vision
transformer},
language = {en}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cellvit-1.0.9.tar.gz.
File metadata
- Download URL: cellvit-1.0.9.tar.gz
- Upload date:
- Size: 94.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d18480d27134ad5db7e282ab456f5fb8cf61f42c56e1157852b3a49f92db9b6
|
|
| MD5 |
8f430a3ad5e57307031193bbd6624132
|
|
| BLAKE2b-256 |
0d43e47f53ffc225962cc86b969f8492396bbe478f3543de1ceac96837ab2c5a
|
File details
Details for the file cellvit-1.0.9-py3-none-any.whl.
File metadata
- Download URL: cellvit-1.0.9-py3-none-any.whl
- Upload date:
- Size: 111.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0dc07a8cb5dd4318882f5200d60170d3326de6de8514cae6f6dafe0a8230b699
|
|
| MD5 |
aa3edb62d59fcc14bc3a293cf364e4e5
|
|
| BLAKE2b-256 |
276a1a7316d23f7bb7c4086c1dd757ec24f64a7d2aa47a098553bac2006bcc4d
|