English

Journal of Chinese Agricultural Mechanization

Journal of Chinese Agricultural Mechanization ›› 2025, Vol. 46 ›› Issue (4): 194-203.DOI: 10.13733/j.jcam.issn.2095-5553.2025.04.028

• Agricultural Products Processing • Previous Articles     Next Articles

Research on coffee beans grading based on the improved ShuffleNet V1

Zhao Yuqing1, 2, 3, 4, Jiao Yujie1, 3, 4, Li Hong3, Wang Tianyun1, 4, Li Jiashun4, 5, Zhang Yue4, 5   

  1. (1. Faculty of Mechanical and Electrical Engineering, Yunnan Agricultural University, Kunming, 650201, China; 
    2. Faculty of Transportation Engineering, Kunming University of Science and Technology, Kunming, 650093, China; 
    3. Yunnan Key Laboratory of Coffee, Kunming, 650201, China; 4. Key Laboratory for Crop Production and Smart Agriculture of Yunnan Province, Kunming, 650201, China; 5. College of Big Data, Yunnan Agricultural University, Kunming, 650201, China)
  • Online:2025-04-15 Published:2025-04-18

改进ShuffleNet V1算法的咖啡豆分级方法研究

赵玉清1,2,3,4,焦雨杰1,3,4,李宏3,王天允1,4,李嘉舜4,5,张悦4,5   

  1. (1. 云南农业大学机电工程学院,昆明市,650201; 2. 昆明理工大学交通工程学院,昆明市,650093; 
    3. 云南省咖啡重点实验室,昆明市,650201; 4. 云南省作物生产与智慧农业重点试验室,昆明市,650201; 5. 云南农业大学大数据学院,昆明市,650201)
  • 基金资助:
    云南省重大科技专项计划项目(202302AE0900200105);云南省科技厅科技计划农业联合专项(202301BD070001—105);云南省教育厅科学研究基金项目(2023Y0986);云南省咖啡重点实验室(202449CE340030)

Abstract: Aiming at the current problems of grading difficulties and low recognition accuracy of coffee beans, a ShuffleNet V1 coffee bean grading model (ECA—ShuffleNet MLP) incorporating attention mechanism is proposed. The ECA—ShuffleNet MLP model uses ShuffleNet V1 as the backbone network, deletes the maximum pooling layer in the input layer, adds the efficient channel attention (ECA) mechanism after the second ordinary convolution of the ShuffleNet Unit, and finally adds a multi‑layer perceptron module (MLP) as a classification head and Fusion Loss as a loss function. The experimental results on the self‑constructed coffee bean dataset show that the average accuracy of the ECA—ShuffleNe MLP model for grading coffee beans was 97.84%, which compared to the AlexNet, VGG16, MobileNet V1, MobileNet V2, ResNet34, and ResNet50 models, improved by 8.49, 5.41, 3.85, 2.71, 4.16, and 3.20 percentage points. Experimental results on the publicly available coffee bean dataset show that compared to the above models, the ECA—ShuffleNet MLP model graded average accuracy improved by 3.75, 1.00, 10.00, 2.75, 0.08, and 1.25 percentage points. The experimental results on the homemade coffee bean grading and sorting test platform show that the recognition accuracy and grasping success rate are 84.00% and 82.67% when the conveyor belt running speed is 50 mm/s. The ECA—ShuffleNet MLP model has a good grading accuracy and light weight, and it is easy to be deployed on hardware devices with good generalizability.

Key words: coffee beans, deep learning, grading, efficient channel attention, multi?layer perceptron

摘要: 针对目前咖啡豆存在分级困难、识别准确率低的问题,提出一种融合注意力机制的ShuffleNet V1咖啡豆分级模型(ECA—ShuffleNet MLP)。模型以ShuffleNet V1为主干网络,删去输入层的最大池化层,在ShuffleNet Unit第二个普通卷积后加入ECA注意力机制,同时添加一个多层感知器模块(MLP)作为分类头,并采用Fusion Loss作为损失函数。相比AlexNet、VGG16、 MobileNet V1、MobileNet V2、ResNet34和ResNet50模型,在自建咖啡豆数据集上的试验结果表明:ECA—ShuffleNe MLP模型的咖啡豆分级平均准确率为97.84%,分别提高8.49、5.41、3.85、2.71、4.16和3.20个百分点。在公开咖啡豆数据集上的试验结果表明:ECA—ShuffleNet MLP模型分级平均准确率分别提高3.75、1.00、10.00、2.75、0.08和1.25个百分点。在自制咖啡豆分级分拣试验平台上的试验结果表明:当输送带运行速度为50 mm/s时,识别准确率和抓取成功率为84.00%和82.67%。ECA—ShuffleNet MLP模型具有分级准确率高和模型轻量化的优点,易于部署在硬件设备上,具有较好的泛用性。

关键词: 咖啡豆, 深度学习, 分级, 注意力机制, 多层感知器

CLC Number: