Skip to main content

Detection of Green Walnuts on Trees Using the Improved YOLOv7 Model

  • Conference paper
  • First Online:
6GN for Future Wireless Networks (6GN 2023)

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 59.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 79.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. 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)

    Google Scholar 

  2. 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)

    Article  Google Scholar 

  3. 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)

    Article  Google Scholar 

  4. 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)

    Google Scholar 

  5. 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)

    Article  Google Scholar 

  6. 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)

    Article  Google Scholar 

  7. Nuske, S., Wilshusen, K., Achar, S., Yoder, L., Narasimhan, S., Singh, S.: Automated visual yield estimation in vineyards. J. FieldRobot. 31, 837–860 (2014)

    Google Scholar 

  8. 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)

    Article  Google Scholar 

  9. Fu, L., et al.: Banana detection based on color and texture features in the natural environment. Comput. Electron. Agric. 167, 105057 (2019)

    Article  Google Scholar 

  10. 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)

    Article  Google Scholar 

  11. Hamza, R., Chtourou, M.: Design of fuzzy inference system for apple ripeness estimation using gradient method. IET Image Proc. 14(3), 561–569 (2020)

    Article  Google Scholar 

  12. Kao, I.H., Hsu, Y.W., Yang, Y.Z., et al.: Determination of lycopersicon maturity using convolutional autoencoders. Sci. Hortic. 256, 108538 (2019)

    Article  Google Scholar 

  13. 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)

    Article  Google Scholar 

  14. 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)

    Article  Google Scholar 

  15. Muni Rathnam, S., Siva Koteswara Rao, G.: A novel deep learning architecture for image hiding. WSEAS Trans. Signal Process. 16, 206–210 (2020)

    Google Scholar 

  16. 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)

    Article  Google Scholar 

  17. 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)

    Google Scholar 

  18. 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

  19. 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)

    Article  Google Scholar 

  20. 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)

    Google Scholar 

  21. 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)

  22. Vaswani, A., Shazeer, N., et al.: Attention is all you need. arXiv preprint arXiv:1706.03762v5 (2017)

  23. He, K., Zhang, X, Ren, S., Sun, J.: Deep residual learning for image recognition. arXiv preprint arXiv:1512.03385v1 (2015)

  24. 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)

    Google Scholar 

  25. 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)

  26. Lin, T.-Y., Goyal, P., Girshick, R., He, K., Dollar, P.: Focal loss for dense object detection. arXiv preprint arXiv:1708.02002v2 (2018)

Download references

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

Authors

Corresponding author

Correspondence to Jinrong He .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2024 ICST Institute for Computer Sciences, Social Informatics and Telecommunications Engineering

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics