Research Paper

Lightweight Online Sorting Method of Milled Tea Based on Improved YOLOv5s

  • LI Bing ,
  • ZHU Yong ,
  • XIA Chenglong ,
  • LI Feilong ,
  • CAI Zhenyang ,
  • WU Hao
Expand
  • 1. College of Engineering, Anhui Agricultural University, Hefei 230036, China;
    2. State Key Laboratory of Tea Plant Biology and Utilization, Hefei 230036, China

Received date: 2025-01-17

  Revised date: 2025-02-27

  Online published: 2025-10-17

Abstract

Milled tea is the raw material for the production of matcha and it is the most important factor in ensuring the quality of matcha. Rapid and effective sorting of milled tea improves its quality. Due to the low efficiency and high labor intensity of the current sorting process in milled tea production, an online sorting system for milled tea was developed in this study. This system is composed of a material conveying system, an image acquisition system, an image recognition system, a positioning system and a sorting execution control system. The image acquisition system is used to collect the milled tea image and make the milled tea image data set. According to the real-time and lightweight requirements of milled tea recognition, the EfficientNet backbone network and SimSPPF module were introduced based on the YOLOv5s model, and the YOLOv5s-EfficientNet-SimSPPF model was improved and designed. On the basis of ensuring the recognition precision, the model recognition speed was improved and the model size was reduced. The established test set was used to evaluate the recognition performance of YOLOv5s, YOLOv5s-EfficientNet, YOLOv5s-SimSPPF and YOLOv5s-EfficientNet-SimSPPF on the PC. The recognition precision, recall, mAP@0.5, inference time and model size of YOLOv5s-EfficientNet-SimSPPF were 0.993, 0.981, 0.995, 6.3 ms and 2.85 MB, respectively. This study also proposed a sorting control algorithm for online sorting based on the online recognition results of milled tea. In addition, an auxiliary algorithm was proposed to prevent low-precision secondary recognition and secondary positioning of the milled tea on the boundary of the field of view of the industrial camera during the sorting process. The YOLOv5s-EfficientNet-SimSPPF model was deployed to the edge device Jetson Nano B01, and the model was tested using the test set. The recognition precision and speed were 0.982 ms and 37.5 ms, respectively. The results show that the real-time milled tea recognition can essentially be achieved by deploying the model migration to the developed online milled tea sorting system. Finally, the milled tea separation was carried out on the designed and developed platform, and the average separation accuracy rate of mixed milled tea leaves and milled tea stems reached 97.0%. The online milled tea sorting system proposed in this paper can meet the actual needs of online milled tea sorting, and can be used as an effective tool for the fine processing of matcha and milled tea sorting operation, providing a reference for online recognition and continuous sorting of other agricultural products.

Cite this article

LI Bing , ZHU Yong , XIA Chenglong , LI Feilong , CAI Zhenyang , WU Hao . Lightweight Online Sorting Method of Milled Tea Based on Improved YOLOv5s[J]. Journal of Tea Science, 2025 , 45(5) : 879 -897 . DOI: 10.13305/j.cnki.jts.2025.05.008

References

