English

中国农机化学报

中国农机化学报 ›› 2024, Vol. 45 ›› Issue (9): 77-82.DOI: 10.13733/j.jcam.issn.2095-5553.2024.09.012

• 农产品加工工程 • 上一篇    下一篇

基于改进 Mask R-CNN的青菜杂质检测研究

赵爽 1,俞永强 1,苗玉彬 2,刘可心 1   

  1. (1.上海电机学院机械学院,上海市,201100;2.上海交通大学机械与动力工程学院,上海市,201100)
  • 出版日期:2024-09-15 发布日期:2024-09-01
  • 基金资助:
    国家自然科学基金项目(51975361);上海市科技兴农项目(沪农科创字(2019)第 2—2号)

Research of impurity detection of green vegetable based on improved Mask R-CNN

Zhao Shuang1,Yu Yongqiang1,Miao Yubin2,Liu Kexin1   

  1. (1. School of Machinery,Shanghai Dianji University,Shanghai,201100,China; 2. School of Mechanical and Power Engineering,Shanghai Jiaotong University,Shanghai,201100,China) 
  • Online:2024-09-15 Published:2024-09-01

摘要:

绿叶蔬菜的智能包装加工是实现绿叶蔬菜智能化生产、降低生产成本的重要部分,对绿叶蔬菜在包装加工时的杂质检测是其重要前提。以青菜为研究对象,提出一种基于 Mask R-CNN的青菜杂质检测模型。首先采集标注掺杂枯树叶、枯菜叶和碎纸片 3种常见杂质的青菜图像 1 370多张,并通过数据增强的方法扩充建立含有 2 740张青菜杂质图像的数据集。为减少背景对杂质检测的影响,通过在 Mask R-CNN模型中加入协调注意力机制,同时添加全连接层和 Dropout层,增强模型特征提取能力,减少过拟合现象,并使用迁移学习方法对模型进行微调。结果表明改进后的 Mask R-CNN算法对青菜杂质识别的平均精度均值为 99. 19%,检测速度为 8. 45 FPS,检测效果良好,可以满足青菜杂质的检测需求。

关键词: 青菜, 杂质检测, Mask R-CNN, 迁移学习, 协调注意力

Abstract:

The intelligent packaging and processing of green leafy vegetables is an important part of realizing intelligent production of green leafy vegetables and reducing production costs. The detection of impurities in the packaging of green leafy vegetables is an important prerequisite. Taking vegetables as the research object,this paper proposes a vegetable impurity detection model based on Mask R-CNN. Firstly,more than 1 370 cabbage images were collected and labeled with 3 kinds of common impurities, including withered leaves, withered leaves and shredded paper. The data set containing 2 740 cabbage impurity images was expanded by the method of data enhancement. In order to reduce the influence of background on impurity detection,this paper add a coordinated attention mechanism,a fully connected layer and Dropout layer to the Mask R-CNN model,reduce over fitting and fine tune the model using transfer learning methods. The results show that the average accuracy of the improved Mask R-CNN algorithm for the identification of vegetable impurities is 99. 19%,the detection speed is 8. 45 FPS,and the detection effect is good,which can meet the detection requirements of vegetable impurities.

Key words: green vegetables, impurity detection, Mask R-CNN, transfer learning, coordinate attention

中图分类号: