| 注册
首页|期刊导航|智慧农业(中英文)|基于改进YOLOv12s的辣椒叶片病虫害轻量化检测方法

基于改进YOLOv12s的辣椒叶片病虫害轻量化检测方法

姚晓通 曲绍业

智慧农业(中英文)2026,Vol.8Issue(1):1-14,14.
智慧农业(中英文)2026,Vol.8Issue(1):1-14,14.

基于改进YOLOv12s的辣椒叶片病虫害轻量化检测方法

Lightweight Detection Method for Pepper Leaf Diseases and Pests Based on Improved YOLOv12s

姚晓通 1曲绍业1

作者信息

  • 1. 兰州交通大学 电子与信息工程学院,甘肃 兰州 730070,中国
  • 折叠

摘要

Abstract

[Objective]Pepper cultivation frequently faces challenges from diseases and pests,and early detection is critical for reducing yield losses.However,existing detection models often suffer from limitations such as insufficient feature extraction for subtle lesions,loss of edge information due to complex backgrounds,and high missed detection rates for small lesions.To address these issues,the YOLO-MDFR(You Only Look Once),a lightweight detection algorithm was proposed based on an enhanced YOLOv12s,specifically designed for accurate identification of pepper leaf diseases and pests in complex natural environments.[Methods]The dataset was es-tablished in the primary pepper cultivation zone of Gangu county,Tianshui city,Gansu province.The cultivated variety was the local-ly dominant Capsicum annuum L.var.conoides(Mill.).Data collection was conducted from March 15 to May 20,2024.The collected samples included four categories of pepper leaves:healthy leaves,leaves damaged by thrips,leaves infected with tobacco mosaic vi-rus exhibiting yellowing symptoms,and leaves affected by bacterial leaf spot.First,the original YOLOv12s backbone was replaced with an improved MobileNetV4 architecture to enhance lightweight performance while preserving feature extraction capability.Spe-cifically,the original 5×5 standard convolutions in the bottleneck layers of MobileNetV4 were substituted with two sequential 3×3 depthwise separable convolutions.This design was based on the principle that two 3×3 convolutions achieve an equivalent receptive field(matching the 5×5 coverage)while reducing parameter count—depthwise separable convolutions further decompose spatial and channel convolution,minimizing redundant computations.Second,a novel dimensional frequency reciprocal attention mixing trans-former(D-F-Ramit)module was introduced to enhance sensitivity to lesion boundaries and fine-grained textures.The module first converted feature maps from the spatial domain to the frequency domain using discrete cosine transform(DCT),capturing high-fre-quency components often lost in spatial-only attention.It then integrated three parallel branches:channel attention,spatial attention,and frequency-domain attention.Finally,a residual aggregation gate-controlled convolution(RAGConv)module was developed for the neck network.This module included a residual aggregation path to collect multi-layer feature information and a gate control unit that dynamically weighted feature components based on their relevance.The residual structure provided a direct gradient propagation path,alleviating gradient vanishing during backpropagation and ensuring efficient information transfer during feature fusion.A sys-tematic experimental framework was established to comprehensively evaluate model performance:(1)Ablation studies were conduct-ed using a controlled variable approach to verify the individual contributions of the improved MobileNetV4,D-F-Ramit,and RAG-Conv modules;(2)Lesion scale sensitivity analysis assessed detection performance across different lesion sizes,with emphasis on small-spot recognition;(3)Resolution impact analysis evaluated five common input resolutions(320×320-736×736)to explore the trade-offs among accuracy,speed,and computational efficiency;and(4)Embedded deployment validation involved model quantiza-tion and implementation on the Rockchip RK3588 platform to measure inference speed and power consumption on edge devices.[Re-sults and Discussions]The proposed YOLO-MDFR achieved an mAP@0.5 of 95.6%on this dataset.Compared to YOLOv12s,it im-proved accuracy by 2.0%,reduced parameters by 61.5%,and lowered computational complexity by 68.5%.Real-time testing showed 43.4 f/s on an NVIDIA RTX 4060 GPU(CUDA 12.2)and 22.8 f/s on a Rockchip RK3588 embedded platform with only 3.5 W power consumption—suitable for battery-powered field devices.Lesion-scale analysis revealed 33.5%accuracy for<16×16 pixel lesions crit-ical for early detection.Confusion matrix evaluation reduced misclassification,bacterial leaf spot/thrips damage misrates fell from 5.8%to 2.1%,and tobacco mosaic virus/healthy leaves from 3.2%to 1.5%,resulting in an overall 2.3%misrate.Experiments across varying input resolutions revealed a clear performance-resolution trade-off.As resolution increased from 320×320 to 736×736,mAP rose from 89.5%to 96.2%,showing diminishing returns beyond 512×512.Concurrently,computational cost grew roughly quadratical-ly,reducing inference speed from 65.2 f/s to 35.1 f/s.[Conclusions]This study presents YOLO-MDFR,a lightweight detection model for identifying pepper leaf diseases and pests under complex natural conditions.By integrating an improved MobileNetV4 backbone,a multi-dimensional frequency reciprocal attention mixing transformer(D-F-Ramit),and a residual aggregation gate-controlled convo-lution(RAGConv)module,YOLO-MDFR outperforms mainstream detection models in both accuracy and efficiency.Systematic de-ployment experiments yielded optimized configurations for different application scenarios.Despite its strong performance,the model shows limitations in robustness under extreme lighting,generalization to emerging diseases,and detection of small targets under occlu-sion.Future work will address these issues through ambient light data fusion,domain adaptation with semi-supervised learning,and binocular vision integration.

关键词

YOLO/叶片病虫害检测/MobileNetV4/轻量化模型/注意力机制

Key words

YOLO/leaf disease and pest detection/MobileNetV4/lightweight deep learning model/attention mechanism

分类

信息技术与安全科学

引用本文复制引用

姚晓通,曲绍业..基于改进YOLOv12s的辣椒叶片病虫害轻量化检测方法[J].智慧农业(中英文),2026,8(1):1-14,14.

基金项目

国家自然科学基金项目(51567014) (51567014)

甘肃省科技计划项目(22JR5RA797) National Natural Science Foundation of China Project(51567014) (22JR5RA797)

Gansu Provincial Science and Technology Pro-gram(22JR5RA797) (22JR5RA797)

智慧农业(中英文)

2096-8094

访问量0
|
下载量0
段落导航相关论文