# Copper Strip Surface Defect Detection Model Based on Deep Convolutional Neural Network
## 3 Surface Defect Detection Model
### Surface Defect Recognition Model of EfficientNet  
At present, scholars have conducted many theoretical investigations regarding deep CNN. The resolution of the input image and the depth and width of the network are assumed to be the dominant factors that affect the model performance. Some studies have expanded the network structure based on the three aforementioned factors, such as common ResNet, DenseNet, and MobileNet [27; 28; 29]. These models only expanded the network on a single factor, which can improve the accuracy to a certain extent. However, blindly adding one dimension will complicate the model structure, and excessively large parameter values are prone to cause over-fitting [30; 31], which is not beneficial to the establishment of the surface defect recognition model. Thus, this paper uses a new CNN model (EfficientNet) to investigate surface defect recognition. This model uses a composite zoom factor to expand the three dimensions of the width and depth of network and image  
Figure 5: General structure of the surface defect CNN model. resolution [32; 33], which can reduce the complexity of the model under the premise of the same accuracy. The expression of the zoom factor is Equation (7). \[\left\{ \begin{array}{rl}\text{depth}:&d=\alpha^{\phi}\\ \text{width}:&w=\beta^{\phi}\\ \text{resolution}:&r=\gamma^{\phi}\\ \text{s.t.}&\alpha\cdot\beta^{2}\cdot\gamma^{2}\approx 2\\ &\alpha\geq 1,\beta\geq 1,\gamma\geq 1\end{array} \right. \tag{7}\]  
where \(d\), \(w\), and \(r\) are the zoom factors of width, depth, and resolution, respectively; \(\phi\) is the source control factor, which regulates the resources available for model zoom (computing power); and \(\alpha\), \(\beta\), and \(\gamma\) are the resource allocation coefficients that can be determined by grid search, and these resources are allocated to width, depth, and resolution, respectively. The model accuracy can be optimised by continuously adjusting the zoom factor of \(d\), \(w\), and \(r\) without increasing the number of model parameters. The EfficientNet model is essentially an optimization problem [33]. The accuracy of the model is improved by continuously optimizing the combination of depth \(d\), width \(w\), and resolution \(r\). The optimization process is expressed as Equation (8). \[ \begin{array}{rl}\max\limits_{d,w,r}&Accuracy(N(d,w,r))\\ \text{s.t.}&N(d,w,r)=\underset{i=1\cdots s}{\odot}\hat{F}_{i}^{d-\hat{L}_{i}} (X_{\langle r\cdot\hat{H}_{i},r\cdot\hat{W}_{i},w\cdot\hat{C}_{i}\rangle})\\ &\text{Memory}(N)\leq\text{target\_memory}\\ &\text{FLOPS}(N)\leq\text{target\_flops}\end{array}  \tag{8}\]  
where \(N\) is the network model; \(i\) is the component of the network model; \(s\) is the total number of components; \(\hat{F}\), \(\hat{L}_{i}\), \(\hat{H}_{i}\), \(\hat{W}_{i}\), and \(\hat{C}_{i}\) are predefined parameters in network; \(\hat{F}\) is the predefined network layer structure, \(\hat{L}_{i}\) is the predefined number of layers, \(\hat{H}_{i}\) and \(\hat{W}_{i}\) are the predefined resolution, and \(\hat{C}_{i}\) is predefined number of channels; X is the adjustment factor; Memory(\(N\)) is the number of parameters of the network; FLOPS(\(N\)) is the amount of floating point calculation on the network; \(\odot\) is the model building operation; target_memory is the threshold value of the parameter quantity; target_flops is the threshold value of the floating-point calculation quantity; and max Accuracy is the maximum accuracy of the model (objective function value). This paper uses EfficientNet to establish an intelligent recognition model for the copper strip surface defects to reduce the model parameters, increase the calculation speed and combine the resolution of surface defect images. The model structure comprises one image data input layer, two Conv convolutional layers, sixteen MBConv mobile inverted bottleneck convolution module layers, one pooling layer and three fully connected layers. The overall structure of the model is shown in Figure 6. The main structure of the model is the MBConv module.