摘要
针对果蔬识别中识别效率低、成本高等问题,本文提出了基于残差块和注意力机制的果蔬识别模型,并成功部署于果蔬智能识别设备。果蔬自动识别装置由Raspberry Pi、STM32F103ZET6、摄像头、称量传感器、处理器、显示屏、微型打印机、扎口机以及电源等部分组成。中央控制器与显示屏进行交互实时显示各种参数,通过摄像头与称量传感器采集待测物体图像与待测物体质量,由部署于Raspberry Pi的果蔬自动识别模型对果蔬进行精准识别,同时协同单片机STM32F103ZET6将果蔬相关信息打印并控制扎口机进行封口打包。本文以YOLO v5网络为基础,通过增加残差块与注意力机制构建果蔬自动识别模型RB+CBAM-YOLO v5。以自制的数据集训练网络,将6种网络进行对比试验,并选择最优网络进行设备端检测试验。试验结果表明,RB+CBAM-YOLO v5的精确率、召回率与mAP_(0.5)分别为83.55%、96.08%、96.20%,较YOLO v5提升4.47、1.10、0.90个百分点。将RB+CBAM-YOLO v5模型部署于嵌入式设备Raspberry Pi中,设备可实现精准识别、自动称量、打印凭条以及快速打包等功能,可满足果蔬识别以及无人售卖装置的需求。
To solve the problems of low efficiency and high cost in fruits and vegetables recognition,a fruit and vegetable recognition model based on residual block and attention mechanism was proposed,and successfully deployed in fruit and vegetable intelligent recognition equipment.The fruit and vegetable automatic recognition device was composed of Raspberry Pi,STM32F103ZET6,camera,weighing sensor,processor,display screen,micro printer,binding machine and power supply.The central controller interacted with the display screen to display various parameters in real time.The image and quality of the object to be measured were collected through the camera and weighing sensor.The fruit and vegetable automatic recognition model deployed in the Raspberry Pi could accurately identify the fruits and vegetables.At the same time,it cooperated with MCU STM32F103ZET6 to print fruit and vegetable related information and control the tying machine to seal and pack.Based on YOLO v5 network,an automatic recognition model RB+CBAM-YOLO v5 was constructed by adding residual blocks and attention mechanism.The network was trained with the self-made data set,and six kinds of networks were compared,and the optimal network was selected for the device side detection test.The experimental results showed that the accuracy rate,recall rate and mAP_(0.5) of RB+CBAM-YOLO v5 were 83.55%,96.08%and 96.20%,respectively,which were 4.47 percentage points,1.10 percentage points and 0.90 percentage points higher than those of YOLO v5.The RB+CBAM-YOLO v5 model was deployed in the embedded device Raspberry Pi,and the device could realize accurate identification,automatic weighing,printing slip and fast packaging functions,which could meet the needs of fruits and vegetables identification and unsold devices.
作者
余琼
张瑞
李德豪
员玉良
王至秋
YU Qiong;ZHANG Rui;LI Dehao;YUN Yuliang;WANG Zhiqiu(College of Mechanical and Electrical Engineering,Qingdao Agricultural University,Qingdao 266109,China;College of Intelligent Systems Science and Engineering,Harbin Engineering University,Harbin 150001,China;Shandong Collaborative Innovation Center of Major Crop Mechanized Production Equipment,Qingdao Agricultural University,Qingdao 266109,China)
出处
《农业机械学报》
EI
CAS
CSCD
北大核心
2023年第S02期214-222,共9页
Transactions of the Chinese Society for Agricultural Machinery
基金
国家自然科学基金项目(52275258)
关键词
果蔬识别
残差块
注意力机制
YOLO
v5
fruits and vegetables recognition
residual block
attention mechanism
YOLO v5