Digital holographic phase distortion compensation method and related apparatus

CN123010356APending Publication Date: 2026-10-30WUYI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611042543.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-14
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

获取含畸变解包裹相位图;

Benefits of technology

[0017]根据本发明实施例提供的数字全息相位畸变补偿方法和相关装置,其中,数字全息相位畸变补偿方法包括:获取含畸变解包裹相位图;将含畸变解包裹相位图输入至预先训练好的深度学习网络模型进行相位畸变补偿,输出绝对相位图,其中,深度学习网络模型采用SFunet网络,深度学习网络模型包括编码器和解码器,编码器和解码器跳跃连接,编码器和解码器均采用RSBlock模块,RSBlock模块用于提取多尺度相位特征,编码器和解码器之间最深层瓶颈位置设有SSBlock模块,SSBlock模块用于空间-频谱联合建模,深度学习网络模型是基于平滑L1损失函数采用相位补偿数据集进行训练而得到。基于此,本发明实施例能够利用训练好的深度学习网络模型可由含畸变相位图一步预测出无畸变相位图,模型中的RSUNet模块能够提取多尺度相位特征,SSBlock模块能够进行空间长程依赖和频率分解建模,从而提升预测相位的连续性、局部细节保持能力和真实数据泛化能力,使得在复杂样本、非均匀相位背景和多阶畸变场景下具有更好的补偿精度、鲁棒性和稳定性,能够更有效地保留样本真实相位结构并去除相位畸变。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123010356A_ABST
    Figure CN123010356A_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a kind of digital holographic phase distortion compensation method and related device.Therein, method includes: obtaining distortion-containing unwrapped phase map;Distortion-containing unwrapped phase map is input to trained deep learning network model to carry out phase distortion compensation, and output absolute phase map, deep learning network model uses SFunet network, deep learning network model includes encoder and decoder, and encoder and decoder are connected with jump, and encoder and decoder all use RSBlock module, RSBlock module is used to extract multi-scale phase feature, SSBlock module is arranged at the deepest bottleneck position between encoder and decoder, and SSBlock module is used for space-spectrum joint modeling, and deep learning network model is based on smooth L1 loss function using phase compensation dataset to obtain training.Based on this, the embodiment of the present application can more effectively retain sample real phase structure and remove phase distortion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of digital holography, and more particularly to a digital holographic phase distortion compensation method and related apparatus. Background Technology

[0002] Digital holographic phase distortion compensation is an important post-processing problem in digital holographic microscopy. Its purpose is to recover a more realistic, smooth, and quantitatively analyzeable phase map from the distorted phase map affected by system aberrations, reference light tilt, and high and low frequency perturbations.

[0003] Currently, digital holographic phase distortion compensation methods can be mainly divided into three categories. The first category is traditional compensation methods based on background region fitting, represented by methods such as plane fitting, polynomial fitting, and Zernike polynomial fitting. These methods typically require first selecting a sample-free background region from the phase image, then utilizing tilt terms, defocus terms, or low-order aberration terms introduced by the background point estimation system, and finally subtracting the fitted distorted background from the original phase image to achieve phase distortion compensation. The second category is methods based on frequency domain filtering or reference hologram correction. These methods reduce background curvature and periodic perturbations in the phase image through spectral filtering, reference phase subtraction, or system calibration, but their compensation effect depends on optical path stability, filtering parameters, and the quality of the reference data. The third category is phase compensation methods based on deep learning. These methods construct a nonlinear mapping between the distorted phase image and the ideal phase image, and use a trained neural network to directly predict the compensated phase image. Although existing methods can achieve phase distortion compensation under certain conditions, they still have significant shortcomings. Traditional fitting methods rely on manual selection of background regions, which can easily lead to inaccurate fitting when the sample region is large, the background region is insufficient, or the sample boundary is complex. Frequency domain filtering methods are sensitive to parameter settings and may lose the true details of the sample while removing distortion. Although ordinary deep learning networks can achieve end-to-end prediction, they are prone to undercompensation, overcompensation, or the removal of the true phase of the sample as distortion when dealing with low-order global distortion and high-order local perturbation that exist simultaneously in the digital holographic phase image. The stability and generalization ability of the compensation results are limited. Summary of the Invention

