DOI: 10.3390/agronomy15071515 ISSN: 2073-4395

GYS-RT-DETR: A Lightweight Citrus Disease Detection Model Based on Integrated Adaptive Pruning and Dynamic Knowledge Distillation

Linlin Yang, Zhonghao Huang, Yi Huangfu, Rui Liu, Xuerui Wang, Zhiwei Pan, Jie Shi

Given the serious economic burden that citrus diseases impose on fruit farmers and related industries, achieving rapid and accurate disease detection is particularly crucial. In response to the challenges posed by resource-limited platforms and complex backgrounds, this paper designs and proposes a lightweight method for the identification and localization of citrus diseases based on the RT-DETR-r18 model—GYS-RT-DETR. This paper proposes an optimization method for target detection that significantly enhances model performance through multi-dimensional technology integration. First, this paper introduces the following innovations in model structure: (1) A Gather-and-Distribute Mechanism is introduced in the Neck section, which effectively enhances the model’s ability to detect medium to large targets through global feature fusion and high-level information injection.(2) Scale Sequence Feature Fusion (SSFF) is used to optimize the Neck structure to improve the detection performance of the model for small targets in complex environments. (3) The Focaler-ShapeIoU loss function is used to solve the problems of unbalanced training samples and inaccurate positioning. Secondly, the model adopts two model optimization strategies: (1) The Group_taylor local pruning algorithm is used to reduce memory occupation and the number of computing parameters of the model. (2) The feature-logic knowledge distillation framework is proposed and adopted to solve the problem of information loss caused by the structural difference between teachers and students, and to ensure a good detection performance, while realizing the lightweight character of the model. The experimental results show that the GYS-RT-DETR model has a precision of 79.1%, a recall of 77.9%, an F1 score of 78.0%, a model size of 23.0 MB, and an mAP value of 77.8%. Compared to the original model, the precision, recall, the F1 score, the mAP value, and the FPS value have improved by 3.5%, 5.3%, 5.0%, 5.3%, and 10.3 f/s, respectively. Additionally, the memory usage of the GYS-RT-DETR model has decreased by 25.5 MB compared to the original model. The GYS-RT-DETR model proposed in this article can effectively detect various citrus diseases in complex backgrounds, addressing the time-consuming nature of manual detection and improving the accuracy of model detection, thereby providing an effective theoretical basis for the automated detection of citrus diseases.

More from our Archive