# A Novel Object Detection Method of Pointer Meter Based on Improved YOLOv4-Tiny
## 2 Pmd-Yolo  
### Framework of the Pmd-Yolo  
YOLO series are very efficient one-stage object detection models. In order to further improve the detection rate and accuracy of pointer meters, this paper proposes a new model named PMD-YOLO based on the improvement of YOLOv4-Tiny. The overall network structure of PMD-YOLO can be seen Figure 1. It can be seen from the figure that PMD-YOLO can be divided into three parts; they are Backbone, Neck, and YOLO Head. In Backbone, GhostNet was introduced to extract the feature information of the input images, which significantly reduced the model volume and the number of computational parameters. YOLO Head uses the extracted features for category and confidence prediction for the final output; Neck is located between the Backbone and YOLO Head, and it can further enhance the diversity and robustness of features by introducing the improved RFB module, CBAM, and improved FPN.  
As the main feature extraction part of the model, the network structure of Backbone is generally more complex, thus resulting in a larger model size. In order to achieve a better lightweight model, GhostNet was chosen as the Backbone of the model by comparing with other lightweight networks. In GhostNet, the Ghost Module uses 3 \(\times\) 3 depthwise separable convolution combined with 1 \(\times\) 1 convolution to replace the original 1 \(\times\) 1 convolution. In order to further reduce the number of model parameters, CBAM with small number of parameters was used to replace the original channel SE attention module. The CBAM is detailed in Section 2.3.  
It can be seen from the overall structure of PMD-YOLO that the output of the Backbone includes two scale feature maps, with the size of 19 \(\times\) 19 (feature layer P5), 38 \(\times\) 38 (feature layer P4). In Neck, firstly, an improved RFB module was used to increase the receptive field of the P5, and two CBAMs were added between feature fusion and depthwise separable convolution. Then, the idea of bidirectional feature fusion was used to further refine and fuse the output information of the backbone, so as to improve the detection performance of the PMD-YOLO model. The network features were enhanced and fused, and two feature maps with scale 19 \(\times\) 19 and 38 \(\times\) 38 were obtained, respectively. Each feature map was outputted by YOLO Head as a tensor with a channel dimension of 18, i.e., 3 \(\times\) (4 + 1 + 1), where \"3\" denotes three different scales of anchor frames, \"4\" denotes the center coordinates (x,y), width (w) and height (w) of each anchor frame, the first \"1\" represents the confidence of the prediction result, and the second \"1\" represents the object category number. Since this article focuses on the detection task of circular pointer meters, only one target category is set, which is simply marked as \"meter\". Finally, CIoU was used to calculate the loss of the prediction frame and the true frame, and the best-scoring prediction frame was filtered by using nonmaximal suppression (NMS). It should be noted that CIoU is a metric for measuring the distance between two bounding boxes, which can be applied to compute the distance between predicted bounding boxes and ground truth bounding boxes in object detection.