[0004] This invention provides a digital holographic phase distortion compensation method and related apparatus, which can utilize a trained deep learning network model to compensate for phase distortion in holograms. Figure 1The model predicts distortion-free phase maps step by step. The RSUNet module in the model can extract multi-scale phase features, and the SSBlock module can perform spatial long-range dependency and frequency decomposition modeling, thereby improving the continuity of the predicted phase, the ability to preserve local details, and the ability to generalize to real data. This results in better compensation accuracy, robustness, and stability in complex samples, non-uniform phase backgrounds, and multi-order distortion scenarios, and can more effectively preserve the true phase structure of the sample and remove phase distortion.

[0005] In a first aspect, embodiments of the present invention provide a digital holographic phase distortion compensation method, comprising: Obtain the phase map containing the distortion solution; The distortion-infused unwrapped phase map is input into a pre-trained deep learning network model for phase distortion compensation, outputting an absolute phase map. The deep learning network model uses the SFunet network and includes an encoder and a decoder. The encoder and decoder are connected by skip connections. Both the encoder and decoder employ RSBlock modules for extracting multi-scale phase features. An SSBlock module is located at the deepest bottleneck position between the encoder and decoder for joint spatial-spectral modeling. The deep learning network model is trained using a phase-compensated dataset based on a smoothed L1 loss function.

[0006] In some embodiments, the training method for the deep learning network model includes: A pure phase map of a preset size is generated by superimposing multiple random structures, wherein the random structures include industrial morphology structures and biological cell structures; The pure phase diagram is normalized to obtain the normalized result; The normalization result is mapped to a set phase amplitude range to obtain a distortion-free, pure phase image; Construct polynomial phase distortion surfaces from first to fourth order; The phase distortion surface is superimposed on the distortion-free pure phase image to obtain a phase image with distortion. The distorted phase map is mapped to the interval (-π, π] to obtain the phase compensation dataset; The deep learning network model is trained based on the phase compensation dataset to obtain a trained deep learning network model.

[0007] In some embodiments, the encoder and the decoder are connected in a six-layer skip connection. The first to fifth layers from top to bottom use the RSBlock module, and the sixth layer uses the SSBlock module. The SSBlock module achieves joint compensation of space-frequency domains through Mamba spatial state modeling and wavelet frequency decomposition.

[0008] In some embodiments, the RSBlock module consists of a 1×1 residual projection branch and four depthwise separable convolutional branches of different depths, and each depthwise separable convolutional branch is followed by an SE attention module for channel recalibration.

[0009] In some embodiments, the SSBlock module includes an SSSM branch and an FDSM branch. The SSSM branch uses the Mamba state-space model to perform long-distance dependency modeling on the flattened spatial sequence to capture the global phase distortion trend. The FDSM branch decomposes the features into low-frequency and high-frequency sub-bands through discrete wavelet transform to enhance the frequency domain structure representation.

[0010] In some embodiments, the SSBlock module includes an SSSM branch and an FDSM branch. The SSSM branch uses a Transformer long-range attention module or a large convolutional kernel context module to perform long-range dependency modeling on the flattened spatial sequence to capture global phase distortion trends. The FDSM branch decomposes features into low-frequency and high-frequency subbands through discrete cosine transform, Fourier transform, multi-scale wavelet packets, or learnable filter banks to enhance the frequency domain structure representation.

[0011] In some embodiments, the smoothed L1 loss function is expressed as:

[0012] in, Let be the prediction error for the i-th pixel. , The total number of pixels involved in the loss calculation. The piecewise error function is... Represented as:

[0013] The smoothed L1 loss function exhibits a squared error when the prediction error is less than 1, and an absolute error when the prediction error is greater than or equal to 1.

[0014] Secondly, embodiments of the present invention also provide a digital holographic phase distortion compensation device, the device comprising: The acquisition module is used to acquire the phase map containing the distortion unwrapped image; The processing module is used to input the distortion-unwrapped phase map into a pre-trained deep learning network model for phase distortion compensation and output an absolute phase map. The deep learning network model adopts the SFunet network and includes an encoder and a decoder. The encoder and the decoder are skip connections. Both the encoder and the decoder adopt RSBlock modules. The RSBlock modules are used to extract multi-scale phase features. An SSBlock module is set at the deepest bottleneck position between the encoder and the decoder. The SSBlock module is used for joint spatial-spectral modeling. The deep learning network model is trained on a phase compensation dataset based on a smooth L1 loss function.

