Source-linked AI summary

StainPresetNet: Stain Preset Network for Fast Multi-to-Multi Stain Normalization

Hongtao Kang, Die Luo, Li Chen, Jing Cai, Junbo Hu, Xiuli Liu, Shenghua Cheng

arXiv:2609.01146v1cs.CVcs.AI

TL;DR

Stain normalization is time-consuming, and CycleGAN-based training is ambiguous for multi-domain transformations. StainPresetNet uses dataset-level color mapping, 1×1 convolutions for structural consistency, and preset references for multi-style normalization, achieving strong classification and processing results across tasks.

  • Problem

    Stain normalization can require manually adjusting dozens of hyperparameters over several hours to days, while CycleGAN training is ambiguous for multi-to-one and multi-to-multi transformations.

  • Method

    StainPresetNet extracts color mappings from entire datasets, applies pixel-wise normalization guided by preset reference images, and uses fully 1×1 convolutions to preserve structure.

  • Results

    StainPresetNet achieves state-of-the-art performance across style transformation and multi-center classification tasks, processing 1,601.5 512×512 images per second.

  • Takeaways & Limitations

    Changing the reference image enables flexible normalization across styles, and the reported speed supports application in computer-aided diagnostic systems.

Abstract

from arXiv · show

Stain normalization reduces color variations caused by variations in staining protocols and imaging conditions, thereby enhancing computer-aided diagnostic system performance. Traditional methods derive mapping relationships from individual or limited reference images through pixel-wise transformation, offering style flexibility but suffering from inaccurate color mapping extraction. While existing deep-learning-based approaches achieve accurate dataset-wide color mapping through complex neural networks, they face challenges including computational inefficiency, artifact generation, and fixed normalization directions requiring model retraining for directional changes. To address these limitations, we propose StainPresetNet - a novel framework that combines structural preservation with dataset-level color mapping while maintaining computational efficiency. Our method implements pixel-wise normalization guided by preset reference images, enabling multi-directional adaptability without retraining. Evaluations on cytopathology and histopathology datasets demonstrate that StainPresetNet achieves superior color mapping accuracy compared to conventional methods, effectively improves classifier generalization in diagnostic tasks, and reduces computational overhead by 90\% versus existing deep learning approaches. The proposed preset-guided mechanism facilitates flexible adjustment of normalization directions through simple reference image replacement, overcoming the directional rigidity of current deep-learning-based solutions.

I. INTRODUCTION

StainPresetNet addresses inaccurate mapping, artifacts, computational burden, and fixed normalization directions through structure-preserving, preset-guided multi-domain normalization.

  • Existing methods face inaccurate single-reference mapping, artifact risks, retraining requirements for direction changes, and time-consuming training.Training may require manually adjusting dozens of hyperparameters over several hours to days.
  • StainPresetNet is proposed as a fast multi-to-multi stain normalization network and training framework.
  • Structure Preservation: Its fully 1×1 convolutional sub-network adjusts colors while preserving image texture and structure.
  • Accurate Mapping Relationships: A backbone network directly controls the color-mapping sub-network to represent complex mapping relationships accurately.
  • Multi-domain to Multi-domain Applicability: Reference images guide normalization direction, enabling multiple styles from one image or one style from multiple image styles.Changing the reference image changes the normalization direction.
  • High Computational Efficiency: The backbone operates at low resolution and the color-mapping sub-network has 59 parameters, supporting high computational efficiency.

II. RELATED WORKS

Prior stain normalization methods use global statistics, stain separation, or generative networks, but their mapping flexibility and multi-domain applicability remain constrained.

  • Conventional methods comprise global normalization and stain separation-based approaches.
  • Global Normalization: Global methods map histograms or match LAB means and standard deviations, but mean-and-standard-deviation matching misses local image differences.
  • Stain Separation: Stain separation methods use stain concentration and intensity relationships in optical-density space to normalize independently separated stain channels.
  • Deep Learning-Based Methods: Pix2pix-based methods train with target-image color transformation and reconstruction because aligned source-target image pairs are difficult to obtain.
  • Deep Learning-Based Methods: CycleGAN-based methods use cycle consistency with real source and target images to learn stain mappings while constraining image content.
  • Deep Learning-Based Methods: CycleGAN is designed for two-domain transformation, making multi-to-one direction selection uncertain and potentially reducing performance.
  • Parametric Networks: StainPresetNet extends ParamNet with reference-image guidance, enabling multi-style stain transformations beyond StainNet’s one-to-one capacity.

