Real-Time Detection of Strawberry Ripeness Using Augmented Reality and Deep Learning
Abstract
:1. Introduction
2. Materials and Methods
2.1. Strawberry Images
2.2. Object Detection Modelling
2.2.1. Data Augmentation
2.2.2. YOLO v7 Network Architecture
2.2.3. Transfer Learning, Fine-Tuning, and Model Training
2.2.4. Evaluation Metrics
2.3. Proposed AR Application Framework
2.3.1. AR Headset
2.3.2. DL Model Executing
2.3.3. AR Implementation
3. Results and Discussion
3.1. Training Process and Fine-Tuning
3.2. Overall Model Performance
3.3. Comparison with State-of-the-Art
3.4. AR Implementation
3.4.1. AR Simulation
3.4.2. AR Real-Time Application
4. Discussion
5. Conclusions
Supplementary Materials
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Fecka, I.; Nowicka, A.; Kucharska, A.Z.; Sokół-Łętowska, A. The effect of strawberry ripeness on the content of polyphenols, cinnamates, L-ascorbic and carboxylic acids. J. Food Compos. Anal. 2021, 95, 103669. [Google Scholar] [CrossRef]
- Park, S.; Kim, J. Design and implementation of a hydroponic strawberry monitoring and harvesting timing information supporting system based on Nano AI-cloud and IoT-edge. Electronics 2021, 10, 1400. [Google Scholar] [CrossRef]
- SkyQuest Global Fresh Strawberry Market. 2022, p. 157. Available online: https://www.skyquestt.com/report/fresh-strawberry-market (accessed on 13 June 2023).
- Gao, Z.; Shao, Y.; Xuan, G.; Wang, Y.; Liu, Y.; Han, X. Real-time hyperspectral imaging for the in-field estimation of strawberry ripeness with deep learning. Artif. Intell. Agric. 2020, 4, 31–38. [Google Scholar] [CrossRef]
- Thakur, R.; Suryawanshi, G.; Patel, H.; Sangoi, J. An innovative approach for fruit ripeness classification. In Proceedings of the 2020 4th International Conference on Intelligent Computing and Control Systems (ICICCS), Madurai, India, 13–15 May 2020; IEEE: Piscataway, NJ, USA, 2020; pp. 550–554. [Google Scholar]
- Shao, Y.; Wang, Y.; Xuan, G.; Gao, Z.; Hu, Z.; Gao, C.; Wang, K. Assessment of strawberry ripeness using hyperspectral imaging. Anal. Lett. 2020, 54, 1547–1560. [Google Scholar] [CrossRef]
- Xiong, Y.; Ge, Y.; Grimstad, L.; From, P.J. An autonomous strawberry-harvesting robot: Design, development, integration, and field evaluation. J. Field Robot. 2020, 37, 202–224. [Google Scholar] [CrossRef]
- Xu, J.; Mishra, P. Combining deep learning with chemometrics when it is really needed: A case of real-time object detection and spectral model application for spectral image processing. Anal. Chim. Acta 2022, 1202, 339668. [Google Scholar] [CrossRef]
- Miragaia, R.; Chávez, F.; Díaz, J.; Vivas, A.; Prieto, M.H.; Moñino, M.J. Plum Ripeness Analysis in Real Environments Using Deep Learning with Convolutional Neural Networks. Agronomy 2021, 11, 2353. [Google Scholar] [CrossRef]
- Xiao, B.; Nguyen, M.; Yan, W.Q. Apple ripeness identification using deep learning. In Proceedings of the Geometry and Vision: First International Symposium, ISGV 2021, Auckland, New Zealand, 28–29 January 2021; Springer: Berlin/Heidelberg, Germany, 2021; pp. 53–67. [Google Scholar]
- Ashtiani, S.-H.M.; Javanmardi, S.; Jahanbanifard, M.; Martynenko, A.; Verbeek, F.J. Detection of mulberry ripeness stages using deep learning models. IEEE Access 2021, 9, 100380–100394. [Google Scholar] [CrossRef]
- Saranya, N.; Srinivasan, K.; Kumar, S. Banana ripeness stage identification: A deep learning approach. J. Ambient. Intell. Humaniz. Comput. 2021, 13, 4033–4039. [Google Scholar] [CrossRef]
- Guo, C.; Liu, F.; Kong, W.; He, Y.; Lou, B. Hyperspectral imaging analysis for ripeness evaluation of strawberry with support vector machine. J. Food Eng. 2016, 179, 11–18. [Google Scholar]
- Bochkovskiy, A.; Wang, C.-Y.; Liao, H.-Y.M. Yolov4: Optimal speed and accuracy of object detection. arXiv 2020, arXiv:2004.10934. [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]
- Feng, W.; Zhu, Y.; Zheng, J.; Wang, H. Embedded YOLO: A real-time object detector for small intelligent trajectory cars. Math. Probl. Eng. 2021, 2021, 6555513. [Google Scholar] [CrossRef]
- Redmon, J.; Farhadi, A. Yolov3: An incremental improvement. arXiv 2018, arXiv:1804.02767. [Google Scholar]
- Wu, D.; Jiang, S.; Zhao, E.; Liu, Y.; Zhu, H.; Wang, W.; Wang, R. Detection of Camellia oleifera Fruit in Complex Scenes by Using YOLOv7 and Data Augmentation. Appl. Sci. 2022, 12, 11318. [Google Scholar] [CrossRef]
- Wang, C.-Y.; Bochkovskiy, A.; Liao, H.-Y.M. YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors. arXiv 2022, arXiv:2207.02696. [Google Scholar]
- Habaragamuwa, H.; Ogawa, Y.; Suzuki, T.; Shiigi, T.; Ono, M.; Kondo, N. Detecting greenhouse strawberries (mature and immature), using deep convolutional neural network. Engineering in Agriculture. Environ. Food 2018, 11, 127–138. [Google Scholar]
- Wang, Y.; Yan, G.; Meng, Q.; Yao, T.; Han, J.; Zhang, B. DSE-YOLO: Detail semantics enhancement YOLO for multi-stage strawberry detection. Comput. Electron. Agric. 2022, 198, 107057. [Google Scholar] [CrossRef]
- Chai, J.J.K.; O’Sullivan, C.; Gowen, A.A.; Rooney, B.; Xu, J.-L. Augmented/mixed reality technologies for food: A review. Trends Food Sci. Technol. 2022, 124, 182–194. [Google Scholar] [CrossRef]
- Goka, R.; Ueda, K.; Yamaguchi, S.; Kimura, N.; Iseya, K.; Kobayashi, K.; Tomura, T.; Mitsui, S.; Satake, T.; Igo, N. Development of Tomato Harvest Support System Using Mixed Reality Head Mounted Display. In Proceedings of the 2022 IEEE 4th Global Conference on Life Sciences and Technologies (LifeTech), Osaka, Japan, 7–9 March 2022; IEEE: Piscataway, NJ, USA, 2022; pp. 167–169. [Google Scholar]
- Vidal, N.R.; Vidal, R.A. Augmented reality systems for weed economic thresholds applications. Planta Daninha 2010, 28, 449–454. [Google Scholar] [CrossRef]
- Katsaros, A.; Keramopoulos, E. FarmAR, a farmer’s augmented reality application based on semantic web. In Proceedings of the 2017 South Eastern European Design Automation, Computer Engineering, Computer Networks and Social Media Conference (SEEDA-CECNSM), Ioannina, Greece, 23–25 September 2017; IEEE: Piscataway, NJ, USA, 2017; pp. 1–6. [Google Scholar]
- Nigam, A.; Kabra, P.; Doke, P. Augmented Reality in agriculture. In Proceedings of the 2011 IEEE 7th International Conference on Wireless and Mobile Computing, Networking and Communications (WiMob), Shanghai, China, 10–12 October 2011; IEEE: Piscataway, NJ, USA, 2011; pp. 445–448. [Google Scholar]
- Perez-Borrero, I.; Marin-Santos, D.; Gegundez-Arias, M.E.; Cortes-Ancos, E. A fast and accurate deep learning method for strawberry instance segmentation. Comput. Electron. Agric. 2020, 178, 105736. [Google Scholar] [CrossRef]
- Cha, Y.; Kim, T.; Kim, D.; Cha, B. Draft design of fruit object recognition using transfer learning in smart farm. In Proceedings of the 9th International Conference on Smart Media and Applications, Jeju, Republic of Korea, 17–19 September 2020; pp. 117–120. [Google Scholar]
- Lin, T.-Y.; Maire, M.; Belongie, S.; Hays, J.; Perona, P.; Ramanan, D.; Dollár, P.; Zitnick, C.L. Microsoft coco: Common objects in context. In Proceedings of the Computer Vision–ECCV 2014: 13th European Conference, Zurich, Switzerland, 6–12 September 2014; Springer: Berlin/Heidelberg, Germany, 2014; pp. 740–755. [Google Scholar]
- Sharma, S.; Mehra, R. Effect of layer-wise fine-tuning in magnification-dependent classification of breast cancer histopathological image. Vis. Comput. 2020, 36, 1755–1769. [Google Scholar] [CrossRef]
- Zhang, Y.; Yu, J.; Chen, Y.; Yang, W.; Zhang, W.; He, Y. Real-time strawberry detection using deep neural networks on embedded system (rtsd-net): An edge AI application. Comput. Electron. Agric. 2022, 192, 106586. [Google Scholar] [CrossRef]
- Lamb, N.; Chuah, M.C. A Strawberry Detection System Using Convolutional Neural Networks. In Proceedings of the 2018 IEEE International Conference on Big Data (Big Data), Seattle, WA, USA, 10–13 December 2018; pp. 2515–2520. [Google Scholar]
Labels | Representative Images | Number of Strawberry Fruits | ||
---|---|---|---|---|
Training | Validation | Test | ||
Unripe | 11,674 | 405 | 816 | |
Partially ripe | 2729 | 81 | 177 | |
Ripe | 1831 | 86 | 139 |
Parameter | Descriptions | YOLOv7 | YOLOv7-Tiny |
---|---|---|---|
HSV_H | HSV-Hue augmentation (fraction) | 0.015 | 0.015 |
HSV_S | HSV-Saturation augmentation (fraction) | 0.7 | 0.7 |
HSV_V | HSV-Value augmentation (fraction) | 0.4 | 0.4 |
Degrees | Image rotation (+/- deg) | 0.0 | 0.0 |
Translate | Image translation (+/- fraction) | 0.2 | 0.1 |
Scale | Image scale (+/- gain) | 0.5 | 0.5 |
Shear | Image shear (+/- deg) | 0.0 | 0.0 |
Perspective | Image perspective (+/- fraction) | 0.0 | 0.0 |
Flipud | Image flip up–down (probability) | 0.0 | 0.0 |
Fliplr | Image flip left–right (probability) | 0.5 | 0.5 |
Mosaic | Mosaic (probability) | 1.0 | 1.0 |
Mixup | Mix-up (probability) | 0.0 | 0.05 |
Copy_paste | Copy–paste (probability) | 0.0 | |
Paste_in | Copy–paste (probability) | 0.0 |
Hyper-Parameter | YOLOv7 | YOLOv7-Multi-Scale | YOLOv7-Tiny | YOLOv7-Tiny-Multi-Scale |
---|---|---|---|---|
Batch size | 32 | 16 | 32 | 32 |
Initial learning rate | 0.01 | 0.01 | 0.01 | 0.01 |
Momentum | 0.937 | 0.937 | 0.937 | 0.937 |
Weight decay | 0.0005 | 0.0005 | 0.0005 | 0.0005 |
Box loss gain | 0.02 | 0.02 | 0.02 | 0.02 |
Classification loss gain | 0.3 | 0.3 | 0.3 | 0.3 |
Objectness loss gain | 0.1 | 0.1 | 0.1 | 0.1 |
IoU training threshold | 0.2 | 0.2 | 0.2 | 0.2 |
Anchor-multiple threshold | 4.0 | 4.0 | 4.0 | 4.0 |
Metrics | YOLOv7 | YOLOv7-Multi-Scale | YOLOv7-Tiny | YOLOv7-Tiny-Multi-Scale |
---|---|---|---|---|
F1 score | 0.87 | 0.92 | 0.89 | 0.90 |
mAP | 0.88 | 0.89 | 0.84 | 0.85 |
Method | Application | Input Size | mAP | F1 Score |
---|---|---|---|---|
Mask R-CNN [28] | Strawberry instance segmentation | 768 × 1005 | 0.45 | - |
DSE-YOLO [22] | Multi-stage ripeness of strawberry detection | 608 × 608 | 0.87 | 0.82 |
YOLOv3 [32] | Strawberry detection | 104 × 104 | 0.83 | 0.81 |
YOLOv3-tiny [32] | Strawberry detection | 104 × 104 | 0.75 | 0.71 |
YOLOv4 [32] | Strawberry detection | 104 × 104 | 0.84 | 0.82 |
YOLOV4-tiny [32] | Strawberry detection | 104 × 104 | 0.83 | 0.79 |
CNN [33] | Strawberry detection | 360 × 640 | 0.88 | - |
DCNN [21] | Mature and immature strawberry detection | - | 0.83 | - |
Our best model | Multi-stage ripeness of strawberry detection | Multi-scale training | 0.89 | 0.92 |
Computers | Manufacture Year | CPU | GPU | RAM |
---|---|---|---|---|
PC1 | 2022 | AMD Ryzen 9 5950X | NVIDIA GeForce RTX 3090 | 64 GB |
PC2 | 2021 | Intel Core i7 11800H | NVIDIA GeForce RTX 3070 | 64 GB |
PC3 | 2015 | Intel Core i7 5500U | NVIDIA GeForce GTX 960M | 8 GB |
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
Chai, J.J.K.; Xu, J.-L.; O’Sullivan, C. Real-Time Detection of Strawberry Ripeness Using Augmented Reality and Deep Learning. Sensors 2023, 23, 7639. https://doi.org/10.3390/s23177639
Chai JJK, Xu J-L, O’Sullivan C. Real-Time Detection of Strawberry Ripeness Using Augmented Reality and Deep Learning. Sensors. 2023; 23(17):7639. https://doi.org/10.3390/s23177639
Chicago/Turabian StyleChai, Jackey J. K., Jun-Li Xu, and Carol O’Sullivan. 2023. "Real-Time Detection of Strawberry Ripeness Using Augmented Reality and Deep Learning" Sensors 23, no. 17: 7639. https://doi.org/10.3390/s23177639
APA StyleChai, J. J. K., Xu, J. -L., & O’Sullivan, C. (2023). Real-Time Detection of Strawberry Ripeness Using Augmented Reality and Deep Learning. Sensors, 23(17), 7639. https://doi.org/10.3390/s23177639