[0015] Thirdly, embodiments of the present invention also provide an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the digital holographic phase distortion compensation method as described in the first aspect.

[0016] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing computer-executable instructions for performing the digital holographic phase distortion compensation method as described in the first aspect.

[0017] According to embodiments of the present invention, a digital holographic phase distortion compensation method and related apparatus are provided. The digital holographic phase distortion compensation method includes: acquiring a distorted unwrapped phase map; inputting the distorted unwrapped phase map into a pre-trained deep learning network model for phase distortion compensation, and outputting an absolute phase map. The deep learning network model employs a SFunet network, including an encoder and a decoder, with skip connections between them. Both the encoder and decoder use RSBlock modules, which are used to extract multi-scale phase features. An SSBlock module is located at the deepest bottleneck position between the encoder and decoder, used for spatial-spectral joint modeling. The deep learning network model is trained using a phase compensation dataset based on a smoothed L1 loss function. Therefore, embodiments of the present invention can utilize a pre-trained deep learning network model to compensate for distorted phase features. Figure 1 The model predicts distortion-free phase maps step by step. The RSUNet module in the model can extract multi-scale phase features, and the SSBlock module can perform spatial long-range dependency and frequency decomposition modeling, thereby improving the continuity of the predicted phase, the ability to preserve local details, and the ability to generalize to real data. This results in better compensation accuracy, robustness, and stability in complex samples, non-uniform phase backgrounds, and multi-order distortion scenarios, and can more effectively preserve the true phase structure of the sample and remove phase distortion. Attached Figure Description

[0018] Figure 1 This is a flowchart of a digital holographic phase distortion compensation method provided in one embodiment of the present invention; Figure 2 This is a partial display of the training set; Figure 3 This is a schematic diagram of the SFunet network structure provided in one embodiment of the present invention; Figure 4 This is a schematic diagram of the RSBlock module provided in one embodiment of the present invention; Figure 5 This is a schematic diagram of the SSBlock module provided in one embodiment of the present invention; Figure 6 (a) is the unwrapped phase map containing one type of distortion, (b) is the corresponding absolute phase map, (c) is the model output proposed in this invention, (d) is the model error map proposed in this invention, (e) is the absolute phase map output by U-Net, and (f) is the error map of U-Net. Figure 7 (a) is the unwrapped phase map containing two types of distortion, (b) is the corresponding absolute phase map, (c) is the model output proposed in this invention, (d) is the model error map proposed in this invention, (e) is the absolute phase map output by U-Net, and (f) is the error map of U-Net. Figure 8 (a) is the unwrapped phase map containing three types of distortion, (b) is the corresponding absolute phase map, (c) is the model output proposed in this invention, (d) is the model error map proposed in this invention, (e) is the absolute phase map output by U-Net, and (f) is the error map of U-Net. Figure 9 (a) is the unwrapped phase map containing four types of distortion, (b) is the corresponding absolute phase map, (c) is the model output proposed in this invention, (d) is the model error map proposed in this invention, (e) is the absolute phase map output by U-Net, and (f) is the error map of U-Net. Figure 10 (a) is the phase map of the real sample distortion unwrapping, (b) is the corresponding absolute phase map, (c) is the output of the model proposed in this invention, (d) is the error map of the model proposed in this invention, (e) is the absolute phase map of the U-Net output, and (f) is the error map of U-Net. Figure 11 This is a schematic diagram of a digital holographic phase distortion compensation device provided in one embodiment of the present invention; Figure 12 This is a schematic diagram of an electronic device provided in one embodiment of the present invention. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0020] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the following drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0021] In this embodiment of the invention, the terms "furthermore," "exemplarily," or "optionally" are used as examples, illustrations, or descriptions and should not be construed as being more preferred or advantageous than other embodiments or designs. The use of the terms "furthermore," "exemplarily," or "optionally" is intended to present the relevant concepts in a specific manner.

