Atmospheric Turbulence Aberration Correction Based On Deep Learning Wavefront Sensing
Atmospheric Turbulence Aberration Correction Based On Deep Learning Wavefront Sensing
Atmospheric Turbulence Aberration Correction Based On Deep Learning Wavefront Sensing
Article
Atmospheric Turbulence Aberration Correction Based on Deep
Learning Wavefront Sensing
Jiang You 1,2 , Jingliang Gu 1 , Yinglei Du 1 , Min Wan 1 , Chuanlin Xie 1 and Zhenjiao Xiang 1, *
1 Institute of Applied Electronics, China Academy of Engineering Physics, Mianyang 621900, China;
youjiang09@163.com (J.Y.); gavin51728@163.com (J.G.); boyduyinglei@163.com (Y.D.);
wanmin@caep.cn (M.W.); x_cling@163.com (C.X.)
2 Graduate School of China Academy of Engineering Physics, Beijing 100088, China
* Correspondence: hitxzj2013newborn@163.com
Abstract: In this paper, research was conducted on Deep Learning Wavefront Sensing (DLWS) neural
networks using simulated atmospheric turbulence datasets, and a novel DLWS was proposed based
on attention mechanisms and Convolutional Neural Networks (CNNs). The study encompassed
both indoor experiments and kilometer-range laser transmission experiments employing DLWS.
In terms of indoor experiments, data were collected and training was performed on the platform built
by us. Subsequent comparative experiments with the Shack-Hartmann Wavefront Sensing (SHWS)
method revealed that our DLWS model achieved accuracy on par with SHWS. For the kilometer-scale
experiments, we directly applied the DLWS model obtained from the indoor platform, eliminating
the need for new data collection or additional training. The DLWS predicts the wavefront from
the beacon light PSF in real time and then uses it for aberration correction of the emitted laser.
The results demonstrate a substantial improvement in the average peak intensity of the light spot at
the target position after closed-loop correction, with a remarkable increase of 5.35 times compared to
the open-loop configuration.
Keywords: adaptive optics (AO); deep learning wavefront sensing (DLWS); aberration correction
experiment; CNN; attention mechanism
With the development of deep learning technology, increasingly deeper neural networks
are being applied in this field of research.
The emergence of Convolutional Neural Networks (CNNs) has greatly simplified
image feature extraction. Through the introduction of innovative structures [10–12], CNNs
have shown significant improvements in performance. Studies have demonstrated the
effectiveness of CNNs in recovering phase information from single-frame images [13].
A mainstream research approach is the establishment of CNN models for predicting
Zernike coefficients from single-frame intensity images [14–16]. In a study conducted
in [17], wavefront sensing models were built using both a Multi-layer Perceptron (MLP)
and CNNs with varying layers. The input to these models was a single-frame Point Spread
Function (PSF), and the output was 2–400 orders of Zernike coefficients. All models,
except for the MLP, achieved impressive results, underscoring the effectiveness of CNNs
in addressing such problems. The accuracy of aberration prediction using single-frame
images can rival that of dual-frame methods and holds promising prospects for practical
optical systems due to its lower complexity.
In this paper, we establish an atmospheric turbulent laser transmission model to create
a theoretical dataset. We propose a scheme that utilizes deep CNNs to map single-frame
intensity images to 67-order Zernike coefficients. We compare the performance of three
networks: ResNet [18], Xception [19], and ResNeXt [20]. Additionally, we study the effects
of incorporating different attention mechanisms into the baseline network. Finally, we
determine that the ResNeXt50 architecture, combined with the NAM (Normalization-based
Attention Module) [21], is the optimal choice for constructing an atmospheric turbulence
wavefront sensor for aberration detection. To validate the effectiveness and accuracy of
this method in practical systems, we establish an indoor experimental system. Real-time
aberration detection and correction based on the DLWS are performed, achieving a correc-
tion effect that closely approaches that of an AO system based on SHWS. Subsequently, we
build an outdoor laser atmospheric transmission experimental platform and directly apply
the indoor trained DLWS to the outdoor platform. The results demonstrate the practicality
of the method presented in this article, as it can be easily migrated to different platforms.
3. Numerical Simulation
3.1. Data Generating and Preprocessing
Atmospheric turbulence wavefront phase can be represented by a phase screen. In this
paper, the spectral inversion method [31] is used to simulate the production of atmospheric
turbulence phase screen. The basic principle is as follows: first, a complex Gaussian random
number matrix is filtered by the square root of the atmospheric turbulence power spectrum,
and then random phase of atmospheric disturbance can be obtained by performing Fourier
transform on it [32,33]. The equation is as follows:
ZZ q
~ ~
ϕ( x, y) = C T ( K x , Ky ) Φ(Kx , Ky )ei~r·K dK, (1)
∞
l
ϕ( x, y) = ∑ ai Ziε (x, y), (2)
i =1
where l is the model number, ai is the undetermined model coefficients, ε is the obscuration
ratio, Ziε ( x, y) is the Zernike model item in the annular domain.
The number of selected items is l, and the mode decomposition of the given wavefront
can be performed to obtain the mode coefficients.
A = Z + ϕ, (3)
where A is the model coefficient matrix, Z + is the inverse matrix of the Zernike model
matrix in the annular domain. Considering that our wavefront corrector performs well in
correcting aberrations up to the 70th order of Zernike coefficients, and based on the findings
in reference [35], which indicate that neural networks can predict around 65 Zernike
coefficients with high wavefront reconstruction accuracy, we establish the prediction of
67 Zernike coefficients in this paper. A set of 4–70 radial Zernike mode bases, denoted as
Ziε ( x, y), is selected. Mode decomposition is performed on the simulated circular random
atmospheric turbulence wavefront phase, resulting in 67 mode coefficients as shown in
Figure 2a. For DLWS in this paper, the input is assumed to be a PSF that has already
been corrected for tilt; thus, tilt terms are not considered. In the case of theoretically
generated datasets, images are cropped with the centroid position as the center. In practical
experimental applications, a Fast Steering Mirror (FSM) is employed to eliminate tilt,
causing the offset between the centroid of the far-field spot and the image center to approach
zero.
Figure 2. Example of sample pairs generated by simulation, (a) Zernike coefficients of wavefront
aberration decomposition, (b) the far-field intensity image.
According to the lens diffraction principle, the complex beam amplitude distribution
on the focal plane of the lens is the Fourier transform of the distorted wavefront. Consider-
ing the influence of the lens aperture, assuming a uniform distribution of beam intensity
on the focal plane, the complex beam amplitude can be calculated using the following
equation [36]:
E = FT ( P × e jϕ ), (4)
where E is the complex amplitude distribution on the focal plane of the lens, FT is the
Fourier transform, and P represents the lens aperture function, which can be expressed
as follows:
1, r × l0 < l ≤ l0
P= , (5)
0, else
Sensors 2023, 23, 9159 5 of 12
where l is the distance from any point on the pupil plane to the center, l0 is the pupil
size, and r is the central obscuration ratio. Therefore, the far-field diffraction image corre-
sponding to the circular random atmospheric turbulence wavefront can be obtained, as
shown in Figure 2b.
Figure 3. Average absolute value of each Zernike coefficient in the training set.
Figure 4a,b display the training and validation errors of the three models during train-
ing. These figures clearly indicate that all three models reach their optimal performance
levels, with ResNeXt50 demonstrating the highest accuracy. As a result, ResNeXt50 was
selected as the baseline network for further investigation into the impact of attention mecha-
nisms on performance. Attention modules CBAM [24], COT (Contextual Transformer) [37],
NAM [21], ECA [30], PNA [27], and SGE [26] were integrated into the baseline network and
trained accordingly. Figure 4c illustrates the performance of these attention mechanisms on
the validation set.
Figure 4. Figures depicting the training and validation loss of different backbone CNN networks, as
well as performance comparison charts after incorporating different attention mechanisms. (a) Train-
ing loss of the three networks, (b) validation loss of the three backbone CNNs, (c) performance
comparison after adding different attention mechanisms to ResNeXt50, where the x-axis represents
inference latency and the y-axis represents validation error.
Notably, the incorporation of the NAM attention module into ResNeXt50 significantly
improved wavefront aberration identification accuracy, with an insignificant increase in
inference time (less than 1 ms). This indicates that the advantages of including the NAM
attention module outweigh its impact on computational efficiency, making it a valuable
addition to the ResNeXt50 model for wavefront sensing applications. We conducted tests
on the network models using the test set, and Table 1 presents the average errors for each
network on both the validation and test sets. It is evident that on the test set, all models
achieved results similar to those on the validation set. The inclusion of NAM in ResNeXt50
delivered the best performance.
Table 1. The performance of different networks on the test set corresponding to the model with the
best loss on the validation set. FPS (Frames Per Second) reflects the inference speed of the model in
predicting the time spent on a single frame.
ResNeXt50
Models ResNet50 Xception
\ +CBAM +COT +ECA +PNA +SGE +NAM
Val Loss 1.1745 1.1471 0.9641 0.9748 0.9826 0.9539 0.9587 0.9816 0.9002
Test Loss 1.2262 1.1996 0.9702 0.9803 1.012 0.9592 0.9601 0.9871 0.9062
FPS 121.4 124.3 111.4 100.8 91.9 109.8 89.2 102.1 104.8
Train time (epoch/s) 516 432 621 668 762 661 723 662 692
Sensors 2023, 23, 9159 7 of 12
Figure 6. Indoor experimental platform and examples of the collected samples. (a) The indoor
experimental platform. The composite detector is capable of simultaneously capturing far-field
intensity images and wavefronts. (b) Examples of samples collected by the platform. From top to
bottom, three randomly visualized sample sets; from left to right, PSF of sample pairs, corresponding
wavefront, and decomposed Zernike coefficients.
Figure 7. Schematic diagram of the experimental platform for atmospheric turbulence correction
based on DLWS.
Figure 8. The comparison between the wavefronts obtained by SHWS and DLWS. From left to right,
it consists of the PSF, the wavefront detected by SHWS, the wavefront detected by DLWS, and the
residual between the two wavefronts. From top to bottom, the results collected at three different
moments in time.
Real-time turbulent aberrations were generated using the DM, and wavefront sensing
and closed-loop correction were performed using both the SHWS and the DLWS. Figure 9
presents a comparison of the closed-loop results. After closed-loop correction based on the
SHWS, the average wavefront RMS was measured to be 0.0694 um. In contrast, the average
wavefront RMS after closed-loop correction based on the DLWS was 0.0719 um. These
results indicate that our method achieved a level of closed-loop performance comparable
to that of the SHWS in the system.
Figure 9. Comparison and visualization of different methods in open-loop and closed-loop configu-
rations on the indoor experimental platform. The line graph shows the wavefront RMS values for
four stages: open loop, closed loop based on SHWS, open loop, and closed loop based on DLWS.
Below, visualizations are presented for randomly selected wavefronts and far-field intensity images
corresponding to each stage.
During the design of the experimental platforms, we deliberately ensured that the
system parameters were similar for both platforms. The telescope system on the outdoor
platform has a magnification of 6 and an aperture of 360 mm. To ensure it had the same
entrance pupil and focal length as the indoor platform detection system, we used the same
detection system and added a 54 mm aperture. Consequently, we directly applied the
Sensors 2023, 23, 9159 10 of 12
Figure 10. Comparison of open-loop and closed-loop experiments for atmospheric turbulence
correction based on DLWS. The curve shows the peak statistics of the intensity images of laser B at
the target point during the open-loop and closed-loop experiments. Below are randomly selected
intensity images corresponding to each state.
In the open-loop configuration, the average peak intensity was merely 351.82, resulting
in a scattered and blurred light pattern in the corresponding image. However, in the closed-
loop configuration, the average peak intensity significantly increased to 1883.72, allowing
for a clear and well-defined pattern resembling an Airy disk in the image. These findings
strongly indicate the effective correction of atmospheric turbulence by our system, leading
to a remarkable enhancement in beam quality. It is noteworthy that the DLWS employed in
this experiment was transferred from the indoor platform without the need for additional
data acquisition or training, highlighting the remarkable generalization capability of our
proposed method.
5. Conclusions
In this article, we introduced a novel deep learning wavefront sensing model known
as ResNeXt-NAM. This model was developed through extensive comparative experiments
involving different network backbones and attention mechanisms to achieve optimal
results. The method not only excels when applied to the theoretical atmospheric turbulence
dataset established in this study, but also demonstrates performance on par with that of
SHWS when tested on experimentally collected data. By transplanting the deep learning
sensor trained in the laboratory to a kilometer-level experimental platform, we conducted
wavefront detection using beacon light intensity images to compensate for aberrations in
the transmitted light. The results obtained at the target point indicate that the closed-loop
correction method has a significant suppressive effect on atmospheric turbulence under
experimental conditions, with the average peak intensity of the spot increasing by 5.35-fold
post correction.
These findings highlight the effectiveness of the DLWS proposed in this article for cor-
recting atmospheric turbulence. We anticipate that further improvements can be achieved
by collecting additional samples on the outdoor platform and incorporating them into the
original dataset. However, acquiring real-world data under practical application scenarios
can be challenging. Therefore, the development of a dedicated indoor platform for DLWS
training may be a viable approach.
Sensors 2023, 23, 9159 11 of 12
Author Contributions: Conceptualization, J.Y., M.W. and Z.X.; methodology, J.Y. and Z.X.; software,
J.Y., M.W., Y.D. and C.X.; validation, J.Y., J.G., Y.D. and Z.X.; formal analysis, J.Y. and Z.X.; investi-
gation, J.Y. and J.G.; resources, J.G., M.W. and Y.D.; data curation, J.Y. and Z.X.; writing—original
draft preparation, J.Y. writing—review and editing, J.Y. and J.G.; visualization, J.Y.; supervision,
C.X.; project administration, Y.D.; funding acquisition, J.G. All authors have read and agreed to the
published version of the manuscript.
Funding: Innovation and Development Fund Project of China Academy of Engineering Physics (CX2020033).
Institutional Review Board Statement: Not applicable.
Informed Consent Statement: Not applicable.
Data Availability Statement: Data underlying the results presented in this paper are not publicly
available at this time but may be obtained from the authors upon reasonable request.
Conflicts of Interest: The authors declare no conflict of interest.
References
1. Wenhan, J. Overview of adaptive optics development. Opto-Electron. Eng. 2018, 45, 170489.
2. Platt, B.C.; Shack, R. History and principles of Shack-Hartmann wavefront sensing. J. Refract. Surg. 2001, 17, S573–S577. [CrossRef]
[PubMed]
3. Bates, W. A wavefront shearing interferometer. Proc. Phys. Soc. 1947, 59, 940. [CrossRef]
4. Barchers, J.D.; Fried, D.L.; Link, D.J. Evaluation of the performance of Hartmann sensors in strong scintillation. Appl. Opt. 2002,
41, 1012–1021. [CrossRef]
5. Ping, W.; Xinyang, L.; Xi, L. Influence of lack of light in partial subapertures on wavefront reconstruction for Shack-Hartmann
wavefront sensor. Chin. J. Lasers 2020, 47, 0409002. [CrossRef]
6. Liu, W.; Wang, Z.; Liu, X.; Zeng, N.; Liu, Y.; Alsaadi, F.E. A survey of deep neural network architectures and their applications.
Neurocomputing 2017, 234, 11–26. [CrossRef]
7. Esteva, A.; Robicquet, A.; Ramsundar, B.; Kuleshov, V.; DePristo, M.; Chou, K.; Cui, C.; Corrado, G.; Thrun, S.; Dean, J. A guide to
deep learning in healthcare. Nat. Med. 2019, 25, 24–29. [CrossRef]
8. Angel, J.R.P.; Wizinowich, P.; Lloyd-Hart, M.; Sandler, D. Adaptive optics for array telescopes using neural-network techniques.
Nature 1990, 348, 221–224. [CrossRef]
9. Sandler, D.; Barrett, T.; Palmer, D.; Fugate, R.; Wild, W. Use of a neural network to control an adaptive optics system for an
astronomical telescope. Nature 1991, 351, 300–302. [CrossRef]
10. Srivastava, N.; Hinton, G.; Krizhevsky, A.; Sutskever, I.; Salakhutdinov, R. Dropout: A simple way to prevent neural networks
from overfitting. J. Mach. Learn. Res. 2014, 15, 1929–1958.
11. Ioffe, S.; Szegedy, C. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In Proceedings
of the International Conference on Machine Learning Pmlr, Lille, France, 7–9 July 2015; pp. 448–456.
12. Lin, T.-Y.; Dollár, P.; Girshick, R.; He, K.; Hariharan, B.; Belongie, S. Feature pyramid networks for object detection. In Proceedings
of the IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 21–26 July 2017; pp. 2117–2125.
13. Sinha, A.; Lee, J.; Li, S.; Barbastathis, G. Lensless computational imaging through deep learning. Optica 2017, 4, 1117–1125.
[CrossRef]
14. Paine, S.W.; Fienup, J.R. Machine learning for improved image-based wavefront sensing. Opt. Lett. 2018, 43, 1235–1238. [CrossRef]
[PubMed]
15. Nishizaki, Y.; Valdivia, M.; Horisaki, R.; Kitaguchi, K.; Saito, M.; Tanida, J.; Vera, E. Deep learning wavefront sensing. Opt. Express
2019, 27, 240–251. [CrossRef]
16. Vera, E.; Guzmán, F.; Weinberger, C. Boosting the deep learning wavefront sensor for real-time applications. Appl. Opt. 2021, 60,
B119–B124. [CrossRef] [PubMed]
17. Tian, Q.; Lu, C.; Liu, B.; Zhu, L.; Pan, X.; Zhang, Q.; Yang, L.; Tian, F.; Xin, X. DNN-based aberration correction in a wavefront
sensorless adaptive optics system. Opt. Express 2019, 27, 10765–10776. [CrossRef] [PubMed]
18. He, K.; Zhang, X.; Ren, S.; Sun, J. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on
Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 26 June–1 July 2016; pp. 770–778.
19. Chollet, F. Xception: Deep learning with depthwise separable convolutions. In Proceedings of the IEEE Conference on Computer
Vision and Pattern Recognition, Honolulu, HI, USA, 21–26 July 2017; pp. 1251–1258.
20. Xie, S.; Girshick, R.; Dollár, P.; Tu, Z.; He, K. Aggregated residual transformations for deep neural networks. In Proceedings of the
IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 21–26 July 2017; pp. 1492–1500.
21. Liu, Y.; Shao, Z.; Teng, Y.; Hoffmann, N. NAM: Normalization-based attention module. arXiv 2021. arXiv:2111.12419.
22. Szegedy, C.; Vanhoucke, V.; Ioffe, S.; Shlens, J.; Wojna, Z. Rethinking the inception architecture for computer vision. In Proceedings
of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 26 June–1 July 2016; pp. 2818–2826.
Sensors 2023, 23, 9159 12 of 12
23. Szegedy, C.; Liu, W.; Jia, Y.; Sermanet, P.; Reed, S.; Anguelov, D.; Erhan, D.; Vanhoucke, V.; Rabinovich, A. Going deeper with
convolutions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Boston, MA, USA, 7–12 June
2015; pp. 1–9.
24. Woo, S.; Park, J.; Lee, J.-Y.; Kweon, I.S. Cbam: Convolutional block attention module. In Proceedings of the European Conference
on Computer Vision (ECCV), Munich, Germany, 8–14 September 2018; pp. 3–19.
25. Hu, J.; Shen, L.; Sun, G. Squeeze-and-excitation networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern
Recognition, Salt Lake City, UT, USA, 18–23 June 2018; pp. 7132–7141.
26. Li, X.; Xiao, H; Jian, Y. Spatial group-wise enhance: Improving semantic feature learning in convolutional networks. arXiv 2019,
arXiv:1905.09646.
27. Balntas, V.; Johns, E.; Tang, L.; Mikolajczyk, K. PN-Net: Conjoined triple deep network for learning local image descriptors. arXiv
2016, arXiv:1601.05030.
28. Lu, J.; Yang, J.; Batra, D.; Parikh, D. Hierarchical question-image co-attention for visual question answering. In Proceedings of the
Advances in Neural Information Processing Systems, Barcelona, Spain, 5–10 December 2016; Volume 29.
29. Li, X.; Wang, W.; Hu, X.; Yang, J. Selective kernel networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and
Pattern Recognition, Long Beach, CA, USA, 15–20 June 2019; pp. 510–519.
30. Wang, Q.; Wu, B.; Zhu, P.; Li, P.; Zuo, W.; Hu, Q. ECA-Net: Efficient channel attention for deep convolutional neural networks.
In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA, 13–19 June 2020;
pp. 11534–11542.
31. McGlamery, B.L. Restoration of turbulence-degraded images. J. Opt. Soc. Am. 1967, 57, 293–297. [CrossRef]
32. Martin, J.; Flatté, S.M. Intensity images and statistics from numerical simulation of wave propagation in 3-D random media. Appl.
Opt. 1988, 27, 2111–2126. [CrossRef]
33. Johansson, E.M.; Gavel, D.T. Simulation of stellar speckle imaging. In Amplitude and Intensity Spatial Interferometry II (SPIE1994);
SPIE: Bellingham, WA, USA, 1994; pp. 372–383.
34. Dai, G. Modal compensation of Atmospheric turbulence with the use of Zernike polynomials and Karhunen–Loève functions. J.
Opt. Soc. Am. A 1995, 12, 2182–2193. [CrossRef]
35. Shohani, J.B.; Hajimahmoodzadeh, M.; Fallah, H. Using a deep learning algorithm in image-based wavefront sensing: Determining
the optimum number of Zernike terms. Opt. Contin. 2023, 2, 632–645. [CrossRef]
36. Guo, H.; Xu, Y.; Li, Q.; Du, S.; He, D.; Wang, Q.; Huang, Y. Improved Machine Learning Approach for Wavefront Sensing. Sensors
2019, 19, 3533. [CrossRef] [PubMed]
37. Li, Y.; Yao, T.; Pan, Y.; Mei, T. Contextual transformer networks for visual recognition. IEEE Trans. Pattern Anal. Mach. Intell. 2022,
45, 1489–1500. [CrossRef] [PubMed]
38. Vanholder, H. Efficient inference with tensorrt. In Proceedings of the GPU Technology Conference, San Jose, CA, USA, 4–7 April 2016.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual
author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to
people or property resulting from any ideas, methods, instructions or products referred to in the content.