# An Accelerating Method of YOLOv7 Based on Lightweight Network Architecture
## 3 Method of Acceleration  
In deep neural network models, several factors affect the accuracy, including the network's downsampling rate, depth, and receptive field (RF). A lightweight model, such as one that uses ShuffleNet v2 as the backbone, reduces the depth of the network, which can decrease detection accuracy. While increasing the depth of the network and reducing the downsampling rate can improve accuracy, these modifications also increase computational complexity, which hinders the acceleration of the object detection model.  
To address this, our method focuses on improving the receptive field of the network without significantly increasing complexity. The receptive field is a crucial factor in object detection because it defines the area of the image that influences each prediction. By enlarging the receptive field, the network can better capture the content of the entire image and understand the context surrounding the object. This improvement allows the model to make more informed predictions, especially in challenging environments with cluttered or occluded objects. In essence, the larger receptive field increases the number of connections between the feature extraction points and the input pixels, improving the model's ability to detect objects even in complex scenarios. The receptive field of a convolutional neural network is primarily influenced by the convolutional layers and the downsampling layers, as described in Equations (5) and (6) for calculating the receptive field of convolutional networks.  
\[RF_{l}=RF_{l-1}+(k-1)\times S_{l-1} \tag{5}\]  
\[S_{l}=\prod_{i=1}^{l}Stride_{i} \tag{6}\]  
In the formula, the receptive field of the feature map at the \(l\)-th layer is denoted as \(RF_{l}\), \(K_{l}\) is the kernel size of the convolutional kernel, and \(S_{l}\) is the product of the convolution steps of all network layers preceding the feature map at the \(l\)-th layer.  
The backbone network of YOLOv7 has a receptive field of \(725\times 725\) on the last layer feature map, while the ShuffleNet v2 network has a receptive field of \(527\times 527\) on the last layer feature map.  
To increase the receptive field of the lightweight network model, a depthwise separable convolution (DWConv) is added before each stage in the main network of shuffleNet v2.  
Figure 3: Lightweight structural units of ShuffleNet v2.  
This addition does not change the size of the output feature map but increases the receptive field. The receptive field of the modified backbone network on the last layer feature map is \(3647\times 647\).  
In real-world applications, object detection often happens in noisy, cluttered, or occluded environments, which can reduce accuracy. To improve YOLOV7's performance in these conditions, we added depthwise separable convolutions to enhance the model's receptive field. The receptive field refers to the area of the image that influences a particular prediction. By increasing the receptive field, the model can capture more surrounding context, helping it detect objects even when they are partially blocked or when there is background noise.  
This improvement allows the model to better understand the scene, especially when objects are hard to distinguish because they are occluded or surrounded by clutter. With a larger receptive field, the model can also filter out noise, improving its accuracy even in challenging conditions.