# Research on Urban Traffic Incident Detection Based on Vehicle Cameras
## 3 Data and Methods
### Neural Networks
#### 3.2.1 Atrous Convolutional Pyramid Pooling  
Atrous convolution is evolved from ordinary convolution, and the essence is to add blank blocks to the convolution part, also known as dilated convolution. The use of this network not only expands the feature receptive field but also preserves the invariance of the image content [41]. The atrous convolutional network adds an important hyperparameter, that is, the hole rate. This parameter indicates the number of intervals between the corresponding pixel gray values on the feature map when the convolution kernel performs the convolution operation. When different hole rates are taken, The receptive field changes to capture multi-scale information [42]. Initially, atrous convolution was presented as a solution to the problem of picture segmentation. The pooling process is utilized in the FCN network to increase the receptive field of the feature and continually compress the image's feature information. Finally, the upsampling operation is used to restore the image content. However, this will lead to a large loss of feature information. If the information loss is reduced only by removing the pooling layer, the receptive field's size will be lowered as well, so the atrous convolutional network emerges as the time requires. This provides a larger receptive field with the same amount of calculation [43].  
As shown in the Figure 5, it is a schematic diagram of the comparison between standard convolution and atrous convolution. The left picture is a \(3\times 3\) standard convolution, and the right picture has a hole rate of 2 and 3 atrous convolutions. The following is the definition of the conventional two-dimensional convolution operation:  
\[y[m,n]=\sum_{i=1}^{M}\sum_{j=1}^{N}x[M+i,N+j]\cdot\omega[i,j] \tag{1}\]  
Figure 4: The structure diagram of the improved YOLOv5s model with ASPP (Atrous Convolutional pyramidal pooling) added to the backbone network, CBAM (fused attention mechanism) introduced at the neck end, and a detection scale added at the prediction end.  
where \(y[m,n]\) is the convolution layer's output, \(\omega\) is the filter, \(M\) and \(N\) are the dimensions of the image. The two-dimensional atrous convolution operation is defined as follows:  
\[y[m,n]=\sum_{i=1}^{M}\sum_{j=1}^{N}x[M+r\cdot i,N+r\cdot j]\cdot\omega[i,j] \tag{2}\]  
In the formula, \(r\) represents the void ratio.  
Atrous spatial pyramid pooling is an important feature extraction method in the field of image segmentation. This method sets four different hole rates and uses atrous convolution to extract features from different receptive fields [44]. It is ASPP, as illustrated in the Figure 6. This is a schematic diagram of the concept, where r is the atrous convolution's hole rate, which is 6, 12, 18, and 24, sequentially, and the feature maps created by the four branches are eventually fused. This method can obtain different features of each area of the image according to the scale view. As a result, the atrous spatial pyramid pooling approach is used in this work, and the atrous space pyramid is incorporated into the feature extraction stage to obtain richer feature information in the original picture, thereby avoiding the impact of unequal object distribution on image processing.