Skip to main content

StainNormProgram

StainNormProgram is a program that performs stain normalization, assessment, and correction.

Background

Stain normalization transforms the color distribution of stained tissue images. The process of staining biological tissues with dyes reveals important structures that can be used by clinicians to diagnose patients. However, variability between different hospitals and laboratories creates noise in the appearance of these stains, which may fool machine learning algorithms. Stain normalization aims to reduce such variabilities by converting source images with different staining styles into a single staining style, which is computed from a target reference.

StainNormProgram provides the utilities needed to perform stain normalization on whole slide images, tissue microarrays, and tiles. The program supports hematoxylin and eosin (H&E) and immunohistochemistry (IHC) with diaminobenzidine (DAB) chromogen. StainNormProgram provides also provides features for assessing and correcting processed images.

Getting Started

Supported Python version: 3.14

pip install stainnormprogram

To learn how to use StainNormProgram, check out the tutorials/ folder.

For the API documentation, please see https://stainnormprogram.readthedocs.io/en/latest/.

Reading Output Images

Stain normalized images outputted by this program can be opened using Aperio ImageScope or tifffile.

Citation

@software{stainnormprogram,
    author = {Hsu, Peter and Falahkheirkhah, Kianoush and Bhargava, Rohit},
    title = {StainNormProgram},
    year = {2026},
    publisher = {GitHub},
    version = {1.0.0},
    url = {https://github.com/peterhsu-uiuc/StainNormProgram"}
}

Built at the University of Illinois Urbana-Champaign. Support for this project was provided by the National Science Foundation Graduate Research Fellowship Program.

Metadata

Release files for stainnormprogram 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stainnormprogram 1.0.0
File Size Uploaded Provenance Actions
stainnormprogram-1.0.0.tar.gz 77.6 kB Without provenance Details for stainnormprogram-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for stainnormprogram 1.0.0
File Interpreter ABI Platform Actions
stainnormprogram-1.0.0-py3-none-any.whl Python 3 none any Details for stainnormprogram-1.0.0-py3-none-any.whl

Total release size: 159.8 kB

Release files / stainnormprogram-1.0.0.tar.gz

Download URL stainnormprogram-1.0.0.tar.gz
Size 77.6 kB
Tags Source
SHA-256 checksum
How to use checksums
19a89433de8769961c663b08a1e6ff5c39143164b977d8eec504913b8ea6d685
BLAKE2b-256 checksum
How to use checksums
50c0d709d918af587230284c291ceed4496782df9455052241035eaf40398633
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / stainnormprogram-1.0.0-py3-none-any.whl

Download URL stainnormprogram-1.0.0-py3-none-any.whl
Size 82.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
266a1a2b13949d8d4f7235af94c441f793fff9f483c59ccece94c36d8714a3a7
BLAKE2b-256 checksum
How to use checksums
5d02930efc4b1a89762960cbcbf57c238324572dd2189636252bcf5c6acaef03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Security for stainnormprogram 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page