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

Pear Fruit Detection Model in Natural Environment Based on Lightweight Transformer Architecture

Author

Listed:
  • Zheng Huang

    (College of Mechanical and Electrical Engineering, Hebei Agricultural University, Baoding 071001, China
    Hebei Intelligent Agriculture Technology Innovation Center, Baoding 071001, China)

  • Xiuhua Zhang

    (College of Mechanical and Electrical Engineering, Hebei Agricultural University, Baoding 071001, China
    Hebei Intelligent Agriculture Technology Innovation Center, Baoding 071001, China)

  • Hongsen Wang

    (College of Mechanical and Electrical Engineering, Hebei Agricultural University, Baoding 071001, China
    Hebei Intelligent Agriculture Technology Innovation Center, Baoding 071001, China)

  • Huajie Wei

    (College of Mechanical and Electrical Engineering, Hebei Agricultural University, Baoding 071001, China
    Hebei Intelligent Agriculture Technology Innovation Center, Baoding 071001, China)

  • Yi Zhang

    (College of Mechanical and Electrical Engineering, Hebei Agricultural University, Baoding 071001, China
    Hebei Intelligent Agriculture Technology Innovation Center, Baoding 071001, China)

  • Guihong Zhou

    (Hebei Intelligent Agriculture Technology Innovation Center, Baoding 071001, China
    College of Information Science and Technology, Hebei Agricultural University, Baoding 071001, China)

Abstract

Aiming at the problems of low precision, slow speed and difficult detection of small target pear fruit in a real environment, this paper designs a pear fruit detection model in a natural environment based on a lightweight Transformer architecture based on the RT-DETR model. Meanwhile, Xinli No. 7 fruit data set with different environmental conditions is established. First, based on the original model, the backbone was replaced with a lightweight FasterNet network. Secondly, HiLo, an improved and efficient attention mechanism with high and low-frequency information extraction, was used to make the model lightweight and improve the feature extraction ability of Xinli No. 7 in complex environments. The CCFM module is reconstructed based on the Slim-Neck method, and the loss function of the original model is replaced with the Shape-NWD small target detection mechanism loss function to enhance the feature extraction capability of the network. The comparison test between RT-DETR and YOLOv5m, YOLOv7, YOLOv8m and YOLOv10m, Deformable-DETR models shows that RT-DETR can achieve a good balance in terms of model lightweight and recognition accuracy compared with other models, and comprehensively exceed the detection accuracy of the current advanced YOLOv10 algorithm, which can realize the rapid detection of Xinli No. 7 fruit. In this paper, the accuracy rate, recall rate and average accuracy of the improved model reached 93.7%, 91.9% and 98%, respectively, and compared with the original model, the number of params, calculation amount and weight memory was reduced by 48.47%, 56.2% and 48.31%, respectively. This model provides technical support for Xinli No. 7 fruit detection and model deployment in complex environments.

Suggested Citation

  • Zheng Huang & Xiuhua Zhang & Hongsen Wang & Huajie Wei & Yi Zhang & Guihong Zhou, 2024. "Pear Fruit Detection Model in Natural Environment Based on Lightweight Transformer Architecture," Agriculture, MDPI, vol. 15(1), pages 1-16, December.
  • Handle: RePEc:gam:jagris:v:15:y:2024:i:1:p:24-:d:1553237
    as

    Download full text from publisher

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

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

    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:2024:i:1:p:24-:d:1553237. 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.

    We have no bibliographic references for this item. You can help adding them by using 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.