Plant pest target detection method and system
By employing hierarchical channel attribution and topology-aware spatial refinement, the multi-scale fusion problem of pest and disease target detection on edge devices is solved, achieving efficient pest and disease target detection, improving detection quality and robustness, and reducing computational and parameter costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TIANJIN UNIV OF SCI & TECH
- Filing Date
- 2026-02-05
- Publication Date
- 2026-05-29
AI Technical Summary
When performing pest and disease target detection on edge or low-computing-power devices, existing technologies struggle to balance semantic consistency and boundary/texture details across multiple scales with limited computing resources, and also suffer from high deployment complexity and inference latency.
A hierarchical channel attribution module is used to fuse multi-scale backbone features, and a topology-aware spatial refinement module is used to restore details in the spatial domain. By combining cross-layer attribution weights and detail bypass, cross-scale semantic consistency and fidelity of boundary/texture details are achieved.
It improves the localization quality and scale robustness of pest and disease target detection under limited computing power, while reducing computation and parameter costs, demonstrating excellent deployment friendliness and cross-framework reusability.
Smart Images

Figure CN122116066A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of target detection technology, and more specifically to a method and system for detecting plant diseases and pests. Background Technology
[0002] In agricultural pest and disease target detection, situations often arise where targets have large scale ranges, irregular boundaries, fragmented textures, and are similar to the background. When deployed on edge or low-computing-power devices, the detection system needs to balance multi-scale fusion quality, latency, and energy consumption under limited computing resources. Therefore, how to balance semantic consistency and boundary / texture details under limited computing power has always been a common challenge in this field.
[0003] Existing technologies mainly focus on three evolutionary paths: First, weighted and bidirectional cross-scale fusion on a pyramid topology, such as BiFPN and NAS-FPN, improves scale balance and enhances accuracy by assigning learnable weights to cross-layer connections or searching for cross-scale connections and resampling topologies – a trade-off between computational power. Second, finer-grained adaptive selection or recombination of the same pixel location in the spatial domain, such as ASFF and CARAFE, alleviate detail loss and semantic conflicts through continuous weighting of spatial location and content-adaptive recombination upsampling, respectively. Third, multi-scale interaction is achieved within an end-to-end attention framework, such as DINO and RT-DETR, which unify global and local representations through multi-scale feature embedding and cross-scale attention, and attempt to decouple intra-scale interaction and cross-scale fusion in real-time scenarios. Other works, such as DetectoRS, employ a recursive feature pyramid to feed the fusion results back to the backbone network to form a closed loop of "re-refinement-re-fusion," further enhancing feature representation capabilities. Existing methods mostly improve multi-scale fusion from the perspective of topology / path weighting or spatial domain reorganization, but the degree of openness in hierarchical modeling and attribution of cross-level channel semantics is limited. Channel selection and spatial refinement are usually handled in stages or by separate operators, lacking coordinated control and temporal coupling under the same mechanism. In edge or low-computing-power scenarios, end-to-end attention-based solutions still need further trade-offs in terms of memory, latency, pre-training dependence, and deployment complexity.
[0004] Therefore, how to improve cross-scale semantic consistency and boundary / texture detail fidelity in the target detection task of pests and diseases under the constraints of limited computing power and real-time performance, while taking into account deployment complexity and inference latency, is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] In view of the above problems, the present invention is proposed to provide a method and system for detecting plant diseases and pests that overcomes or at least partially solves the above problems.
[0006] To achieve the above objectives, the present invention adopts the following technical solution:
[0007] 1. A method for detecting plant diseases and pests, comprising: Acquire plant images and extract multi-scale trunk features; For each target scale, features of adjacent scales are selected, cross-layer attribution weights are generated channel by channel, and selective aggregation is performed to obtain the first fused feature; The first fusion feature at multiple target scales is input into the topology-aware spatial refinement module. The feature maps of adjacent high and low scales are fused at the spatial level to generate a position-related spatial reconstruction kernel. At the same time, a detail bypass sensitive to boundaries and texture is introduced. The high-frequency information of the reconstruction kernel and the detail bypass is fused in the spatial dimension to obtain the second fusion feature. The second fused feature is fed into the detection head for classification and regression, and the predicted target location and category are output.
[0008] Preferably, a hierarchical channel attribution module is used to fuse the multi-scale backbone features, the steps of which include: The multi-layered channel attribution module is configured to perform fusion processing on the corresponding target scales. Two adjacent scale features are extracted from the multi-scale backbone features as inputs: one path is the high-resolution backbone feature of the current layer, and the other path is the low-resolution backbone feature of the next layer. Perform global average pooling on the two features respectively to obtain global statistical information for each channel feature; Two global statistical information streams are compressed and projected into the same channel space through linear mapping, and then channel-dimensional splicing is performed. The concatenated features are then mapped using a convolution operation to obtain cross-layer joint channel attention features. The cross-layer joint channel attention features are subjected to temperature-activated flexible processing and split according to channel dimensions to obtain high-resolution weights and low-resolution weights. The high-resolution weights and low-resolution weights are weighted with the corresponding original features, and the high-resolution weighted results and low-resolution weighted results are fused across scales through sampling to obtain the first fused feature.
[0009] Preferably, when fusing the backbone features of the lowest layer, the corresponding low-resolution backbone features are obtained by downsampling the lowest-scale features.
[0010] Preferably, the fusion process of the topology-aware spatial refinement module includes: Based on the first fusion feature, spatial structure features are extracted through depthwise separable convolution, and weighted fusion is performed in the channel dimension through pointwise convolution.
[0011] Preferably, a detail branch is introduced within the topology-aware spatial writing module. Based on the original features, a depthwise analyzable convolution is performed after processing by the Labras operator to obtain enhanced features, which are then weighted and fused together with the first fused features.
[0012] Preferably, the first fusion feature includes a high-resolution fusion feature and a low-resolution fusion feature; After the low-resolution feature is subjected to depthwise separable convolution, it is upsampled to align itself with the high-resolution feature in terms of spatial dimensions.
[0013] Preferably, the weighted fusion is performed by setting learnable weights for each depth-separable convolutional branch.
[0014] A plant disease and pest target detection system includes: The image acquisition module is used to acquire plant images; The backbone network module is used to extract multi-scale backbone features from the plant image; The channel domain hierarchical attribution module is used to select features of adjacent scales for each target scale, generate cross-level attribution weights for each channel, and perform selective aggregation to obtain the first fused feature. The spatial domain topology refinement module is used to generate a position-related spatial reconstruction kernel based on the up-down connection relationship of the pyramid. At the same time, it introduces a detail bypass that is sensitive to boundaries and textures, and fuses the high-frequency information of the reconstruction kernel and the detail bypass in the spatial dimension to obtain a second fused feature.
[0015] Preferably, the channel domain hierarchical attribution module includes a global statistics submodule, a convolutional mapping submodule, a cross-layer joint channel attention submodule, and a weighted fusion submodule connected in sequence.
[0016] Preferably, the spatial domain topology refinement module includes a first branch and a second branch for two-way spatial weight fusion, and a third branch for detail enhancement; It also includes a fusion submodule for enhancing the fusion of the first branch, the second branch, and the third branch.
[0017] As can be seen from the above technical solution, compared with the prior art, this invention discloses a method and system for detecting plant diseases and pests. It achieves semantic unification through channel domain hierarchical attribution and preserves details through spatial domain topological refinement. The coupling of these two methods simultaneously improves high-threshold localization quality, scale robustness, and task synergy, while exhibiting excellent deployment friendliness and cross-framework reusability under controlled computational / parameter costs. These effects all stem from the action chain of specific mechanisms rather than parameter stacking, and have been validated for alignment on multiple baselines according to a unified protocol. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0019] Figure 1 This is a schematic diagram of the framework of a plant disease and pest target detection method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the channel hierarchical attribution method provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of a method for topology-aware spatial refinement provided in an embodiment of the present invention. Detailed Implementation
[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] Example 1 like Figure 1 This invention discloses a method for detecting plant diseases and pests, comprising: S1: Acquire plant images and extract multi-scale trunk features; S2: For each target scale, select features from adjacent scales, generate cross-layer attribution weights channel by channel, and perform selective aggregation to obtain the first fused feature; S3: Input the first fusion features at multiple target scales into the topology-aware spatial refinement module, generate a position-related spatial reconstruction kernel based on the up-down connection relationship of the pyramid, and introduce a detail bypass that is sensitive to boundaries and textures. Then, fuse the high-frequency information of the reconstruction kernel and the detail bypass in the spatial dimension to obtain the second fusion feature. S4: The second fused feature is fed into the detection head for classification and regression, and the predicted target location and category are output.
[0022] The following is a detailed explanation of each step in this embodiment with reference to the accompanying drawings: This embodiment addresses the target detection task of plant diseases and pests, proposing a multi-scale fusion method that collaboratively performs "channel hierarchical attribution" and "spatial refinement and reorganization" at the neck stage. Starting from the input image, the system extracts multi-layer features through a backbone network (1), aligning the backbone feature maps of different scales into {F1, F2, F3, F4} for fusion. Subsequently, the feature maps are fed into the hierarchical channel attribution module HCA (2). Each HCA module receives feature maps {F1, F2} at two different scales, and after fusion, outputs the corresponding channel attention feature map {F1, F2}. 1, 2}. The lowest-scale feature map F4 is downsampled to generate F5, which is then used for HCA channel fusion. Subsequently, the topology-aware spatial refinement module TSR (3) generates a position-related spatial reconstruction kernel based on the up-down connection relationship of the pyramid. At the same time, it introduces a detail bypass that is sensitive to boundaries and textures, and fuses the high-frequency information of the reconstruction kernel and the detail bypass in the spatial dimension, thereby completing the boundary enhancement and texture restoration of the feature map, and sending it to the detection head (4) for classification and regression, and finally outputting the predicted target box position and category.
[0023] like Figure 2 The hierarchical channel attribution module HCA uses the channel dimension as the core to perform hierarchical modeling of features at each scale: First, the channel distribution at each scale is statistically analyzed and compressed to form a comparable hierarchical channel description; then, the channel weight matrix is obtained based on the cross-scale consistency measure, which suppresses conflicting or redundant channels while maintaining beneficial semantics; the output of this selection process forms a feature map and maintains a one-to-one correspondence with the pyramid topology.
[0024] At the principle design level of the module: The hierarchical channel attribution module (HCA) receives the features of two adjacent layers as input: one is the high-resolution feature of the current layer, and the other is the low-resolution feature of the next layer. The module first performs global channel statistics on the two features respectively [1] to obtain a compact description that can characterize the importance of each channel; then, it uses a lightweight 1×1 convolution [2] linear mapping to compress the two descriptions and project them into the same channel space so that they can be compared and fused on the same scale later. Then, the two channel descriptions are spliced in the channel dimension [3], and the “cross-layer joint channel attention” representation is obtained by another convolution operation, and on this basis, the temperature activation [4] is performed to make the attention distribution smoother and more stable. The obtained joint attention is then split into two sets of weights according to the channel dimension of the two paths [5], which correspond one-to-one with the high and low resolution features respectively. HCA applies these two sets of weights to the corresponding original feature map [6] to amplify the useful channels and suppress redundant or mutually interfering channels, forming the two-way weighted features. To achieve cross-scale fusion, the module samples the low-resolution data along the path to match the high-resolution data, and then fuses it with the high-resolution data at the element-wise level (e.g., element-wise addition) to obtain the fused output features. This output is then fed into the subsequent Spatial Refinement (TSR) module to further enhance boundary and texture details in the spatial domain.
[0025] like Figure 3 The topology-aware spatial refinement module is located after channel domain fusion (HCA). Its goal is to further restore and enhance spatial details such as boundaries and textures without changing the semantic backbone, while merging and aligning this refinement with the up-down spatial topology relationship of the multi-scale pyramid. The module consists of three parallel paths: two spatial weight fusion paths (AWF) of high and low [1][2] and a detail enhancement path [3], which finally outputs through a stable three-branch weighted fusion.
[0026] In the spatial weight fusion path, the module first receives two features from adjacent scales (one high-resolution feature and one low-resolution feature). The feature maps of the two different scales are extracted with spatial structure clues by depthwise separable convolution [4][5], and learn spatial patterns that are complementary to channel selection with a small number of parameters. Depthwise separable convolution learns the spatial features of each channel independently through depthwise convolution, and performs weighted fusion in the channel dimension through pointwise convolution, thereby achieving complementarity between spatial and channel features. Such a structure enables the network to efficiently capture and fuse spatial and channel information, improve expressive power and reduce computational complexity. Subsequently, the low-resolution features are upsampled to align with the high-resolution features in spatial size.
[0027] In this embodiment, the aligned features from the two paths are concatenated and fed into a lightweight weight estimation branch to obtain a spatially weighted map representing the relative importance of different locations. This weighted map acts as a "gate" in the subsequent fusion: important regions are amplified, while unimportant regions are suppressed, thereby achieving adaptive refinement in spatial distribution.
[0028] To further implement the above technical solution, a parallel detail enhancement path is also set up. Taking the high-resolution backbone features, i.e. the original features, as input, the Laplacian edge operator [6] of the discrete high-pass class is first used to extract the rapidly changing boundary and texture response; then, through channel-wise [7] depthwise separable convolution and lightweight operators such as normalization and nonlinear activation, adaptive filtering is performed to obtain stable detail features. This path only performs channel-wise spatial filtering and does not mix with other channels, so it does not introduce new high-level semantics, but only aligns the geometric and texture clues that already exist in the image. Finally, this path of detail is back-injected into the backbone in a residual manner, so that the details are enhanced in a controllable manner.
[0029] After completing these three paths, the module enters the weight estimation branch to perform learnable weighted fusion [8]. At this time, there are usually three candidate features: high-resolution backbone branch, upsampled and aligned low-resolution branch, and detail enhancement branch. The module assigns non-negative learnable weights to each of the three paths (ensuring stable learnability through softening and normalization), and performs linear fusion of the three features according to the weights to generate the final spatial refinement output. In order to avoid numerical anomalies from affecting the downstream, the output will also undergo simple finite value pruning and outlier processing in the implementation to improve the robustness of deployment.
[0030] Before multi-scale fusion, this invention "listens" to candidate features of adjacent scales in real time at each target scale, generates cross-layer attribution weights for each channel, and performs selective aggregation, so that the channel semantics are unified and purified before entering subsequent spatial processing. After fusion, each scale feature is processed in parallel through two topology-aware branches: one is a detail bypass to recover lesion boundaries and high-frequency textures, and the other is spatial gating to suppress background and upsampling artifacts; the two branches, together with the identity principal branch, constitute structure-sensitive spatial refinement.
[0031] This invention employs learnable, non-negative, and normalized fusion weights to perform three-branch fusion of the three outputs: "identity main branch, detail bypass, and spatial gating," adaptively balancing the contributions of "semantic stability, detail recovery, and noise suppression" under different images and scales.
[0032] The selection of cross-layer channels adopts temperature normalization (τ) or equivalent sparsification mechanism to control the intensity of "hard / soft" competition and improve the stability and interpretability of training and inference (channel thermal and spatial response are visible).
[0033] The TSR module is implemented with depthwise separable convolution (DWConv) and 1×1 pointwise convolution, ensuring low FLOPs and low parameter count. The input and output tensor shapes and number of layers are consistent with mainstream detectors, and it can be plug-and-play to replace the original neck, which is convenient for end-side quantization / pruning / distillation and engineering implementation.
[0034] Example 2 Based on the same inventive concept, embodiments of the present invention disclose a plant disease and pest target detection system, characterized by comprising: The image acquisition module is used to acquire plant images; The backbone network module is used to extract multi-scale backbone features from the plant image; The channel domain hierarchical attribution module is used to select features of adjacent scales for each target scale, generate cross-level attribution weights for each channel, and perform selective aggregation to obtain the first fused feature. The spatial domain topology refinement module is used to generate a position-related spatial reconstruction kernel based on the up-down connection relationship of the pyramid. At the same time, it introduces a detail bypass that is sensitive to boundaries and textures, and fuses the high-frequency information of the reconstruction kernel and the detail bypass in the spatial dimension to obtain a second fused feature.
[0035] To further implement the above technical solution, the channel domain hierarchical attribution module includes a global statistics submodule, a convolutional mapping submodule, a cross-layer joint channel attention submodule, and a weighted fusion submodule connected in sequence.
[0036] To further implement the above technical solution, the spatial domain topology refinement module includes a first branch and a second branch for two-way spatial weight fusion, and a third branch for detail enhancement; it also includes a fusion submodule for enhancing the fusion of the first branch, the second branch and the third branch.
[0037] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.
[0038] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for detecting plant diseases and pests, characterized in that, include: Acquire plant images and extract multi-scale trunk features; For each target scale, features of adjacent scales are selected, cross-layer attribution weights are generated channel by channel, and selective aggregation is performed to obtain the first fused feature; The first fusion feature at multiple target scales is input into the topology-aware spatial refinement module. The feature maps of adjacent high and low scales are fused at the spatial level to generate a position-related spatial reconstruction kernel. At the same time, a detail bypass sensitive to boundaries and texture is introduced. The high-frequency information of the reconstruction kernel and the detail bypass is fused in the spatial dimension to obtain the second fusion feature. The second fused feature is fed into the detection head for classification and regression, and the predicted target location and category are output.
2. The method for detecting plant diseases and pests according to claim 1, characterized in that, The multi-scale backbone features are fused using a hierarchical channel attribution module, and the steps include: The multi-layered channel attribution module is configured to perform fusion processing on the corresponding target scales. Two adjacent scale features are extracted from the multi-scale backbone features as inputs: one path is the high-resolution backbone feature of the current layer, and the other path is the low-resolution backbone feature of the next layer. Perform global average pooling on the two features respectively to obtain global statistical information for each channel feature; Two global statistical information streams are compressed and projected into the same channel space through linear mapping, and then channel-dimensional splicing is performed. The concatenated features are then mapped using a convolution operation to obtain cross-layer joint channel attention features. The cross-layer joint channel attention features are subjected to temperature-activated flexible processing and split according to channel dimensions to obtain high-resolution weights and low-resolution weights. The high-resolution weights and low-resolution weights are weighted with the corresponding original features, and the high-resolution weighted results and low-resolution weighted results are fused across scales through sampling to obtain the first fused feature.
3. The method for detecting plant diseases and pests according to claim 2, characterized in that, When fusing the backbone features of the lowest layer, the corresponding low-resolution backbone features are obtained by downsampling the lowest-scale features.
4. The method for detecting plant diseases and pests according to claim 1, characterized in that, The fusion process of the topology-aware spatial refinement module includes: Based on the first fusion feature, spatial structure features are extracted through depthwise separable convolution, and weighted fusion is performed in the channel dimension through pointwise convolution.
5. The method for detecting plant diseases and pests according to claim 1, characterized in that, Within the topology-aware spatial writing module, a detail branch is introduced. Based on the original features, a depthwise analyzable convolution is performed after processing by the Labras operator to obtain enhanced features, which are then weighted and fused together with the first fused features.
6. A method for detecting plant diseases and pests according to claim 4 or 5, characterized in that, The first fusion feature includes high-resolution fusion features and low-resolution fusion features; After the low-resolution feature is subjected to depthwise separable convolution, it is upsampled to align itself with the high-resolution feature in terms of spatial dimensions.
7. The method for detecting plant diseases and pests according to claim 6, characterized in that, The weighted fusion is performed by setting learnable weights for each depthwise separable convolutional branch.
8. A plant disease and pest target detection system, characterized in that, include: The image acquisition module is used to acquire plant images; The backbone network module is used to extract multi-scale backbone features from the plant image; The channel domain hierarchical attribution module is used to select features of adjacent scales for each target scale, generate cross-level attribution weights for each channel, and perform selective aggregation to obtain the first fused feature. The spatial domain topology refinement module is used to generate a position-related spatial reconstruction kernel based on the up-down connection relationship of the pyramid. At the same time, it introduces a detail bypass that is sensitive to boundaries and textures, and fuses the high-frequency information of the reconstruction kernel and the detail bypass in the spatial dimension to obtain a second fused feature.
9. A plant disease and pest target detection system according to claim 8, characterized in that, The channel domain hierarchical attribution module includes a global statistics submodule, a convolutional mapping submodule, a cross-layer joint channel attention submodule, and a weighted fusion submodule connected in sequence.
10. A plant disease and pest target detection system according to claim 8, characterized in that, The spatial domain topology refinement module includes a first branch and a second branch for two-way spatial weight fusion, and a third branch for detail enhancement. It also includes a fusion submodule for enhancing the fusion of the first branch, the second branch, and the third branch.