A Deep Learning-Based Real-Time Phase Unwrapping Method for Electron Speckle Interferometry
By constructing a CNN-based dual-task coupled network, the true phase distribution can be predicted directly from the noisy wrapped phase map, solving the problem of phase unwrapping difficulties in complex scenes using traditional methods. This achieves efficient and accurate phase unwrapping results and is suitable for dynamic scene processing in electronic speckle interferometry.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-29
- Publication Date
- 2026-03-10
AI Technical Summary
Traditional phase unwrapping methods perform poorly in complex scenarios such as high noise, broken stripes, or abrupt density changes. They cannot automatically batch process multiple wrapped phase maps, nor can they achieve accurate, robust, and fast phase unwrapping of the original wrapped phase map.
A dual-task coupled network based on CNN is constructed. By sharing an encoder, a phase reconstruction decoder, and a phase filtering decoder, and using a composite loss function to optimize training, the network directly predicts the true phase distribution from the noisy wrapped phase map and outputs the absolute phase result and the filtered wrapped phase result.
It achieves efficient and accurate phase unwrapping of multiple electronic speckle interferometry measurements, improves the efficiency and accuracy of phase unwrapping, is suitable for real-time processing in dynamic scenarios, and reduces the complexity of parameter setting and adjustment.
Smart Images