[0022] First, let's analyze some of the terms used in this invention: Digital holographic phase distortion compensation: During phase reconstruction in digital holographic microscopy, factors such as reference light tilt, system aberrations, optical path assembly errors, and spectral filtering errors often affect the reconstructed phase image, resulting in background curvature, overall tilt, local ripples, and mixed high- and low-frequency distortions. Digital holographic phase distortion compensation aims to restore a phase distribution that more closely approximates the true sample morphology from the distorted phase image, thereby improving the accuracy of subsequent three-dimensional morphology measurements and quantitative analysis.

[0023] SFunet is a deep learning network for phase distortion compensation in digital holography. Based on a six-layer U-Net structure, it extracts phase features at different scales through an encoder, and then gradually restores the phase map resolution through a decoder. The deepest layer introduces an SSBlock module to simultaneously model global low-order distortions and local high-order perturbations; with this structure, SFunet can predict a high-quality compensated phase map in one step from the distorted phase map.

[0024] RMSE: Calculates the sum of squares of the differences between the predicted phase and the ground truth phase, takes the average, and then takes the square root. A smaller value is better; it is also called the average numerical error. PSNR: Peak Signal-to-Noise Ratio, is the ratio of the maximum possible power of a signal to the power of noise, usually expressed in decibels (dB). A higher value is better. In distortion compensation, PSNR reflects the ability to remove noise and residual distortion. A high PSNR indicates a very smooth background, clear sample edges, and no clutter.

