Abstract
Virtual staining improves the interpretability of microscopy images without requiring chemical labeling; however, the computational cost of conventional image-to-image translation models limits their real-time use. Here, we present a lightweight virtual staining framework designed for edge and workstation environments, enabling interactive microscopy workflows. The method utilizes a compact, deployment-oriented U-Net architecture with reduced base channels, accelerated for inference via ONNX Runtime. Our proposed model generates high-fidelity staining outputs while substantially reducing complexity. Compared to a standard pix2pix baseline, it decreases the parameter count from~60million to ~3.0 million and computational cost from 19.0 to 9.5 GFLOPs. In deployment benchmarking, the optimized model achieves a latency of 1.32 ms per frame (758 FPS). Furthermore, integration into a Napari-based interface demonstrates its practical utility in interactive imaging scenarios. These results show that virtual staining can move from offline post-processing to a real-time microscopy capability.