融合Fasternet与YOLOv5模型的鸡蛋外观检测
Detection of egg appreance based on Fasternet and YOLOv5 model
魏晶鑫 1陈中举 1许浩然1
作者信息
- 1. 长江大学计算机科学学院,湖北 荆州 434023
- 折叠
摘要
[目的]高效识别自动化生产过程中存在蛋壳瑕疵的鸡蛋.[方法]设计了一种融合Fasternet模块与YOLOv5s的鸡蛋外观检测模型FC-YOLOv5.该模型使用Kmeans++算法对数据集重新聚类,优化先验框;将C3 结构中的Bottleneck模块替换为FasternetBlock模块,减少模型参数量,同时提高模型检测精度;采用Soft-NMS算法作为非极大值抑制算法,提高重叠特征的检测效果;引入CBAM注意力机制,增加网络模型对重要特征的提取能力.[结果]与YO-LOv5原模型相比,改进后的FC-YOLOv5模型在mAP@0.5和mAP@0.5:0.95上分别提高了3.2%和5.2%,计算量和参数量分别减少了19.6%和16.9%,且与YOLOv7-tiny和YOLOv8模型相比有显著优势.[结论]试验方法在鸡蛋外观检测场景下可提高检测精度并降低参数量,达到鸡蛋自动化生产中的次品蛋识别目的.
Abstract
[Objective]Efficiently identify eggs with defects on their appearance in the automatic production process.[Methods]Designed a detection model based on fusing Fasternet module and YOLOv5s.The model used the Kmeans++algorithm to re-cluster the dataset and optimizeed the bounding box.The Bottleneck module in the C3 structure was replaced by the Fasternet Block module to reduce the parameters and improve the percision in the process of detection.The Soft-NMS,a non-maximum suppression was utilized to improve the detection of eggs with similar features.The CBAM attention mechanism was introduced to enhance the function of extracting important features.[Results]Compared with the YOLOv5 original model,the experiment results showed that the mAP@0.5 and mAP@0.5:0.95 respectively had increased by 3.2%and 5.2%,respectively.The amount of calculation and parameters was reduced by 19.6%and 16.9%,respectively.Compared with YOLOv7-tiny and YOLOv8 models,the improved model has significant advantages.[Conclusion]The experimental method can optimize the detection percision and reduces the parameters in the detection of egg'appreance,so as to achieve the purpose of identifying defected eggs in the automatic production.Efficiently identify eggs with defects on their appearance in the automatic production process.
关键词
鸡蛋外观检测/YOLOv5/Fasternet/Kmeans++/CBAMKey words
detection of egg appearance/YOLOv5/Fasternet/Kmeans++/CBAM引用本文复制引用
基金项目
湖北省教育厅科学技术研究项目(B2021052)
出版年
2024