Grape Cluster Real-Time Detection in Complex Natural Scenes Based on YOLOv5s Deep Learning Network

Due to differences in planting environment, color, shape, size, and compactness, accurate detection of grape clusters is very difficult. Herein, a real-time detection method for grape clusters based on the YOLOv5s deep learning algorithm was proposed. More specifically, a novel dataset called Grape-...

Full description

Bibliographic Details
Main Authors: Chuandong Zhang, Huali Ding, Qinfeng Shi, Yunfei Wang
Format: Article
Language:English
Published: MDPI AG 2022-08-01
Series:Agriculture
Subjects:
Online Access:https://www.mdpi.com/2077-0472/12/8/1242
_version_ 1797432556455460864
author Chuandong Zhang
Huali Ding
Qinfeng Shi
Yunfei Wang
author_facet Chuandong Zhang
Huali Ding
Qinfeng Shi
Yunfei Wang
author_sort Chuandong Zhang
collection DOAJ
description Due to differences in planting environment, color, shape, size, and compactness, accurate detection of grape clusters is very difficult. Herein, a real-time detection method for grape clusters based on the YOLOv5s deep learning algorithm was proposed. More specifically, a novel dataset called Grape-internet was constructed, which consisted of 8657 grape images and corresponding annotation files in complex scenes. By training and adjusting the parameters of the YOLOv5s model on the data set, and by reducing the depth and width of the network, the lightweight processing of the network was completed, losing only a small amount of accuracy. As a result, the fast and accurate detection of grape clusters was finally realized. The test results showed that the precision, recall, mAP and F1 of the grape cluster detection network were 99.40%, 99.40%, 99.40% and 99.40%, respectively, and the average detection speed per image was 344.83 fps, with a model size of 13.67 MB. Compared with the YOLOv5x, ScaledYOLOv4-CSP and YOLOv3 models, the precision of YOLOv5s was 1.84% higher than that of ScaledYOLOv4-CSP, and the recall rate and mAP were slightly lower than three networks by 0.1–0.3%. The speed was the fastest (4.6 times, 2.83 times and 6.7 times of YOLOv3, ScaledYOLOv4-CSP and YOLOv5x network, respectively) and the network scale was the smallest (1.61%, 6.81% and 8.28% of YOLOv3, ScaledYOLOv4-CSP YOLOv5x, respectively) for YOLOv5s. Moreover, the detection precision and recall rate of YOLOv5s was 26.14% and 30.96% higher, respectively, than those of Mask R-CNN. Further, it exhibited more lightweight and better real-time performance. In short, the detection network can not only meet the requirements of being a high precision, high speed and lightweight solution for grape cluster detection, but also it can adapt to differences between products and complex environmental interference, possessing strong robustness, generalization, and real-time adaptability.
first_indexed 2024-03-09T10:03:15Z
format Article
id doaj.art-355e52fd9f0e410f8aaff8310ee6c557
institution Directory Open Access Journal
issn 2077-0472
language English
last_indexed 2024-03-09T10:03:15Z
publishDate 2022-08-01
publisher MDPI AG
record_format Article
series Agriculture
spelling doaj.art-355e52fd9f0e410f8aaff8310ee6c5572023-12-01T23:17:00ZengMDPI AGAgriculture2077-04722022-08-01128124210.3390/agriculture12081242Grape Cluster Real-Time Detection in Complex Natural Scenes Based on YOLOv5s Deep Learning NetworkChuandong Zhang0Huali Ding1Qinfeng Shi2Yunfei Wang3School of Mathematics and Computer Application Technology, Jining University, Qufu 273100, ChinaSchool of Mathematics and Computer Application Technology, Jining University, Qufu 273100, ChinaSchool of Mathematics and Computer Application Technology, Jining University, Qufu 273100, ChinaCollege of Mechanical and Electronic Engineering, Northwest A&F University, Xianyang 712100, ChinaDue to differences in planting environment, color, shape, size, and compactness, accurate detection of grape clusters is very difficult. Herein, a real-time detection method for grape clusters based on the YOLOv5s deep learning algorithm was proposed. More specifically, a novel dataset called Grape-internet was constructed, which consisted of 8657 grape images and corresponding annotation files in complex scenes. By training and adjusting the parameters of the YOLOv5s model on the data set, and by reducing the depth and width of the network, the lightweight processing of the network was completed, losing only a small amount of accuracy. As a result, the fast and accurate detection of grape clusters was finally realized. The test results showed that the precision, recall, mAP and F1 of the grape cluster detection network were 99.40%, 99.40%, 99.40% and 99.40%, respectively, and the average detection speed per image was 344.83 fps, with a model size of 13.67 MB. Compared with the YOLOv5x, ScaledYOLOv4-CSP and YOLOv3 models, the precision of YOLOv5s was 1.84% higher than that of ScaledYOLOv4-CSP, and the recall rate and mAP were slightly lower than three networks by 0.1–0.3%. The speed was the fastest (4.6 times, 2.83 times and 6.7 times of YOLOv3, ScaledYOLOv4-CSP and YOLOv5x network, respectively) and the network scale was the smallest (1.61%, 6.81% and 8.28% of YOLOv3, ScaledYOLOv4-CSP YOLOv5x, respectively) for YOLOv5s. Moreover, the detection precision and recall rate of YOLOv5s was 26.14% and 30.96% higher, respectively, than those of Mask R-CNN. Further, it exhibited more lightweight and better real-time performance. In short, the detection network can not only meet the requirements of being a high precision, high speed and lightweight solution for grape cluster detection, but also it can adapt to differences between products and complex environmental interference, possessing strong robustness, generalization, and real-time adaptability.https://www.mdpi.com/2077-0472/12/8/1242grape cluster detectionYOLOv5sobject detectionreal-time detectionlightweight
spellingShingle Chuandong Zhang
Huali Ding
Qinfeng Shi
Yunfei Wang
Grape Cluster Real-Time Detection in Complex Natural Scenes Based on YOLOv5s Deep Learning Network
Agriculture
grape cluster detection
YOLOv5s
object detection
real-time detection
lightweight
title Grape Cluster Real-Time Detection in Complex Natural Scenes Based on YOLOv5s Deep Learning Network
title_full Grape Cluster Real-Time Detection in Complex Natural Scenes Based on YOLOv5s Deep Learning Network
title_fullStr Grape Cluster Real-Time Detection in Complex Natural Scenes Based on YOLOv5s Deep Learning Network
title_full_unstemmed Grape Cluster Real-Time Detection in Complex Natural Scenes Based on YOLOv5s Deep Learning Network
title_short Grape Cluster Real-Time Detection in Complex Natural Scenes Based on YOLOv5s Deep Learning Network
title_sort grape cluster real time detection in complex natural scenes based on yolov5s deep learning network
topic grape cluster detection
YOLOv5s
object detection
real-time detection
lightweight
url https://www.mdpi.com/2077-0472/12/8/1242
work_keys_str_mv AT chuandongzhang grapeclusterrealtimedetectionincomplexnaturalscenesbasedonyolov5sdeeplearningnetwork
AT hualiding grapeclusterrealtimedetectionincomplexnaturalscenesbasedonyolov5sdeeplearningnetwork
AT qinfengshi grapeclusterrealtimedetectionincomplexnaturalscenesbasedonyolov5sdeeplearningnetwork
AT yunfeiwang grapeclusterrealtimedetectionincomplexnaturalscenesbasedonyolov5sdeeplearningnetwork