Medical & Scientific Vision
Stain Normalization
Standardizing the color of histology images that were stained or scanned under different conditions, by matching color statistics (Reinhard), estimating stain vectors in optical density space (Macenko, Vahadane) or learning the mapping with a network, and how this compares with stain augmentation during training.
intermediate
Stain normalization, also called color normalization, maps histology images that were stained or scanned under different conditions to a common color appearance. A model trained on slides from one laboratory sees colors that depend on that laboratory’s dyes, protocol and scanner; normalization tries to remove that dependence before the image reaches the model, by matching color statistics to a reference image, by estimating each image’s stain colors and re-rendering it with the reference’s, or by training a network to do the mapping. The main alternative leaves the images alone and instead randomizes stain colors during training, so that the model learns to ignore them.
This article covers where stain variation comes from, the optical density model that most methods share, the Reinhard, Macenko and Vahadane methods, learned normalization in outline, stain augmentation, and what published comparisons report, with their set-ups. Digital Pathology introduces color deconvolution with a worked example on the same bundled image used below; this article builds on it rather than repeating it. It describes methods and evidence for practitioners and researchers and draws no clinical conclusions.
Purpose
Tissue sections are stained so that structures become visible under transmitted light, and the colors that result vary. Macenko et al. (2009) attribute differences in a stain’s color to its manufacturer, its storage before use and the way it is applied, and differences in intensity to the amount of stain added and to fading when slides are exposed to light. Vahadane et al. (2016) add the color responses of the scanners, and Ciompi et al. (2017) note that fixation, embedding, cutting and staining change the appearance across laboratories and even across staining batches within one laboratory. Scanner color and its calibration with ICC profiles are treated in Whole-Slide Imaging.
A pathologist adapts to these differences; a network trained on one laboratory’s colors often does not. Tellez et al. (2019) describe convolutional networks trained on one center that underperform on another’s images, and Lin et al. (2025) found the same between two staining batches of one laboratory (see Evidence and Impact). Stain variation is therefore one of the main forms of dataset bias in pathology, and normalization is one way to reduce it.
When to Use It
Normalization matters most when training data come from a single laboratory or scanner and the model must work on others, and when the color itself is measured, as in quantifying a stain’s amount: Macenko et al. (2009) designed their method to make such quantitative analysis possible across slides. It needs a reference: a template image or slide whose appearance the others are mapped to, and several methods are sensitive to that choice (Shaban et al., 2019).
It is less clearly useful when the training data already span many laboratories, or when the model is trained with strong color augmentation; the comparisons under Evidence and Impact disagree on how much it adds in that case. It also has limits that no choice of method removes. The classical methods assume a fixed number of stains, usually two, and Macenko et al. (2009) report that results are sometimes inconsistent with three or more stains present. Normalization changes color, not morphology; it follows that differences in fixation or tissue processing that alter the structures themselves remain.
How It Works
The optical density model
Most stains absorb light rather than emit it. With each channel’s intensity normalized to , in effect divided by the brightness of empty glass , the optical density is , and in OD space a mixture of stains is a linear combination of their OD vectors, , where the columns of are unit stain vectors and holds the stain amounts (Macenko et al., 2009, Eqs. 1–2). Inverting this with a known is color deconvolution, which Digital Pathology derives and demonstrates. Normalization methods built on this model separate two kinds of variation: a change in the stain vectors themselves (a different hue of hematoxylin, say) and a change in the amounts (more or less of the same stain). Methods that work on color statistics instead, such as Reinhard’s, do not make this distinction.
Color transfer: Reinhard et al. (2001)
Reinhard et al. proposed a way to give one image another’s color characteristics for computer graphics, such as making a rendered scene look like a photograph; it was later used for histology, and Shaban et al. (2019) place it among the color-matching methods for stain normalization. The method’s core is the choice of color space. In RGB the channels of natural images are strongly correlated, so a coherent change of color must modify all channels together. Reinhard et al. therefore work in the space of Ruderman et al., which decorrelates the channels for natural scenes: RGB is converted to the cone space LMS with a fixed matrix (derived from a device-independent RGB-to-XYZ conversion, since the display’s primaries are rarely known), the LMS values are replaced by their logarithms , and these are rotated into an achromatic axis and two opponent axes (Reinhard et al., Eqs. 4–6):
In this space each channel of the source image is shifted and scaled so that its mean and standard deviation match those of the target (Eqs. 10–11):
and the result is converted back to RGB. The logarithm is base 10: the inverse raises the values to the power ten. Since the transfer acts on statistics of the whole image, the authors note that it works when the two images have similar composition and fails, for example, when one has much grass and the other much sky; their remedy is to compute statistics on matching swatches and blend the results. In histology the analogue is a tile with much more stroma, fat or background than the template, whose statistics differ for reasons that have nothing to do with staining. Shaban et al. (2019) add that applying one transformation to the whole image ignores the separate contributions of the stains.
Stain vectors from the data: Macenko et al. (2009)
Macenko et al. estimate the two stain vectors of each image from its pixels, then normalize amounts. Their argument for the estimator is geometric. Since stain amounts are non-negative, every pixel’s OD vector lies between the two stain vectors, so the vectors are found at the fringe of the pixel distribution rather than at its peaks; robust extremes replace the minimum and maximum because of noise. Their Algorithm 1 converts the image to OD, removes pixels with OD below , computes the singular value decomposition of the remaining OD vectors, projects them onto the plane of the two leading singular vectors and normalizes them to unit length, measures each projected pixel’s angle from the first singular direction, and takes the -th and -th percentiles of the angles () as the two stain directions. The authors report acceptable results over a wide range of both parameters. As we read Algorithm 1, the singular value decomposition is taken of the OD vectors themselves, without the centering that principal component analysis applies, so the plane passes through the origin, where unstained glass lies.
The second step corrects intensity. For each stain the authors take the pixels in which that stain is the majority, use the 99th percentile of its amount as a robust maximum, and scale every image’s amounts so that these pseudo-maxima agree. They assume that fading affects each stain identically. The method is direct, with no optimization, and the authors contrast it with non-negative matrix factorization, which has no closed-form solution and in their account converges inconsistently when only three color channels are available. On twelve hematoxylin and eosin (H&E) slides of melanomas and nevi, the automatically estimated vectors formed tight clusters that were distinct for each slide and differed from the standard vectors chosen by hand.
Sparse stain separation: Vahadane et al. (2016)
Vahadane et al. start from two physical observations: stain amounts cannot be negative, and most tissue regions are dominated by at most one effective stain. They decompose an image, without supervision, into stain density maps that are sparse and non-negative, and normalize by combining an image’s density maps with the stain color basis of a target image preferred by a pathologist, which changes the color while keeping the structure described by the maps. In the abstract (the full text could not be read for this article), they report higher correlation of stain densities with ground truth and higher preference by pathologists than for other methods, and an extension for whole-slide images that estimates the stain basis from a sample of patches instead of the whole image. Lin et al. (2025) used the method with pooled statistics: they estimated stain vectors on 100 random tiles from each training slide and normalized test tiles with the mean vectors.
Learned normalization
Later methods replace the hand-built model with a network. Tellez et al. (2019) group them into methods that detect structures such as nuclei to characterize each stain (the look-up-table method of Ehteshami Bejnordi et al., in their description), deep generative models, and style transfer. Two examples show the range:
- Network-based normalization (Tellez et al., 2019) treats normalization as image-to-image translation without labels. A U-Net-like network with long skip connections is trained to reconstruct the original appearance of 500,000 H&E patches from four organs after heavy hue, saturation and value perturbations; having learned to undo arbitrary color changes, it maps new images toward the training appearance. The authors hypothesize that it learns to associate tissue structures with their usual colors.
- StainGAN (Shaban et al., 2019) adapts CycleGAN: two generative adversarial generator–discriminator pairs translate between two scanners’ appearances, and a cycle-consistency loss (the L1 distance between an image and its round-trip translation) is meant to preserve tissue structure. It needs no reference image, since it learns the whole target distribution, but it needs unpaired training images from both domains.
A learned mapping can do more than recolor. Lin et al. (2025) observed that after CycleGAN normalization the nuclei in their recut slides appeared larger and more pleomorphic than in the originals, a change of morphology that a method built on the OD model cannot make, since it only re-weights each pixel’s stains.
Stain augmentation
Augmentation attacks the same problem from the training side: instead of mapping test images to the training colors, it widens the training colors until they cover the test images (Tellez et al., 2019, Eqs. 1–2). Generic photometric data augmentation perturbs brightness, contrast, hue and saturation. Stain-specific augmentation works in the stain space: in the routine Tellez et al. (2019) describe, which they call HED (hematoxylin-eosin-DAB) augmentation, the hematoxylin and eosin channels are separated by color deconvolution with a fixed matrix, each stain is perturbed independently, and the result is converted back to RGB. Bug et al.’s perturbation of the principal components of pixel values is another variant they cite. In their experiments the ranges were set by visual inspection, with “light” and “strong” settings for both HSV and stain-space augmentation.
How to Apply It
Example: normalizing simulated stain variation
The example normalizes three re-stained versions of scikit-image’s bundled immunohistochemistry image (skimage.data.immunohistochemistry, colonic glands with the protein FHL2 revealed by brown DAB over a blue hematoxylin counterstain; the package’s documentation describes it as acquired at the Center for Microscopy And Molecular Imaging, with no known copyright restrictions). The image is a file inside the package, so nothing is downloaded. It runs in a few seconds with NumPy 2.3.5 and scikit-image 0.25.2.
Because the true answer must be known, the variants are rendered rather than scanned. The image is decomposed into hematoxylin, eosin and DAB amounts with scikit-image’s standard stain matrix (whose source attributes it to Ruifrok and Johnston), normalized to unit rows; unmixing with the full inverse and re-rendering reproduces the image, apart from the floor applied before the logarithm. The variants then change the staining while the tissue stays the same: V1 has 50% more hematoxylin and 40% less DAB, V2 has a more violet hematoxylin and a redder, duller DAB, and V3 has both. Each is normalized back to the original with Reinhard’s method and Macenko’s, and compared with the original by the mean CIE76 color difference in CIELAB. Our implementation choices, not the papers’: intensities are floored at before logarithms; Reinhard’s statistics use all pixels, glass included; Macenko’s threshold drops pixels with any channel below , one reading of the paper’s “OD intensity”; and hematoxylin is taken to be the estimated vector with the larger red OD.
import numpy as np
from skimage import data
from skimage.color import rgb_from_hed, rgb2lab, deltaE_cie76
def unit(v):
v = np.asarray(v, float)
return v / np.linalg.norm(v, axis=-1, keepdims=True)
def to_od(img): # base-10 optical density
return -np.log10(np.maximum(img.reshape(-1, 3) / 255.0, 1 / 255))
def from_od(od, shape):
return np.rint(np.clip(255 * 10.0 ** (-od), 0, 255)).reshape(shape).astype(np.uint8)
ref = data.immunohistochemistry() # bundled ihc.png: DAB + hematoxylin
M = unit(rgb_from_hed) # rows: H, E, DAB stain vectors
A = to_od(ref) @ np.linalg.inv(M) # stain amounts; A @ M reproduces ref
def render(scale=(1, 1, 1), M_new=M):
return from_od((A * np.array(scale)) @ M_new, ref.shape)
M_hue = M.copy()
M_hue[0] = unit(M[0] + [-0.10, 0.05, 0.15]) # a more violet hematoxylin
M_hue[2] = unit(M[2] + [0.15, 0.05, -0.15]) # a redder, duller DAB
variants = {"V1 intensity": render((1.5, 1, 0.6)),
"V2 hue": render(M_new=M_hue),
"V3 both": render((1.5, 1, 0.6), M_hue)}
true_vecs = {"V1 intensity": M, "V2 hue": M_hue, "V3 both": M_hue}
# Reinhard et al. (2001): match mean and std per channel in l-alpha-beta space
RGB2LMS = np.array([[0.3811, 0.5783, 0.0402], [0.1967, 0.7244, 0.0782],
[0.0241, 0.1288, 0.8444]])
LMS2RGB = np.array([[4.4679, -3.5873, 0.1193], [-1.2186, 2.3809, -0.1624],
[0.0497, -0.2439, 1.2045]])
P = np.diag([1 / np.sqrt(3), 1 / np.sqrt(6), 1 / np.sqrt(2)]) @ np.array(
[[1, 1, 1], [1, 1, -2], [1, -1, 0]])
def to_lab_rd(img):
rgb = np.maximum(img.reshape(-1, 3) / 255.0, 1 / 255)
return np.log10(rgb @ RGB2LMS.T) @ P.T
def reinhard(img, target):
s, t = to_lab_rd(img), to_lab_rd(target)
out = (s - s.mean(0)) / s.std(0) * t.std(0) + t.mean(0)
rgb = (10.0 ** (out @ np.linalg.inv(P).T)) @ LMS2RGB.T
return np.rint(np.clip(255 * rgb, 0, 255)).reshape(img.shape).astype(np.uint8)
# Macenko et al. (2009): stain vectors from the fringe of the OD distribution
def macenko_vectors(img, beta=0.15, alpha=1):
od = to_od(img)
od = od[np.all(od > beta, axis=1)] # drop nearly unstained pixels
_, _, vt = np.linalg.svd(od, full_matrices=False)
plane = vt[:2] * np.sign(vt[:2].sum(1, keepdims=True)) # make both point to +OD
proj = od @ plane.T
phi = np.arctan2(proj[:, 1], proj[:, 0])
lo, hi = np.percentile(phi, [alpha, 100 - alpha])
v = unit(np.array([[np.cos(a), np.sin(a)] for a in (lo, hi)]) @ plane)
return v if v[0, 0] > v[1, 0] else v[::-1] # hematoxylin: larger red OD first
def macenko_amounts(img, V):
return np.linalg.lstsq(V.T, to_od(img).T, rcond=None)[0].T
def max99(C): # 99th pct where each stain dominates
return np.array([np.percentile(C[C[:, k] >= C[:, 1 - k], k], 99) for k in (0, 1)])
V_ref = macenko_vectors(ref)
C_ref = macenko_amounts(ref, V_ref)
def macenko(img):
V = macenko_vectors(img)
C = macenko_amounts(img, V)
C = C / max99(C) * max99(C_ref)
return from_od(C @ V_ref, img.shape)
def angle(u, v):
return np.degrees(np.arccos(np.clip(unit(u) @ unit(v), -1, 1)))
def dE(img):
return deltaE_cie76(rgb2lab(img), rgb2lab(ref)).mean()
print("Macenko vectors vs rendering vectors (degrees, H / DAB):")
print(f" ref {angle(V_ref[0], M[0]):5.1f} / {angle(V_ref[1], M[2]):5.1f}")
for name, img in variants.items():
V = macenko_vectors(img)
print(f" {name:<12}{angle(V[0], true_vecs[name][0]):5.1f} / "
f"{angle(V[1], true_vecs[name][2]):5.1f}")
print("\nmean Delta E (CIE76) to the reference image:")
print("variant none Reinhard Macenko")
normed = {}
for name, img in variants.items():
normed[name] = {"Reinhard": reinhard(img, ref), "Macenko": macenko(img)}
print(f"{name:<13}{dE(img):5.1f} {dE(normed[name]['Reinhard']):8.1f} "
f"{dE(normed[name]['Macenko']):7.1f}")
print(f"ref -> ref {0.0:5.1f} {dE(reinhard(ref, ref)):8.1f} {dE(macenko(ref)):7.1f}")
Macenko vectors vs rendering vectors (degrees, H / DAB):
ref 9.4 / 5.3
V1 intensity 3.9 / 7.9
V2 hue 5.8 / 5.2
V3 both 3.6 / 8.8
mean Delta E (CIE76) to the reference image:
variant none Reinhard Macenko
V1 intensity 12.0 8.8 2.5
V2 hue 9.8 3.7 2.2
V3 both 13.9 13.5 2.8
ref -> ref 0.0 0.7 1.8
Macenko’s estimator recovers the stain directions of every image to within about 9°. On the original image the comparison is with the standard vectors, which are a convention rather than the true colors of this slide’s stains, so the 9.4° there partly measures how far this laboratory’s hematoxylin is from the textbook value.
Reinhard’s method does well on the hue change and poorly on the change of amounts, and does almost nothing for both together. The reason follows from what it matches. A change of hue moves all stained pixels in a similar direction, which a per-channel shift and scale can largely undo. More hematoxylin and less DAB darken the blue nuclei and lighten the brown regions at the same time, opposite changes in two pixel populations, and no single affine map per channel can reverse both. Macenko’s method brings all three variants to between 2.2 and 2.8, close to its floor of 1.8 on the original image itself. That floor is the cost of its two-stain model: the projection discards the part of each pixel’s OD outside the plane of the two stains, which the third, eosin row of the standard matrix carried. Reinhard’s floor of 0.7 comes mostly from the paper’s matrices: printed to four decimals, the RGB-to-LMS matrix and its inverse multiply to a matrix that differs from the identity by up to 0.014 in one entry.
This comparison favors Macenko’s method by construction. The variants were rendered with exactly the model it assumes, linear mixing in OD space with per-stain scaling, and with only two stains that dominate different pixels. Real variation also includes scanner response curves, nonlinear dye behavior, fading that may differ between stains, and differences in tissue, none of which is simulated here.
One change was made after the first run of the script, and it is disclosed here. The first run converted floating-point images to 8 bits by truncation, which biased every rendered image by about half a gray level; the script now rounds. Rounding lowered the floors on the original image (from 1.0 to 0.7 for Reinhard’s method and from 1.9 to 1.8 for Macenko’s) and moved some other values by 0.1; nothing else in the computation was changed.
Normalize or augment?
The choice the example leaves open, whether to normalize test images or to augment training images, is what the published comparisons test. They agree that stain variation degrades networks trained on one laboratory’s slides, and their answers on the remedy depend on the set-up (details under Evidence and Impact). With rotations as the only augmentation, Ciompi et al. (2017) concluded that normalization is a necessary step for a colorectal tissue classifier applied to another source’s patches. Comparing combinations of the two in four patch classification tasks, Tellez et al. (2019) found the best results with color augmentation and no normalization, and recommend augmentation always, with network-based normalization as an optional addition. Shaban et al. (2019) report gains from normalization for a small CAMELYON16 classifier whose augmentation they do not describe, and Lin et al. (2025), whose described augmentation included no color changes, found that no normalization they tried restored performance across two staining batches.
Variants
- Choice of reference. Methods differ in what they map to: a single template image (Reinhard, Macenko and Vahadane as usually applied), statistics pooled over many training tiles (Lin et al., 2025, averaged Vahadane stain vectors over 100 tiles per slide), or a learned target distribution (StainGAN).
- Where the statistics come from. Statistics can be computed per tile or per slide. Vahadane et al. (2016) estimate the stain basis of a whole-slide image from sampled patches, and the look-up-table method that Tellez et al. (2019) evaluated characterizes the H&E distribution of a whole slide from detected nuclei.
- Normalizing training data, test data or both. Ciompi et al. (2017) compared all four combinations; their results are below.
- Grayscale. Discarding color is the crudest normalization. Tellez et al. (2019) included it as a baseline, and neither classical normalization method in their benchmark surpassed it.
Best Practices
- Choose the reference deliberately and check its effect, since Shaban et al. (2019) found the conventional methods’ results changed with the reference image; in a multi-center setting, report which reference was used.
- Apply the same normalization to training and test images. In Ciompi et al.’s (2017) experiment, normalizing only the training data gave the worst result of the four combinations.
- Inspect normalized images on tissue types that differ from the template. Ciompi et al. (2017) found that the Macenko-based method failed on three adipose patches and removed the characteristic red of blood cells.
- Combine normalization with color augmentation rather than using either alone, which is the recommendation Tellez et al. (2019) draw from their benchmark; tune the augmentation’s strength together with the normalization.
- Evaluate on data from laboratories, staining batches and scanners that were held out entirely, since a split that mixes them hides exactly the variation normalization is meant to address.
Pitfalls
- Assuming the wrong number of stains. A two-stain model applied to an image with a third stain, pigment or artifact misassigns it; Macenko et al. (2009) note inconsistent results with three or more stains.
- Template and tile composition. Statistical methods such as Reinhard’s assume the source and target have similar content, which Reinhard et al. (2001) state for natural images; a tile that is mostly fat or background is pulled toward the template’s statistics anyway.
- Treating normalization as a guarantee of generalization. In Tellez et al. (2019), every normalization method performed poorly without color augmentation, and in Lin et al. (2025), whose described augmentation included no color changes, no normalization they tried closed the gap between staining batches.
- Learned methods that alter content. A generative mapping can change structures as well as colors, as noted above, which matters most when the downstream task measures morphology.
- Cost. Normalization adds a pass over every whole-slide image. Tellez et al. (2019) measured the extra time to normalize a 50,000 × 50,000 pixel slide at 21.8 minutes for the look-up-table method, 26.0 for their network, 111.2 for the Macenko-based method and 217.8 for style transfer, on their hardware.
Evidence and Impact
The comparisons disagree in part because their set-ups differ, above all in whether color augmentation was used.
Ciompi et al. (2017) trained a convolutional network on 74 whole-slide images of rectal cancer from one laboratory, augmented only by rotations, and tested it on a public set of 5,000 colorectal cancer patches from another source, with the classes mapped to six common ones. Patch accuracy was 50.96% without normalization. Normalizing the test patches to a template image from the training cohort raised it to 75.55% with a method based on Ehteshami Bejnordi et al.’s and 73.99% with Macenko’s; normalizing training and test data gave 79.66%, and normalizing the training data alone 45.65%. They concluded that normalization is a necessary step for their task.
Tellez et al. (2019) ran the largest controlled comparison. They trained patch classifiers for four tasks (mitosis detection, lymph node metastasis detection, prostate epithelium detection and nine-class colorectal tissue classification) on data from one center, Radboud University Medical Center, and tested them on external data from other centers, nine centers in all. Each combination of normalization (none, grayscale, Macenko’s deconvolution, the look-up-table method, style transfer and their network) and augmentation (from basic rotations and flips to light and strong HSV and stain-space augmentation) was trained five times: 760 networks, compared by ROC AUC per external test set and by average rank. The top-ranked combination used no normalization and light stain-space augmentation, with a mean rank of 1.2 (standard deviation 0.4). Color augmentation, HSV or stain-space, was needed for top performance; the two kinds performed similarly, and light and strong settings nearly so. The two network-based normalizations performed similarly to each other, and neither classical method surpassed grayscale. They recommend always using color augmentation, optionally combined with network-based normalization for robustness, and omitting normalization when computation is limited, at a negligible cost in their benchmark. Reinhard’s and Vahadane’s methods were not among those compared.
Shaban et al. (2019) evaluated normalization as image matching, on the MITOS-ATYPIA 14 challenge data, in which the same sections were scanned on an Aperio and a Hamamatsu scanner, so that a normalized Aperio patch could be compared with its Hamamatsu counterpart. On 500 test patches StainGAN reached a mean SSIM of 0.71, against 0.58 for Reinhard’s method, 0.56 for Macenko’s, 0.67 for Khan et al.‘s and 0.65 for Vahadane’s. In a CAMELYON16 experiment, a small classifier trained on one laboratory’s patches and tested on the other’s, they report relative AUC improvements for StainGAN of 80%, 36%, 22%, 15% and 3% over no normalization, Reinhard, Macenko, Khan and Vahadane; the absolute AUCs appear only in a figure, and the abstract’s summary, a 12% increase in AUC, does not match these figures. Their text says the test set was normalized to match the training laboratory but that the conventional methods’ reference slide was picked from the other laboratory, so which reference they used is unclear from the preprint.
Lin et al. (2025) tested a harder case of variation, using tissue blocks from a previously studied cohort of 154 patients with non-small cell lung cancer and long-term follow-up: original slides and adjacent recuts from the same blocks, stained in the same laboratory about eight months apart and scanned at 40× (the paper names one scanner model, an Aperio/Leica AT2). An ImageNet-pretrained ResNet-18, trained on tiles with rotation, flip and crop augmentation (no color augmentation is described), predicted brain metastasis with an average AUC of 0.81 on held-out patients from the training batch and 0.53 on the same patients’ recuts (averages over three folds). With Vahadane normalization the cross-batch AUC was 0.60, and with CycleGAN normalization 0.61; in neither case was it significantly different from chance in their analysis (). Macenko and Reinhard normalization, reported in a supplementary table of the journal version, gave AUCs not substantially different from Vahadane’s. They conclude that current normalization methods do not map subtle stain differences with enough fidelity, and call for new ways of preparing and imaging slides.
Related
- Digital Pathology
Computer vision for digitized microscope slides of stained tissue, from whole-slide scanners, pyramidal image formats and stain variation to nucleus segmentation, tissue classification, slide-level prediction by multiple-instance learning, benchmarks such as CAMELYON and PANDA, regulatory milestones and pathology foundation models.
- Data Augmentation
Training a network on randomly transformed copies of its training images, such as crops, flips, colour changes, erasing and mixing, so that it learns invariances the small training set cannot show, provided each transformation keeps the label correct.
- Dataset Bias
How the way a dataset's images are chosen, photographed and labelled makes it an unrepresentative sample of the visual world, how cross-dataset tests measure the damage, and what bias means when the images show people, from demographic representation to withdrawn datasets.
- Image-to-Image Translation
The task of mapping an image from one domain to a corresponding image in another, such as label maps to photos, maps to aerial views or day to night; paired and unpaired training, pix2pix, CycleGAN and their successors, semantic image synthesis, diffusion-based translation, and why per-pixel losses and metrics favour blurry averages.
- Generative Adversarial Network
A generative model trained as a game between a generator that turns random noise into images and a discriminator that tries to tell them from real images; the minimax objective and its Jensen–Shannon interpretation, the non-saturating loss, DCGAN, mode collapse and training instability, Wasserstein and other remedies, conditional and large-scale GANs, and why diffusion models overtook them.
- Singular Value Decomposition
The factorization A = UΣVᵀ of any matrix into two orthogonal matrices and a diagonal matrix of singular values, and how vision uses it for rank, pseudoinverses, low-rank approximation, homogeneous systems and projection onto constrained matrices.
References
- Reinhard, E., Ashikhmin, M., Gooch, B. & Shirley, P. (2001). Color Transfer between Images. IEEE Computer Graphics and Applications, 21(5), 34–41 (read in the authors' copy formerly at the University of Utah, archived).
- Macenko, M., Niethammer, M., Marron, J. S., Borland, D., Woosley, J. T., Guan, X., Schmitt, C. & Thomas, N. E. (2009). A method for normalizing histology slides for quantitative analysis. IEEE International Symposium on Biomedical Imaging: From Nano to Macro (ISBI), 1107–1110 (read in the authors' copy at the University of North Carolina).
- Vahadane, A., Peng, T., Sethi, A., Albarqouni, S., Wang, L., Baust, M., Steiger, K., Schlitter, A. M., Esposito, I. & Navab, N. (2016). Structure-Preserving Color Normalization and Sparse Stain Separation for Histological Images. IEEE Transactions on Medical Imaging, 35(8), 1962–1971 (abstract read).
- Ciompi, F., Geessink, O., Ehteshami Bejnordi, B., de Souza, G. S., Baidoshvili, A., Litjens, G., van Ginneken, B., Nagtegaal, I. & van der Laak, J. (2017). The importance of stain normalization in colorectal tissue classification with convolutional networks. IEEE International Symposium on Biomedical Imaging (ISBI), 160–163 (read in arXiv:1702.05931v2).
- Tellez, D., Litjens, G., Bándi, P., Bulten, W., Bokhorst, J.-M., Ciompi, F. & van der Laak, J. (2019). Quantifying the effects of data augmentation and stain color normalization in convolutional neural networks for computational pathology. Medical Image Analysis, 58, 101544 (read in arXiv:1902.06543v2).
- Shaban, M. T., Baur, C., Navab, N. & Albarqouni, S. (2019). StainGAN: Stain Style Transfer for Digital Histological Images. IEEE International Symposium on Biomedical Imaging (ISBI), 953–956 (read in arXiv:1804.01601v1).
- Lin, S., Zhou, H., Watson, M., Govindan, R., Cote, R. J. & Yang, C. (2025). Impact of stain variation and color normalization for prognostic predictions in pathology. Scientific Reports, 15, 2369.
- scikit-image developers (2025). skimage.data.immunohistochemistry and skimage.color.rgb_from_hed, scikit-image v0.25.2 source code.