Research on Defective Apple Detection Based on Attention Module and ResNet-50 Network
摘要
In defective apple detection, stem and calyx are easily confused with defects, and the detection accuracy of defective apples is lower. In order to solve these problems, this paper proposes a defective apple detection algorithm based on attention module and ResNet-50 network. CAM attention module and LeakyReLU activation function are used to optimize ResNet-50 network, which is named as C-ResNet-50 network. During network training, we use the cosine attenuation learning rate method, which effectively reduces the oscillation of training loss and accelerates the speed of network convergence. After the training and validation of the C-ResNet-50 network, the detection accuracy of defective apples reaches 97.35%, which is 2.33% higher than that of unimproved ResNet-50 network, 3.16% higher than VGGNet network and 4.14% higher than AlexNet network. This proves that the C-ResNet-50 network can improve the accuracy of defective apple detection.