机构地区:[1]云南农业大学机电工程学院,昆明650201 [2]云南农业大学大数据学院,昆明650201
出 处:《黑龙江畜牧兽医》2024年第19期46-54,118,119,共11页Heilongjiang Animal Science And veterinary Medicine
基 金:云南省农业基础研究联合专项面上项目(2022FG001(-031))。
摘 要:为了能够在猪只重叠、遮挡等复杂场景中实现版纳微型猪只行为的准确、高效识别,试验通过改进YOLO v4模型的方法来识别猪只行为,通过视频捕获的方式截取不同角度猪只行为图片,构建行为特征数据集;采用嵌入CBAM注意力机制的Res Net50残差网络结构作为改进YOLO v4模型的主干网络,并引入由深度可分离卷积、批标准化(BN)、Hard Swish激活函数组成的CH模块,代替主干网络中的传统卷积,提升模型检测精度的同时降低参数量;在PANet多尺度特征融合结构中引入双重3层1×1和3×3交替卷积运算替代上、下原采样方式,构成DPANet网络结构,增强对猪只行为图片中细节特征的提取,提高计算效率;基于参数共享理念与二阶段训练的迁移学习方法,优化训练过程以显著缩短训练时间,加速模型的收敛速度。结果表明:改进YOLO v4模型对猪只行为数据集的训练时间仅为6 h,而原模型训练时间则需要19 h;改进YOLO v4模型识别平均精度为93.97%,召回率为96.27%、参数量为0.26×10^(8),与Faster-RCNN、SSD、YOLO v4模型相比,平均精度与召回率分别提升8.88,15.36,8.68个百分点及16.09,41.34,30.40个百分点,参数量最大减少1.11×10^(8)。改进YOLO v4模型对识别爬栏探究、站立行走、进食、躺卧4种行为的准确率达到了98%、88%、92%、97%,与其他3种模型相比,站立行走、进食两种行为的识别效果远大于其他模型。说明改进YOLO v4模型在复杂场景下具有良好的准确性和有效性,能够精准识别猪只的不同行为。In order to achieve accurate and efficient recognition of Banna micro pig behaviors in complex scenarios such as pig overlap and occlusion,the identification of pig behavior by an improved YOLOv4 model was studied.The behavioral pictures of pigs from different angles were captured by video capture,and the behavioral feature data set was constructed.The YOLOv4 backbone network utilized the Res Net50residual network structure embedded with CBAM(Convolutional Block Attention Module)attention mechanism was used as the YOLO v4backbone network,and the CH module composed of DSConv(Depthwise Separable Convolution),batch normalization(BN),Hard Swish activation function was introduced to replace traditional convolutions in the backbone network,which improved the model detection accuracy with the reduction of the number of parameters.A ouble 3-layer 1×1 and 3×3 alternating convolution operation were introduced into PANet multi-scale feature fusion structure to replace the original up-sampling and down-sampling methods to form a DPANet network structure,which enhanced the extraction of detailed features from pig behavior images and improved computational efficiency.Lastly,the training process of a transfer learning approach based on parameter sharing and two-stage training was optimized to significantly shorten the training time and accelerate the convergence rate of the model.The results showed that the improved YOLOv4 model required only 6 hours for training on a selfbuilt pig behavior dataset,while the training time of the original model was 19 hours.The improved model achieved an average precision of 93.97%and a recall rate of 96.27%,with a parameter count of 26 M.Compared with Faster-RCNN,SSD,and YOLOv4 models,the average precision was increased by 8.88%,15.36%,and 8.68%,as well as a recall rate was increased by 16.09%,41.34%,and 30.40%,and the maximum number of parameters was reduced by 1.11×10^(8).The average accuracy of the improved YOLO v4 model for the four behaviors such as climbing and exploring,standing and w
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...