Abstract
One application of artificial intelligence in agriculture is the use of machines to detect fruits and evaluate yield. Due to the small size and color of green walnuts similar to leaves, it is important to develop a method that detects walnuts quickly and accurately. Motivated by this issue, we propose a solution using the improved YOLOv7 model and use the improved model for detection and identification. We constructed a dataset with data augmentation to help with this study, containing a total of 10,550 images, including green walnuts from different angles. We used Precision, Recall, F-Measure, and mean Average Precision as the accuracy indexes of the model. Add the Transformer model, the ResNet network, and the SimAm attention mechanism to the network structure of the YOLOv7 model to improve the detection capability of the model. Compared to the YOLOv7 model without improvements, P increased by 1.5%, R increased by 1.3%, F1 increased by 1%, and mAP increased by 1.5%. Compared with other target detection models, the accuracy indexes show better results. This method can maintain high precision in walnut identification and detection and can provide technical support to the machine to recognize walnuts in a complex environment quickly and for a long time. The dataset is publicly available on Github: https://github.com/lunchc/Walnut.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Pei, D., Guo, B., Li, P., Zhang, Q., Xu, Y.: Investigation and analysis report of walnut market and industry. Agricult. Prod. Market 56–58 (2021)
Wang, C., Tang, Y., Zou, X., Luo, L., Chen, X.: Recognition and matching of clustered mature litchi fruits using binocular charge-coupled device (CCD) color cameras. Sensors 17, 2564 (2017)
Fu, L., Tola, E., Al-Mallahi, A., Li, R., Cui, Y.: A novel image processing algorithm to separate linearly clustered kiwifruits. Biosyst. Eng. 183, 184–195 (2019)
Reis, M.J.C.S., et al.: Automatic detection of bunches of grapes in natural environment from color images. J. Appl. Log. 10, 285–290 (2012)
Cubero, S., Diago, M.P., Blasco, J., Tardáguila, J., Millán, B., Aleixos, N.: A new method for pedicel/peduncle detection and size assessment of grapevine berries and other fruits by image analysis. Biosyst. Eng. 117, 62–72 (2014)
Wang, C., Lee, W.S., Zou, X., Choi, D., Gan, H., Diamond, J.: Detection and counting of immature green citrus fruit based on the local binary patterns (LBP) feature using illumination-normalized images. Precis. Agric. 19, 1062–1083 (2018)
Nuske, S., Wilshusen, K., Achar, S., Yoder, L., Narasimhan, S., Singh, S.: Automated visual yield estimation in vineyards. J. FieldRobot. 31, 837–860 (2014)
Borba, K.R., Oldoni, F., Monaretto, T., Colnago, L.A., Ferreira, M.D.: Selection of industrial tomatoes using TD-NMR data and computational classification methods. Microchem. J. 164(4), 106048 (2021)
Fu, L., et al.: Banana detection based on color and texture features in the natural environment. Comput. Electron. Agric. 167, 105057 (2019)
Goel, N., Sehgal, P.: Fuzzy classification of pre-harvest tomatoes for ripeness estimation – an approach based on automatic rule learning using decision tree. Appl. Soft Comput. 36, 45–56 (2015)
Hamza, R., Chtourou, M.: Design of fuzzy inference system for apple ripeness estimation using gradient method. IET Image Proc. 14(3), 561–569 (2020)
Kao, I.H., Hsu, Y.W., Yang, Y.Z., et al.: Determination of lycopersicon maturity using convolutional autoencoders. Sci. Hortic. 256, 108538 (2019)
Mazen, F.M.A., Nashat, A.A.: Ripeness classification of bananas using an artificial neural network. Arab. J. Sci. Eng. 44(8), 6901–6910 (2019)
Bai, X., Wang, X., Liu, X.L., et al.: Explainable deep learning for efficient and robust pattern recognition: a survey of recent developments. Pattern Recogn. 120, 108102 (2021)
Muni Rathnam, S., Siva Koteswara Rao, G.: A novel deep learning architecture for image hiding. WSEAS Trans. Signal Process. 16, 206–210 (2020)
Tian, Y., Yang, G., Wang, Z., Wang, H., Liang, Z.: Apple detection during different growth stages in orchards using the improved YOLO-V3 model. Comput. Electron. Agricult. 157, 417–426 (2019)
Zhang, Y., Zhang, W., Yu, J., He, L., Chen, J., He, Y.: Complete and accurate holly fruits counting using YOLOX object detection. Comput. Electron. Agricult. 52–59, 149–156 (2021)
Hao, J., Bing, Z., Yang, S., Yang, J., Sun, L.: Detection of green walnut by improved YOLOv3. Trans. Chin. Soc. Agricult. Eng. (Trans. CSAE) 38(14), 183–190 (2022). https://doi.org/10.11975/j.issn.1002-6819.2022.14.021
Cui, K., Su, S., Cai, J., Chen, F.: Walnut ripeness detection based on coupling information and lightweight YOLOv4. Int. J. Circuits Syst. Signal Process. 16, 239–247 (2022)
Redmon, J., Farhadi, A.: YOLO9000: better, faster, stronger. In: Proceedings of the 2017 IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, 21–26 July 2017; pp. 6517–6525 (2017)
Alexey Bochkovskiy, C.-Y., Mark Liao, H.-Y.: YOLOv7: trainable bag-of-freebies sets new state-of the art for real-time object dectors. arXiv preprint arXiv:2207.02696v1 (2022)
Vaswani, A., Shazeer, N., et al.: Attention is all you need. arXiv preprint arXiv:1706.03762v5 (2017)
He, K., Zhang, X, Ren, S., Sun, J.: Deep residual learning for image recognition. arXiv preprint arXiv:1512.03385v1 (2015)
Yang, L., Zhang, R.-Y., Li, L., Xie, X.: SimAM: a simple, parameter-free attention model for convolutional netural networks. In: Proceedings of the 38th International Conference on Machine Learning, PMLR, vol. 139, pp. 11863–11874 (2021)
Ren, S., He, K., Girshick, R., Sun, J.: Faster R-CNN: towards real-time object detection with region proposal networks. arXiv preprint arXiv:1506.01497v3 (2016)
Lin, T.-Y., Goyal, P., Girshick, R., He, K., Dollar, P.: Focal loss for dense object detection. arXiv preprint arXiv:1708.02002v2 (2018)
Acknowledgement
This work is supported in part by National Natural Science Foundation of China under grant No. 61902339, by the Natural Science Basic Research Plan in Shaanxi Province of China under grants No. 2021JM-418, by Yan’an Special Foundation for Science and Technology (2019-01, 2019-13).
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2024 ICST Institute for Computer Sciences, Social Informatics and Telecommunications Engineering
About this paper
Cite this paper
He, J., Liu, Y., Zhai, L., Liu, H. (2024). Detection of Green Walnuts on Trees Using the Improved YOLOv7 Model. In: Li, J., Zhang, B., Ying, Y. (eds) 6GN for Future Wireless Networks. 6GN 2023. Lecture Notes of the Institute for Computer Sciences, Social Informatics and Telecommunications Engineering, vol 554. Springer, Cham. https://doi.org/10.1007/978-3-031-53404-1_1
Download citation
DOI: https://doi.org/10.1007/978-3-031-53404-1_1
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-53403-4
Online ISBN: 978-3-031-53404-1
eBook Packages: Computer ScienceComputer Science (R0)