Abstract:
In order to solve the problems of low detection accuracy and long detection time of trichosanthes detection technology, a method of grading trichosanthes, YOLOv5-GCB, based on improved YOLOv5 algorithm, is proposed. Firstly, the Ghost convolution module is introduced in the backbone network to replace the traditional convolution, which reduces the number of parameters of the model while guaranteeing the accuracy. Then, the CA attention is added between the feature extraction network and the inference layer module is added between the feature extraction network and the inference layer to enhance the model’s attention to spatial and channel information and improve the detection accuracy. Finally, a Bi-directional Feature Pyramid Network(BiFPN) is introduced into the neck network to replace the original structure, and the fusion of different scale features improves the expression ability of multi-scale targets. The results show that compared with the original YOLOv5 model, the improved YOLOv5-GCB algorithm increases the detection accuracy of trichosanthes grades by 4% to 95.3%, and the detection speed reaches 31.5 fps. The algorithm proposed in this study guarantees the accuracy of trichosanthes grades detection with higher recognition speed, which provides theoretical research and technical support for trichosanthes grades grading in real scenarios.