首页|基于改进YOLOv7算法的牛只行为识别

基于改进YOLOv7算法的牛只行为识别

扫码查看
提出一种基于YOLOv7 算法的改进模型.首先,在 Head部分融入自注意力机制,加入CA、SimAM、CBAM三种注意力模块改进网络结构,自适应地选择输入特征,提高模型对牛只行为的检测精准率以及在复杂背景下的表现能力;其次,考虑到牛只在日常行为采集过程中与设备距离远近的不同,引入超参Focal EIOU损失函数,平衡高质量样本与低质量样本对Loss的贡献,提升多分类任务下样本的识别率.经过实验分析,改进后的模型样本检测平均准确率达到 95.2%,与改进前相比提高 5.4 个百分点,单张图片检测平均用时 0.010 6 s,与SSD、Faster RCNN 等其他模型相比,改进后的 YOLOv7 模型检测准确率与检测速度均大幅提升.
Cattle behavior recognition based on improved YOLOv7 algorithm
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.010 6 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.

cattle behaviortarget detectionYOLOv7attention mechanismloss function

邰志艳、冯子懿、侯婷悦、刘铭

展开 >

长春工业大学 数学与统计学院,吉林 长春 130012

牛只行为 目标检测 YOLOv7 注意力机制 损失函数

国家自然科学基金吉林省发改委基本建设资金项目

615031502022C043-2

2024

长春工业大学学报
长春工业大学

长春工业大学学报

影响因子:0.282
ISSN:1674-1374
年,卷(期):2024.45(1)
  • 19