Adaptive optical system wavefront recovery method based on deep learning hybrid model
By combining CNN and Transformer in a deep learning hybrid model (CNN-Transformer), the problem of insufficient wavefront recovery accuracy in wavefront-sensorless adaptive optics systems under strong turbulence conditions is solved, achieving fast and stable wavefront recovery, which is applicable to fields such as biomedical imaging and free-space optical communication.
Patent Information
- Application Number
- CN202511902031.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-17
- Publication Date
- 2026-03-31
- Estimated Expiration
- 2045-12-17
AI Technical Summary
Existing wavefront-less adaptive optics systems suffer from decreased accuracy under strong turbulence conditions and insufficient handling of Zernike coefficient sign ambiguity, resulting in inadequate wavefront recovery accuracy, especially poor performance in dynamic environments.
A deep learning hybrid model (CNN-Transformer) is adopted, which combines convolutional neural network (CNN) to extract local spatial features and Transformer to model long-range dependencies. The Zernike coefficient recovery is optimized through loss function to solve the symbol ambiguity problem and achieve fast and stable wavefront recovery.
It improves the real-time performance and stability of wavefront recovery, enhances robustness and accuracy under strong turbulence conditions, supports millisecond-level inference time, and is suitable for real-time adaptive optics applications.
Smart Images