[0025] PCC: Structural Similarity, measures the degree of linear correlation between the predicted image and the real image. Its value ranges from [ Between 1 and 1. The larger the better, ideally close to 1.

[0026] To facilitate a more convenient description of the working principle of the embodiments of the present invention, the following introduction of relevant technical scenarios is given first.

[0027] Digital holographic phase distortion compensation is an important post-processing problem in digital holographic microscopy. Its purpose is to recover a more realistic, smooth, and quantitatively analyzeable phase map from the distorted phase map affected by system aberrations, reference light tilt, and high and low frequency perturbations.

[0028] Currently, digital holographic phase distortion compensation methods can be mainly divided into three categories. The first category is traditional compensation methods based on background region fitting, represented by methods such as plane fitting, polynomial fitting, and Zernike polynomial fitting. These methods typically require first selecting a sample-free background region from the phase image, then utilizing tilt terms, defocus terms, or low-order aberration terms introduced by the background point estimation system, and finally subtracting the fitted distorted background from the original phase image to achieve phase distortion compensation. The second category is methods based on frequency domain filtering or reference hologram correction. These methods reduce background curvature and periodic perturbations in the phase image through spectral filtering, reference phase subtraction, or system calibration, but their compensation effect depends on optical path stability, filtering parameters, and the quality of the reference data. The third category is phase compensation methods based on deep learning. These methods construct a nonlinear mapping between the distorted phase image and the ideal phase image, and use a trained neural network to directly predict the compensated phase image. Although existing methods can achieve phase distortion compensation under certain conditions, they still have significant shortcomings. Traditional fitting methods rely on manual selection of background regions, which can easily lead to inaccurate fitting when the sample region is large, the background region is insufficient, or the sample boundary is complex. Frequency domain filtering methods are sensitive to parameter settings and may lose the true details of the sample while removing distortion. Although ordinary deep learning networks can achieve end-to-end prediction, they are prone to undercompensation, overcompensation, or the removal of the true phase of the sample as distortion when dealing with low-order global distortion and high-order local perturbation that exist simultaneously in the digital holographic phase image. The stability and generalization ability of the compensation results are limited.

[0029] Based on this, the present invention provides a digital holographic phase distortion compensation method and related apparatus. The digital holographic phase distortion compensation method includes: acquiring a distorted unwrapped phase map; inputting the distorted unwrapped phase map into a pre-trained deep learning network model for phase distortion compensation, and outputting an absolute phase map. The deep learning network model uses a SFunet network, including an encoder and a decoder, with skip connections between them. Both the encoder and decoder employ RSBlock modules, which are used to extract multi-scale phase features. An SSBlock module is located at the deepest bottleneck position between the encoder and decoder, used for spatial-spectral joint modeling. The deep learning network model is trained using a phase compensation dataset based on a smoothed L1 loss function. Therefore, this embodiment of the invention can utilize a pre-trained deep learning network model to compensate for distorted phase features. Figure 1 The model predicts distortion-free phase maps step by step. The RSUNet module in the model can extract multi-scale phase features, and the SSBlock module can perform spatial long-range dependency and frequency decomposition modeling, thereby improving the continuity of the predicted phase, the ability to preserve local details, and the ability to generalize to real data. This results in better compensation accuracy, robustness, and stability in complex samples, non-uniform phase backgrounds, and multi-order distortion scenarios, and can more effectively preserve the true phase structure of the sample and remove phase distortion.

[0030] The embodiments of the present invention will be further described below with reference to the accompanying drawings.

[0031] like Figure 1 As shown, Figure 1 This is a flowchart of a digital holographic phase distortion compensation method provided in an embodiment of the present invention. The digital holographic phase distortion compensation method may include, but is not limited to, steps S101 to S102.

[0032] Step S101: Obtain the phase map containing the distortion unwrapped image; Step S102: Input the unwrapped phase map containing distortion into a pre-trained deep learning network model for phase distortion compensation, and output an absolute phase map. The deep learning network model adopts the SFunet network, which includes an encoder and a decoder with skip connections. Both the encoder and decoder use RSBlock modules to extract multi-scale phase features. An SSBlock module is set at the deepest bottleneck position between the encoder and decoder for joint spatial-spectral modeling. The deep learning network model is trained on a phase compensation dataset based on a smooth L1 loss function.

[0033] It is understood that the digital holographic phase distortion compensation method of this invention treats the distortion compensation problem as a regression problem, establishing a nonlinear mapping between the distorted phase map and the clean phase map by training a deep learning network model. This model utilizes the SSBlock module to enhance global spatial modeling and frequency decomposition capabilities, enabling the model to predict a high-quality compensated phase map in one step, thereby improving the automation, stability, and adaptability to real data in digital holographic phase compensation.

[0034] It is understood that the SFunet network used in the digital holographic phase distortion compensation method of the present invention not only retains the ability of the U-Net encoder-decoder structure to extract multi-scale features, but also introduces the SSBlock space-frequency dual-domain modeling module in the bottleneck layer, thereby simultaneously improving the compensation ability for low-order global distortion and high-order local disturbance.

[0035] Understandably, during the model training phase, unlike traditional phase distortion compensation methods, deep learning-based phase compensation algorithms require a large amount of paired data for training, meaning that both distorted phase maps and corresponding undistorted true phase maps must be obtained simultaneously. However, in actual digital holographic microscopy measurements, it is difficult to obtain distorted phases and strictly registered true phases of the same object on a large scale. Therefore, this invention constructs a training dataset by combining pure phase generation with polynomial distortion superposition.

[0036] First, generate a size of The pure phase diagram. The pure phase is obtained by superimposing multiple random structures, including industrial morphological structures and biological cell structures. Its original phase can be represented as:

[0037] in, Represents pixels The original phase at that point, For the number of structures, For the first Phase amplitude of each structure, These are the corresponding spatial morphology basis functions. Industrial structures mainly include microlenses and rectangular step structures, while biological structures mainly include erythrocyte and ordinary cell morphologies. After generating the original phase, it is normalized:

[0038] Subsequently, the normalization result is mapped to a set phase amplitude range to obtain a distortion-free, clean phase image:

[0039] Based on this, first- to fourth-order polynomial phase distortion surfaces are constructed to simulate tilt, defocus, astigmatism, and higher-order distortions in digital holographic systems:

[0040] By superimposing the distorted surface onto the clean phase, we obtain a phase map containing the distortion:

[0041] To simulate actual digital holographic phase measurement results, the non-wrapped phase is further mapped to... The interval is used to obtain the wrapped phase:

[0042] Ultimately, the dataset was divided into a training set and a validation set, containing 1500 and 250 samples respectively. Each set includes non-wrapped phases with distortion, clean non-wrapped phases, wrapped phases with distortion, and clean wrapped phases, thus providing training data for the phase distortion compensation network that strictly corresponds to the labels. It's important to note that this dataset is not strictly divided into four classes (1st, 2nd, 3rd, and 4th order), but rather randomly synthesized according to the number of distortion orders used.

[0043] Understandably, the SFunet network is characterized by a downsampling path called the encoder and an upsampling path called the decoder, interconnected by skip connections. For example, a six-layer RS-U-Net with direct skip connections is used as the end-to-end phase distortion compensation backbone to achieve direct regression from the distorted phase to the clean phase. At each layer, RSBlock is sampled as a multi-branch residual feature extraction module in the SFunet network to replace ordinary convolutional blocks, and SSBlock is used as the bottleneck module of the digital holographic phase distortion compensation network. Spatial-frequency dual-domain joint compensation is achieved through Mamba spatial state modeling and wavelet frequency decomposition. This structure allows SFunet to simultaneously capture multi-scale information and perform fine image reconstruction in the decoder. The network uses a smooth L1 loss function as the supervision objective function. Let the... The prediction error for each pixel is:

[0044] The objective function to be solved during training in this invention can be expressed as:

[0045] in, The total number of pixels involved in the loss calculation. The piecewise error function is specifically expressed as:

[0046] The smoothed L1 loss exhibits a squared error when the error is small, which is beneficial for improving phase compensation accuracy; when the error is large, it exhibits an absolute error, which is beneficial for reducing the impact of abnormal phase points on the training process. Therefore, this loss function is suitable for digital holographic phase distortion compensation tasks where both smoothed background distortion and local structural details exist simultaneously.

[0047] It is understood that the SFunet network proposed in this invention uses an encoder and a decoder as its basic structure. The SFunet network uses the RSBlock module as the basic feature extraction module for the encoder and decoder. The SSBlock spatial-spectral module is introduced at the deepest bottleneck position. This structure can not only retain the multi-scale reconstruction capability of U-Net, but also jointly model low-order background distortion and high-frequency sample details in the digital holographic phase map.

[0048] The RSBlock module is a multi-branch residual feature extraction module in the SFunet network used to replace ordinary convolutional blocks. The RSBlock module consists of a... The system consists of a residual projection branch and four depthwise separable convolution branches at different depths. Each branch is followed by an SE attention module (Squeeze-and-Excitation) for channel recalibration.

[0049] At the deepest layer of the network, this invention uses the SSBlock module to replace the ordinary convolutional bottleneck module. SSBlock is a space-spectrum joint modeling module containing SSSM and FDSM branches. The SSSM branch uses the Mamba state-space model to model the long-range dependencies of the flattened spatial sequence, capturing global phase distortion trends. The FDSM branch decomposes features into low-frequency and high-frequency subbands through Discrete Wavelet Transform (DWT), enhancing the frequency domain structure representation. It should be noted that, without changing the application, the SSSM branch in the SSBlock module can be replaced with other state-space models, Transformer long-range attention, or large convolutional kernel context modules; the Discrete Wavelet Transform in the FDSM branch can be replaced with Discrete Cosine Transform, Fourier Transform, multi-scale wavelet packets, or learnable filter banks.

[0050] To evaluate the model's performance across multiple scales, all test results in this invention are comprehensively assessed using RMSE, PSNR, and PCC metrics. For example... Figure 6 , 7As shown in Figures 8, 9, and 10, (a) represents the unwrapped phase with only n-order distortions, i.e., the model's input; (b) represents the absolute phase map corresponding to (a); (c) and (d) represent the output and error map of the model proposed in this invention, respectively; and (e) and (f) represent the output and error map of U-Net, respectively. Generally, when the distortion removal error is less than 10%, the removed distortion can be considered correct. Therefore, the error map is generated by calculating the relative error between the model output and the true value (gt). In the error map, any pixel with a relative error exceeding 10% is marked as an error point.

[0051] As shown in Tables 1, 2, 3, 4, and 5 below, the proposed model outperforms U-Net in all evaluation metrics. The experimental results fully demonstrate the advantages of the proposed network in terms of model distortion correction performance, model generalization, and model robustness.

[0052] Table 1. Distortion-free average PSNR (dB), RMSE, and SSIM (%) of unwrapped phase map models with one type of distortion

[0053] Table 2. Distortion-free average PSNR (dB), RMSE, and SSIM of the unwrapped phase map model with two types of distortion.

[0054] Table 3. Distortion-free average PSNR (dB), RMSE, and SSIM of the unwrapped phase map model with three types of distortion.

[0055] Table 4. Distortion-free average PSNR (dB), RMSE, and SSIM of the unwrapped phase map model with four types of distortion.

[0056] Table 5. Distortion-free average PSNR (dB), RMSE, and SSIM of real samples with distortion.

[0057] It is understood that a significant advantage of this invention is that applying deep learning technology for distortion compensation of the unwrapped phase not only improves the model's performance in terms of distortion resistance, generalization ability, and robustness, but also achieves distortion compensation with high accuracy. The specific process includes four stages: data construction, network training, model inference, and result output. First, training samples containing labels for distorted and clean phases are constructed, with each sample using `distorted_phase` as network input and `clean_phase` as the supervision target. Second, the input phase is fed into the SFunet network, undergoing five downsampling iterations and bottleneck modeling, followed by progressive upsampling to restore spatial resolution. Third, an SSBlock is introduced in the deepest bottleneck layer to model long-range spatial dependencies and frequency decomposition, thereby improving the continuity of the predicted phase, the ability to preserve local details, and the generalization ability to real data. Finally, the predicted distortion-free phase `predicted_phase` is output and can be saved as a MAT file and a visualization image.

[0058] Based on this, the present invention proposes a digital holographic phase distortion compensation method based on the SFunet deep learning network. This method utilizes a trained model to compensate for phase distortion in digital holography. Figure 1 This invention predicts a distortion-free phase map in one step. Compared with traditional fitting methods, this invention does not require manual selection of background regions, nor does it rely on a single fixed distortion function form. The RSBlock module in the SFunet network can extract multi-scale phase features, and the SSBlock module can combine Mamba spatial sequence modeling and DWT spectral decomposition to capture global distortion trends, enhancing the fusion of high and low frequency features. Therefore, this invention has better compensation accuracy, robustness, and stability in complex samples, non-uniform phase backgrounds, and multi-order distortion scenarios, and can more effectively preserve the true phase structure of the sample and remove system phase distortion.

[0059] In addition, such as Figure 11 As shown, one embodiment of the present invention also discloses a digital holographic phase distortion compensation device, the device comprising: The acquisition module is used to acquire the phase map containing the distortion unwrapped image; The processing module is used to input the unwrapped phase map containing distortion into a pre-trained deep learning network model for phase distortion compensation and output an absolute phase map. The deep learning network model adopts the SFunet network and includes an encoder and a decoder with skip connections between them. Both the encoder and decoder use RSBlock modules to extract multi-scale phase features. An SSBlock module is located at the deepest bottleneck position between the encoder and decoder for joint spatial-spectral modeling. The deep learning network model is trained on a phase compensation dataset based on a smooth L1 loss function.

[0060] The digital holographic phase distortion compensation device of this invention is used to execute the digital holographic phase distortion compensation method in the above embodiments. Its specific processing procedure is the same as that of the digital holographic phase distortion compensation method in the above embodiments, and will not be described in detail here.

[0061] In addition, such as Figure 12 As shown, one embodiment of the present invention also discloses an electronic device, including: at least one processor 210; at least one memory 220 for storing at least one program; when the at least one program is executed by the at least one processor 210, it implements the digital holographic phase distortion compensation method as described in any of the preceding embodiments.

[0062] In addition, one embodiment of the present invention discloses a computer-readable storage medium storing computer-executable instructions for performing the digital holographic phase distortion compensation method as described in any of the preceding embodiments.

[0063] The system architecture and application scenarios described in the embodiments of this invention are for the purpose of more clearly illustrating the technical solutions of the embodiments of this invention, and do not constitute a limitation on the technical solutions provided by the embodiments of this invention. As those skilled in the art will know, with the evolution of system architecture and the emergence of new application scenarios, the technical solutions provided by the embodiments of this invention are also applicable to similar technical problems.

[0064] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0065] In hardware implementations, the division between functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0066] The terms “component,” “module,” “system,” etc., used in this specification are used to refer to computer-related entities, hardware, firmware, combinations of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program, or a computer. As illustrated, applications running on computing devices and computing devices can both be components. One or more components may reside in a process or execution thread, and components may be located on a single computer or distributed among two or more computers. Furthermore, these components can be executed from various computer-readable media on which various data structures are stored. Components can communicate, for example, via local or remote processes based on signals having one or more data packets (e.g., data from two components interacting with another component between a local system, a distributed system, or a network, such as the Internet interacting with other systems via signals).