III. METHODS

StainPresetNet combines reference-guided color mapping with a multi-domain training framework designed for structural consistency, clear mapping directions, and computational efficiency.

  • A. Network Structure of StainPresetNet: The network uses source and reference encoders, a fusion layer, and a color mapping sub-network to normalize the source image.The encoders extract color distribution features, while the fusion layer computes the mapping network’s weights and biases.
  • A. Network Structure of StainPresetNet: The fully 1×1 convolutional color mapping sub-network adjusts colors while preserving the input image’s texture and structure.Its parameters are dynamically determined from the source and reference image styles.
  • A. Network Structure of StainPresetNet: Pre-setting the reference image avoids repeatedly computing its color feature vector and supports high computational efficiency.Complex computations occur at low resolution, while the color mapping sub-network operates at the original resolution.
  • B. Training Framework of StainPresetNet: CycleGAN-based multi-domain mapping can be uncertain, whereas StainPresetNet establishes a clear and stable mapping relationship.CycleGAN’s one-to-many direction is indeterminate in multi-to-one normalization, which can make training ambiguous and reduce performance.
  • B. Training Framework of StainPresetNet: The training framework equips each domain with an independent texture module and discriminator selected according to the reference-image domain.For each source-reference pair, the framework performs a two-domain transformation with a clear mapping direction.
  • B. Training Framework of StainPresetNet: The overall objective combines adversarial, cycle consistency, domain consistency, domain structure, and identity losses.The identity loss keeps reference-domain inputs unchanged, while the adversarial loss aligns texture-module outputs with real reference images.

A. Datasets

The study evaluates stain normalization across three datasets, including one public and two private datasets, with ethics approval. One dataset uses the same slides scanned by three different scanners, producing distinct image styles.

  • A. Datasets: Three datasets—one public and two private—were used to evaluate the methods.The study received approval from the Ethics Committee of Tongji Medical College, Huazhong University of Science and Technology.
  • A. Datasets: The scanner-based cytopathology dataset contains identical slides scanned using three different scanners.The scanners used 20× or 40× objective lenses and pixel sizes of 0.2930 um, 0.2436 um, and 0.1803 um.

1) Aligned Cytopathology Dataset:

The aligned cytopathology dataset includes slides from two hospitals and five image styles, supporting evaluation across multiple cytopathology domains.

  • 1) Aligned Cytopathology Dataset:: The classification set trains or tests classifiers with and without normalization, while the normalization set trains stain normalization methods.This division is specified in the dataset patch-count table caption.
  • 1) Aligned Cytopathology Dataset:: The dataset contains five styles, D1–D5, with D1–D4 from Hubei Maternal and Child Health Hospital and D5 from Tongji Hospital.The slides originate from Hubei Provincial Maternal and Child Health Hospital and Tongji Hospital.

2) Cytopathology Classification Dataset:

The histopathology classification datasets comprise Camelyon16 and Camelyon17, representing whole-slide images collected from multiple centers.

  • 2) Cytopathology Classification Dataset:: Camelyon16 provides 399 whole-slide images from two centers, while Camelyon17 provides 1,000 whole-slide images from five centers.Experiments used 100 Uni16 training-part slides for training patches and 500 Camelyon17 training-part slides for test patches.

3) Histopathology Classification Dataset:

