bioRxivBioinformaticsPreprint
StainX: GPU-accelerated batch stain normalization for computational pathology at scale
Abstract
Stain normalization reduces color variability in histopathology whole-slide images, but cohort-scale pipelines lack fused multi-image batch transforms for classical methods. We present StainX, a GPU-accelerated batch stain normalization framework built around a two-stage fit/transform interface. It implements histogram matching, Macenko, and Reinhard normalizers through a portable PyTorch backend and an optional CUDA backend that fuses per-pixel operations for batch throughput. On NVIDIA GPUs, the fused CUDA path outperforms the torch CPU backend by 168x, 70x, and 48x for Reinhard, histogram matching, and Macenko respectively, and exceeds the fastest GPU peers by 7-8x (Reinhard) and 2x (Macenko) at comparable accuracy. StainX also provides user-selectable precision modes, a documented Python API, continuous integration testing, and online documentation. Source code available at https://github.com/rendeirolab/stainx, and documentation at https://stainx.readthedocs.io. Implemented in Python. Runs on Linux, macOS, and Windows.
- assay: imaging
- research focus: batch correction / integration
- research focus: software / tool
- research focus: benchmarking
- approach: experimental assay
- Citations
- 0
Reproducibility ledger
Nobody has reported trying to reproduce this paper yet. Did you replicate an experiment or run the code? Your report saves the next lab a week.
Sign in to file a reproducibility report.
Related papers
- stainlib: a python library for augmentation and normalization of histopathology H&E images
Sebastian Otálora, Niccolò Marini, … Manfredo Atzori·bioRxiv·May 17, 2022
- StainStyleSampler: Clustering-based sampling of whole slide image appearances
Maya Maya Barbosa Silva, Sabine Maria Leh, Hrafn Weishaupt·Diagnostic PathologyPeer-reviewed·Feb 5, 2026
- Stain Normalisation Does Not Consistently Improve Matched-Location Retrieval with Pathology Foundation Models
Yang Meng, Binghao Chai, Tapabrata Chakraborti·bioRxiv·Oct 19, 2026
- FalseColor-Python: a rapid intensity-leveling and digital-staining package for fluorescence-based slide-free digital pathology
R. Serafin, W. Xie, … J. T. C. Liu·bioRxiv·May 3, 2020
- Improving Accuracy of Nuclei Segmentation by Reducing Histological Image Variability
Yusuf Roohani, Eric Kiss·bioRxiv·Apr 6, 2018
- General stain deconvolution of histopathology images with physics-guided deep learning
Jianan Chen, Lydia Liu, … Anne Louise Martel·bioRxiv·Dec 6, 2022