Abstract:
The quality of raw coffee beans determines the price of commercial coffee beans. Currently, the screening of raw coffee beans is mainly done manually, which is time-consuming and laborious. This paper proposes a method to identify raw coffee beans based on an improved ResNet50 model. Firstly, 8 000 images of raw coffee beans were collected to build a dataset and data enhancement was applied to it. A ResNet50-CBAM-DW model for coffee bean classification recognition was constructed based on the ResNet50 model by adding a CBAM attention mechanism, by introducing a migration learning mechanism and using deep separable convolution instead of the conventional convolution in the ResNet50 residual unit. In order to evaluate the effectiveness of the model improvement, the accuracy of the improved model was compared with ResNet50, AlexNet, VGG16, MobileNetV2 and other models, and the accuracy of the improved model reached 91.1%, which improved 3.0% compared with the original ResNet50 model and reduced the number of parameters by 39.0%.