YANG Sen, ZHANG Pengchao, WANG Lei, et al. Identifying tomato leaf diseases and pests using lightweight improved YOLOv8n and channel pruning[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2025, 41(2): 206-214. DOI: 10.11975/j.issn.1002-6819.202409008
    Citation: YANG Sen, ZHANG Pengchao, WANG Lei, et al. Identifying tomato leaf diseases and pests using lightweight improved YOLOv8n and channel pruning[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2025, 41(2): 206-214. DOI: 10.11975/j.issn.1002-6819.202409008

    Identifying tomato leaf diseases and pests using lightweight improved YOLOv8n and channel pruning

    • Timely and accurate identification of leaf diseases can greatly contribute to the effective pest prevention and control in the tomato growth cycle. In this study, a lightweight detection approach was proposed to balance between detection accuracy and computational efficiency. An enhanced version of the YOLOv8n (you only look once) model was augmented with a pruning algorithm, specifically designed to identify the various types of tomato leaf diseases. The YOLOv8n architecture was used to replace the conventional C2f (concatenated feature fusion) module with the more efficient StarBlock module. The number of parameters were was significantly reduced within the network. The complex features were represented to improve the overall expressive power of the improved model. Additionally, a mixed local channel attention mechanism (MLCA) was integrated to capture the richer set of contextual information and multi-scale features, which were critical to distinguishing among different types of leaf diseases. Furthermore, multi-level channel compression was used to reengineer the original detection head. The performance of the improved model was refined to reduce the dimensionality of the feature maps along the channel axis. Thus, the a more streamlined and computationally efficient structure was obtained after these architectural adjustments. Sparse training was then performed on the high-precision and lightweight model. Some weights were selectively eliminated within the network, according to their importance. A specified level of sparsity was achieved after training. Experimental results indicate that there was the best trade-off between data sparsity and model performance at a sparsity rate of 0.005. The redundant or less significant channels were removed using channel pruning. The final high-precision and lightweight models were obtained after training. A series of tests were carried out to validate the improved model. A dataset was comprised of 4,130 images. Nine distinct types of tomato leaf diseases were compiled. The developed model was then tested against this dataset. Compared with the baseline YOLOv8n, the improved model exhibited a substantial reduction in the parameter count (63.3%), floating point operations (72.8%), and model weight size (61.9%). The better performance of the improved model was achieved in the accuracy (97.5%), recall (96.2%), and average precision (mAP@0.5: 98.5%), with the a minimal average drop in the performance metrics of just 0.23 percentage points. Furthermore, the improved model was deployed on mobile devices, indicating the a remarkable detection frame rate of 358.5 frames per second, with an average inference time of 4.4 milliseconds per image. Once benchmarked against the popular object detection frameworks, such as Faster R-CNN and SSD, the improved model demonstrated a dramatic decrease in both the number of parameters (by 207.3 and 34.9 M, respectively) and computational complexity (by 497.2 and 280.6 G, respectively). The YOLOv8n was reduced by 20.0% and 59.3% in the parameters, corresponding to a 17% and 49.54% decrease in the computational complexity, compared with the more recent and lightweight models, like YOLOX Nano and YOLOv5Nano. The competitive accuracy levels were all preserved. In conclusion, the improved YOLOv8-SLMP model can offer a highly viable solution to the real-time detection of tomato leaf diseases. Particularly, the footprint was also minimized, in terms of the parameters, computations, and model size. An ideal candidate was deployed on the resource-constrained embedded systems, thus enabling more widespread and efficient monitoring of crop health.
    • loading

    Catalog

      /

      DownLoad:  Full-Size Img  PowerPoint
      Return
      Return