Figure CN121348562B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of wavefront-free adaptive optics systems. Background Technology
[0002] Adaptive optics (AO) technology is used to compensate for wavefront distortion caused by atmospheric turbulence, optical system errors, and inhomogeneous refractive indices in the medium in real time, thereby enabling imaging systems to achieve diffraction-limited resolution. AO technology has become an indispensable tool in fields such as astronomical observation, laser communication, and biomedical imaging.
[0003] Traditional AO systems typically rely on wavefront sensors (such as Shaker-Hartmann sensors) to measure wavefront errors and perform real-time wavefront correction using deformable mirrors. These systems are complex and costly, and their performance degrades significantly in the absence of a guide star or under low light conditions, making them unsuitable for dynamically changing environments. Wavefront-sensorless adaptive optics (WFSL-AO) technology, however, eliminates the need for wavefront sensors, directly inferring wavefront distortion through the focal plane point spread function (PSF). Turbulence-induced phase aberrations on a unit pupil plane can be expressed using a Zernike polynomial expansion as follows:
[0004] (1),
[0005] in This represents the normalized Zernike model. It is its modal coefficient.
[0006] Complex pupil function is derived from (2),
[0007] in For a binary aperture mask, the corresponding focal plane PSF can be calculated as the square modulus of the Fourier transform:
[0008] (3).
[0009] Formulas (1) to (3) above define a highly nonlinear positive operator that transforms the Zernike coefficient vector Mapping to intensity distribution How to quickly and stably recover the Zernike coefficients from the observed PSF without iterative solution remains a key problem for WFSL-AO.
[0010] In recent years, deep learning algorithms have been applied in WFSL-AO technology. For example, methods based on Transformer models effectively model long-range dependencies and global structures in PSFs through self-attention mechanisms, but these methods require significant computational resources. Alternatively, CNNs (Convolutional Neural Networks) can be used to learn the mapping between turbulent-degraded PSFs and their underlying wavefronts to recover phase errors. This method achieves good wavefront recovery accuracy under certain conditions (such as low turbulence intensity). However, in practical applications, accuracy degrades and generalization ability is insufficient under strong turbulence conditions, and the handling of Zernike coefficient sign ambiguity is inadequate. Specifically, in WFSL-AO systems, when inferring Zernike mode coefficients from PSFs, especially even-symmetric modes, ambiguity in sign recognition occurs, causing different aberration configurations to produce almost identical PSFs, thus reducing reconstruction accuracy. Summary of the Invention
[0011] To address the technical problems of insufficient real-time performance, poor robustness under strong turbulence, and ambiguous Zernike coefficient signs in existing technologies, this invention proposes an adaptive optics wavefront recovery method based on a deep learning hybrid model (CNN-Transformer).
[0012] The technical solution of the present invention:
[0013] The wavefront recovery method for adaptive optics systems based on deep learning hybrid models includes the following steps:
[0014] S1. Acquire turbulent degradation PSF images and perform data preprocessing;
[0015] S2. Construct a deep learning hybrid model. Input the turbulent degradation PSF image into the deep learning hybrid model to achieve feature extraction, abstraction and global processing. The deep learning hybrid model is a CNN-Transformer model, where CNN is used to extract local spatial features from the input PSF image, and Transformer is used to model long-range dependencies and global context information in the PSF image, and output Zernike coefficients.
[0016] S3. Output the Zernike coefficients after sign recovery and optimization.
[0017] loss function Recovery is performed using weighted mean square error:
[0018] in and They represent the b-th sample and the th... i The true and predicted values of each Zernike modality, where B is the batch size and weights. wi = N is the number of terms in the Zernike coefficients;
[0019] Zernike coefficient prediction accuracy is achieved by ensuring the absolute error is below the decision threshold. τ Quantify the coefficient ratio:
[0020] , where 1(·) is an indicator function.
[0021] Technical effects:
[0022] This invention avoids the iterative optimization steps in existing methods by learning the nonlinear mapping relationship between the turbulent degradation PSF and the wavefront, thus improving the real-time performance and stability of wavefront recovery. The core innovation lies in proposing a deep learning architecture that combines a hybrid convolutional neural network (CNN) and a Transformer. CNN is used for local feature extraction, while the Transformer is used for global context modeling, significantly improving wavefront recovery accuracy, especially under strong turbulence conditions, and enhancing the model's robustness and accuracy under conditions of strong turbulence and large aberrations.
[0023] To address the issue of symbol ambiguity, an optimization strategy for the Zernike coefficient symbol ambiguity problem is proposed. By setting a smaller decision threshold τ, the impact of symbol errors on wavefront recovery accuracy is effectively reduced, maintaining high recovery accuracy even in higher-order modes. The final output wavefront recovery result is typically presented in the form of Zernike coefficients. This invention provides accurate wavefront recovery results, which are mapped to deformable mirror driving quantities to form conjugate wavefronts, thereby enabling rapid correction of subsequent closed-loop or quasi-closed-loop circuits.
[0024] It is also hardware independent, enabling millisecond-level inference times on common hardware platforms, making it suitable for real-time adaptive optics applications, particularly in biomedical imaging and free-space optical communication. By combining the advantages of CNN and Transformer, it improves the network's computational efficiency and model accuracy, and supports transfer learning, easily scaling to different turbulence intensities and complex aberration conditions.
[0025] like Figure 3As shown, for reference, the diffraction-limited PSF (Strehl (Strehl ratio) = 1) is displayed outside the red dashed box. The images on the left inside the box show the turbulence degradation PSF for D / r0 values of 1, 5, 10, 15, and 20, with corresponding Strehl values of 0.975, 0.878, 0.620, 0.557, and 0.398, respectively. The data on the right directly compares the Zernike coefficients of the actual and predicted values under the same conditions, and gives the MAE (mean absolute error) for each case. Under all turbulence levels, the predicted Zernike coefficients are in high agreement with the actual values and the error remains low, proving that the constructed CNN-Transformer model can reliably and accurately recover the wavefront parameters under different turbulence conditions. Attached Figure Description
[0026] Figure 1 This is a flowchart illustrating the overall process of this invention.
[0027] Figure 2 This is a block diagram of the hybrid CNN-Transformer module architecture.
[0028] Figure 3 The image shows a comparison of the PSF and Zernike coefficients under different turbulent conditions.
[0029] Figure 4 This is a loss curve for the training set / validation set.
[0030] Figure 5 The graph shows the accuracy of the validation set when the decision threshold τ is 0.05.
[0031] Figure 6 This diagram illustrates the test accuracy for different D / r0 values.
[0032] Figure 7 Box plot of error distribution for 28 Zernike modes. Detailed Implementation
[0033] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.
[0034] This embodiment provides a wavefront recovery method for adaptive optics systems based on a deep learning hybrid model. For example... Figure 1 As shown, turbulence-degraded PSF images are first acquired using a CMOS or CCD high-speed camera, typically represented as PSFs. These PSFs are the manifestation of wavefront distortion in the images caused by atmospheric turbulence or other environmental factors. The data preprocessing includes standardization and denoising operations on the PSF images to ensure that the input data is compatible with the deep learning hybrid model.
[0035] Next, a CNN-Transformer model is used, where the CNN is responsible for extracting local spatial features from the input PSF image. Convolutional layers, batch normalization layers, and activation functions process the image layer by layer to capture detailed information in the image, aiding subsequent global modeling. The Transformer uses a self-attention mechanism to model long-range dependencies and global contextual information in the image, especially in cases with large aberrations, enabling it to capture global patterns in the PSF and help recover complex wavefront information. This is used to understand the global information in the PSF image and further improve the accuracy of wavefront recovery.
[0036] like Figure 2 As shown, the CNN-Transformer model employs a five-stage hybrid architecture to progressively extract, abstract, and globally process PSF features. Stage S0 reduces spatial resolution and expands feature channels through convolutional layers, generating efficient low-level representations. Stage S1 consists of the MBConv (moving inverse bottleneck convolution) module and the SE module, achieving local feature extraction and adaptive channel recalibration. Stage S2 introduces downsampling MBConv layers, enhancing abstraction capabilities while compressing spatial dimensions. From Stage S3 onwards, convolutional operations are replaced by the TransformerBlock2D module, which integrates MHSA (multi-head self-attention mechanism) and two-dimensional relative position bias to capture long-range spatial relationships on the pupil plane. Stage S4 refines the global representation through deep Transformer layers, and finally, the head undergoes global mean pooling followed by linear regression to aggregate features, outputting Zernike coefficients.
[0037] The above content and Figure 2 Explanation of some terms in the Chinese section:
[0038] ConvBNAct is a common module in neural networks, typically used in CNN architectures. It usually consists of three main components: convolutional layers (Conv), batch normalization (BN) layers, and activation functions (Act).
[0039] MBConv + SE is a common deep learning module widely used in CNNs. It combines the Mobile Inverted Bottleneck Convolution (MBConv) and the Squeeze-and-Excitation (SE) module.
[0040] The TransformerBlock2D self-attention mechanism is an application in image data, widely used to improve the ability of image processing models to capture long-range feature dependencies.
[0041] This embodiment of the CNN-Transformer model effectively integrates local and global inference through its hierarchical design: the early stages utilize the ability of convolutional layers to process local spatial information, while deeper layers gradually introduce attention mechanisms to achieve global feature aggregation. By simultaneously capturing local blobular details and global structural distortions, this hybrid approach ensures that the model can generate reliable wavefront estimates, which is crucial for high-performance adaptive optics systems.
[0042] To train and validate the constructed CNN-Transformer model, a large-scale dataset of turbulent degradation PSFs and their associated aberration coefficients was first generated using the Adaptive Optics Toolbox. A frozen flow model was designed to describe the complex environment: the telescope aperture D was 1 m, and the spatial sampling within the field of view was 64 × 64 pixels. Atmospheric turbulence was simulated using a Kolmogorov statistical model with an outer scale L0 of 42 m and D / r0 (Fried parameter, representing turbulence intensity) values of 1, 5, 10, 15, and 20. A multi-layered frozen flow model was implemented, with disturbance layers located at heights of 1 km, 5 km, and 12 km, driven by wind speeds of 5 m / s, 7.5 m / s, and 10 m / s in different directions.
[0043] Each time a perturbation occurs, the corresponding phase screen is propagated through a telescope and imaged onto the sampling camera. A total of 5000 PSFs are recorded under each turbulence condition, forming a dataset covering a wide range of aberration states. These PSFs accurately capture the complex variations in wavefront distortion, comprehensively presenting the turbulence-induced optical effects. To generate effective training targets, each instantaneous wavefront is decomposed into 28 modified Zernike modes, covering up to the sixth radial order.
[0044] The generated dataset was input into the model for training. The dataset, covering D / r0={1,5,10,15,20}, was merged and then randomly divided into 70% for training, 15% for validation, and 15% for testing. Images were resized to 64×64 pixels and normalized. Optimization was performed using the AdamW algorithm with a learning rate lr = 3×10⁻⁶. -4 Weight decay 10 -4 Combined with the cosine annealing scheduling strategy, the batch size is 32.
[0045] Next, the Zernike coefficient signs are restored and optimized before output.
[0046] loss function Recovery is performed using weighted mean square error:
[0047] in and They represent the b-th sample and the th... i The true and predicted values of each Zernike modality, where B is the batch size and weights. w i = N is the number of terms in the Zernike coefficients; in this embodiment, N=28. Therefore, higher-order Zernike modes are assigned progressively increasing penalty values.
[0048] Zernike coefficient prediction accuracy is achieved by ensuring the absolute error is below the decision threshold. τ Quantify the coefficient ratio:
[0049] , where 1(·) is an indicator function.
[0050] like Figures 4-6 As shown, this embodiment uses the decision threshold. τ Under the condition of 0.05, the performance of the CNN-Transformer model on the training, validation, and test sets is as follows. The weighted mean squared error loss shows a steady decreasing trend on both the training and validation sets, triggering an early stopping mechanism at the 139th epoch. Under this criterion, the validation set accuracy converges to above 0.95, confirming that the model did not overfit during effective optimization. Finally, in the test under turbulent conditions D / r0=1~20, the model consistently maintains high accuracy, even exceeding 0.9 when D / r0=20, fully demonstrating the model's strong generalization ability.
[0051] Furthermore, the standard Noel index convention was used to analyze the prediction errors of 28 Zernike coefficients. For example... Figure 7 As shown, the absolute error distribution under different modes is illustrated. The box plots for each mode display the interquartile range (25%–75%), with the midline representing the median. The results indicate that lower-order modes (such as defocus, astigmatism, and coma, i.e., J02–J06) exhibit larger absolute errors, while higher-order modes show significantly smaller error amplitudes. Notably, although the first three modes (J01–J03: piston and tilt) show large absolute deviations, they do not directly affect image quality.
[0052] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the invention by those skilled in the art. Any modifications, equivalent substitutions, or improvements made to the present invention should be included within the scope of protection of the present invention.
Claims
1. A wavefront recovery method for an adaptive optical system based on a deep learning hybrid model, characterized in that, The method comprises the following steps: S1, acquiring a turbulent degradation PSF image and performing data preprocessing; S2, constructing a deep learning hybrid model, inputting the turbulent degradation PSF image into the deep learning hybrid model, and using the deep learning hybrid model to realize feature extraction, abstraction and global processing; the deep learning hybrid model is a CNN-Transformer model, wherein the CNN is used to extract local spatial features from the input PSF image, the Transformer is used to model long-range dependence and global context information in the PSF image, and Zernike coefficients are outputted; S3, outputting after sign recovery and optimization of the Zernike coefficients, Loss function Recovery with weighted mean square error: wherein and respectively represent the true value and the predicted value of the b-th sample in the b-th Zernike mode, B is the batch size, and the weight i w i = N is the number of terms of the Zernike coefficients; The Zernike coefficient prediction accuracy is quantified by the absolute error below a decision threshold The CNN-Transformer model specifically adopts a five-stage hybrid architecture, S0 stage reduces the spatial resolution and expands the feature channel through a convolution layer, and generates an efficient low-level representation; S1 stage is composed of an MBConv module and an SE module, and realizes local feature extraction and adaptive channel recalibration; S2 stage introduces a down-sampling MBConv layer, which compresses the spatial dimension while enhancing the abstraction capability; from S3 stage, the convolution operation is replaced by a TransformerBlock2D module, which integrates MHSA and two-dimensional relative position bias, and captures long-range spatial correlation on the pupil plane; S4 stage refines the global representation through a deep Transformer layer, and finally the head adopts linear regression to aggregate the features after global average pooling, and outputs the Zernike coefficients. quantized by a coefficient scale ratio: where 1(·) is an indicator function; In S1, the turbulent degradation PSF image is acquired by a CMOS or CCD high-speed camera.
2. The adaptive optics system wavefront recovery method based on a deep learning hybrid model according to claim 1, characterized in that, The data preprocessing includes standardization and denoising operation of the PSF image.
3. The adaptive optics system wavefront recovery method based on a deep learning hybrid model according to claim 1, characterized in that,
Citation Information
Patent Citations
Adaptive optical wavefront compensation method for predicting wavefront Zernike coefficient based on deep migration learning
CN110349095A
Laser scanning microscope and method for correcting imaging errors particularly in high-resolution scanning microscopy
US20150077844A1