摘要
提出一种基于YOLOv7算法的改进模型。首先,在Head部分融入自注意力机制,加入CA、SimAM、CBAM三种注意力模块改进网络结构,自适应地选择输入特征,提高模型对牛只行为的检测精准率以及在复杂背景下的表现能力;其次,考虑到牛只在日常行为采集过程中与设备距离远近的不同,引入超参Focal EIOU损失函数,平衡高质量样本与低质量样本对Loss的贡献,提升多分类任务下样本的识别率。经过实验分析,改进后的模型样本检测平均准确率达到95.2%,与改进前相比提高5.4个百分点,单张图片检测平均用时0.0106 s,与SSD、Faster RCNN等其他模型相比,改进后的YOLOv7模型检测准确率与检测速度均大幅提升。
An improved model based on YOLOv7 algorithm is proposed.Firstly,a self-attention mechanism is incorporated into the Head part,and three attention modules,CA,SimAM and CBAM,are added to improve the network structure,adaptively selecting the input features to improve the model's detection accuracy rate of each behavior of the cattle as well as its performance ability in complex backgrounds;secondly,taking into account the differences in the distances between the cattle and the equipment during the daily behavior collection process,the hyper-parameter Focal EIOU loss function is introduced to balance the contribution of high-quality samples and low-quality samples to the Loss,and to improve the recognition rate of samples under the multi-classification task.After experimental analysis,the average accuracy of sample detection of the improved model reaches 95.2%,which is improved by 5.4 percentage points compared with the pre-improvement period,and the average time for single image detection is 0.0106 s.Compared with other models such as SSD and Faster RCNN,the detection accuracy and detection speed of the improved YOLOv7 model are both greatly improved.
作者
邰志艳
冯子懿
侯婷悦
刘铭
TAI Zhiyan;FENG Ziyi;HOU Tingyue;LIU Ming(School of Mathematics&Statistics,Changchun University of Technology,Changchun 130012,China)
出处
《长春工业大学学报》
CAS
2024年第1期24-31,共8页
Journal of Changchun University of Technology
基金
国家自然科学基金资助项目(61503150)
吉林省发改委基本建设资金项目(2022C043-2)。