作者
Zezhong Ding,Yanfang Li,Bin Hu,Zhiwei Chen,Houzhen Jia,Yali Shi,Xingmin Zhang,Xuesong Zhu,Wen-Jie Feng,Chunwang Dong
摘要
During the harvesting and preparation of tea, it is common for tea to become mixed with some impurities. Eliminating these impurities is essential to improve the quality of famous green tea. At present, this sorting procedure heavily depends on manual efforts, which include high labor intensity, low sorting efficiency, and high sorting costs. In addition, the hardware performance is poor in actual production, and the model is not suitable for deployment. To solve this technical problem in the industry, this article proposes a lightweight algorithm for detecting and sorting impurities in premium green tea in order to improve sorting efficiency and reduce labor intensity. A custom dataset containing four categories of impurities was created. This dataset was employed to evaluate various YOLOv8 models, ultimately leading to the selection of YOLOv8n as the base model. Initially, four loss functions were compared in the experiment, and Focaler_mpdiou was chosen as the final loss function. Subsequently, this loss function was applied to other YOLOv8 models, leading to the selection of YOLOv8m-Focaler_mpdiou as the teacher model. The model was then pruned to achieve a lightweight model at the expense of detection accuracy. Finally, knowledge distillation was applied to enhance its detection performance. Compared to the base model, it showed advancements in P, R, mAP, and FPS by margins of 0.0051, 0.0120, and 0.0094 and an increase of 72.2 FPS, respectively. Simultaneously, it achieved a reduction in computational complexity with GFLOPs decreasing by 2.3 and parameters shrinking by 860350 B. Afterwards, we further demonstrated the model’s generalization ability in black tea samples. This research contributes to the technological foundation for sophisticated impurity classification in tea.