Claims

1. A digital holographic phase distortion compensation method, comprising: Obtain the phase map containing the distortion solution; The distortion-infused unwrapped phase map is input into a pre-trained deep learning network model for phase distortion compensation, outputting an absolute phase map. The deep learning network model uses the SFunet network and includes an encoder and a decoder. The encoder and decoder are connected by skip connections. Both the encoder and decoder employ RSBlock modules for extracting multi-scale phase features. An SSBlock module is located at the deepest bottleneck position between the encoder and decoder for joint spatial-spectral modeling. The deep learning network model is trained using a phase-compensated dataset based on a smoothed L1 loss function.

2. The method according to claim 1, characterized in that, The training methods for the deep learning network model include: A pure phase map of a preset size is generated by superimposing multiple random structures, wherein the random structures include industrial morphology structures and biological cell structures; The pure phase diagram is normalized to obtain the normalized result; The normalization result is mapped to a set phase amplitude range to obtain a distortion-free, pure phase image; Construct polynomial phase distortion surfaces from first to fourth order; The phase distortion surface is superimposed on the distortion-free pure phase image to obtain a phase image with distortion. The distorted phase map is mapped to the interval (-π, π] to obtain the phase compensation dataset; The deep learning network model is trained based on the phase compensation dataset to obtain a trained deep learning network model.

