IDEAS home Printed from https://ideas.repec.org/a/gam/jagris/v15y2025i4p387-d1589706.html
   My bibliography  Save this article

RF-YOLOv7: A Model for the Detection of Poor-Quality Grapes in Natural Environments

Author

Listed:
  • Changyong Li

    (College of Mechanical Engineering, Xinjiang University, Urumqi 830047, China
    State Key Laboratory for Manufacturing Systems Engineering, Xi’an Jiaotong University, Xi’an 710054, China)

  • Shunchun Zhang

    (College of Mechanical Engineering, Xinjiang University, Urumqi 830047, China)

  • Zhijie Ma

    (College of Mechanical Engineering, Xinjiang University, Urumqi 830047, China)

Abstract

This study addresses the challenges of detecting inferior fruits in table grapes in natural environments, focusing on subtle appearance differences, occlusions, and fruit overlaps. We propose an enhanced green grape fruit disease detection model named RF-YOLOv7. The model is trained on a dataset comprising images of small fruits, sunburn, excess grapes, fruit fractures, and poor-quality grape bunches. RF-YOLOv7 builds upon the YOLOv7 architecture by integrating four Contextual Transformer (CoT) modules to improve target-detection accuracy, employing the Wise-IoU (WIoU) loss function to enhance generalization and overall performance, and introducing the Bi-Former attention mechanism for dynamic query awareness sparsity. The experimental results demonstrate that RF-YOLOv7 achieves a detection accuracy of 83.5%, recall rate of 76.4%, mean average precision (mAP) of 80.1%, and detection speed of 58.8 ms. Compared to the original YOLOv7, RF-YOLOv7 exhibits a 3.5% increase in mAP, with only an 8.3 ms increase in detection time. This study lays a solid foundation for the development of automatic detection equipment for intelligent grape pruning.

Suggested Citation

  • Changyong Li & Shunchun Zhang & Zhijie Ma, 2025. "RF-YOLOv7: A Model for the Detection of Poor-Quality Grapes in Natural Environments," Agriculture, MDPI, vol. 15(4), pages 1-16, February.
  • Handle: RePEc:gam:jagris:v:15:y:2025:i:4:p:387-:d:1589706
    as

    Download full text from publisher

    File URL: https://www.mdpi.com/2077-0472/15/4/387/pdf
    Download Restriction: no

    File URL: https://www.mdpi.com/2077-0472/15/4/387/
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Daniel-David Leal-Lara & Julio Barón-Velandia & Lina-María Molina-Parra & Ana-Carolina Cabrera-Blandón, 2025. "A Model for Detecting Xanthomonas campestris Using Machine Learning Techniques Enhanced by Optimization Algorithms," Agriculture, MDPI, vol. 15(3), pages 1-16, January.
    2. Yong-Suk Lee & Maheshkumar Prakash Patil & Jeong Gyu Kim & Seong Seok Choi & Yong Bae Seo & Gun-Do Kim, 2024. "Improved Tomato Leaf Disease Recognition Based on the YOLOv5m with Various Soft Attention Module Combinations," Agriculture, MDPI, vol. 14(9), pages 1-18, August.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.

      Corrections

      All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:gam:jagris:v:15:y:2025:i:4:p:387-:d:1589706. See general information about how to correct material in RePEc.

      If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

      If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

      If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

      For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: MDPI Indexing Manager (email available below). General contact details of provider: https://www.mdpi.com .

      Please note that corrections may take a couple of weeks to filter through the various RePEc services.

      IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.