Figure CN121413669B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of optical detection and image processing technology, and particularly relates to a real-time phase unwrapping method for electronic speckle interferometry based on deep learning. Background Technology
[0002] Electronic speckle interferometry has become an important tool in modern optical metrology. With its non-contact, high-precision, and real-time imaging characteristics, it has found wide application in fields such as mechanical property evaluation, displacement and vibration monitoring, and thermal deformation measurement. Its principle involves extracting the phase from the interference fringe pattern through arctangent calculation. The obtained phase is folded in the (-π, π] interval, and phase unwrapping is necessary to obtain a continuous absolute phase distribution. However, inherent speckle noise causes the wrapped phase to be covered with spots, severely degrading image quality and posing significant difficulties for subsequent unwrapping.
[0003] Traditional phase unwrapping methods (such as WFF-QGPU and DCT-LSPU) heavily rely on path tracking or global optimization strategies, often performing poorly in complex scenarios with high noise, broken fringes, or abrupt density changes. They also frequently suffer from limitations such as requiring individual parameter fine-tuning for each sample, limited applicability, and inability to batch process samples in dynamic measurements. Furthermore, they cannot automatically batch process multiple wrapped phase maps, nor can they achieve accurate, robust, and fast phase unwrapping of the original wrapped phase map.
[0004] Although deep learning has demonstrated excellent feature learning and generalization capabilities in image processing in recent years, providing new ideas for breaking away from traditional frameworks, how to directly use data-driven methods to achieve high-precision unwrapping of high-noise, complex-shaped phase wrapping in one go remains an unsolved problem. Summary of the Invention
[0005] To address the aforementioned technical problems, this invention proposes a real-time phase unwrapping method for electronic speckle interferometry based on deep learning. This method constructs a dual-task coupled network based on CNN, which can achieve batch fully automatic phase unwrapping of multiple ESPI wrapped phase maps of different shapes and directly output the absolute phase result. It aims to achieve fast and accurate unwrapping of low-quality, high-noise, and complex-shaped wrapped phases to solve the problems existing in the prior art.
[0006] To achieve the above objectives, this invention provides a real-time phase unwrapping method for electronic speckle interferometry based on deep learning, comprising the following steps:
[0007] Generate corresponding absolute phase labels based on random number sequences;
[0008] The original speckle pattern is obtained based on the absolute phase label;
[0009] Based on the absolute phase label and the original speckle pattern, a noisy wrapped phase image, a noiseless wrapped phase label and a wrapped count label are generated, and a training data set is constructed;
[0010] Based on the convolutional neural network, a double-task coupled network model is constructed with a shared encoder, a phase reconstruction decoder, a phase filtering decoder and a symmetric branch as an overall framework;
[0011] Based on the phase reconstruction loss, the wrapped phase filtering loss and the wrapped count segmentation loss, a composite loss function is constructed;
[0012] Based on the composite loss function and the training data set, the double-task coupled network model is trained;
[0013] Based on the trained double-task coupled network model, the phase unwrapping of the original wrapped phase image to be processed is performed to obtain an absolute phase image after phase unwrapping.
[0014] Optionally, based on the random number sequence, a corresponding absolute phase label is generated; and based on the absolute phase label, the original speckle pattern is obtained, including:
[0015] Based on the random number sequence, the absolute phase label is generated through two-dimensional interpolation processing;
[0016] Based on the absolute phase label and the electronic speckle interferometry principle, four original speckle patterns are obtained.
[0017] Optionally, based on the absolute phase label and the original speckle pattern, a noisy wrapped phase image, a noiseless wrapped phase label and a wrapped count label are generated, and a training data set is constructed, including:
[0018] Based on the four original speckle patterns, a noisy wrapped phase image and a corresponding noiseless wrapped phase label are obtained by using a four-step phase shift method;
[0019] According to the absolute phase label and the noiseless wrapped phase label, a wrapped count label is calculated;
[0020] According to the noisy wrapped phase image, the noiseless wrapped phase label, the absolute phase label and the wrapped count label, a training data set is divided.
[0021] Optionally, based on the convolutional neural network, a double-task coupled network model is constructed with a shared encoder, a phase reconstruction decoder, a phase filtering decoder and a symmetric branch as an overall framework, including:
[0022] A shared encoder is constructed to perform step-by-step down-sampling on the input noisy wrapped phase image to obtain a multi-scale phase feature map;
[0023] A phase reconstruction decoder and a phase filtering decoder are constructed to upsample the multi-scale phase feature map step by step and fuse shallow features to obtain the corresponding absolute phase features and filtered wrapped phase features.
[0024] Construct an absolute phase reconstruction branch and a wrapping phase filtering branch. Based on the absolute phase features and the filtered wrapping phase features, output the corresponding absolute phase results, wrapping phase results, and wrapping count results.
[0025] This leads to the completion of the structural construction of the dual-task coupled network model.
[0026] Optionally, the construction of the shared encoder involves downsampling the input noisy wrapped phase map step by step to obtain a multi-scale phase feature map, including:
[0027] A shared encoder is constructed based on weighted convolution, batch normalization, activation functions, and residual blocks;
[0028] The input noisy wrapped phase map is processed based on the shared encoder, and the final multi-scale phase feature map is obtained through five consecutive max pooling operations.
[0029] Optionally, the phase reconstruction decoder introduces a Shuffle Attention module, which divides the feature channels into several semantic subspaces through a grouping-rearrangement mechanism. After channel rearrangement, the structure and texture of the absolute phase features are obtained.
[0030] Optionally, the phase filter decoder embeds a COT module to enhance the global representation capability of features by capturing long-range dependencies and optimize the wrapped phase features after filtering.
[0031] Optionally, the process of constructing an absolute phase reconstruction branch and a wrapper phase filtering branch, and outputting the corresponding absolute phase result, wrapper phase result, and wrapper count result based on the absolute phase feature and the filtered wrapper phase feature, includes:
[0032] The absolute phase features and the filtered wrapper phase features are merged separately.
[0033] The merged features are processed based on the absolute phase reconstruction branch, and the absolute phase result is output.
[0034] The wrap-around phase filtering branch uses dilated convolution and dense blocks at the end to process the merged features and outputs the filtered wrap-around phase result.
[0035] Simultaneously, based on the mapping relationship between the absolute phase result and the filtered package phase result, the package count result is calculated.
[0036] Optionally, the phase reconstruction loss includes MSE, MAE, MS-SSIM, and wavelet loss, used to optimize the absolute phase results; the package phase filtering loss includes MSE, MAE, and MS-SSIM, used to optimize the package phase results; and the package counting segmentation loss includes multi-class Dice coefficients and Focal loss, used to optimize the package counting results.
[0037] Optionally, the process of training the dual-task coupled network model based on the composite loss function includes:
[0038] The difference between the output of the dual-task coupled network model and the true label is calculated based on the composite loss function. The network parameters are updated by backpropagation using gradient descent, and the weights and offsets are continuously optimized. Training stops when the training reaches the maximum number of iterations, the loss function value decreases to a stable value, or the network weights converge to the optimal value.
[0039] Compared with the prior art, the present invention has the following advantages and technical effects:
[0040] This invention proposes a deep learning-based real-time phase unwrapping method for electronic speckle interferometry. By constructing a dual-task coupled network model based on a convolutional neural network, it achieves efficient and accurate phase unwrapping of multiple electronic speckle interferometry measurements of wrapped phases. The method utilizes a shared encoder to progressively downsample noisy wrapped phase maps, extracting multi-scale phase feature maps. These feature maps are then upsampled and fused using a phase reconstruction decoder and a phase filtering decoder, respectively, ultimately outputting the absolute phase result, the filtered wrapped phase result, and the wrapped phase count result. Furthermore, the model is optimized through a composite loss function, ensuring its robustness and accuracy under different noise levels and complex scenarios. Compared to traditional methods, this invention eliminates the need for complex parameter settings and adjustments, significantly improving the efficiency and accuracy of phase unwrapping and providing a new technical path for the real-time processing and application of electronic speckle interferometry in dynamic scenarios. Attached Figure Description
[0041] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0042] Figure 1 This is a schematic diagram of the network structure according to an embodiment of the present invention;
[0043] Figure 2 This is a noisy enclosed phase map obtained from a partial simulation in an embodiment of the present invention;
[0044] Figure 3 This is a schematic diagram of the absolute phase result obtained by the method proposed in the embodiment of the present invention;
[0045] Figure 4 This is a schematic diagram of the absolute phase result obtained by the WFF-QGPU method in an embodiment of the present invention;
[0046] Figure 5 This is a schematic diagram of the absolute phase result obtained by the DCT-LSPU method in an embodiment of the present invention. Detailed Implementation
[0047] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0048] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0049] Convolutional Neural Networks (CNNs), as a highly efficient deep learning architecture, can automatically extract discriminative hierarchical features from data through multi-layer convolution and nonlinear transformations, achieving breakthroughs in tasks such as image recognition, segmentation, and regression. CNN-based phase unwrapping methods do not rely on traditional path integrals or continuity assumptions; instead, they directly predict the true phase distribution from noisy wrapped phase maps through end-to-end learning, combining high efficiency and high accuracy. These methods not only significantly improve the robustness and computational efficiency of phase reconstruction but also provide a new technical path for the real-time processing and application of electronic speckle interferometry in dynamic scenarios.
[0050] Example 1
[0051] This embodiment provides a real-time phase unwrapping method for electronic speckle interferometry based on deep learning, including the following steps:
[0052] Generate corresponding absolute phase labels based on random number sequences;
[0053] The original speckle pattern is obtained based on the absolute phase label;
[0054] Based on absolute phase labels and the original speckle map, noisy package phase images, noise-free package phase labels, and package count labels are generated to construct a training dataset.
[0055] Based on convolutional neural networks, a dual-task coupled network model is constructed with a shared encoder, a phase reconstruction decoder, a phase filtering decoder, and a symmetric branch as the overall framework.
[0056] A composite loss function is constructed based on phase reconstruction loss, package phase filtering loss, and package counting segmentation loss;
[0057] The dual-task coupled network model is trained based on the composite loss function and the training dataset.
[0058] The trained dual-task coupled network model is used to unwrap the phase map of the original package to be processed, and the unwrapped absolute phase map is obtained.
[0059] As an optional implementation, a deep learning-based real-time phase unwrapping method for electronic speckle interferometry is used to unwrap the wrapped phase obtained from electronic speckle measurements. The specific steps are as follows:
[0060] Step 1: Construct the training dataset. The specific steps are as follows:
[0061] Step 1-1: Generate a random number sequence using a computer, and obtain the absolute phase label through two-dimensional interpolation;
[0062] Steps 1-2: Based on the principle of absolute phase tagging and electronic speckle interferometry, four phase-shifted original speckle images are simulated and generated. A noisy wrapped phase image and a noise-free wrapped phase tag are generated using a four-step phase-shifting method. The size of each image is 256×256 pixels.
[0063] Steps 1-3: Based on the principle of phase unwrapping, calculate the package count tag using absolute phase tags and noise-free package phase tags.
[0064] Steps 1-4: Construct a dataset based on noisy wrapped phase images, noise-free wrapped phase labels, absolute phase labels, and wrapped count labels. There are a total of 7000 sets of data, of which 500 sets are the validation set and the remaining 6500 sets are the training dataset.
[0065] Step 2: Construct a network model for real-time phase unwrapping of electronic speckle interferometry. The specific steps are as follows:
[0066] This embodiment constructs a dual-task coupled network model based on CNN. The core is used to accurately recover the absolute phase from a noisy wrapped phase map. The overall architecture consists of a shared encoder (Encoder), a phase reconstruction decoder (Decoder1), a phase filtering decoder (Decoder2), and symmetric branches R1 and R2. Efficient phase unwrapping is achieved through multi-component collaborative optimization. The network structure is as follows: Figure 1 As shown.
[0067] Step 2-1: Construct a shared encoder, whose basic module consists of 3×3 wConv + BN + ReLU, with residual blocks embedded in the middle. Each module output is followed by a 2×2 max pooling layer. The encoder processes the input noisy wrapped phase map by performing five consecutive max pooling operations, halving the scale of the output feature map and doubling the number of channels each time, ultimately obtaining five different scales of phase feature maps, which are then passed to the corresponding encoding layers. Among them, the weighted convolution wConv enhances the ability to suppress non-stationary backgrounds without parameter increments through the center-edge weight decay mechanism of the symmetric spatial density function; batch normalization (BN) can accelerate the training convergence speed; and the residual blocks avoid feature degradation in deep networks, ensuring accurate extraction of regional structures and texture features in the wrapped phase, rather than single pixel features, thus improving noise resistance and feature stability.
[0068] Step 2-2: Construct the phase reconstruction decoder Decoder1 and the phase filtering decoder Decoder2. Both use 2×2 bilinear interpolation for upsampling to restore deep features to the original input size. Each layer fuses the shallow features of the corresponding encoding layer with the deep features of the previous layer, and then further extracts deep phase features through a basic module consistent with the encoder. Decoder1 introduces a Shuffle Attention module, which divides the feature channels into multiple semantic subspaces through a grouping-rearrangement mechanism. After suppressing background interference in each subspace, channel rearrangement achieves noise-resistant knowledge sharing, enhancing the preservation of structure and texture during absolute phase recovery. Decoder2 embeds a COT module, which enhances the global representation capability of features by capturing long-range dependencies and optimizes the wrapping phase filtering effect. The two decoders work together to output absolute phase features and filtered wrapping phase features respectively. At the same time, they combine phase unwrapping theory to simultaneously estimate the wrapping count, avoiding the high computational cost problems of single-scale feature loss and complex scale adjustment.
[0069] Steps 2-3: Construct the absolute phase reconstruction branch R1 and the wrapping phase filtering branch R2. R1 merges features of all different scales and outputs the absolute phase result of each pixel via 1×1 Conv+Sigmoid. R2 processes the features at the end using dilated convolution and dense blocks, and then outputs the filtered wrapping phase result via 1×1 Conv+Sigmoid. Simultaneously, based on the mapping relationship between absolute phase and wrapping phase, the wrapping count result is calculated. This ultimately achieves end-to-end output from noisy wrapping phase map to absolute phase, filtered wrapping phase, and wrapping count, without additional post-processing.
[0070] Step 3: Train the model. The specific steps are as follows:
[0071] Step 3-1: Initialize parameters by inputting the training set into the dual-task coupled network model.
[0072] Step 3-2: Design a composite loss function that integrates phase reconstruction loss, wrapping phase filtering loss, and wrapping count segmentation loss for optimal training. The phase reconstruction loss includes MSE, MAE, MS-SSIM, and wavelet loss to optimize absolute phase recovery accuracy; the wrapping phase filtering loss includes MSE, MAE, and MS-SSIM to improve wrapping phase filtering performance; and the wrapping count segmentation loss includes multi-class Dice coefficients and Focal loss for accurate wrapping count estimation. The difference between the output and the true labels is calculated using this composite loss function. Gradient descent is then used for backpropagation to update network parameters, continuously optimizing weights and offsets, and fully utilizing prior phase unwrapping information to improve model performance.
[0073] Step 3-3: Stop training when the maximum number of iterations has been reached, or when the loss function value stabilizes and the network weights converge to their optimal values. In training a dual-task coupled network model, multiple iterations are required for the network to converge to the training set. Continuing to train the model further will lead to varying degrees of overfitting. Since this network has a relatively small parameter size, data augmentation is used to prevent overfitting. Finally, the optimal weights and biases are saved as the training model for this database.
[0074] Step 4: Model Validation. The specific steps are as follows:
[0075] Step 4-1: After one epoch, test the validation set with the currently trained dual-task coupled network model. The accuracy can be used to observe the model's fit and generalization.
[0076] Figure 2 This embodiment shows a portion of the simulated noisy enclosed phase map. Figure 3 The absolute phase result obtained by the method proposed in this embodiment is shown; Figure 4 The absolute phase result obtained by the WFF-QGPU method in this embodiment is shown; Figure 5 The absolute phase results obtained by the DCT-LSPU method in this embodiment are shown. Through comparative analysis of the above results, it can be seen that the phase unwrapping method proposed in this embodiment has good applicability to wrapped phases with high speckle noise and complex morphology, can effectively obtain accurate and reliable absolute phase results, and has batch processing capabilities.
[0077] The real-time phase unwrapping method for electronic speckle interferometry provided in this embodiment has the following advantages: (1) It can achieve batch unwrapping of wrapped phases obtained from multiple electronic speckle interferometry measurements with high accuracy; (2) Compared with traditional phase unwrapping methods, the real-time phase unwrapping method for electronic speckle interferometry based on deep learning does not rely on path tracking or global optimization strategies, and does not require complex parameter settings and adjustments, providing a new path for the real-time processing and application of electronic speckle interferometry technology in dynamic scenarios. The method provided in this embodiment can be widely applied to electronic speckle interferometry phase unwrapping tasks, which is of great significance to the fields of optical detection and image processing technology.
[0078] The model structure in this embodiment is implemented using the PyTorch framework based on Python 3.9. The server hardware configuration used is as follows: CPU: Intel i5-13490F, RAM: 32GB, GPU: NVIDIA GeForce RTX 5070.
[0079] The experimental data used in this embodiment consists of 7000 sets of computer-simulated data, including noisy wrapped phase images, noise-free wrapped phase labels, absolute phase labels, and wrapped count labels. All images are 256×256 pixels in size. After training and testing, the method in this embodiment can accurately obtain the absolute phase.
[0080] The above are merely preferred embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A deep learning based electronic speckle pattern interferometry real-time phase un-wrapping method, characterized in that, The method comprises the following steps: generating corresponding absolute phase labels based on a random number sequence; obtaining original speckle patterns based on the absolute phase labels; generating noisy wrapped phase images, noise-free wrapped phase labels and wrapped count labels based on the absolute phase labels and the original speckle patterns, and constructing a training data set; constructing a double-task coupled network model based on a convolutional neural network, taking a shared encoder, a phase reconstruction decoder, a phase filtering decoder and a symmetric branch as an overall framework; constructing a composite loss function based on a phase reconstruction loss, a wrapped phase filtering loss and a wrapped count segmentation loss; training the double-task coupled network model based on the composite loss function and the training data set; performing phase unwrapping on a to-be-processed original wrapped phase image based on the trained double-task coupled network model to obtain an absolute phase image after phase unwrapping; The process of constructing the double-task coupled network model based on the convolutional neural network, taking the shared encoder, the phase reconstruction decoder, the phase filtering decoder and the symmetric branch as the overall framework comprises: constructing the shared encoder to perform step-by-step down-sampling on the input noisy wrapped phase image to obtain multi-scale phase feature maps; constructing the phase reconstruction decoder and the phase filtering decoder to perform step-by-step up-sampling on the multi-scale phase feature maps and fuse shallow features to obtain corresponding absolute phase features and filtered wrapped phase features; constructing an absolute phase reconstruction branch and a wrapped phase filtering branch to output corresponding absolute phase results and wrapped phase results and wrapped count results based on the absolute phase features and the filtered wrapped phase features; and further completing the structure construction of the double-task coupled network model.
2. The method of claim 1, wherein the process of generating corresponding absolute phase labels based on a random number sequence comprises: generating absolute phase labels through two-dimensional interpolation processing based on a random number sequence; obtaining four original speckle patterns based on the absolute phase labels and the principle of electronic speckle pattern interferometry.
3. The method of claim 2, wherein the process of generating noisy wrapped phase images, noise-free wrapped phase labels and wrapped count labels based on the absolute phase labels and the original speckle patterns, and constructing a training data set comprises: obtaining noisy wrapped phase images and corresponding noise-free wrapped phase labels by using a four-step phase shift method based on the four original speckle patterns; calculating wrapped count labels according to the absolute phase labels and the noise-free wrapped phase labels; dividing the training data set according to the noisy wrapped phase images, the noise-free wrapped phase labels, the absolute phase labels and the wrapped count labels.
4. The method of claim 1, wherein the process of constructing the shared encoder to perform step-by-step down-sampling on the input noisy wrapped phase image to obtain multi-scale phase feature maps comprises: constructing the shared encoder based on weighted convolution, batch normalization, an activation function and a residual block; processing the input noisy wrapped phase image based on the shared encoder to obtain the final multi-scale phase feature maps through five consecutive max-pooling operations.
5. The method of claim 1, wherein, the phase reconstruction decoder introduces a Shuffle Attention module, which divides feature channels into several semantic subspaces through a grouping-rearranging mechanism, and obtains the structure and texture of absolute phase features after channel rearrangement.
6. The method of claim 1, wherein, the phase filter decoder embeds a COT module, which enhances the global representation ability of features by capturing long-range dependencies and optimizes the wrapped phase features after filtering.
7. The method of claim 1, wherein, an absolute phase reconstruction branch and a wrapped phase filter branch are constructed, and based on the absolute phase features and the wrapped phase features after filtering, the process of outputting the corresponding absolute phase results, wrapped phase results, and wrapped count results includes: combining the absolute phase features and the wrapped phase features after filtering, respectively; processing the combined features based on the absolute phase reconstruction branch to output the absolute phase results; processing the combined features based on the wrapped phase filter branch at the end using a dilated convolution and a dense block to output the wrapped phase results after filtering; and based on the mapping relationship between the absolute phase results and the wrapped phase results after filtering, the wrapped count results are calculated.
8. The method of claim 7, wherein, the phase reconstruction loss includes MSE, MAE, MS-SSIM, and wavelet loss for optimizing the absolute phase results; the wrapped phase filter loss includes MSE, MAE, and MS-SSIM for optimizing the wrapped phase results; and the wrapped count segmentation loss includes multi-class Dice coefficient and Focal loss for optimizing the wrapped count results.
9. The method of claim 1, wherein, based on the composite loss function, the process of training the dual-task coupled network model includes: calculating the difference between the output results of the dual-task coupled network model and the true labels based on the composite loss function, updating the network parameters using the gradient descent method, continuously optimizing the weights and biases, and stopping training when the training reaches the maximum number of iterations, the loss function value decreases and tends to be stable, or the network weights converge to the optimal.
Citation Information
Patent Citations
Phase unwrapping method, device and system and storage medium
CN118795476A
Two-step learning type phase unwrapping method based on residual optimization
CN119291686A