Abstract:Wheat grain detection has important applications in the calculation of thousand grain weight and crop breeding, and the effective detection of heavily adhesive grains is the key issue should be solved. A lightweight network called YOLO v5-MDC was designed for the detection of heavily adhesive wheat grains to provide technical support for the development of mobile terminals. The YOLO v5s detection network was chosen and the mixed depthwise convolutional (MDC) module was carried out to improve it. At the same time, the MDC module combined with a squeeze and excitation(SE) module was applied to achieve the purpose of reducing model parameters without losing the accuracy of the model. The YOLO v5-MDC network replaced the convolution, batch normal, Hardswish (CBH) modules of the backbone of the YOLO v5s feature extraction network with the MDC module, reducing the model parameters. After 500 iterations of training, the accuracy of the model reached 93.15%, the recall rate reached 99.96%, and the average accuracy rate (mAP) reached 99.46%. According to the detection effect of the model on the test set, the impact of training times, different light sources and different shooting distances on the model’s detection effect was explored. The statistical results showed that the model detection accuracy rate was the highest under the green light source, and the image detection accuracy rate was the highest under the shooting height of 5cm. The research results were also compared with YOLO v5s, RetinaNet and YOLO v4 network models in 50 iterations. The results showed that the mAP of YOLO v5-MDC model was 99.40%, which was 0.06 percentage points lower than that of the original YOLO v5s model, but the model occupied the smallest storage space, with a result of only 13.4MB, which was 0.6 MB less than the YOLO v5s model. The average detection time for single image was 0.03s, and the maximum detection time was 0.08s. In summary, the designed model can effectively realize the detection of heavily adhesive wheat grains. At the same time, the model had high detection efficiency and small storage space, which can provide necessary technical support for the development of embedded equipment for wheat grain detection.