Yang Wangka, Lv Meini, Yu Zhenming, Deng Jiawei
School of Computer Electronics and Information, Guangxi University, Nanning, 530004, China.
WuZhou University, Wuzhou, 543002, China.
Sci Rep. 2025 Jul 15;15(1):25521. doi: 10.1038/s41598-025-11037-3.
Autofocus plays a crucial role in Biological Microscopy by ensuring image clarity and improving operational efficiency. However, mainstream brightfield biological microscopes still rely on conventional autofocus methods, which suffer from poor real-time performance and high sensitivity to noise, limiting their applicability in time-critical scenarios. To address these challenges, we propose a Wavelet-Guided Transformer Network (WGT-Net) that enables fast and accurate autofocus prediction from a single blurred image. WGT-Net integrates three key design elements: the use of wavelet transform to construct multi-scale blurred features and perform downsampling; a Transformer module that captures global-local dependencies across multi-scale image features; a Gaussian soft labeling strategy that models the optimal focus position as a probability distribution to handle uncertainty. Experiments conducted on a locally collected dataset demonstrate that WGT-Net achieves a mean absolute error (MAE) of 0.0869 and a root mean square error (RMSE) of 0.101, achieving 28.69% and 32.39% reductions in MAE and RMSE, respectively, compared with state-of-the-art methods, and completing predictions within milliseconds. These results demonstrate that WGT-Net significantly improves both prediction accuracy and real-time performance, highlighting its suitability for real-time, high-throughput Brightfield Biological Microscopy applications.
自动聚焦在生物显微镜中起着至关重要的作用,它能确保图像清晰度并提高操作效率。然而,主流的明场生物显微镜仍依赖传统的自动聚焦方法,这些方法实时性能较差,对噪声敏感度高,限制了它们在时间紧迫场景中的适用性。为应对这些挑战,我们提出了一种小波引导的变压器网络(WGT-Net),它能够从单个模糊图像中实现快速准确的自动聚焦预测。WGT-Net集成了三个关键设计元素:使用小波变换构建多尺度模糊特征并进行下采样;一个变压器模块,用于捕捉多尺度图像特征中的全局-局部依赖性;一种高斯软标签策略,将最佳聚焦位置建模为概率分布以处理不确定性。在本地收集的数据集上进行的实验表明,WGT-Net的平均绝对误差(MAE)为0.0869,均方根误差(RMSE)为0.101,与现有方法相比,MAE和RMSE分别降低了28.69%和32.39%,并能在毫秒内完成预测。这些结果表明,WGT-Net显著提高了预测准确性和实时性能,凸显了其适用于实时、高通量明场生物显微镜应用的特点。