Shipin yu jixie (Apr 2023)

Detection method of defective coffee beans based on YOLOv5

  • ZHANG Cheng-yao,
  • ZHANG Yan-cheng,
  • ZHANG Yu-qian,
  • ZHAO Yu-qing

DOI
https://doi.org/10.13652/j.spjx.1003.5788.2022.80499
Journal volume & issue
Vol. 39, no. 2
pp. 50 – 56,175

Abstract

Read online

Objective: To realize the defect detection of coffee beans. Methods: An improved YOLOv5s network was proposed to embed different attention mechanism modules and activation functions with YOLOv5s as the baseline network. Results: The mean accuracy of the CBAM module and the activation function Hardswish improved by 5.3% and 2.9%, respectively, compared with the baseline network. After 200 iterations of training, the model accuracy was 99.5%, the average accuracy was 97.6%, the recall was 0.98, the recognition rate was 64 amplitude/s, and the model size was 15 M. Conclusion: Compared with Faster RCNN, SSD, YOLOv3, YOLOv4 and YOLOv5s, the test algorithm has higher recognition accuracy, more lightweight model and better recognition effect for coffee defective beans.

Keywords