# Autonomous Multiple Tramp Materials Detection in Raw Coal Using Single-Shot Feature Fusion Detector
## 3 Proposed Method
### Extract Feature Module  
Expanding the receptive field of the detector is an effective means to improve the performance of the detector. Previous researchers extracted multi-scale information by using multi-scale convolution kernels. With the continuous increase of the convolution kernels, the detection effect was improved while the computational cost increased rapidly. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Stage** & **Layer** & **Output Size** & **Specification** \\ \hline \multirow{3}{*}{Stage(4)} & dense block(4) & \(19\times 19\times 1024\) & \(\left(\begin{array}{c}1\times 1\text{ conv}\\ 3\times 3\text{ conv}\end{array}\right)\times 8\) \\ \cline{2-4}  & simplify transition & & \\ & layer(2) & & \\ \hline \hline \end{tabular}
\end{table} 
Table 1: _Cont._  
Figure 2: Schematic diagram of stem block. Dilation convolution is a variant of traditional image convolution. By adding dilation to traditional image convolution, the receptive field expansion of traditional image convolution is completed. Dilation convolutions with different numbers of dilation are often used for the fusion of multi-scale feature map information and receptive fields. The calculation is as follows:  
\[rf_{k}=rf_{k-1}+\left((n_{k}-1)\times\prod_{i=1}^{k-1}s_{i}\right) \tag{1}\]  
\(rf_{k}\) represents the size of the \(k\) layer receptive field; \(rf_{k-1}\) represents the size of the \(k\) - 1 layer receptive field; \(n_{k}\) represents the size of the convolution kernel of the \(k\) layer; and \(s_{i}\) is represents the size of the \(k\) layer before the step size of the \(i\) layer convolution. The dilation convolution expands the receptive field without reducing the size of the feature map. The kernel size \(dl_{k}\) of the \(k\) layer of dilation convolution is as follows:  
\[dl_{k}=l_{k}+(l_{k}-1)\times(d-1) \tag{2}\]  
where \(l_{k}\) represents the kernel size of the \(k\) layer of the original ordinary convolution, and \(d\) represents the number of spaces inserted. Combining the above two formulas, the receptive field of the \(k\) layer \(dl_{k}\) size dilation convolution kernel for the \(l_{k}\) size ordinary convolution kernel expansion is \(rf_{\_}{exp}d_{k}\) as follows:  
\[rf_{\_}{exp}d_{k}=\left((l_{k}-1)\times(d-1)\times\prod_{i=1}^{k-1}s_{i}\right. \tag{3}\]  
The concrete description of the receptive field relationship is shown in Figure 3. Take a \(5\times 5\) ordinary convolution kernel to perform a convolution operation on a \(5\times 5\) image matrix as an example. After the original image is convolved, a \(1\times 1\) feature map is obtained, that is, the feature map only saves the receptive field of pixels as the entire original image. The dilation convolution kernel is \(3\times 3\) and d = 2, as shown in Figure 3b. Perform a convolution operation on a \(5\times 5\) image matrix with the dilation convolution to obtain a \(1\times 1\) feature map. It can be seen that the feature map obtained by this dilation convolution operation is consistent with the receptive field of a convolution operation using a \(5\times 5\) ordinary convolution. The dilation convolution uses a smaller parameter to achieve a larger receptive field. Due to the preset fixed size of the convolution kernel, a standard convolution can only extract the information of some receptive fields in the image. In order to obtain richer image information, we designed a multi-branch dilation convolution structure (MDCS), as shown in Figure 4. First, use \(1\times 1\) convolution to achieve channel interaction, then reduce  
Figure 3: Dilation convolution operation. (a) The process of \(5\times 5\) general convolution Convolve. (b) The process of \(3\times 3\) dilated convolution (d = 2). the number of channels in each branch to a quarter of the previous input level. In order to reduce the parameter size, we add a 3 \(\times\) 3 convolution operation on the middle three branches respectively. Next, the dilation convolution of d = 1, 2, 3 and 5 was used on each branch to enrich the receptive field.