# Research on Defect Detection Method for Composite Materials Based on Deep Learning Networks
## 3 ECA Ghost CNN Method
### Ghost Module  
The structure of the Ghost module is shown in Figure 2. Its main idea is to leverage the redundancy in feature maps during the convolution process. The Ghost module initially performs a small number of convolutions to obtain a certain quantity of feature maps. Then, instead of convolution operations, it applies linear operations to each feature map under each channel, generating a set of ghost feature maps in relation to the intrinsic feature map. Subsequently, the ghost feature maps are concatenated with the intrinsic feature map to obtain the final feature map.  
In the figure, S represents the quotient of the final output feature map channel quantity and the number of intrinsic maps. M is the final output feature map channel quantity, and N is the number of intrinsic maps.  
The depth-wise convolution of the intrinsic map divides the convolution process into two steps. Unlike regular convolution, depth-wise convolution determines the number of  
Figure 1: Visualization of the decision process of the ECAGhostCNN model.  
Figure 2: Ghost module structure diagram.  
convolutional operation kernels in the first step based on the number of input feature map channels. Each convolutional kernel is responsible for operating on a specific channel's feature map, mapping the data from that channel's feature map to the resulting output after the convolution operation. Therefore, the output channel quantity of the first step in depth-wise convolution is the same as the input data channel quantity.  
Next, a regular convolution operation is performed using a \(1\times 1\) kernel to obtain a new feature map. The use of a \(1\times 1\) kernel significantly reduces computational complexity during the operation. Depth-wise convolution, compared to regular convolution, reduces the computational operations of the convolutional kernel on each channel, thereby decreasing the number of parameters required for computation.  
The compression ratio can be used to measure the number of parameters saved by the Ghost module compared to a standard convolution module. It is defined as the ratio of the number of parameters operated by the original convolution to the number of parameters operated by the current module. The specific formula is as follows:  
\[r_{c}=\frac{n\times c\times k\times k}{\frac{n}{s}\times c\times k\times k+(s-1 )\times\frac{n}{s}\times d\times d} \tag{1}\]  
where \"\(c\)\" represents the number of input channels in the Ghost module, and \"\(n\)\" represents the number of output channels in the module. \"\(k\)\" represents the size of the convolutional kernel in the first convolution operation of the Ghost module, i.e., \(k\times k\). \"\(d\)\" represents the size of the convolutional kernel used in the depth-wise convolution process, i.e., \(d\times d\). \"\(s\)\" represents the quotient of the number of output channels (\"\(n\)\") and the number of channels (\"\(m\)\") after the first convolution step, which can be calculated as \(s=n/m\). Through approximate calculations, it can be determined that using the Ghost module can achieve a compression ratio of approximately \(s\) in terms of parameter reduction. In the model design, this paper sets the value of \(k\) as 5 and the value of \(d\) as 3. The value of \"\(s\)\" in the Ghost module operation is determined by the number of output channels obtained from the first convolution of the module. In this case, \(s\) is set to 8, which means that after the first convolution in the Ghost module, each channel generates 7 ghost maps and 1 original map through depth-wise convolution. Experimental results show that the addition of the Ghost module significantly reduces the parameters of the feature extraction layers in the model. Except for the compression ratio of the first Ghost module, the compression ratios of the other modules are close to the initially set value of \(s\). This improvement in parameter reduction enhances the computational speed of the model while maintaining its performance.