Real-Time Detection Technology of Corn Kernel Breakage and Mildew Based on Improved YOLOv5s
Open Access
- 7 May 2024
- journal article
- research article
- Published by MDPI AG in Agriculture
- Vol. 14 (5) , 725
Abstract
In order to solve low recognition of corn kernel breakage degree and corn kernel mildew degree during corn kernel harvesting, this paper proposes a real-time detection method for corn kernel breakage and mildew based on improved YOlOv5s, which is referred to as the CST-YOLOv5s model algorithm in this paper. The method continuously obtains images through the discrete uniform sampling device of corn kernels and generates whole corn kernels, breakage corn kernels, and mildew corn kernel dataset samples. We aimed at the problems of high similarity of some corn kernel features in the acquired images and the low precision of corn kernel breakage and mildew recognition. Firstly, the CBAM attention mechanism is added to the backbone network of YOLOv5s to finely allocate and process the feature information, highlighting the features of corn breakage and mildew. Secondly, the pyramid pooling structure SPPCPSC, which integrates cross-stage local networks, is adopted to replace the SPPF in YOLOv5s. SPP and CPSC technologies are used to extract and fuse features of different scales, improving the precision of object detection. Finally, the original prediction head is converted into a transformer prediction head to explore the prediction potential with a multi-head attention mechanism. The experimental results show that the CST-YOLOv5s model has a significant improvement in the detection of corn kernel breakage and mildew. Compared with the original YOLOv5s model, the average precision (AP) of corn kernel breakage and mildew recognition increased by 5.2% and 7.1%, respectively, and the mean average precision (mAP) of all kinds of corn kernel recognition is 96.1%, and the frame rate is 36.7 FPS. Compared with YOLOv4-tiny, YOLOv6n, YOLOv7, YOLOv8s, and YOLOv9-E detection model algorithms, the CST-YOLOv5s model has better overall performance in terms of detection accuracy and speed. This study can provide a reference for real-time detection of breakage and mildew kernels during the harvesting process of corn kernels.Keywords
Funding Information
- the National Key R&D Program of China (2021YFD2000502, ZR2022ME064, SDAIT-02-12)
- the Natural Science Foundation of Shandong province (2021YFD2000502, ZR2022ME064, SDAIT-02-12)
- the Modern Agricultural Industrial System of Shandong Province (2021YFD2000502, ZR2022ME064, SDAIT-02-12)
This publication has 6 references indexed in Scilit:
- Strawberry ripeness detection based on YOLOv8 algorithm fused with LW-Swin TransformerComputers and Electronics in Agriculture, 2023
- Improved Apple Fruit Target Recognition Method Based on YOLOv7 ModelAgriculture, 2023
- YOLOv7: Trainable Bag-of-Freebies Sets New State-of-the-Art for Real-Time Object Detectors2023
- Multi-channel feature fusion networks with hard coordinate attention mechanism for maize disease identification under complex backgroundsComputers and Electronics in Agriculture, 2022
- Design and Experiment of a Broken Corn Kernel Detection Device Based on the Yolov4-Tiny AlgorithmAgriculture, 2021
- Design of On-line Detection Device for Grain Breakage of Corn Harvester Based on OpenCV2019