CR-YOLOv9: Improved YOLOv9 Multi-Stage Strawberry Fruit Maturity Detection Application Integrated with CRNET
Abstract
:1. Introduction
2. Materials and Methods
2.1. Data Acquisition
Classification of Different Strawberry Maturity Levels
2.2. Composite Refinement Network
2.2.1. Overview of CRNet
2.2.2. Frequence Separation and Fusion
2.2.3. Convolutional Enhancement
2.3. YOLOv9 Model
2.3.1. Improving the YOLOv9 Model
2.3.2. Efficient Vision Transformer with Cascaded Group Attention
2.3.3. Self-Attention and Convolution Mechanisms
2.3.4. Self-Attention Mechanism
2.4. Shape IoU
3. Results and Discussion
3.1. Experimental Dataset and Experimental Environment
3.2. Model Evaluation Indicators
3.3. Model Performance Experiments
3.4. Ablation Experiment
3.5. Comparison of Mainstream Algorithms
4. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Giampieri, F.; Tulipani, S.; Alvarez-Suarez, J.M.; Quiles, J.L.; Mezzetti, B.; Battino, M. The strawberry: Composition, nutritional quality, and impact on human health. Nutrition 2012, 28, 9–19. [Google Scholar] [CrossRef]
- Sun, J.; Chen, Y.; Zhou, X.; Shen, J.; Wu, X. Fast and accurate recognition of the strawberries in greenhouse based on improved YOLOv4-Tiny model. Trans. Chin. Soc. Agric. Eng. 2022, 38, 195–203. [Google Scholar]
- Renfan, C.; Zhi, X.; Cheng, L. YOLO-ODM based rapid detection of strawberry ripeness in greenhouse. J. Huazhong Agric. Univ. 2023, 42, 262–269. [Google Scholar] [CrossRef]
- 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]
- Zhou, X.; Lee, W.S.; Ampatzidis, Y.; Chen, Y.; Peres, N.; Fraisse, C. Strawberry maturity classification from UAV and near-ground imaging using deep learning. Smart Agric. Technol. 2021, 1, 100001. [Google Scholar] [CrossRef]
- Zhou, L.; Zhang, C.; Liu, F.; Qiu, Z.; He, Y. Application of deep learning in food: A review. Compr. Rev. Food Sci. Food Saf. 2019, 18, 1793–1811. [Google Scholar] [CrossRef]
- Zhang, Y.; Deng, L.; Zhu, H.; Wang, W.; Ren, Z.; Zhou, Q.; Lu, S.; Sun, S.; Zhu, Z.; Gorriz, J.M.; et al. Deep learning in food category recognition. Inf. Fusion 2023, 98, 101859. [Google Scholar] [CrossRef]
- Mohanty, S.P.; Singhal, G.; Scuccimarra, E.A.; Kebaili, D.; Héritier, H.; Boulanger, V.; Salathé, M. The food recognition benchmark: Using deep learning to recognize food in images. Front. Nutr. 2022, 9, 875143. [Google Scholar] [CrossRef]
- Wang, J.; Xia, L.; Liu, H.; Zhao, C.; Ming, S.; Wu, J. Colorimetric microneedle sensor using deep learning algorithm for meat freshness monitoring. Chem. Eng. J. 2024, 481, 148474. [Google Scholar] [CrossRef]
- Lin, Y.; Ma, J.; Sun, D.W.; Cheng, J.H.; Zhou, C. Fast real-time monitoring of meat freshness based on fluorescent sensing array and deep learning: From development to deployment. Food Chem. 2024, 448, 139078. [Google Scholar] [CrossRef]
- Chen, S.; Xiong, J.; Jiao, J.; Xie, Z.; Huo, Z.; Hu, W. Citrus fruits maturity detection in natural environments based on convolutional neural networks and visual saliency map. Precis. Agric. 2022, 23, 1515–1531. [Google Scholar] [CrossRef]
- 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]
- Faisal, M.; Albogamy, F.; Elgibreen, H.; Algabri, M.; Alqershi, F.A. Deep learning and computer vision for estimating date fruits type, maturity level, and weight. IEEE Access 2020, 8, 206770–206782. [Google Scholar] [CrossRef]
- Saranya, N.; Srinivasan, K.; Kumar, S.K.P. Banana ripeness stage identification: A deep learning approach. J. Ambient Intell. Humaniz. Comput. 2022, 13, 4033–4039. [Google Scholar] [CrossRef]
- Mesa, A.R.; Chiang, J.Y. Multi-input deep learning model with RGB and hyperspectral imaging for banana grading. Agriculture 2021, 11, 687. [Google Scholar] [CrossRef]
- Hossain, M.S.; Al-Hammadi, M.; Muhammad, G. Automatic fruit classification using deep learning for industrial applications. IEEE Trans. Ind. Inform. 2018, 15, 1027–1034. [Google Scholar] [CrossRef]
- Zhang, H.; Cloutier, R.S. Review on one-stage object detection based on deep learning. EAI Endorsed Trans. E-Learn. 2021, 7, e5. [Google Scholar] [CrossRef]
- Wang, L.; Bai, J.; Li, W.; Jiang, J. Research Progress of YOLO Series Target Detection Algorithms. Comput. Eng. Appl. 2023, 59, 15–29. [Google Scholar]
- Liu, Z.; Xiao, D. Recognition method of mature strawberry based on improved ssd deep convolution neural network. In Bio-inspired Computing: Theories and Applications: 14th International Conference, BIC-TA 2019; Zhengzhou, China, 22–25 November 2019, Revised Selected Papers, Part II 14; Springer: Singapore, 2020; pp. 271–281. [Google Scholar]
- Du, L.; Zhang, R.; Wang, X. Overview of two-stage object detection algorithms. J. Phys. Conf. Ser. 2020, 1544, 012033. [Google Scholar] [CrossRef]
- Hsieh, K.W.; Huang, B.Y.; Hsiao, K.Z.; Tuan, Y.H.; Shih, F.P.; Hsieh, L.C.; Chen, S.; Yang, I.C. Fruit maturity and location identification of beef tomato using R-CNN and binocular imaging technology. J. Food Meas. Charact. 2021, 15, 5170–5180. [Google Scholar] [CrossRef]
- Girshick, R. Fast r-cnn. In Proceedings of the IEEE International Conference on Computer Vision, Santiago, Chile, 7–13 December 2015; pp. 1440–1448. [Google Scholar]
- Parvathi, S.; Selvi, S.T. Detection of maturity stages of coconuts in complex background using Faster R-CNN model. Biosyst. Eng. 2021, 202, 119–132. [Google Scholar] [CrossRef]
- 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]
- An, Q.; Wang, K.; Li, Z.; Song, C.; Tang, X.; Song, J. Real-time monitoring method of strawberry fruit growth state based on YOLO improved model. IEEE Access 2022, 10, 124363–124372. [Google Scholar] [CrossRef]
- Cuong, N.H.H.; Trinh, T.H.; Meesad, P.; Nguyen, T.T. Improved YOLO object detection algorithm to detect ripe pineapple phase. J. Intell. Fuzzy Syst. 2022, 43, 1365–1381. [Google Scholar] [CrossRef]
- Chen, W.; Liu, M.; Zhao, C.; Li, X.; Wang, Y. MTD-YOLO: Multi-task deep convolutional neural network for cherry tomato fruit bunch maturity detection. Comput. Electron. Agric. 2024, 216, 108533. [Google Scholar] [CrossRef]
- Li, P.; Zheng, J.; Li, P.; Long, H.; Li, M.; Gao, L. Tomato maturity detection and counting model based on MHSA-YOLOv8. Sensors 2023, 23, 6701. [Google Scholar] [CrossRef]
- You, S.; Zhang, C.Q.; Wang, C.; Ning, S. Research on cherry maturity detection based on improved DS-YOLOV8. arXiv 2024. [Google Scholar] [CrossRef]
- Yang, S.; Wang, W.; Gao, S.; Deng, Z. Strawberry ripeness detection based on YOLOv8 algorithm fused with LW-Swin. Transform. Comput. Electron. Agric. 2023, 215, 108360. [Google Scholar] [CrossRef]
- Abdelrahman, A.; Mahmoud, A.; Radu, T.; Michael, S.B. Ntire 2020 challenge on real image denoising: Dataset, methods and results. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops, Seattle, WA, USA, 14–19 June 2020; pp. 496–497. [Google Scholar]
- Tim, B.; Ben, M.; Tianfan, X.; Jiawen, C.; Dillon, S.; Barron, J.T. Unprocessing images for learned raw denoising. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Long Beach, CA, USA, 16–17 June 2019; pp. 11036–11045. [Google Scholar]
- Mao, X.; Liu, Y.; Liu, F.; Li, Q.; Shen, W. Intriguing findings of frequency selection for image deblurring. In Proceedings of the AAAI Conference on Artificial Intelligence, Washington, DC, USA, 7–14 February 2023; pp. 1905–1913. [Google Scholar]
- Nah, S.; Kim, T.H.; Lee, K.M. Deep multi-scale convolutional neural network for dynamic scene deblurring. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 21–26 July 2017; pp. 3883–3891. [Google Scholar]
- Zhang, Z.; Xu, R.; Liu, M.; Yan, Z.; Zuo, W. Self-supervised image restoration with blurry and noisy pairs. Adv. Neural Inf. Process. Syst. 2022, 35, 29179–29191. [Google Scholar]
- Liu, Z.; Wang, Y.; Zeng, B.; Liu, S. Ghost-free high dynamic range imaging with context-aware transformer. In Proceedings of the European Conference on Computer Vision, Tel Aviv, Israel, 23–27 October 2022; Springer: Berlin/Heidelberg, Germany, 2022; pp. 344–360. [Google Scholar]
- Niu, Y.; Wu, J.; Liu, W.; Guo, W.; Lau, R.W. Hdr-gan: Hdr image reconstruction from multi-exposed ldr images with large motions. IEEE Trans. Image Process. 2021, 30, 3885–3896. [Google Scholar] [CrossRef]
- Zhang, C.; Chen, J.; Zong, R.; Yang, S.; Fan, G. Transformer based scene character detection over low quality images. J. Beijing Univ. Posts Telecommun. 2022, 45, 124–130. [Google Scholar]
- Parmar, N.; Vaswani, A.; Uszkoreit, J.; Kaiser, L.; Shazeer, N.; Ku, A.; Tran, D. Image transformer. In Proceedings of the International Conference on Machine Learning, Stockholm, Sweden, 10–15 July 2018; pp. 4055–4064. [Google Scholar]
- Dosovitskiy, A.; Beyer, L.; Kolesnikov, A.; Weissenborn, D.; Zhai, X.; Unterthiner, T.; Dehghani, M.; Minderer, M.; Heigold, G.; Gelly, S.; et al. An image is worth 16 × 16 words: Transformers for image recognition at scale. In Proceedings of the International Conference on Learning Representations, Virtual Event, Austria, 3–7 May 2021. [Google Scholar]
- Wu, H.; Xiao, B.; Codella, N.; Liu, M.; Dai, X.; Yuan, L.; Zhang, L. Cvt: Introducing convolutions to vision transformers. arXiv 2021, arXiv:2103.15808. [Google Scholar]
- Xiao, T.; Singh, M.; Mintun, E.; Darrell, T.; Dollar, P.; Girshick, R. Early convolutions help transformers see better. arXiv 2021, arXiv:2106.14881. [Google Scholar]
- Dong, X.; Bao, J.; Chen, D.; Zhang, W.; Yu, N.; Yuan, L.; Chen, D.; Guo, B. Cswin transformer: A general vision transformer backbone with cross-shaped windows. arXiv 2021, arXiv:2107.00652. [Google Scholar]
- Peng, Z.; Huang, W.; Gu, S.; Xie, L.; Wang, Y.; Jiao, J.; Ye, Q. Conformer: Local features coupling global representations for visual recognition. arXiv 2021, arXiv:2105.03889. [Google Scholar]
- Zhang, H.; Xu, C.; Zhang, S. Inner-IoU: More Effective Intersection over Union Loss with Auxiliary Bounding Box. arXiv 2023, arXiv:2311.02877. [Google Scholar]
- Zhang, H.; Zhang, S. Shape-IoU: More Accurate Metric considering Bounding Box Shape and Scale. arXiv 2024, arXiv:2312.17663. [Google Scholar]
- Wang, C.Y.; Yeh, I.H.; Liao, H.Y.M. YOLOv9: Learning What You Want to Learn Using Programmable Gradient Information. arXiv 2024, arXiv:2402.13616. [Google Scholar]
- Liu, W.; Anguelov, D.; Erhan, D.; Szegedy, C.; Reed, S.; Fu, C.Y.; Berg, A.C. Ssd: Single shot multibox detector. In Computer Vision–ECCV 2016: 14th European Conference, Amsterdam, The Netherlands, 11–14 October 2016; Proceedings, Part I 14; Springer International Publishing: Berlin/Heidelberg, Germany, 2016; pp. 21–37. [Google Scholar]
- Law, H.; Deng, J. Cornernet: Detecting objects as paired keypoints. In Proceedings of the European Conference on Computer Vision (ECCV), Munich, Germany, 8–14 September 2018; pp. 734–750. [Google Scholar]
Stage | Maturity | Related Description | Picking Situation |
---|---|---|---|
1 | Green ripening period | During the early stages of strawberry growth, the fruit appears bright green in color with a smooth skin and firm flesh. At this point, the fruit lacks the characteristic red or white spots and is not yet sweet in taste. | Not suitable for picking |
2 | White ripening period | During the middle stage of strawberry growth, the majority of the fruit surface appears white as the green color begins to fade, although some green areas may still be present. At this point, the pulp is soft, but has not yet reached optimal sweetness. | Not suitable for picking |
3 | Color-changed period | During the later stages of strawberry growth, the fruit typically displays a noticeable red color. This color change typically starts on the side of the fruit that receives the most light, before gradually spreading to the other areas including the sides and backlit surface. | Pickable, stored, or transported over long distances |
4 | Red ripening period | During the final stage of strawberry growth, the fruit undergoes a transformation, turning a vibrant red color with a uniform appearance, free of any green or white spots. As the fruit reaches maturity, it also tends to increase in size and develop a sweeter taste. | Pickable, transported at close distances, or sold on the same day |
Model | Precision P/% | Recall R/% | Mean Average Precision mAP@50/% | Mean Average Precision mAP@50:95/% | F1 Score/% | Frames per Second FPS/(Frame·s−1) |
---|---|---|---|---|---|---|
YOLOv9 | 93.32 | 90.27 | 94.61 | 68.82 | 91.77 | 78 |
YOLOv9 + CGA | 94.57 | 91.39 | 95.36 | 72.12 | 92.96 | 86 |
YOLOv9 + ACmix | 94.78 | 90.67 | 95.19 | 71.01 | 92.68 | 84 |
YOLOv9 + Shape-IoU | 95.12 | 90.92 | 94.97 | 71.94 | 92.97 | 79 |
YOLOv9 + CGA + ACmix | 95.71 | 92.52 | 96.01 | 76.19 | 94.09 | 80 |
YOLOv9 + CGA + Shape-IoU | 95.22 | 92.58 | 95.94 | 74.69 | 93.88 | 81 |
YOLOv9 + ACmix + Shape-IoU | 95.34 | 92.15 | 95.72 | 73.49 | 93.71 | 83 |
YOLOv9 + CGA+ ACmix+Shape-IoU | 97.52 | 95.34 | 97.95 | 85.46 | 96.42 | 84 |
Model | Precision P/% | Recall R/% | Mean Average Precision mAP@50/% | Mean Average Precision mAP@50:95/% | F1 Score/% | Frames per Second FPS/(Frame·s−1) |
---|---|---|---|---|---|---|
CR-YOLOv9 | 97.52 | 95.34 | 97.95 | 85.46 | 96.42 | 84 |
YOLOv9 | 93.32 | 90.27 | 94.61 | 68.82 | 91.77 | 78 |
SSD | 87.77 | 82.73 | 88.13 | 55.16 | 85.17 | 94 |
CornerNet | 80.97 | 74.27 | 81.56 | 47.72 | 77.48 | 92 |
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. |
© 2024 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
Ye, R.; Shao, G.; Gao, Q.; Zhang, H.; Li, T. CR-YOLOv9: Improved YOLOv9 Multi-Stage Strawberry Fruit Maturity Detection Application Integrated with CRNET. Foods 2024, 13, 2571. https://doi.org/10.3390/foods13162571
Ye R, Shao G, Gao Q, Zhang H, Li T. CR-YOLOv9: Improved YOLOv9 Multi-Stage Strawberry Fruit Maturity Detection Application Integrated with CRNET. Foods. 2024; 13(16):2571. https://doi.org/10.3390/foods13162571
Chicago/Turabian StyleYe, Rong, Guoqi Shao, Quan Gao, Hongrui Zhang, and Tong Li. 2024. "CR-YOLOv9: Improved YOLOv9 Multi-Stage Strawberry Fruit Maturity Detection Application Integrated with CRNET" Foods 13, no. 16: 2571. https://doi.org/10.3390/foods13162571
APA StyleYe, R., Shao, G., Gao, Q., Zhang, H., & Li, T. (2024). CR-YOLOv9: Improved YOLOv9 Multi-Stage Strawberry Fruit Maturity Detection Application Integrated with CRNET. Foods, 13(16), 2571. https://doi.org/10.3390/foods13162571