# A Lightweight YOLOv5 Optimization of Coordinate Attention
## 2 Related Work
### Lightweight YOLOv5  
As we know, traditional object detection has resulted in large model size and slow detection speed; as such, the application of object detection technologies under different application environments needs better real-time and lightweight performance. Because of this, a lightweight object detection method based on the You Only Look Once (YOLO) v5 algorithm and attentional feature fusion have been proposed to address this problem, and to produce a harmonious balance between accuracy and speediness for target detection in different environments. [PERSON] et al. [21] proposed YOLOv5-tassel to detect tasks in UAV-based RGB imagery. A bidirectional feature pyramid network was adopted for the path-aggregation neck to effectively fuse cross-scale features. The robust attention module of SimAM was introduced to extract the features of interest before each detection head. It is better than well-known object detection approaches, such as FCOS, RetinaNet, and YOLOv5. [PERSON] [22] presented a lightweight model YOLO-LRDD for road damage identification by enhancing the YOLOv5s approach. Its backbone network Shuffle-ECANet worked by adding an ECA attention module into the lightweight model ShuffleNetV2. Furthermore, it employed BiFPN rather than the original feature pyramid network since it improves the network's capacity to describe features. So that YOLO-LRDD provided a good balance of detection precision and speed. Currently, the standard convolution is the main part of the convolution neural network, which is also the most computationally complex part of the whole network model. The FLOPs and parameters of the convolution can be basically considered as the following equation:  
\[FLOPs=k^{2}*H_{\text{out}}*W_{\text{out}}*C_{\text{in}}*C_{\text{out}} \tag{1}\]  
\[Parameters=k^{2}*C_{in}*C_{out} \tag{2}\]  
where FLOPs are the number of floating point operations, and can be seen as the amount of computation, k\({}^{2}\) is the size of the convolution kernel, \(C_{\text{in}}\) and \(C_{\text{out}}\) are the number of channels of input and output, \(H_{\text{out}}\) and \(W_{\text{out}}\) are the width and length of the output feature map. Many approaches have been used to modify the convolution network in terms of changing the convolution strategy. For example, [PERSON] et al. proposed MobileNet. They believe that this network pushes the state of the art for mobile-tailored computer vision models; the core is depth-wise separable convolutions and it is a key building block for many efficient neural network architectures [23,24]. Replacing normal convolution with depth-wise separable convolution can significantly reduce the computational effort. In addition, there are similar examples of the ShuffleNet. Thanks to pointwise group convolution with channel shuffle, all components in a ShuffleNet unit can be computed efficiently [25,26]; the group convolution mentioned in the paper is also a convolution strategy to reduce the FLOPs and the number of parameters. Similarly, there are examples in GhostNet. The paper mentions the supposition that the output feature maps are \"ghosts\" of a handful of intrinsic feature maps with some cheap transformation [27]. It uses the unique ghost convolution. The ghost convolution uses normal convolution to obtain only some features, and then uses a linear operation to obtain some redundant features. These methods have been shown to be effective, and the use of these convolution strategies to replace the YOLOv5 network could achieve a reduction in FLOPs and the number of parameters, but it also leads to some degradation in detection accuracy. We believe that using these lightweight modules to modify the YOLOv5 network would undermine the integrity of the network model, and in using these strategies to reduce the feature maps obtained by convolution, a portion of the feature maps that are useful for the final detection would inevitably be removed, bringing a reduction in detection accuracy.