Green pepper fruits counting based on improved DeepSort and optimized Yolov5s
Authors:
Open Access
- 16 July 2024
- journal article
- research article
- Published by Frontiers Media SA in Frontiers in Plant Science
- Vol. 15, 1417682
Abstract
Introduction: Green pepper yield estimation is crucial for establishing harvest and storage strategies.Method: This paper proposes an automatic counting method for green pepper fruits based on object detection and multi-object tracking algorithm. Green pepper fruits have colors similar to leaves and are often occluded by each other, posing challenges for detection. Based on the YOLOv5s, the CS_YOLOv5s model is specifically designed for green pepper fruit detection. In the CS_YOLOv5s model, a Slim-Nick combined with GSConv structure is utilized in the Neck to reduce model parameters while enhancing detection speed. Additionally, the CBAM attention mechanism is integrated into the Neck to enhance the feature perception of green peppers at various locations and enhance the feature extraction capabilities of the model.Result: According to the test results, the CS_YOLOv5s model of mAP, Precision and Recall, and Detection time of a single image are 98.96%, 95%, 97.3%, and 6.3 ms respectively. Compared to the YOLOv5s model, the Detection time of a single image is reduced by 34.4%, while Recall and mAP values are improved. Additionally, for green pepper fruit tracking, this paper combines appearance matching algorithms and track optimization algorithms from SportsTrack to optimize the DeepSort algorithm. Considering three different scenarios of tracking, the MOTA and MOTP are stable, but the ID switch is reduced by 29.41%. Based on the CS_YOLOv5s model, the counting performance before and after DeepSort optimization is compared. For green pepper counting in videos, the optimized DeepSort algorithm achieves ACP (Average Counting Precision), MAE (Mean Absolute Error), and RMSE (Root Mean Squared Error) values of 95.33%, 3.33, and 3.74, respectively. Compared to the original algorithm, ACP increases by 7.2%, while MAE and RMSE decrease by 6.67 and 6.94, respectively. Additionally, Based on the optimized DeepSort, the fruit counting results using YOLOv5s model and CS_YOLOv5s model were compared, and the results show that using the better object detector CS_YOLOv5s has better counting accuracy and robustness.Keywords
Funding Information
- National Key Research and Development Program of China (2022YFD20020032022年YFD2002003)
This publication has 34 references indexed in Scilit:
- Slim-neck by GSConv: a lightweight-design for real-time detector architecturesJournal of Real-Time Image Processing, 2024
- Twice matched fruit counting system: An automatic fruit counting pipeline in modern apple orchard using mutual and secondary matchesBiosystems Engineering, 2023
- Image super-resolution via channel attention and spatial attentionApplied Intelligence, 2021
- Fruits yield estimation using Faster R-CNN with MIoUMultimedia Tools and Applications, 2021
- Passion fruit detection and counting based on multiple scale faster R-CNN using RGB-D imagesPrecision Agriculture, 2020
- An yield estimation in citrus orchards via fruit detection and counting using image processingComputers and Electronics in Agriculture, 2017
- Automatic fruit recognition and counting from multiple imagesBiosystems Engineering, 2014
- Estimation of mango crop yield using image analysis – Segmentation methodComputers and Electronics in Agriculture, 2013
- Multilevel systematic sampling to estimate total fruit number for yield forecastsPrecision Agriculture, 2011
- Spatial variation in yield and quality in a small apple orchardPrecision Agriculture, 2009