摘要
目的:为提升YOLOv5在复杂环境和密集目标场景下对奶牛乳头的检测速度,提出一种基于YOLOv5模型改进的目标检测方法。方法:对传统YOLOv5网络结构进行改进,通过增加SE(Squeeze and Excitation)注意力模块结构,提高算法提取特征的能力,提高对奶牛乳头识别的准确率;通过将SPP(Spatial Pyramid Pooling)结构改进为SPPF(Spatial Pyramid Pooling Fast)结构,加快检测速度,并基于PAN(Path Aggregation Network)模块提出CN-PAN(Cow Nipple Path Aggregation Network)模型,在传统的YOLOv5网络中PAN结构的基础上,轻量化对小目标检测的迭代。基于YOLOv5s创建奶牛乳头图像数据集CN-YOLOv5s model。利用奶牛乳头数据集CN-YOLOv5s model对改进前后2种算法进行测试。结果:在测试设备上改进后的算法在几乎不影响准确率的情况下,检测速度提升约13%。结论:应用改进后的YOLOv5算法可以更快速地对奶牛乳头目标进行识别,为后续对复杂环境和密集目标场景中大目标检测提供理论支撑与思路。
Objective:To improve the detection speed of YOLOv5 for cow nipples in complex environment and dense target scenario,an improved target detection method based on YOLOv5 model is proposed.Methods:The traditional YOLOv5 network structure is improved.The SE attention module structure is added to improve the algorithm's ability to extract features and the accuracy of cow nipples recognition.By improving the SPP structure to the SPPF structure,the detection speed is accelerated.A CN-PAN model was proposed based on the PAN module.Based on the PAN structure in the traditional YOLOv5 network,the iteration of small target detection was lightweight.The cow nipples image dataset CN-YOLOv5s model was created based on YOLOv5s.The experiment verifies that the two algorithms can be tested before and after the improvement by using the cow nipples image dataset CN-YOLOv5s model.Results:On the test equipment,the improved algorithm can improve the detection speed to 13%without affecting the accuracy.Conclusion:The improved YOLOv5 algorithm can be used to identify cow nipples targets more quickly,providing theoretical support and ideas for the subsequent detection of large targets in complex environments and dense target scenario.
作者
夏事成
王磊
王成军
席横流
XIA Shicheng;WANG Lei;WANG Chengjun;XI Hengliu(College of Mechanical Engineering,Anhui Science and Technology University,Fengyang 233100,China;School of Electronic Engineering,Chaohu University,Chaohu 238024,China;School of Artificial Intelligence,Anhui University of Science and Technology,Huainan 232001,China)
出处
《安徽科技学院学报》
2023年第5期64-70,共7页
Journal of Anhui Science and Technology University
基金
安徽省自然科学基金(2208085MF169)
宜昌市自然科学研究项目(A20-3-004)。