# Tree Internal Defected Imaging Using Model-Driven Deep Learning Network
## 2 Method
### Model-Driven Inversion Algorithm Based on Deep Learning Networks  
CSI methods, including model-driven algorithms, are highly dependent on accurate mathematical models. However, due to the highly ill-posed nature of the electromagnetic wave inverse scattering problem, if the detection environment changes greatly, it is very likely that the detection results of the CSI will be inaccurate [25]. A new parameter setting and modeling for the changed environment is required. This feature increases the time cost and computational complexity of the CSI and reduces the scope of application. The field standing wood inspection environment is complex and variable, and many parameters fixed in the simulation experiment are changed in the actual measurement process. For example, the relative dielectric constants of wood with different moisture contents are different, and the relative dielectric constants of different types of defects are also different. Therefore, the traditional CSI algorithm cannot adapt to the requirements of modern defect detection with fast, accurate, and strong generalization ability. To overcome the drawbacks of model-driven algorithms represented by comparison sources, some data-driven algorithms are introduced [26]. Data-driven algorithms are represented by neural networks, among which deep convolutional neural networks have the strongest ability to extract and classify data features and have also been a popular research topic in recent years [27; 28]. Neural networks can better fit nonlinear problems by learning from a large amount of data, overcoming discomfort, improving the detection speed and generalization ability of the detection system, and enabling fast and accurate defect detection, which cannot be achieved via traditional model-driven algorithms. However,the selection of the neural network structure and the parameter optimization process is dependent on the researcher's experience [29; 30]. Herein, the CSI is introduced to combine the advantages of model-driven and data-driven algorithms to form the model-driven deep learning network. The structure of the deep convolutional neural network used for constructing new algorithms is shown in Figure 3.  
The sensory field size in the network is \(5\times 5\), and the feature data are pooled in the pooling layer to perform a 2 \(\times\) 2 pooling operation, and finally, a 100 \(\times\) 100 regression value is obtained for imaging through the fully connected layer. The cost function is a quadratic cost function with following form:  
\[C(\omega,b)\equiv\frac{1}{2n}\sum_{x}\|y(x)-a\|. \tag{29}\]  
To improve the defect detection speed of the algorithm and the network learning rate, cross-entropy cost function is used and expressed as [31]:  
\[C=-\frac{1}{n}\sum_{x}[y\ln a+(1-y)\ln(1-a)]. \tag{30}\]  
Bringing \(a=\sigma(z)\) into Equation (30), we achieve:  
\[\frac{\partial C}{\partial\omega_{j}}=-\frac{1}{n}\sum_{x}\biggl{(}\frac{y}{ \sigma(z)}-\frac{1-y}{1-\sigma(z)}\biggr{)}\frac{\partial\sigma}{\partial \omega_{j}}=-\frac{1}{n}\sum_{x}\biggl{(}\frac{y}{\sigma(z)}-\frac{1-y}{1- \sigma(z)}\biggr{)}\sigma^{\prime}(z)x_{j} \tag{31}\]  
Taking \(\sigma^{\prime}(z)=\sigma(z)(1-\sigma(z))\) into Equation (31) gives:  
\[\frac{\partial C}{\partial\omega_{j}}=\frac{1}{n}\sum_{x}x_{j}(\sigma(z)-y). \tag{32}\]  
Similarly, the bias derivative is obtained as:  
\[\frac{\partial C}{\partial b}=\frac{1}{n}\sum_{x}(\sigma(z)-y). \tag{33}\]  
The cross-entropy cost function eliminates \(\sigma^{\prime}(z)\) from the bias derivatives of weights and biases using intermediate quantities so that it can avoid the slow learning process associated with too small \(\sigma^{\prime}(z)\) values [32]. In this paper, to speed up the training process of deep convolutional neural networks as well as to optimize the hyperparameter selection, the CSI combines with the deep  
Figure 3: Convolutional neural network structure used in the constructing algorithm. convolutional neural network to obtain a new cost function.