The experiments compare conventional and deep-learning normalization methods using similarity, source-information preservation, computational efficiency, and classifier accuracy.

  • 3) Histopathology Classification Dataset:: Four evaluation aspects were considered: target-image similarity, source-image information preservation, computational efficiency, and classifier accuracy.These aspects define the evaluation framework for comparing normalization methods.
  • 3) Histopathology Classification Dataset:: SSIM-T and PSNR-T measure similarity between normalized and target images, while SSIM-S measures preservation of source-image information.SSIM denotes Structural Similarity index and PSNR denotes Peak Signal-to-Noise Ratio.
  • 3) Histopathology Classification Dataset:: FPS measures computational efficiency on a 6-core Intel i7-6850K CPU with an NVIDIA GeForce GTX 1080Ti, excluding input and output time.FPS results use 512×512-pixel input images; classifier performance is evaluated by accuracy.
  • 3) Histopathology Classification Dataset:: Conventional methods use one professionally selected reference image, whereas GAN-based methods use their default training settings.The conventional methods are Reinhard, Macenko, and Vahadane; the GAN-based methods are StainGAN, StainNet, and ParamNet.
  • 3) Histopathology Classification Dataset:: StainPresetNet is compared with Reinhard, Macenko, Vahadane, StainGAN, StainNet, and ParamNet.These methods are identified as state-of-the-art normalization methods in the comparison.
  • 3) Histopathology Classification Dataset:: The aligned cytopathology comparison reports visual results, quantitative similarity results, and an additional result category introduced in the source passage.The passage lists three result categories but does not specify the third category.

1) Image Similarity Evaluation:

StainPresetNet achieved the closest visual and quantitative similarity to target styles across multiple normalization directions, while requiring only one training run. Its reference-image performance was relatively stable, and its computational speed approached ParamNet.

  • Visual comparison: StainPresetNet was visually closest to the corresponding target images across the three style transformations.StainGAN, StainNet, and ParamNet required multiple training runs for multiple styles, whereas StainPresetNet was trained once.
  • Quantitative similarity: StainPresetNet achieved the highest SSIM-T and PSNR-T in all evaluated normalization directions.These metrics indicate closeness between normalized images and target images; ParamNet had the highest SSIM-S among deep-learning methods.
  • Reference-image impact: Reference-image choice had little impact on StainPresetNet performance, which was significantly better than conventional methods.The experiment randomly selected reference images and repeated the evaluation ten times.
  • Computational efficiency: 1,601.5 FPS was measured for StainPresetNet on 512×512 inputs, nearly matching ParamNet at 1,605.2 FPS.Input and output time were excluded; the reference color feature vector was pre-computed.

E. Patch-Level Classification Evaluation

Stain normalization improved classification accuracy across cytopathology and histopathology datasets, with StainPresetNet obtaining the strongest reported patch-level averages. The broader evaluation also includes whole-slide classification across medical centers.

  • Patch-level classification: StainPresetNet produced the highest average cytopathology patch-classification accuracy among deep-learning methods, reaching 0.951.Normalization improved classifier performance relative to original images, and deep-learning methods outperformed conventional methods.
  • Patch-level classification: StainPresetNet achieved the best average histopathology patch-classification accuracy, with an average of 0.907.For C3 images, accuracy increased from 0.907 on original images to 0.919 after StainPresetNet normalization.
  • WSI-level classification: Stain normalization significantly improved whole-slide classifier performance compared with unnormalized WSIs.Unnormalized WSIs had an F1 score of 0.000 at C1, C2, and C4.
  • WSI-level classification: StainPresetNet achieved the best average metrics across centers C1–C5, including an F1 score 8.0% higher than the second-place method.It achieved the best F1 scores at C2, C4, and C5, while StainNet led at C1 and ParamNet at C3.

V. DISCUSSION AND CONCLUSION

StainPresetNet combines dataset-level color mapping, pixel-wise normalization, preset-guided direction control, and computational efficiency. It achieves state-of-the-art performance across transformation and classification tasks while supporting practical CAD deployment.

  • StainPresetNet extracts color mapping relationships from entire datasets and performs pixel-by-pixel normalization guided by a preset reference image.This design maintains high computational efficiency while enabling normalization-direction control.
  • StainPresetNet achieves state-of-the-art performance on multiple style mutual transformation, multi-center patch-level classification, and multi-center WSI-level classification tasks.
  • 1,601.5 512×512 images per second enables processing a 100,000×100,000 whole slide image in about 25 seconds on one 1080ti graphics card.The reported throughput supports application in computer-aided diagnostic systems.
Loading 2609.01146v1…