[1] Patrício I D, Rieder R.Computer vision and artificial intelligence in precision agriculture for grain crops: a systematic review[J]. Computers and Electronics in Agriculture, 2018, 153: 69-81. doi: 10.1016/j.compag.2018.08.001.
[2] Momin A M, Yamamoto K, Miyamoto M, et al.Machine vision based soybean quality evaluation[J]. Computers and Electronics in Agriculture, 2017, 140: 452-460. doi: 10.1016/j.compag.2017.06.023.
[3] Wang F Y, Zheng J Y, Tian X C, et al.An automatic sorting system for fresh white button mushrooms based on image processing[J]. Computers and Electronics in Agriculture, 2018, 151: 416-425. doi: 10.1016/j.compag.2018.06.022.
[4] Maganda N A M, Rodríguez D A I, Mier H Y, et al. Real-time embedded vision system for online monitoring and sorting of citrus fruits[J]. Electronics, 2023, 12(18): 3891. doi: 10.3390/electronics12183891.
[5] Gan N, Wang Y J, Ren G X, et al.Design and testing of a machine-vision-based air-blow sorting platform for famous tea fresh leaves production[J]. Computers and Electronics in Agriculture, 2023, 214: 108334. doi: 10.1016/j.compag.2023.108334.
[6] 吴江春, 王虎虎, 徐幸莲. 基于机器视觉的鸡胴体断翅快速检测技术[J]. 农业工程学报, 2022, 38(22): 253-261.
Wu C J, Wang H H, Xu X L.Rapid detection technology for broken-winged broiler carcass based on machine vision[J]. Transactions of the Chinese Society of Agricultural Engineering, 2022, 38(22): 253-261.
[7] 左杰文, 彭彦昆, 李永玉, 等. 基于声学特性的西瓜糖度检测与分级系统研究[J]. 农业机械学报, 2022, 53(s1): 316-323.
Zuo J W, Peng Y K, Li Y Y, et al.Watermelon sugar content detection and grading system based on acoustic characteristics[J]. Transactions of the Chinese Society for Agricultural Machinery, 2022, 53(s1): 316-323.
[8] 吕壮, 黄金, 兰梓溶, 等. 机器学习算法在食用植物油掺伪鉴别中的研究进展[J/OL]. 中国油脂, 2024: 1-12[2025-01-17]. https://doi.org/10.19902/j.cnki.zgyz.1003-7969.240160.
Lü Z, Huang J, Lan Z R, et al. Research progress of machine learning algorithm in adulteration identification of edible vegetable oil [J/OL]. China Oils and Fats, 2024: 1-12[2025-01-17]. https://doi.org/10.19902/j.cnki.zgyz.1003-7969.240160.
[9] Huang K Y, Cheng J F.A novel auto-sorting system for Chinese cabbage seeds[J]. Sensors, 2017, 17(4): 886. doi: 10.3390/s17040886.
[10] Rezaei P, Hemmat A, Shahpari N, et al.Machine vision-based algorithms to detect sunburn pomegranate for use in a sorting machine[J]. Measurement, 2024, 232: 114682. doi: 10.1016/j.measurement.2024.114682.
[11] Blasco J, Cubero S, Gómez-sanchís J, et al. Development of a machine for the automatic sorting of pomegranate (Punica granatum) arils based on computer vision[J]. Journal of Food Engineering, 2008, 90(1): 27-34.
[12] Tala T K, Hadjar O S, Naima K.Deep learning: systematic review, models, challenges, and research directions[J]. Neural Computing & Applications, 2023: 35(31): 23103-23124.
[13] Gao X H W, Hui R, Tian Z M. Classification of CT brain images based on deep learning networks[J]. Computer Methods and Programs in Biomedicine, 2017, 138: 49-56.
[14] Lee S H, Chan C S, Mayo S J, et al.How deep learning extracts and learns leaf features for plant classification[J]. Pattern Recognition, 2017, 71: 1-13. doi: 10.1016/j.patcog.2017.05.015.
[15] Yang Z H, Xu J C, Yang L, et al.Optimized dynamic monitoring and quality management system for post-harvest matsutake of different preservation packaging in cold chain[J]. Foods, 2022, 11(17): 26-46.
[16] Xu J C, Yang Z H, Wang Z, et al.Flexible sensing enabled packaging performance optimization system (FS-PPOS) for lamb loss reduction control in E-commerce supply chain[J]. Food Control, 2023, 145: 109394. doi: 10.1016/j.foodcont.2022.109394.
[17] Zhang H Y, Zuo X Y, Sun B Y, et al.Fuzzy-PID-based atmosphere packaging gas distribution system for fresh food[J]. Applied Sciences, 2023, 13(4): 2674. doi: 10.3390/app13042674.
[18] Fu L S, Majeed Y, Zhang X, et al.Faster R-CNN-based apple detection in dense-foliage fruiting-wall trees using RGB and depth features for robotic harvesting[J]. Biosystems Engineering, 2020, 197: 245-256. doi: 10.1016/j.biosystemseng.2020.07.007.
[19] Fan S X, Li J B, Zhang Y H, et al.On line detection of defective apples using computer vision system combined with deep learning methods[J]. Journal of Food Engineering, 2020, 286: 110102. doi: 10.1016/j.jfoodeng.2020.110102.
[20] Subramanian P, Sankar S T.Detection of maturity stages of coconuts in complex background using Faster R-CNN model[J]. Biosystems Engineering, 2021, 202: 119-132. doi: 10.1016/j.biosystemseng.2020.12.002.
[21] Jahanbakhshi A, Momeny M, Mahmoudi M, et al.Waste management using an automatic sorting system for carrot fruit based on image processing technique and improved deep neural networks[J]. Energy Reports, 2021, 7: 5248-5256. doi: 10.1016/j.egyr.2021.08.028.
[22] Wan S H, Goudos S.Faster R-CNN for multi-class fruit detection using a robotic vision system[J]. Computer Networks, 2020, 168: 107036. doi: 10.1016/j.comnet.2019.107036.
[23] Lu Z H, Zhao M F, Luo J, et al.Design of a winter-jujube grading robot based on machine vision[J]. Computers and Electronics in Agriculture, 2021, 186: 106170. doi: 10.1016/j.compag.2021.106170.
[24] Lu A G, Guo R X, Ma Q C, et al.Online sorting of drilled lotus seeds using deep learning[J]. Biosystems Engineering, 2022, 221: 118-137. doi: 10.1016/j.biosystemseng.2022.06.015.
[25] Wen J, He J.Agricultural development driven by the digital economy: improved EfficientNet vegetable quality grading[J]. Frontiers in Sustainable Food Systems, 2024, 8: 1310042. doi: 10.3389/fsufs.2024.1310042.
[26] 杨肖委, 沈强, 罗金龙, 等. 基于改进YOLOv8n的茶树嫩芽识别[J]. 茶叶科学, 2024, 44(6): 949-959.
Yang X W, Shen Q, Luo J L, et al.Research on tea bud recognition based on improved YOLOv8n[J]. Journal of Tea Science, 2024, 44(6): 949-959.
[27] Wang H Q, Guo X X, Zhang S H, et al.Detection and recognition of foreign objects in Pu-erh sun-dried green tea using an improved YOLOv8 based on deep learning[J]. PloS One, 2025, 20(1): e0312112. doi: 10.1371/journal.pone.0312112.
[28] Tian Y N, Yang G D, Wang Z, et al.Apple detection during different growth stages in orchards using the improved YOLO-V3 model[J]. Computers and Electronics in Agriculture, 2019, 157: 417-426. doi: 10.1016/j.compag.2019.01.012.
[29] 闫彬, 樊攀, 王美茸, 等. 基于改进YOLOv5m的采摘机器人苹果采摘方式实时识别[J]. 农业机械学报, 2022, 53(9): 28-38, 59.
Yan B, Fan P, Wang M R, et al.Real-time apple picking pattern recognition for picking robot based on improved YOLOv5m[J]. Transactions of the Chinese Society for Agricultural Machinery, 2022, 53(9): 28-38, 59.
[30] 赵露强, 彭强吉, 兰玉彬, 等. CottonBud-YOLOv5s轻量型棉花顶芽检测算法[J]. 农业工程学报, 2025, 41(4): 175-184.
Zhao L Q, Peng Q J, Lan Y B, et al.CottonBud-YOLOv5s lightweight cotton bud detection algorithm[J]. Transactions of the Chinese Society of Agricultural Engineering, 2025, 41(4): 175-184.
[31] 白强, 高荣华, 赵春江, 等. 基于改进YOLOV5s网络的奶牛多尺度行为识别方法[J]. 农业工程学报, 2022, 38(12): 163-172.
Bai Q, Gao R H, Zhao C J, et al.Multi-scale behavior recognition method for dairy cows based on improved YOLOV5s network[J]. Transactions of the Chinese Society of Agricultural Engineering, 2022, 38(12): 163-172.
[32] 尚钰莹, 张倩如, 宋怀波. 基于YOLOv5s的深度学习在自然场景苹果花朵检测中的应用[J]. 农业工程学报, 2022, 38(9): 222-229.
Shang Y Y, Zhang Q R, Song H B.Application of deep learning using YOLOv5s to apple flower detection in natural scenes[J]. Transactions of the Chinese Society of Agricultural Engineering, 2022, 38(9): 222-229.
[33] Tan M X, Le Q V.EfficientNet: rethinking model scaling for convolutional neural networks[J]. International Conference on Machine Learning, 2019, arXiv: 1905.11946. doi: 10.48550/arXiv.1905.11946.
[34] Ren F, Fei J J, Li H S, et al.Steel surface defect detection using improved deep learning algorithm: ECA-SimSPPF-SIoU-Yolov5[J]. IEEE Access, 2024, 12: 32545-32553. doi: 10.1109/ACCESS.2024.3371584.
[35] Lu S J, Chen W K, Zhang X, et al.Canopy-attention-YOLOv4-based immature/mature apple fruit detection on dense-foliage tree architectures for early crop load estimation[J]. Computers and Electronics in Agriculture, 2024, 193: 106696. doi: 10.1016/j.compag.2022.106696.
[36] Zhang X C, Wu Z M, Cao C M, et al.Design and operation of a deep-learning-based fresh tea-leaf sorting robot[J]. Computers and Electronics in Agriculture, 2023, 206: 107664. doi: 10.1016/j.compag.2023.107664.
[37] Mazzia V, Khaliq A, Salvetti F, et al.Real-time apple detection system using embedded systems with hardware accelerators: an edge AI application[J]. IEEE Access, 2020, 8: 9102-9114. doi: 10.1109/ACCESS.2020.2964608.
[38] Wu D H, Lü S H, Mei J, et al.Using channel pruning-based YOLO v4 deep learning algorithm for the real-time and accurate detection of apple flowers in natural environments[J]. Computers and Electronics in Agriculture, 2020, 178: 105742. doi: 10.1016/j.compag.2020.105742.
Outlines

/