A Study on Multi-Target Dairy Cow Feeding Behavior Recognition Based on Improved YOLOv7
Keywords:
multi-target, YOLOv7, lightweight, attention mechanism, cow feeding behaviorAbstract
To make the research on multi-target dairy cow feeding behavior recognition in pastures more lightweight and improve the detection accuracy and inference speed of the model, this paper proposes a lightweight and improved algorithm YOLOv7-CDD based on the YOLOv7 object detection model. Firstly, the algorithm adds the CA attention mechanism module to the last layer of all backbone extraction networks to replace the original output layer, resulting in better detection performance and higher accuracy without the need for manual threshold adjustment. Secondly, DSConv is introduced to replace some conventional convolutions (3×3 convolutions) in the back-bone network and in the multi-branch stacking module (Multi_Concat_Block), further reducing the number of model parameters without compromising detection accuracy. Finally, the dynamic detection head Dynamic Head is added, enhancing the expression capability of the target detection head and further improving detection accuracy without increasing computational complexity. Experimental results show that the YOLOv7-CDD model achieves an accuracy of 98.4%, a recall rate of 98.3%, and an mAP@0.5 of 99.3%, representing improvements of 2.8%, 2.6%, and 3.1%, respectively, compared to the YOLOv7 model, while significantly reducing model parameters and GFLOPs, demonstrating that YOLOv7-CDD meets the application requirements in pastures.