## 2 Method for Automatic Optimization of the DOPC System
\[E_{1}{}^{\prime}\big{(}k_{x},k_{y}\big{)}=\int\exp[-i(\varphi_{0}+\varphi_{2 ernike })]H^{\prime}\big{(}k_{x}{}^{\prime},k_{y}^{\prime},k_{x},k_{y}\big{)}dk_{x}{ }^{\prime}dk_{y}{}^{\prime}, \tag{3}\]  
\[E_{f1}{}^{\prime}\big{(}k_{x},k_{y}\big{)}=E_{1}{}^{\prime}\big{(}k_{x},k_{y} \big{)}\otimes H_{L}\big{(}k_{x},k_{y}\big{)}, \tag{4}\]  
\[E_{f1}\big{(}k_{x},k_{y}\big{)}=E_{1}{}^{*}\big{(}k_{x},k_{y}\big{)}\otimes H_{ L}\big{(}k_{x},k_{y}\big{)}, \tag{5}\]  
where \(H_{L}\big{(}k_{x},k_{y}\big{)}\) is the Fourier change of the lens factor, \(\otimes\) represents convolution; \(H^{\prime}\big{(}k_{x}{}^{\prime},k_{y}^{\prime},k_{x},k_{y}\big{)}\) is a transfer function from the input mode \(\big{(}k_{x}{}^{\prime},k_{y}{}^{\prime}\big{)}\) to the transmission mode \(\big{(}k_{x},k_{y}\big{)}\). \(E_{f1}\big{(}k_{x},k_{y}\big{)}\) is the initial ideally focused field without a scattering medium that is used as target-focused field. When the phase conjugation is ideal (i.e., \(E_{1}{}^{\prime}\big{(}k_{x},k_{y}\big{)}=E_{1}{}^{*}\big{(}k_{x},k_{y}\big{)}\)), then from Equation (4), it is concluded that \(E_{f1}{}^{\prime}\big{(}k_{x},k_{y}\big{)}=E_{f1}\big{(}k_{x},k_{y}\big{)}\). However, it is not exactly equal in practical experiments. In order to maximize the correlation coefficient between \(E_{f1}{}^{\prime}\big{(}k_{x},k_{y}\big{)}\) and \(E_{f1}\big{(}k_{x},k_{y}\big{)}\), it is necessary to seek an efficient and accurate algorithm for the optimal Zernike coefficients. In this paper, we propose an automatic optimized method for a DOPC system based on a multipopulation genetic algorithm(MPGA). Among algorithms, with the enhancement of computing capability, deep learning has gained more accuracy in image segmentation than traditional segmentation and is widely used in medical image processing [41]. A comparison of fuzzy logic (FL), traditional neural networks (NNs), and genetic algorithms (GAs) in image segmentation has been discussed [42]. As for our experiment, it is difficult to obtain the training set needed for NN training. Additionally, there is no guarantee of a global optimal solution. Therefore, we used MPGA to obtain a faster global optimal solution. Moreover, compared with the traditional single-point search method, MPGA is not limited by the precision of the sampling interval. Additionally, it does not demand balanced sampling accuracy and iteration time, which means it can do a fast search for more accurate optimization parameters. The flow chart of the automatic optimized method for a DOPC system is outlined in Figure 1a. Taking focusing through scattering media as an example, the optimization process is illustrated as follows. Above all, after the initial pixel alignment in the DOPC system, the initial phase (\(\varphi_{0}\)) of the scattering media is obtained and loaded into a spatial-light modulator (SLM). After DOPC system, an initial OPC focus is obtained. We start with the focus and the initial phase is used as the current initial state of MPGA. The optimal Zernike coefficients are obtained by MPGA iteration. The optimal Zernike phase generated by the optimal Zernike coefficients is added to the initial phase and then loaded into the SLM. After DOPC system, an optimal focus is eventually obtained. The flow chart of MPGA is shown in Figure 1b. The initial populations are divided into 8 subpopulations, the number of individuals in each population is 15, and each individual is one vector of Zernike coefficients. After that, the parallel traditional genetic algorithms (GAs) are implemented on each population. Each GA coded by a real number has a 10% mutation rate and a 90% crossover rate. According to the fitness function, information between individuals is constantly exchanged through selection, crossover, and mutation operations to continuously select individuals. Individuals with low fitness values for the environment are eliminated, and the surviving individuals will automatically group into new groups.