3. The method according to claim 1, characterized in that, The encoder and the decoder are connected in a six-layer skip connection. The first to fifth layers from top to bottom use the RSBlock module, and the sixth layer uses the SSBlock module. The SSBlock module achieves joint compensation of space-frequency domain through Mamba spatial state modeling and wavelet frequency decomposition.

4. The method according to claim 1, characterized in that, The RSBlock module consists of a 1×1 residual projection branch and four depthwise separable convolutional branches of different depths. Each depthwise separable convolutional branch is followed by an SE attention module for channel recalibration.

5. The method according to claim 1, characterized in that, The SSBlock module includes an SSSM branch and an FDSM branch. The SSSM branch uses the Mamba state space model to perform long-distance dependency modeling on the flattened spatial sequence, which is used to capture the global phase distortion trend. The FDSM branch decomposes the features into low-frequency and high-frequency sub-bands through discrete wavelet transform, which is used to enhance the frequency domain structure representation.

6. The method according to claim 1, characterized in that, The SSBlock module includes an SSSM branch and an FDSM branch. The SSSM branch uses the Transformer long-range attention module or the large convolutional kernel context module to perform long-range dependency modeling on the flattened spatial sequence to capture the global phase distortion trend. The FDSM branch decomposes the features into low-frequency and high-frequency subbands through discrete cosine transform, Fourier transform, multi-scale wavelet packets or learnable filter banks to enhance the frequency domain structure representation.

