Fig. 8: Overview of the RegGAN-based virtual staining framework and network architectures.

a Schematic of the RegGAN training workflow. The generator network G receives a multichannel PARS input x and produces a virtual stain G(x). This is concatenated with the misaligned real stain \(\widetilde{y}\) and passed through the registration network R, which predicts a deformation field T that is applied to align the virtual stain. A correction loss is computed between the registered output and the real stain, while a smoothness loss is applied to T to enforce spatial smoothness. An adversarial discriminator D guides G via a least squares loss. b Architecture of the discriminator D, based on a 70 × 70 PatchGAN, which outputs a patch-wise classification map for real/fake discrimination. c Architecture of the generator G, a ResNet-based encoder-decoder that processes four-channel 266 nm and 355 nm contrast images and outputs an RGB virtual stain. d Architecture of the registration network R, a ResUNet-style model that predicts a 2D deformation field from a six-channel concatenation of the real and virtual stain. IN = Instance Normalization; ReLU = Rectified Linear Unit.