Fast Recognition and Counting Method of Dragon Fruit Flowers and Fruits Based on Video Stream
<p>The plots with different scenarios: (<b>a</b>) plots with coexisting green and red fruits; (<b>b</b>) plots with coexisting dragon fruit flowers and green fruits; and (<b>c</b>) plots with coexisting flowers and green and red fruits.</p> "> Figure 2
<p>The proposed technical framework in this study.</p> "> Figure 3
<p>The network architecture of YOLOv5-s.</p> "> Figure 4
<p>The workflow of BYTE. (<b>a</b>) Partitioning bounding boxes into high and low scoring categories; (<b>b</b>) matching of high-scoring boxes with existing tracking trajectories; and (<b>c</b>) matching of all bounding boxes.</p> "> Figure 5
<p>The tracking process of ByteTrack with multi-class information incorporated.</p> "> Figure 6
<p>The workflow of the counting method using the ROI region.</p> "> Figure 7
<p>The curves of (<b>a</b>) loss; and (<b>b</b>) mAP during the training process.</p> "> Figure 8
<p>The recognition results obtained by the YOLOv5 model for dragon fruits in different growth stages. (<b>a</b>) Detection results of different types of dragon fruit flowers, and (<b>b</b>) detection results of red and green fruits.</p> "> Figure 9
<p>The counting accuracies achieved by the proposed counting method for videos collected at different locations and times.</p> "> Figure 10
<p>The experimental results of dragon fruit counting using the proposed method under varying lighting conditions for (<b>a</b>) night time, and (<b>b</b>) day time.</p> "> Figure 11
<p>The detection performances of models in different scenes. (<b>a</b>) YOLOv5 in Scene 1, (<b>b</b>) YOLOv5 in Scene 2, (<b>c</b>) YOLOX in Scene 1, (<b>d</b>) YOLOX in Scene 2, (<b>e</b>) YOLOv3-tiny in Scene 1, and (<b>f</b>) YOLOv3-tiny in Scene 2.</p> "> Figure 12
<p>The counting accuracies achieved by different combinations of object detectors and counting methods.</p> ">
Abstract
:1. Introduction
2. Materials and Methods
2.1. Image Acquisition for Dragon Fruit
2.2. The Proposed Technical Framework
2.3. Construction of the Dragon Fruit Dataset
2.4. Multi-Object Tracking with Multi-Class
2.4.1. Object Detection
2.4.2. Object Tracking
2.5. Counting Method Using the ROI Region
2.6. Evaluation Metrics
2.7. Experimental Environment and Parameter Setting
3. Results
3.1. YOLOv5 Object Detection Results
3.2. Results of Object Tracking and Counting
3.3. Performance Comparison of Different Object Detection Algorithms
3.4. Performance Comparison of Different Counting Methods
4. Discussion and Future Work
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Luu, T.-T.-H.; Le, T.-L.; Huynh, N.; Quintela-Alonso, P. Dragon fruit: A review of health benefits and nutrients and its sustainable development under climate changes in Vietnam. Czech J. Food Sci. 2021, 39, 71–94. [Google Scholar] [CrossRef]
- Jiang, H.; Zhang, W.; Li, X.; Shu, C.; Jiang, W.; Cao, J. Nutrition, phytochemical profile, bioactivities and applications in food industry of pitaya (Hylocereus spp.) peels: A comprehensive review. Trends Food Sci. Technol. 2021, 116, 199–217. [Google Scholar] [CrossRef]
- Vijayakumar, T.; Vinothkanna, M.R. Mellowness detection of dragon fruit using deep learning strategy. J. Innov. Image Process. (JIIP) 2020, 2, 35–43. [Google Scholar]
- Ruzainah, A.J.; Ahmad, R.; Nor, Z.; Vasudevan, R. Proximate analysis of dragon fruit (Hylecereus polyhizus). American Journal of Applied Sciences 2009, 6, 1341–1346. [Google Scholar]
- Felzenszwalb, P.; McAllester, D.; Ramanan, D. A discriminatively trained, multiscale, deformable part model. In Proceedings of the 2008 IEEE Conference on Computer Vision and Pattern Recognition, Anchorage, AK, USA, 23–28 June 2008; pp. 1–8. [Google Scholar]
- Ren, S.; He, K.; Girshick, R.; Sun, J. Faster r-cnn: Towards real-time object detection with region proposal networks. Adv. Neural Inf. Process. Syst. 2015, 28, 2969239–2969250. [Google Scholar] [CrossRef]
- Yan, J.; Zhao, Y.; Zhang, L.; Su, X.; Liu, H.; Zhang, F.; Fan, W.; He, L. Recognition of Rosa roxbunghii in natural environment based on improved faster RCNN. Trans. Chin. Soc. Agric. Eng. 2019, 35, 143–150. [Google Scholar]
- Gao, F.; Fu, L.; Zhang, X.; Majeed, Y.; Li, R.; Karkee, M.; Zhang, Q. Multi-class fruit-on-plant detection for apple in SNAP system using Faster R-CNN. Comput. Electron. Agric. 2020, 176, 105634. [Google Scholar] [CrossRef]
- Tu, S.; Pang, J.; Liu, H.; Zhuang, N.; Chen, Y.; Zheng, C.; Wan, H.; Xue, Y. Passion fruit detection and counting based on multiple scale faster R-CNN using RGB-D images. Precis. Agric. 2020, 21, 1072–1091. [Google Scholar] [CrossRef]
- Pan, Y.; Zhu, N.; Ding, L.; Li, X.; Goh, H.H.; Han, C.; Zhang, M. Identification and Counting of Sugarcane Seedlings in the Field Using Improved Faster R-CNN. Remote Sens. 2022, 14, 5846. [Google Scholar] [CrossRef]
- Le, V.N.T.; Truong, G.; Alameh, K. Detecting weeds from crops under complex field environments based on Faster RCNN. In Proceedings of the 2020 IEEE Eighth International Conference on Communications and Electronics (ICCE), Phu Quoc Island, Vietnam, 13–15 January 2021; pp. 350–355. [Google Scholar]
- Lin, T.L.; Chang, H.Y.; Chen, K.H. The pest and disease identification in the growth of sweet peppers using faster R-CNN and mask R-CNN. J. Internet Technol. 2020, 21, 605–614. [Google Scholar]
- Zhang, K.; Wu, Q.; Chen, Y. Detecting soybean leaf disease from synthetic image using multi-feature fusion faster R-CNN. Comput. Electron. Agric. 2021, 183, 106064. [Google Scholar] [CrossRef]
- Redmon, J.; Farhadi, A. Yolov3: An incremental improvement. arXiv 2018, arXiv:1804.02767. [Google Scholar]
- Redmon, J.; Divvala, S.; Girshick, R.; Farhadi, A. You only look once: Unified, real-time object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016; pp. 779–788. [Google Scholar]
- Redmon, J.; Farhadi, A. YOLO9000: Better, faster, stronger. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 21–26 July 2017; pp. 7263–7271. [Google Scholar]
- Parico, A.I.B.; Ahamed, T. An aerial weed detection system for green onion crops using the you only look once (YOLOv3) deep learning algorithm. Eng. Agric. Environ. Food 2020, 13, 42–48. [Google Scholar] [CrossRef] [PubMed]
- Liu, J.; Wang, X. Tomato diseases and pests detection based on improved Yolo V3 convolutional neural network. Front. Plant Sci. 2020, 11, 898. [Google Scholar] [CrossRef] [PubMed]
- Wang, Z.; Jin, L.; Wang, S.; Xu, H. Apple stem/calyx real-time recognition using YOLO-v5 algorithm for fruit automatic loading system. Postharvest Biol. Technol. 2022, 185, 111808. [Google Scholar] [CrossRef]
- Wu, D.; Lv, S.; Jiang, M.; Song, H. Using channel pruning-based YOLO v4 deep learning algorithm for the real-time and accurate detection of apple flowers in natural environments. Comput. Electron. Agric. 2020, 178, 105742. [Google Scholar] [CrossRef]
- Yao, J.; Qi, J.; Zhang, J.; Shao, H.; Yang, J.; Li, X. A real-time detection algorithm for Kiwifruit defects based on YOLOv5. Electronics 2021, 10, 1711. [Google Scholar] [CrossRef]
- Yan, B.; Fan, P.; Lei, X.; Liu, Z.; Yang, F. A real-time apple targets detection method for picking robot based on improved YOLOv5. Remote Sens. 2021, 13, 1619. [Google Scholar] [CrossRef]
- Wang, Z.; Yang, X. Moving target detection and tracking based on Pyramid Lucas-Kanade optical flow. In Proceedings of the 2018 IEEE 3rd International Conference on Image, Vision and Computing (ICIVC), Chongqing, China, 27–29 June 2018; pp. 66–69. [Google Scholar]
- Singla, N. Motion detection based on frame difference method. Int. J. Inf. Comput. Technol. 2014, 4, 1559–1565. [Google Scholar]
- Li, Q.; Li, R.; Ji, K.; Dai, W. Kalman filter and its application. In Proceedings of the 2015 8th International Conference on Intelligent Networks and Intelligent Systems (ICINIS), Tianjin, China, 1–3 November 2015; pp. 74–77. [Google Scholar]
- Lee, W.; Kim, H.; Ahn, J. Defect-free atomic array formation using the Hungarian matching algorithm. Phys. Rev. A 2017, 95, 053424. [Google Scholar] [CrossRef]
- Bewley, A.; Ge, Z.; Ott, L.; Ramos, F.; Upcroft, B. Simple online and realtime tracking. In Proceedings of the 2016 IEEE International Conference on Image Processing (ICIP), Phoenix, AZ, USA, 25–28 September 2016; pp. 3464–3468. [Google Scholar]
- Wojke, N.; Bewley, A.; Paulus, D. Simple online and realtime tracking with a deep association metric. In Proceedings of the 2017 IEEE International Conference on Image Processing (ICIP), Beijing, China, 17–20 September 2017; pp. 3645–3649. [Google Scholar]
- Zhang, Y.; Sun, P.; Jiang, Y.; Yu, D.; Weng, F.; Yuan, Z.; Luo, P.; Liu, W.; Wang, X. Bytetrack: Multi-object tracking by associating every detection box. In Proceedings of the Computer Vision–ECCV 2022, 17th European Conference, Tel Aviv, Israel, 23–27 October 2022; pp. 1–21. [Google Scholar]
- Ge, Z.; Liu, S.; Wang, F.; Li, Z.; Sun, J. Yolox: Exceeding yolo series in 2021. arXiv 2021, arXiv:2107.08430. [Google Scholar]
- Fu, L.; Feng, Y.; Wu, J.; Liu, Z.; Gao, F.; Majeed, Y.; Al-Mallahi, A.; Zhang, Q.; Li, R.; Cui, Y. Fast and accurate detection of kiwifruit in orchard using improved YOLOv3-tiny model. Precis. Agric. 2021, 22, 754–776. [Google Scholar] [CrossRef]
- Huang, H.; Huang, T.; Li, Z.; Lyu, S.; Hong, T. Design of citrus fruit detection system based on mobile platform and edge computer device. Sensors 2021, 22, 59. [Google Scholar] [CrossRef] [PubMed]
- Mao, D.; Sun, H.; Li, X.; Yu, X.; Wu, J.; Zhang, Q. Real-time fruit detection using deep neural networks on CPU (RTFD): An edge AI application. Comput. Electron. Agric. 2023, 204, 107517. [Google Scholar] [CrossRef]
Training Set (5000 Images) | Validation Set (500 Images) | ||
---|---|---|---|
Class | Object Number | Class | Object Number |
Flower | 13,500 | Flower | 1491 |
Green fruit | 18,000 | Green fruit | 2073 |
Red fruit | 20,000 | Red fruit | 2300 |
Total | 51,500 | Total | 5864 |
Class | TP | FN | FP | TN | P% | R% | AP% | mAP% | FPS (Frame/s) |
---|---|---|---|---|---|---|---|---|---|
Flower | 1328 | 163 | 529 | 3844 | 89.4 | 86.5 | 94.1 | 95.0 | 125 |
Green Fruit | 1828 | 245 | 439 | 3352 | 90.5 | 86.6 | 94.8 | ||
Red Fruit | 2090 | 210 | 324 | 3240 | 92.8 | 89.1 | 96.1 |
Index | Time | Length (Frames) | Detected Flower (Ground Truth) | Detected Green Fruit (Ground Truth) | Detected Red Fruit (Ground Truth) |
---|---|---|---|---|---|
1 | Night | 2400 | 64 (66) | 43 (53) | 18 (18) |
2 | Night | 3300 | 95 (95) | 51 (52) | 15 (18) |
3 | Daytime | 5400 | 13 (13) | 49 (50) | 70 (77) |
4 | Daytime | 1800 | 15 (16) | 79 (80) | 103 (110) |
Class | % | % | FPS (Frames/s) |
---|---|---|---|
Flower | 97.68 | 94.51 | 56 |
Green Fruit | 93.97 | ||
Red Fruit | 91.89 |
Models | Parameters (M) | Flops (G) | mAP (%) | Speed (ms/Image) |
---|---|---|---|---|
YOLOv5s | 7 | 15.8 | 95.0 | 8 |
YOLOXs | 8.94 | 17.05 | 93.3 | 12 |
YOLOv3-tiny | 8.7 | 12.9 | 91.4 | 15 |
Model Combination | % | FPS (Frame/s) |
---|---|---|
YOLOv5+ByteTrack | 94.51 | 56 |
YOLOX+ByteTrack | 92.66 | 43 |
YOLOv5+DeepSORT | 90.61 | 25 |
YOLOX+DeepSORT | 89.30 | 21 |
YOLOv5+SORT | 92.76 | 54 |
YOLOX+SORT | 88.23 | 40 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Li, X.; Wang, X.; Ong, P.; Yi, Z.; Ding, L.; Han, C. Fast Recognition and Counting Method of Dragon Fruit Flowers and Fruits Based on Video Stream. Sensors 2023, 23, 8444. https://doi.org/10.3390/s23208444
Li X, Wang X, Ong P, Yi Z, Ding L, Han C. Fast Recognition and Counting Method of Dragon Fruit Flowers and Fruits Based on Video Stream. Sensors. 2023; 23(20):8444. https://doi.org/10.3390/s23208444
Chicago/Turabian StyleLi, Xiuhua, Xiang Wang, Pauline Ong, Zeren Yi, Lu Ding, and Chao Han. 2023. "Fast Recognition and Counting Method of Dragon Fruit Flowers and Fruits Based on Video Stream" Sensors 23, no. 20: 8444. https://doi.org/10.3390/s23208444
APA StyleLi, X., Wang, X., Ong, P., Yi, Z., Ding, L., & Han, C. (2023). Fast Recognition and Counting Method of Dragon Fruit Flowers and Fruits Based on Video Stream. Sensors, 23(20), 8444. https://doi.org/10.3390/s23208444