7. The method according to claim 1, characterized in that, The smoothed L1 loss function is expressed as follows: in, Let be the prediction error for the i-th pixel. , The total number of pixels involved in the loss calculation. The piecewise error function is... Represented as: The smoothed L1 loss function exhibits a squared error when the prediction error is less than 1, and an absolute error when the prediction error is greater than or equal to 1.

8. A digital holographic phase distortion compensation device, characterized in that, The device includes: The acquisition module is used to acquire the phase map containing the distortion unwrapped image; The processing module is used to input the distortion-unwrapped phase map into a pre-trained deep learning network model for phase distortion compensation and output an absolute phase map. The deep learning network model adopts the SFunet network and includes an encoder and a decoder. The encoder and the decoder are skip connections. Both the encoder and the decoder adopt RSBlock modules. The RSBlock modules are used to extract multi-scale phase features. An SSBlock module is set at the deepest bottleneck position between the encoder and the decoder. The SSBlock module is used for joint spatial-spectral modeling. The deep learning network model is trained on a phase compensation dataset based on a smooth L1 loss function.

9. An electronic device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, when the processor executes the computer program, it implements the digital holographic phase distortion compensation method as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing computer-executable instructions for performing the digital holographic phase distortion compensation method as described in any one of claims 1 to 7.