A tool used for whole slide images normalization, support macenko, reinhard, vahadane (GPU accelerate)
Project description
WSI Normalizer: a color stain normalization tool/package for whole slide images
Inspired by & reconstructed from this repository link
How to start? blog
Description
Repository for normalizing whole slide images (WSI) patches.
Updates
[04/2025] We have upload the PyPI package for this repository. You can directly install it by using pip and use it without clone the repository.
Support for:
- Reinhard Reinhard, Erik, et al. "Color transfer between images." IEEE Computer graphics and applications 21.5 (2001): 34-41.
- Macenko Macenko, Marc, et al. "A method for normalizing histology slides for quantitative analysis." 2009 IEEE international symposium on biomedical imaging: from nano to macro. IEEE, 2009.
- Vahadane Vahadane, Abhishek, et al. "Structure-preserving color normalization and sparse stain separation for histological images." IEEE transactions on medical imaging 35.8 (2016): 1962-1971.
Package Usage
Install the package via PyPI:
pip install wsi-normalizer
Then you can use it in your code:
import cv2
from wsi_normalizer import imread, MacenkoNormalizer # or ReinhardNormalizer, VahadaneNormalizer, TorchVahadaneNormalizer
macenko_normalizer = MacenkoNormalizer()
macenko_normalizer.fit(imread('TARGET_IMAGE.jpg'))
norm_img = macenko_normalizer.transform(imread('INPUT_IMAGE.jpg'))
cv2.imwrite('OUTPUT_IMAGE.jpg', cv2.cvtColor(norm_img, cv2.COLOR_RGB2BGR))
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 wsi_normalizer-1.0.1.tar.gz.
File metadata
- Download URL: wsi_normalizer-1.0.1.tar.gz
- Upload date:
- Size: 21.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8afd5492005862bb721341f6038ab4f6850eff7e1371892a7b4e18b567ee9154
|
|
| MD5 |
81c34720df93cd0cf32d55b76031804d
|
|
| BLAKE2b-256 |
7d152de60807e6cb868df9ce50c3dcf4f42dc1b7ffe1aa593b81924902a048bd
|
File details
Details for the file wsi_normalizer-1.0.1-py3-none-any.whl.
File metadata
- Download URL: wsi_normalizer-1.0.1-py3-none-any.whl
- Upload date:
- Size: 26.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04aaf4f19011874736902b65041ffd4e10bcb83fe964be4980160b6ef2a94862
|
|
| MD5 |
79909fcaf994389b7b6dff8ea79e1401
|
|
| BLAKE2b-256 |
70529579778f7cc65657a692bb49ce60ca21359cc811968eee593c7ec42b45b3
|