Imaging through Atmospheric TurbulenceTurbSim v2: Phase to Space (P2S) TransformFast and accurate simulation of imaging through atmospheric turbulence is essential for developing turbulence mitigation algorithms. Recognizing the limitations of previous approaches, we introduce a new concept known as the phase-to-space (P2S) transform to significantly speed up the simulation. P2S is build upon three ideas: (1) reformulating the spatially varying convolution as a set of invariant convolutions with basis functions, (2) learning the basis function via the known turbulence statistics models, (3) implementing the P2S transform via a light-weight network that directly convert the phase representation to spatial representation. The new simulator offers 300x-1000x speed up compared to the mainstream split-step simulators while preserving the essential turbulence statistics. PublicationZhiyuan Mao, Nicholas Chimitt and Stanley H. Chan, ‘‘Accelerating Atmospheric Turbulence Simulation via Learned Phase-to-Space Transform’’, accepted to IEEE International Conference on Computer Vision, 2021. Code
System requirement: Python 3.6 Pytorch 1.4.0 Numpy 1.19.2 Scipy 1.6.0 Matplotlib 3.3.6 DemonstrationBelow are images generated by v2 simulator. For details, please check our paper. Suggested parameters # corr_mat() corr: (-5 to -0.01)) Strength of the spatial and temporal correlations. A smaller value means weaker correlations # tilt_mat() img_size: (128, 256, 512, 1024) Size of the input image. Right now the simulator only support square image D_r0: (1.0-5.0) D/r0 characterizes the strength of the turbulence. A larger value means stronger turbulence L: (1000-8000) Length of the imaging path (in km) adj: (1) An adjusting factor used to control the strength of turbulence. Not recommended to use. Default is 1. # Main Simulator img_size: (128, 256, 512, 1024) Size of the input image. Right now the simulator only support square image D_r0: (1.0-5.0) D/r0 characterizes the strength of the turbulence. A larger value means stronger turbulence L: (1000-8000) Length of the imaging path (in km) scaling: (0/16x16 tensor) This scaling is used to path Zernike coefficient to the simulator for testing. Additional instructions - Initialization of Zernike correlation If it is your first time running the simulator, you need to generate the correlation matrix for higher-order Zernike coefficients. This process will take about 10 minutes. The matrix is generated by calling the corr_mat() function. - Initialization of tilt correlation For each turbulence level, another correlation matrix for tilt generation needs to be generated. The required time to compute the matrix depends on the image size (~30 sec for a 256x256 image). The matrix can be generated by calling the tilt_mat() function. - Running the simulator After the required matrices are generated, the simulation can be done at a high throughput (~0.02 sec/frame). We decoupled the generation of the blur and tilt in order to provide users the freedom to try different combinations of the parameters. For appropriate usage, we recommend using the same set of parameters for tilt and blur. |