Lightweight detection method and system for agricultural pests based on dynamic channel attention

By employing a dynamic channel attention mechanism and utilizing scale jump decisions based on texture and contour features, real-time weight reordering is achieved, solving the detection accuracy problem of lightweight models in dynamic scenes and improving the accuracy and stability of agricultural pest detection.

CN120807889BActive Publication Date: 2026-02-17DONGGUAN CITY COLLEGE
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510934797.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-08
Publication Date
2026-02-17
Estimated Expiration
2045-07-08

AI Technical Summary

Technical Problem

Existing agricultural pest detection methods struggle to update their lightweight models in dynamic scenarios, especially under conditions such as changes in light intensity and wind-induced swaying of branches and leaves. This leads to decreased detection accuracy and the occurrence of missed or false detections.

Method used

By introducing a dynamic channel attention mechanism, using scale jump decisions of texture and contour features, continuous coefficients are generated as weight splitting gates to achieve real-time weight rearrangement, exponentially shrinking noisy channels, and linearly expanding stable high-confidence channels, ensuring that the lightweight backbone can focus on extremely small pests in computing-limited situations.

Benefits of technology

Maintaining stable inference under varying light, occlusion, and parallax conditions reduces redundancy and decomposition delays, improves detection accuracy, reduces false positives and false negatives, and enhances the timeliness of field control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120807889B_ABST
    Figure CN120807889B_ABST
Patent Text Reader

Abstract

The application discloses a dynamic channel attention-based lightweight agricultural pest detection method and system, and particularly relates to the field of agricultural video target detection, and is used for solving the problem that channel weights are difficult to dynamically adjust with interframe changes in pest identification. The scale jump judgment of texture and contour features is used, continuous coefficients generated by a Gaussian process are taken as weight split gates, channel mapping and asymmetric transition are synchronously responded to interframe texture burst and form breaking, weight real-time rearrangement is realized, noise channels are rapidly inhibited through exponential contraction, high-confidence channels are stabilized through linear expansion, and it is ensured that the lightweight backbone maintains focusing on the smallest pests in power-limited occasions; the prior weight of a front frame is injected into subsequent mapping, the detection head always receives the latest effective features, and stable inference is maintained under light, shielding and parallax variation; meanwhile, delay caused by redundant splitting is avoided, deep convolution storage is saved, and original frame rate output is maintained.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of agricultural video target detection, more particularly, the present application relates to a dynamic channel attention-based lightweight agricultural pest detection method and system. BACKGROUND

[0002] In the field of automatic monitoring, the camera or unmanned aerial vehicle continuously captures a sequence of consecutive frames, the pest body is extremely small, the posture is variable, and the color is similar to that of branches, leaves or soil. The disclosed document CN113673340B "Pest species image recognition method and system" adopts a space-channel serial attention to peel off the static background and highlight the pest body. CN113065558B "Lightweight small target detection method combined with attention mechanism" uses MSE multi-scale channel attention to cooperate with pruning-distillation compression, focusing on compressing the model order and single-frame small target segmentation accuracy. Both solutions build attention weights around static image features without introducing time domain coupling strategies. The texture drift and scale expansion caused by light and wind in consecutive video frames are still outside the inference process, and the lightweight model faces difficulties in real-time updating when running on the edge for a long time.

[0003] However, the contrast between the pest body and the background in the continuously captured image changes over time, the multi-scale channel weight remains in a fixed state, and the attention focus in the dynamic scene responds slowly, causing the feature extraction network to fail to timely redistribute channel resources. When light flickers or leaves are blocked, the originally emphasized texture channel is driven by noise, and the detection network tends to focus on false targets. Rotating or blurred frames further reduce the local saliency, causing the pruned shallow prediction layer to give false detection. The above gaps are due to the lack of temporal context: the weight update is not synchronized with the inter-frame changes, the lightweight structure lacks a flexible channel re-labeling mechanism, and the terminal deployment therefore has the risk of missing detection and subsequent lag prevention.

[0004] To solve the above problems, a technical solution is provided. SUMMARY

[0005] To overcome the above-mentioned defects of the prior art, the embodiments of the present application provide a dynamic channel attention-based lightweight agricultural pest detection method and system. The scale jump of texture and contour features is used to determine the continuous coefficients generated by the Gaussian process as weight split gates. The channel mapping and asymmetric transition synchronously respond to inter-frame texture bursts and morphological breaks, realizing real-time weight rearrangement. Exponential contraction rapidly suppresses noise channels, and linear expansion stabilizes high-confidence channels, ensuring that the lightweight backbone maintains focus on extremely small pests in power-limited scenarios. The prior weight of the previous frame is injected into the subsequent mapping, and the detection head always receives the latest effective features, maintaining stable inference under dramatic changes in light, shading and parallax. At the same time, it avoids the delay caused by redundant splitting, saves deep convolution storage, and maintains the original frame rate output, to solve the problems raised in the background art.

[0006] To achieve the above object, the present application provides the following technical solutions:

[0007] The dynamic channel attention-based agricultural pest lightweight detection method comprises the following steps:

[0008] S1: continuously receiving video frames, extracting texture layers frame by frame through a difference operator, and writing the texture layers in time sequence into a cache;

[0009] S2: calculating a difference field of two continuous texture layers, and then splitting the texture layers based on a comprehensive analysis of texture and contour features to obtain a weight draft;

[0010] S3: deploying a channel mapping link at a network entrance, multiplying the weight draft and a current frame feature map channel by channel, and recording a weight difference table;

[0011] S4: triggering a transition link according to the weight difference table, performing exponential contraction on a weak stable channel, performing linear expansion on a strong stable channel, and generating an updated weight table;

[0012] S5: using the updated weight table to drive a detection layer to complete multi-scale candidate box inference, and storing the current frame weight table back into the cache for reference by a next frame.

[0013] In a preferred embodiment, step S1 comprises the following contents:

[0014] receiving a video frame stream in time sequence and storing the video frame stream in a cache area; performing element-by-element subtraction of a pixel value matrix of each current frame and a previous frame of the current frame to generate a difference image; applying Gaussian convolution in horizontal and vertical directions to the difference image to perform smoothing processing and generate a smoothed difference image; subtracting the smoothed difference image from the pixel value matrix of the current frame to generate a texture layer; and writing the texture layer and a corresponding time index in time sequence into the cache area.

[0015] In a preferred embodiment, step S2 comprises the following contents:

[0016] reading two continuous texture layers from the cache area, calculating a difference field obtained by subtracting pixels of a current frame texture layer from pixels of a previous frame texture layer, applying a hot spot mask to lock a region with a change amplitude exceeding a preset threshold, calculating a ratio of a pixel intensity average to a spatial entropy in the mask to obtain a texture emergence amplitude index, and extracting edge maps of the two texture layers respectively, calculating a proportion of contour change pixels in an exclusive or edge map to obtain a contour fragmentation density index.

[0017] In a preferred embodiment, step S2 further comprises the following contents:

[0018] The texture emergence amplitude index and the contour fragmentation density index are input into an adaptive Gaussian process discriminator, and a scale jump coefficient is output; the scale jump coefficient is compared with a preset threshold value, and a multi-scale channel weight or a main scale channel weight is generated as a weight draft.

[0019] In a preferred embodiment, step S2 further comprises the following:

[0020] The multi-scale channel weight specifically assigns multiple weight values to the feature map channels, each value corresponding to a scale range to cover complex texture and contour changes; the main scale channel weight is a weight value concentrated in a single main scale, reducing redundant calculations.

[0021] In a preferred embodiment, step S3 comprises the following:

[0022] The feature map and the weight draft of the current frame are read from the cache area; the channel mapping link is executed to generate a weighted feature map by multiplying the weight draft and the feature map channel by channel; the average absolute change amplitude of the weighted feature map and the original feature map in each channel is calculated to generate a weight difference table; the weight difference table and the time index of the current frame are written into the cache area.

[0023] In a preferred embodiment, step S4 comprises the following:

[0024] The weight difference table and the weight draft are read from the cache area, and the channel stability is evaluated according to the weight difference table; the weight difference value of each channel is compared with the preset stability threshold value to determine that the channel with a weight difference value less than the stability threshold value is a strong stable channel, and the channel with a weight difference value greater than or equal to the stability threshold value is a weak stable channel.

[0025] In a preferred embodiment, step S4 further comprises the following:

[0026] An exponential contraction adjustment weight is applied to the weak stable channel, and the initial weight value of the weak stable channel in the weight draft is multiplied by an exponential decay term with the channel weight difference value as a parameter; a linear expansion adjustment weight is applied to the strong stable channel, and the initial weight value of the strong stable channel in the weight draft is added to a linear expansion term with the corresponding channel weight difference value as a parameter; the adjusted weight values of all channels are normalized, and the adjusted weight value of each channel is divided by the sum of the adjusted weight values of all channels to generate an updated weight table; the difference between the normalized weight value and the initial weight value in the weight draft is calculated to generate a residual vector.

[0027] In a preferred embodiment, step S5 comprises the following:

[0028] Read the update weight table and multi-scale feature map from the cache area, multiply the update weight table with each scale layer of the multi-scale feature map channel by channel to generate a weighted feature map; use the weighted feature map to drive the detection layer to perform multi-scale candidate box inference to generate the boundary box and confidence of the pest target; store the update weight table of the current frame in the cache area together with the time index.

[0029] The dynamic channel attention-based agricultural pest lightweight detection system comprises:

[0030] The texture frame extraction module: continuously receives video frames, extracts texture layers frame by frame through the difference operator, and writes them in time sequence into the cache;

[0031] The weight draft generation module: calculates the difference field of the continuous two texture layers, and then splits the texture and contour feature comprehensive analysis to obtain the weight draft;

[0032] The channel mapping module: deploys a channel mapping link at the network entrance, multiplies the weight draft with the current frame feature map channel by channel, and records the weight difference table at the same time;

[0033] The weight transition module: triggers the transition link according to the weight difference table, performs exponential contraction on the weak stable channel, performs linear expansion on the strong stable channel, and generates an updated weight table;

[0034] The detection closing module: uses the updated weight table to drive the detection layer to complete multi-scale candidate box inference, and stores the weight table of the current frame back to the cache for reference by the next frame.

[0035] The technical effects and advantages of the dynamic channel attention-based agricultural pest lightweight detection method and system are as follows:

[0036] The application uses the scale jump judgment of texture and contour features, uses the continuous coefficients generated by the Gaussian process as the weight splitting gate, synchronously responds to the inter-frame texture burst and morphological fragmentation through channel mapping and asymmetric transition, realizes real-time rearrangement of weights, rapidly suppresses noise channels through exponential contraction, stabilizes high-confidence channels through linear expansion, ensures that the lightweight backbone maintains focus on small pests in power-limited scenarios, injects prior knowledge of the previous frame weight into subsequent mapping, and ensures that the detection head always receives the latest effective features, thereby maintaining stable inference under changes in illumination, occlusion and parallax; at the same time, the application avoids the delay caused by redundant splitting, saves deep convolution storage, and maintains the original frame rate output; under the cooperation of the above, the terminal detection accuracy is significantly improved, the false detection and missed detection phenomena are greatly converged, and the timeliness of field prevention and control decision-making is simultaneously improved. BRIEF DESCRIPTION OF DRAWINGS

[0037] Figure 1 The figure is a flowchart of the dynamic channel attention-based agricultural pest lightweight detection method.

[0038] Figure 2A structure schematic diagram of the agricultural pest lightweight detection system based on the dynamic channel attention of the application is shown. DETAILED DESCRIPTION

[0039] The technical solutions in the embodiments of the application will be clearly and completely described below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only part of the embodiments of the application, rather than all the embodiments of the application. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative work belong to the protection scope of the application.

[0040] Embodiment 1 Figure 1 The agricultural pest lightweight detection method based on the dynamic channel attention of the application is given, which comprises the following steps.

[0041] S1: continuously receiving video frames, extracting texture layers by a difference operator frame by frame, and writing the texture layers into a cache in time sequence.

[0042] S2: calculating a difference field for two continuous texture layers, and then splitting the texture layers based on a comprehensive analysis of texture and contour features to obtain a weight draft.

[0043] S3: deploying a channel mapping link at a network entrance, multiplying the weight draft and a current frame feature map channel by channel, and recording a weight difference table.

[0044] S4: triggering a transition link according to the weight difference table, performing exponential contraction on a weak stable channel, performing linear expansion on a strong stable channel, and generating an updated weight table.

[0045] S5: using the updated weight table to drive a detection layer to complete multi-scale candidate frame inference, and storing the current frame weight table back to the cache for reference by a next frame.

[0046] In the field of automatic monitoring scenarios, cameras or drones capture a sequence of consecutive video frames for monitoring the activities of agricultural pests. However, pests are usually small in size, have variable postures, and are similar in color to branches, leaves or soil, which makes automatic detection difficult. Traditional pest detection methods rely on static image processing and fail to fully utilize the temporal information in the sequence of video frames, resulting in decreased detection accuracy in dynamic scenes such as changes in lighting and branch and leaf swings caused by wind. When edge devices are running for a long time, due to limited computing power and difficulty in real-time model updating, the detection process is prone to miss or false detection. To address these challenges, the present invention proposes a lightweight agricultural pest detection method based on dynamic channel attention, which improves the detection ability of lightweight models in dynamic scenes by introducing time-sensitive feature metrics, probability learning decisions and channel-level dynamic regulation. Step S1 serves as the starting point of the entire scheme, aiming to extract texture layers from consecutive video frames and store them in chronological order, laying the data foundation for subsequent cross-frame analysis. This process captures inter-frame changes and highlights texture details, addressing the lack of adaptability of static methods to dynamic scenes.

[0047] Step S1 involves receiving video frames continuously, extracting texture layers from each frame using a difference operator, and writing them into a cache in chronological order.

[0048] S1-1, video frame reception and caching;

[0049] The video frame stream is a data sequence formed by continuous collection by a camera or drone, and is sequentially entered into the cache area according to the time sequence of collection. Each frame of image is regarded as an independent unit for current processing, and is assigned a time index to identify its position in the entire sequence. The cache area is managed using a first-in, first-out queue structure to ensure that each frame of image is arranged in the order of its collection, so as to provide complete and ordered data sequences for subsequent temporal processing.

[0050] In the field of dynamic scenes, the movement and posture changes of pests evolve over time, and the continuously collected video frames can record these changes completely. Using a queue structure to store frame data ensures that the system always accesses a complete sequence arranged in chronological order during processing, facilitating the tracking of dynamic associations between frames and supporting subsequent analysis.

[0051] S1-2, difference operator application;

[0052] For each received frame, starting from the second frame in the sequence, the difference in pixel values between the current frame and the previous frame is calculated to generate a difference image reflecting the inter-frame changes. Specifically, the pixel value matrix of the current frame is subtracted from the pixel value matrix of the previous frame element by element, i.e., a subtraction operation is performed on the pixel values of each corresponding position, and the result constitutes the difference image. Each element value in the difference image represents the magnitude of pixel change at that position between the two frames, highlighting dynamic regions.

[0053] The movement of pests or wind motion in the field environment, etc. factors can cause local changes in pixel values, while the pixel values of static background regions usually remain stable. By calculating the difference in pixel values between frames, these dynamic change regions can be separated from the background, providing a raw basis for subsequent texture extraction. The generation process of the difference image has a small amount of calculation, can quickly capture the changes in pixel values, and is suitable for running on devices with limited computing power, while providing direct and effective input data for texture feature extraction.

[0054] S1-3, texture layer extraction;

[0055] In order to further highlight the texture details and reduce the noise interference from the difference image, a bidirectional Gaussian smoothing process is applied. Gaussian smoothing relies on horizontal and vertical Gaussian kernels, which is a smoothing filter based on weighted average, which can weaken the influence of high-frequency noise while preserving the edge features of the image. The horizontal Gaussian kernel is used to process the horizontal direction of the image, and the vertical Gaussian kernel is used to process the vertical direction of the image.

[0056] Bidirectional Gaussian smoothing is divided into two consecutive steps. First, a convolution operation is performed on the difference image in the horizontal direction, i.e., the weighted sum of each row of pixel values and the weights of the horizontal Gaussian kernel is calculated, generating a horizontally smoothed image. Then, a convolution operation is performed on the horizontally smoothed image in the vertical direction, i.e., the weighted sum of each column of pixel values and the weights of the vertical Gaussian kernel is calculated, generating the final smoothed difference image. Through these two convolution operations, the noise in the difference image is effectively suppressed, while the edge information of the dynamic change region is preserved.

[0057] Subsequently, the pixel value matrix of the smoothed difference image is subtracted from the pixel value matrix of the current frame element by element, i.e., a subtraction operation is performed on each corresponding position, and the result is the texture layer. This operation preserves the texture details in the current frame, while weakening the background noise and slowly changing interference factors.

[0058] The texture features of pests are important clues to identify their presence and activities, while there are often noises caused by wind movement or changes in illumination in the field environment. By two-way Gaussian smoothing processing, the texture details can be highlighted and irrelevant interference can be suppressed in the difference image, so that the texture layer more clearly reflects the dynamic characteristics of pests. The generation process of the texture layer combines smoothing and subtraction operations, providing high-quality feature data to facilitate subsequent analysis and recognition of pest features by the system.

[0059] S1-4, texture layer writing cache;

[0060] The generated texture layer is written into the cache area together with the corresponding time index. The cache area stores these texture layer data in chronological order, ensuring that each frame's texture layer can correspond to its position in the sequence, facilitating subsequent steps to access and process these data in chronological order.

[0061] The texture layer contains important information reflecting the dynamic characteristics of pests and is a key input for subsequent time series analysis. By associating it with the time index and storing it in order, the system can accurately track the dynamic change trend between frames during processing. This storage method facilitates the orderly management and efficient access of data, enabling the system to respond to dynamic information in the video stream in real time and improve the continuity and accuracy of the detection process.

[0062] Step S1 receives video frames continuously, calculates the difference between pixel values, applies two-way Gaussian smoothing, and extracts the texture layer, finally storing the results in chronological order in the cache area. This process separates the texture features reflecting the movement or posture changes of pests from dynamic video sequences, providing reliable data support for subsequent time series analysis and feature processing. In the field dynamic scene, traditional static image processing cannot adapt to changes in illumination and environmental interference. Step S1 overcomes these challenges by introducing time series data and texture extraction, ensuring the robustness and consistency of the starting data for the detection process. At the same time, the calculation method adopted is lightweight and efficient, suitable for running on resource-constrained edge devices, providing support for the efficiency of the entire system.

[0063] Step S1 has extracted the texture layer from the video frame stream through the difference operator and stored it in chronological order in the cache area, providing a time-series data basis for subsequent analysis. However, the texture layer only reflects the dynamic characteristics within a single frame and cannot fully represent the evolution trend of pest features between consecutive frames, especially when the texture and contour jump or drift due to environmental interference in dynamic scenes. Therefore, step S2 designs a difference field analysis and feature quantization process for consecutive two-frame texture layers, generates a dynamic weight draft by introducing time-series context information, to realize real-time response to the change of pest features, ensuring the accuracy and robustness of the detection model in the lightweight operation of the edge.

[0064] The complete processing process of step S2 aims to extract dynamic features and generate adaptive weight drafts by analyzing the temporal changes of the texture layers of two consecutive frames to cope with the feature jumps caused by environmental interference or target movement in the video frame stream of field agricultural pest monitoring.

[0065] S2-1, difference field calculation;

[0066] The texture layers of two consecutive frames are read from the cache area, referred to as the previous frame texture layer and the current frame texture layer respectively, both of which are in the form of a matrix with height multiplied by width, and each pixel position stores a texture intensity value. In order to capture the dynamic changes of the texture between the two frames, the difference between each pair of corresponding positions needs to be calculated.

[0067] The intensity value of each pixel position of the current frame texture layer is subtracted from the intensity value of the corresponding position of the previous frame texture layer, and the result is stored as a new matrix called the difference field. Each element of the difference field represents the change amplitude of the texture intensity over time, and its numerical range depends on the range of the texture layer intensity value. Through this pixel-by-pixel subtraction method, the difference field completely retains the evolution information of the texture between the two frames, and can reflect the local fluctuations caused by pest movement or environmental factors (such as wind movement, changes in light), providing time-series data support for subsequent analysis.

[0068] S2-2, hot spot mask generation and texture burst amplitude index calculation;

[0069] Based on the difference field, it is necessary to further focus on the areas with significant changes and quantify the burst degree of texture changes. To this end, first, take the absolute value of each element in the difference field to eliminate the influence of positive and negative directions, and then compare it with a pre-set intensity threshold. If the absolute value of a certain element exceeds this threshold, a marked value of 1 is generated at the corresponding position; if it does not exceed, the marked value is 0. All marked values form a matrix with the same size as the difference field, called the hot spot mask. The role of the hot spot mask is to highlight the areas with larger change amplitude in the difference field. Next, calculate the average value of the absolute values of the difference field in the areas marked as 1 in the hot spot mask, which is done by adding the absolute values of these areas and dividing by the total number of pixels marked as GES1. Then, analyze the uniformity of the distribution of pixel intensity in these areas and calculate the spatial entropy. The calculation process of spatial entropy is as follows: count the distribution of the absolute values of the difference field in the areas marked as 1 in the hot spot mask, generate a normalized probability distribution, take the natural logarithm of each probability value and multiply it by the probability value, and then add all the negative results to get the spatial entropy. Finally, divide the aforementioned average value by the spatial entropy, and to avoid division by zero when the spatial entropy is zero, add a small positive value to the denominator.

[0070] S2-3, contour fragmentation density index calculation;

[0071] To complement the texture feature analysis, the contour change between two consecutive frames needs to be quantified to capture the degree of fragmentation or displacement of the morphology. Edge detection is performed on the texture layer of the previous frame and the current frame, respectively, to generate edge maps. The edge map is a binary matrix where the edge pixel positions are marked as 1 and the non-edge pixels are marked as 0. The detection process is achieved through edge detection operators, such as gradient amplitude-based detection methods. Then, the edge maps of the two frames are compared one by one for each corresponding position value: if the value of a certain position in the edge map of the previous frame and the current frame is different, it is recorded as 1 at the corresponding position; if the same, it is recorded as 0, generating a new matrix called the XOR edge map. The value of 1 in the XOR edge map indicates that the contour has changed. Count the total number of pixels marked as 1 in the XOR edge map and divide it by the total number of pixels in the image (i.e. the product of height and width), to get a dimensionless value called the contour fragmentation density index. The contour fragmentation density index reflects the intensity of the difference between the two frames of edges, and can represent the contour fragmentation caused by changes in pest posture or environmental disturbances, providing information on the morphological dimension for subsequent comprehensive discrimination.

[0072] S2-4, adaptive Gaussian process discriminator;

[0073] Using the texture emergence amplitude index and the contour fragmentation density index, the severity of feature changes needs to be evaluated comprehensively. These two values are input into the adaptive Gaussian process discriminator. The Gaussian process discriminator measures the similarity between input data through a kernel function, which calculates the similarity weight based on the distance between samples and dynamically adjusts the model parameters based on historical data. The discriminator outputs a continuous value called the scale jump coefficient based on Bayesian inference. The calculation process of the scale jump coefficient is as follows: a joint distribution model is constructed for the input texture emergence amplitude index and contour fragmentation density index, the correlation between the current input and historical samples is estimated through the kernel function, and the posterior probability is derived by combining the prior distribution to generate the scale jump coefficient. The scale jump coefficient reflects the significance of the feature change in the current frame, and can adapt to the dynamic adjustment needs of different scenarios, providing a probabilistic basis for weight generation.

[0074] The construction process of the adaptive Gaussian process discriminator aims to analyze and support decision-making of feature changes in dynamic scenarios through the Bayesian inference method of Gaussian process combined with adaptive adjustment mechanism. Specifically, it is used to determine whether the texture emergence amplitude index and the contour fragmentation density index in consecutive video frames exceed the preset threshold, thereby deciding whether to trigger multi-scale channel splitting to improve the accuracy and robustness of agricultural pest detection.

[0075] First, the input data is determined, i.e. the texture emergence amplitude index and the contour fragmentation density index extracted from consecutive video frames. These two indicators represent the sudden amplitude of texture change and the intensive degree of contour change, respectively, as the core features of model analysis.

[0076] Next, a kernel function is selected, typically a radial basis function kernel, to measure the similarity between input data points, as it can effectively capture nonlinear relationships. Kernel function parameters such as length scale are optimized by maximizing the marginal likelihood to ensure the model's fitting ability to the data.

[0077] Then, prepare the training data, use historical video frames or pre-collected data sets, containing samples of texture emergence amplitude index and contour fragmentation density index, and corresponding labels, indicating whether multi-scale channel splitting is needed. These data provide the basis for the model to learn.

[0078] After that, train the model, use the training data to make the Gaussian process model learn the mapping relationship between input features and labels, adjust the kernel function parameters during the training process to minimize the prediction error, and thus build a discriminator that can reflect the feature variation law. In practical applications, prediction is performed, for new texture emergence amplitude index and contour fragmentation density index input, the model not only predicts its corresponding label, but also provides uncertainty estimation of the prediction, such as confidence interval, to provide basis for subsequent decision-making.

[0079] Finally, realize adaptive adjustment, dynamically optimize kernel function parameters or retrain the model according to the predicted uncertainty or the addition of new data, to ensure that the discriminator can continuously adapt to environmental changes and the evolution of data distribution.

[0080] Through the above steps, the adaptive Gaussian process discriminator in the dynamic channel attention agricultural pest lightweight detection method can analyze video frame features in real time, flexibly cope with complex scenes, and support the adjustment of channel attention mechanism combined with uncertainty estimation. Its construction process fully embodies the non-parametric characteristics and adaptability of Gaussian process, providing an efficient and reliable feature discrimination tool for pest detection tasks.

[0081] S2-5, weight draft generation;

[0082] According to the scale jump coefficient, dynamically generate the weight draft to adapt to the complexity of feature changes. Compare the scale jump coefficient with a pre-set threshold. If the scale jump coefficient exceeds the threshold, it indicates that the feature changes sharply, and generate multi-scale channel weights, specifically, assign multiple weight values according to the number of feature map channels, each value corresponds to a scale range to cover complex texture and contour changes. If the scale jump coefficient does not exceed the threshold, it indicates that the change is relatively stable, and generate the main scale channel weight, that is, the weight value concentrated in a single main scale to reduce redundant calculation. The dimension of the weight draft is consistent with the number of channels of the subsequent feature map, and the specific value is generated by proportional allocation according to the scale jump coefficient. Through this adaptive strategy, the weight draft can efficiently respond to dynamic scenes in resource-constrained environments, providing an accurate allocation scheme for the channel mapping link.

[0083] Step S2 extracts the texture emergence amplitude index and the contour fragmentation density index by calculating the difference field of the two consecutive texture layers, and generates the scale jump coefficient by combining the adaptive Gaussian process discriminator, and finally dynamically generates the weight draft. This process realizes the complete logic from texture and contour quantization to weight adjustment for the time sequence change of pest characteristics in the field video, ensures the real-time and accuracy of the detection model under the interference of light, shielding and other interference, and provides reliable support for subsequent channel mapping.

[0084] Step S2 extracts the texture emergence amplitude index and the contour fragmentation density index based on the difference field analysis of the two consecutive texture layers, and generates a dynamic weight draft using an adaptive Gaussian process discriminator, providing adaptive basis for subsequent feature weighting. However, the weight draft only reflects the preliminary analysis of the time sequence characteristics, and has not yet been fused with the actual feature map of the current frame. Step S3 aims to apply the weight draft to the current frame feature map through the channel mapping link, realize the dynamic weighting processing of the features, and record the weight difference table at the same time, providing data support for the subsequent transition link.

[0085] S3-1, read the weight draft and the current frame feature map;

[0086] The feature map of the current frame and the weight draft generated in step S2 are read from the cache area. The feature map is generated by the front feature extraction layer of the network and contains multiple channels, each of which corresponds to a specific feature response, such as edge, texture or color distribution. The weight draft is a vector equal to the number of channels of the feature map, and each element of the vector represents the weight value of the corresponding channel, which is used to adjust the feature response intensity.

[0087] S3-2, channel mapping and weighted feature generation;

[0088] In the channel mapping link, the weight draft is multiplied by the current frame feature map channel by channel to dynamically adjust the feature response intensity of each channel. For each channel of the feature map, the elements of all spatial positions in the channel are multiplied by the corresponding weight value in the weight draft one by one. The specific calculation process is as follows: for the first channel of the feature map, the numerical value of each spatial position is multiplied by the first element of the weight draft to obtain a new numerical value; for the second channel, repeat the process using the second element of the weight draft, and so on until all channels are processed. After multiplication, the weighted feature map is generated. This operation can enhance the response of channels sensitive to pest features, while weakening the influence of channels affected by noise or irrelevant background interference, so that the feature map is more suitable for changes in dynamic scenes, providing more focused input data for the subsequent detection layer.

[0089] S3-3, record the weight difference table;

[0090] To quantify the impact of the weighting operation on the feature map and support subsequent adjustment, the difference between the weighted feature map and the original feature map is calculated to generate a weight difference table. For each channel, the average absolute change amplitude of the feature values before and after weighting is calculated. The specific calculation steps are as follows: for the first channel of the feature map, subtract the values of all spatial positions in the channel of the weighted feature map from the corresponding positions in the original feature map one by one, take the absolute value of each subtraction result, and add all the absolute values to get the sum; then, divide the sum by the total number of spatial positions in the channel to get the weight difference value of the first channel. Repeat this process for the second channel and subsequent channels until the weight difference values of all channels are calculated. The weight difference table is a vector equal to the number of channels, and each element represents the average change amplitude of the corresponding channel feature response. This table can reflect the degree of change of each channel in the weighting process and provide quantitative basis for subsequent adjustment.

[0091] S3-4, storing the weight difference table;

[0092] The weight difference table is written into the cache area together with the time index of the current frame. The cache area organizes data in chronological order, and when storing the weight difference table, it ensures that the temporal correspondence of the weight difference table with the current frame feature map and the weight draft is preserved. The specific storage process is: using the time index of the current frame as an identifier, the vector data of the weight difference table is written into the corresponding position of the cache area, ensuring that these data can be accessed in chronological order in subsequent steps.

[0093] Step S3 multiplies the weight draft and the current frame feature map through the channel mapping link to generate a weighted feature map, achieving dynamic adjustment of feature response, highlighting pest features while suppressing the influence of noise and background interference. At the same time, by calculating the feature difference before and after weighting and recording the weight difference table, quantitative data of channel changes are provided for subsequent adjustment. This process ensures that the model can optimize channel resource allocation in real time in the dynamic field scene, thereby improving the accuracy and stability of pest detection.

[0094] Step S3 applies the weight draft to the current frame feature map to generate a weighted feature map and records the weight difference table, providing data support for weight adjustment. However, the weight draft only reflects the initial changes of the time sequence features and does not fully consider the stability differences between channels. In dynamic scenarios, channel stability directly affects the model's ability to focus on pest features, so step S4 needs to dynamically adjust the weight based on the weight difference table to enhance the model's attention to pest features and suppress noise interference.

[0095] The step S4 of the transition link and the weight update aims to dynamically adjust the channel weight based on the data generated in the previous steps to adapt to the needs of small pest size and complex environmental changes.

[0096] S4-1, read the weight difference table and the current weight draft;

[0097] The system first extracts the weight difference table and the weight draft generated in step S3 from the cache area. The weight difference table is a data structure that records the change amplitude of the feature response of each channel before and after the weighting operation, specifically represented by a numerical value corresponding to each channel, indicating the difference in the feature map on that channel due to the application of the weight. The weight draft is the channel weight vector preliminarily calculated for the current frame feature map in step S3, containing the initial weight value of each channel, serving as the starting point for subsequent adjustment. When reading, according to the time sequence index of the cache area, it is ensured that the extracted data is consistent with the processing stage of the current frame. The organization method of the data is arranged according to the channel dimension, that is, each channel independently corresponds to a weight difference value and an initial weight value. This method of reading and organizing according to the channel dimension enables the subsequent processing to directly correspond to the structure of the feature map, facilitating channel-by-channel analysis and adjustment.

[0098] S4-2, evaluate channel stability;

[0099] Next, the stability of each channel is evaluated, based on the comparison of the numerical value in the weight difference table with a preset stability threshold. The stability threshold is a fixed value determined based on historical data or the characteristics of the field video scene, used to measure the reasonable range of feature response change amplitude. For each channel, read its weight difference value in the weight difference table, and then compare it with the stability threshold. If the weight difference value of a certain channel is less than the stability threshold, it is considered that the feature response change of this channel is small, and it has high stability, which may correspond to the reliable features of pests; if the weight difference value is greater than or equal to the stability threshold, it is considered that the feature response change of this channel is large, and the stability is low, which may be affected by environmental factors such as light jump or wind disturbance. Through this comparison, all channels are divided into two categories: channels with high stability and channels with low stability. This classification method is based on quantitative comparison and can distinguish the reliability of features and noise influence in dynamic scenes, providing a basis for subsequent differentiated processing.

[0100] S4-3, recursive adjustment: exponential contraction and linear expansion;

[0101] According to the classification of channel stability, the initial weight value in the weight draft is adjusted, and different strategies are used to optimize the weight distribution.

[0102] For the channels with low stability, i.e., the channels with weight difference values greater than or equal to the stability threshold, the weights thereof are adjusted by an exponential function to reduce the influence. The specific process is as follows: the initial weight value of the channel in the weight draft is read, and then a decay term is calculated. The decay term is determined by the weight difference value of the channel multiplied by a preset shrinkage coefficient in an exponential form, wherein the shrinkage coefficient is a fixed value controlling the decay intensity. The initial weight value is multiplied by the decay term to obtain the adjusted weight value. The exponential function is characterized in that it can quickly reduce the weight value, so as to reduce the role of the channel with low stability in feature extraction and reduce the interference of environmental noise on detection.

[0103] For the channels with high stability, i.e., the channels with weight difference values less than the stability threshold, the weights thereof are adjusted by linear mapping to enhance the influence. The specific process is as follows: the initial weight value of the channel in the weight draft is read, and then an expansion term is calculated. The expansion term is determined by the stability threshold minus the weight difference value of the channel, multiplied by a preset expansion coefficient, wherein the expansion coefficient is a fixed value controlling the expansion amplitude. The initial weight value is added to the expansion term to obtain the adjusted weight value. The linear mapping is characterized in that it changes gently and can moderately increase the weight of the channel with high stability to enhance the attention to pest features while avoiding imbalance caused by excessive adjustment.

[0104] The differentiated adjustment strategy enables the weight distribution to adapt to the timing changes, strengthens the key features while suppressing the noise influence, and improves the resource utilization efficiency.

[0105] S4-4, normalize the generated update weight table;

[0106] After the adjustment, the adjusted weight values of all channels are normalized to meet the constraint conditions of the feature map weighting operation. The specific process is as follows: first, the sum of the adjusted weight values of all channels is calculated, and then for each channel, the adjusted weight value thereof is divided by the sum to obtain the normalized weight value. The sum of the normalized weight values is 1, which maintains the overall consistency of the weight distribution. This processing manner ensures that the adjusted weight can be directly applied to the subsequent detection layer while maintaining the relative importance relationship between the channels. Through normalization, the optimized weight is integrated into the update weight table, providing an adaptive input for the weighted calculation of the feature map.

[0107] S4-5, record the residual vector;

[0108] Finally, the weight changes before and after adjustment are calculated to generate a residual vector. The specific process is as follows: for each channel, subtract the initial weight value in the weight draft from the normalized weight value to obtain the weight adjustment amount of that channel. These adjustment amounts are arranged in channel order to form a residual vector. The residual vector records the change amplitude of each channel in the adjustment process, reflecting the effect of weight optimization. This recording method provides data support for subsequent analysis, enabling the system to track the details of the adjustment process, enhancing the transparency and improvable nature of the processing.

[0109] Step S4 completes the complete process of weight optimization through five sub-steps: reading the weight difference table and the weight draft, evaluating channel stability, differentially adjusting the weight, normalizing to generate the updated weight table, and recording the residual vector. In the field video scene, this method enhances the focusing ability of the lightweight model on pest features by dynamically adjusting the weight distribution, while suppressing environmental noise interference, providing efficient support for the subsequent detection layer.

[0110] Step S4 adjusts the weight through the transitive link according to the weight difference table to generate the updated weight table, providing the detection layer with optimized channel attention. However, in the face of dynamic disturbances such as small pest size, variable posture, and light, the detection layer needs to use the updated weight table to drive multi-scale candidate boxes for inference, while ensuring the continuity of the time sequence weight to maintain the real-time adaptability of the model on the edge side. Step S5, as a key link for detection and feedback, needs to apply the optimized weight to inference and provide prior support for the next frame to solve the problem of response lag in traditional static attention in video sequences.

[0111] Step S5 is the detection and feedback link, and its core task is to use the optimized weight generated by the previous steps to drive the detection layer to complete the identification and positioning of pest targets, while providing prior support for the processing of the next frame.

[0112] S5-1, read the updated weight table and multi-scale feature maps;

[0113] First, extract the updated weight table generated in step S4 and the multi-scale feature maps output by the feature extraction network from the cache area. The updated weight table is a data structure organized by channel dimension, recording the optimized weight values of each channel, which reflect the importance differences of the channels in the current frame. The multi-scale feature maps output by the feature extraction network are composed of multiple scale layers, each corresponding to different resolution feature information, capable of representing pests of different sizes. When performing the read operation, according to the time sequence index in the cache area, ensure that the extracted updated weight table and the multi-scale feature maps of the current frame are completely matched in the time dimension.

[0114] The organization of the updated weight table is as follows: arranged in channel order, each channel corresponds to a specific weight value.

[0115] The organization of the feature map is arranged in a scale order, and each scale layer contains multiple channel feature response data. The feature response data is stored in a two-dimensional matrix form, representing the feature intensity at the spatial position. By reading the updated weight table and multi-scale feature map, the channel importance information is combined with the spatial feature information, providing the necessary input data for the subsequent detection process. This method fully utilizes the timing optimization results and multi-resolution feature extraction capability of the previous steps, ensuring that the detection process can adapt to the diversity of pest targets in the field video.

[0116] S5-2, weight matching and weighted feature generation;

[0117] After obtaining the updated weight table and multi-scale feature map, the weight values in the updated weight table are applied to each scale layer of the multi-scale feature map to generate a weighted feature map. The specific operation process is as follows: for each scale layer in the multi-scale feature map, first read all the channel data of the scale layer, each channel data is stored in a two-dimensional matrix form, and each element in the matrix represents the feature value of the corresponding spatial position. Then, extract the weight value corresponding to the current channel from the updated weight table, which is a scalar representing the importance of the channel.

[0118] Subsequently, element-wise operation is performed on the two-dimensional matrix of the current channel, i.e., each element in the matrix is multiplied by the weight value to generate a new two-dimensional matrix. Each element in the new matrix is the product of the original feature value and the weight value. Repeat the above operation for all channels in the scale layer until the two-dimensional matrices of all channels are completed.

[0119] Finally, all weighted two-dimensional matrices are recombined in channel order to generate the weighted feature map of the scale layer. For each scale layer in the multi-scale feature map, the above steps are executed in turn, and finally the complete weighted feature map is obtained. The weighted feature map is consistent with the original feature map in the channel dimension and the spatial dimension, but the feature response intensity of each channel has been adjusted according to the weight value. This processing method enhances the channel response sensitive to pest features and weakens the interference of background noise, improving the quality of the feature map and providing more accurate input data for the detection layer.

[0120] S5-3, detection layer candidate box inference;

[0121] With the generated weighted feature map, the detection layer is driven to perform candidate box inference of the pest target. The detection layer adopts a lightweight target detection network, which can generate candidate boxes according to the weighted feature map, and predict the boundary box position and confidence of the pest target. The specific operation process is as follows: first, the weighted feature map is input into the lightweight target detection network. The network generates a series of candidate boxes for each scale layer of the weighted feature map. These candidate boxes cover the spatial range of the scale layer in a grid form, and each grid position corresponds to a set of predefined candidate boxes.

[0122] Then, the network processes each candidate box through a classification module and a regression module. The classification module calculates the confidence of each candidate box belonging to the pest target. The confidence is represented by a numerical value, ranging from 0 to 1. The regression module calculates the spatial position adjustment of each candidate box, including the horizontal and vertical coordinate offset of the boundary box center, as well as the width and height adjustment of the boundary box. The classification results and regression results of all candidate boxes are summarized to output the boundary box information and confidence score of each candidate box. The boundary box information is represented by four numerical values, which are the horizontal and vertical coordinates of the upper left corner of the boundary box, and the width and height of the boundary box.

[0123] Finally, the candidate box results from all scale layers are integrated to form the detection result set of the current frame. This multi-scale inference method combined with the weighted feature map can cover different sizes of pest targets in the field scene, while improving the recognition accuracy of small targets, and adapting to the actual needs of the diversity of pest sizes.

[0124] S5-4, store the current frame weight table;

[0125] After completing the detection task, the updated weight table of the current frame is stored in the cache area together with the time index. The cache area records the weight table in a time sequence, and the storage format is a data pair containing the weight value and the time identifier. The specific storage process is as follows: read the updated weight table of the current frame. The table is arranged in channel order, and each channel corresponds to a weight value. The system assigns a time index to the updated weight table, which is represented by a numerical value and corresponds to the position of the current frame in the video sequence. Then, the updated weight table and the time index are combined into a data pair and written to the specified location of the cache area. The cache area organizes all data pairs in chronological order to ensure that the time sequence position of each data pair is consistent with the corresponding frame. When processing the next frame, the system can extract the updated weight table of the previous frame from the cache area according to the time index as reference information for weight generation. This storage mechanism preserves the time sequence weight information, realizes the dynamic transmission of inter-frame weight data, ensures the continuous adaptability of the detection process in the video sequence, and improves the response ability of the system to dynamic interference in the field.

[0126] Step S5 completes the complete process from data input to target detection to timing optimization through four sub-steps of reading the updated weight table and the multi-scale feature map, generating a weighted feature map, performing detection layer candidate frame inference, and storing the current frame weight table. In the field video processing scene, this method fully utilizes multi-scale features and channel weight information to improve the detection accuracy of pest targets, and realizes inter-frame information coupling through the storage and transmission of the weight table, ensuring the efficiency and stability of the system in the edge lightweight deployment.

[0127] Embodiment 2: Figure 2 The present application provides a dynamic channel attention-based agricultural pest lightweight detection system, which comprises:

[0128] The texture frame extraction module continuously receives video frames, extracts texture layers frame by frame through a difference operator, and writes them in time sequence into a cache;

[0129] The weight draft generation module calculates the difference field of two consecutive texture layers, and then splits the weight draft after comprehensive analysis based on texture and contour features;

[0130] The channel mapping module deploys a channel mapping link at the network entrance, multiplies the weight draft and the current frame feature map channel by channel, and records the weight difference table;

[0131] The weight transition module triggers the transition link according to the weight difference table, performs exponential contraction on weak stable channels, performs linear expansion on strong stable channels, and generates an updated weight table;

[0132] The detection closing module uses the updated weight table to drive the detection layer to complete multi-scale candidate frame inference, and stores the current frame weight table back into the cache for reference by the next frame.

[0133] The above formulas are dimensionless numerical calculations, and the formulas are obtained by software simulation of a large amount of data to obtain a formula of the latest real situation, and the preset parameters in the formula are set by a person skilled in the art according to the actual situation.

[0134] It should be noted that the system of the present application can be deployed on the device itself to realize embedded application, or can be run on PC or other terminal with user interface, so as to meet various hardware environments and use requirements.

[0135] The above only describes some exemplary embodiments of the present application by way of illustration, and it is needless to say that those skilled in the art can modify the described embodiments in various ways without departing from the spirit and scope of the present application. Therefore, the above figures and description are illustrative in nature and should not be understood as limiting the scope of protection of the claims of the present application.

[0136] It has to be noted that, in the present document, the terms "first", "second", etc. merely serve the purpose of differentiation and do not require or imply any kind of ordering or sequence of the entities or actions associated therewith. Furthermore, the terms "comprising", "containing", etc. are to be interpreted as non- exclusive in the sense that a process, method, article, or apparatus that comprises a list of elements is not necessarily limited to those elements, but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a", "contains... a", etc. does not, without further restriction, exclude the presence of additional identical elements in the process, method, article, or apparatus.

[0137] The above description is only specific embodiments of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present application, which should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A dynamic channel attention-based lightweight detection method for agricultural pests, characterized in that, Comprising steps: S1: continuously receiving video frames, extracting texture layers frame by frame through difference operators, and writing in time sequence into the cache; S2: calculating the difference field of the two consecutive texture layers, and then splitting after comprehensive analysis of the texture and contour features to obtain the weight draft; including: calculating the difference field of the two consecutive texture layers: reading the two consecutive texture layers from the cache area, calculating the difference field obtained by subtracting the current frame texture layer from the previous frame texture layer pixel by pixel; applying a hot mask to lock the area with a change amplitude exceeding the preset threshold, calculating the ratio of the average pixel intensity to the spatial entropy in the mask to obtain the texture emergence amplitude index; extracting the edge map of the two texture layers respectively, calculating the proportion of contour change pixels in the exclusive or edge map to obtain the contour fragmentation density index; and the texture emergence amplitude index and the contour fragmentation density index are used as the texture and contour feature comprehensive analysis and then split to obtain the weight draft, specifically: inputting the texture emergence amplitude index and the contour fragmentation density index into the adaptive Gaussian process discriminator to output the scale jump coefficient; comparing the scale jump coefficient with the preset threshold to generate a multi-scale channel weight or a main scale channel weight as the weight draft; S3: deploying a channel mapping link at the network entrance, multiplying the weight draft and the current frame feature map channel by channel, and recording the weight difference table at the same time; wherein the network entrance is the input end of the channel mapping link, which receives the current frame feature map generated by the front feature extraction layer of the network and provides input data to the detection layer; reading the feature map and the weight draft of the current frame from the cache area; wherein recording the weight difference table includes: calculating the average absolute change amplitude of the weighted feature map and the original feature map in each channel to generate the weight difference table; and writing the weight difference table and the time index of the current frame into the cache area; S4: triggering the transition link according to the weight difference table, executing exponential contraction for weak stable channels and linear expansion for strong stable channels to generate an updated weight table; including: reading the weight difference table and the weight draft from the cache area, evaluating the channel stability according to the weight difference table, comparing the weight difference value of each channel with the preset stability threshold, determining the channel with a weight difference value less than the stability threshold as a strong stable channel, and determining the channel with a weight difference value greater than or equal to the stability threshold as a weak stable channel; and applying exponential contraction to adjust the weight of the weak stable channel, multiplying the initial weight value of the weak stable channel in the weight draft by an exponential decay term with the channel weight difference value as the parameter; applying linear expansion to adjust the weight of the strong stable channel, adding a linear expansion term with the corresponding channel weight difference value as the parameter to the initial weight value of the strong stable channel in the weight draft; normalizing the adjusted weight values of all channels, dividing the adjusted weight value of each channel by the sum of the adjusted weight values of all channels to generate an updated weight table; calculating the difference between the normalized weight value and the initial weight value in the weight draft to generate a residual vector; S5: driving the detection layer to complete multi-scale candidate box inference using the updated weight table, and storing the current frame weight table back to the cache for reference by the next frame; wherein driving the detection layer to complete multi-scale candidate box inference includes: reading the updated weight table and the multi-scale feature map from the cache area, multiplying the updated weight table with each scale layer of the multi-scale feature map channel by channel to generate a weighted feature map; driving the detection layer to perform multi-scale candidate box inference using the weighted feature map to generate the boundary box and confidence of the pest target; storing the updated weight table of the current frame together with the time index into the cache area; when processing the next frame, extracting the updated weight table of the previous frame from the cache area according to the time index as reference information for weight generation.

2. The dynamic channel attention based lightweight agricultural pest detection method according to claim 1, characterized in that, Step S1 includes the following contents: Continuously receive video frame streams in time sequence and store them in the cache area; perform element-by-element subtraction of pixel value matrices for each current frame and its previous frame to generate a difference image; apply horizontal and vertical Gaussian convolution to the difference image for smoothing processing to generate a smoothed difference image; subtract the smoothed difference image from the pixel value matrix of the current frame to generate a texture layer; write the texture layer and the corresponding time index in time sequence into the cache area. 3.The dynamic channel attention based lightweight agricultural pest detection method according to claim 1, characterized in that, Step S2 also includes the following contents: Multi-scale channel weights, specifically, a plurality of weight values are assigned according to the number of feature map channels, each value corresponding to a scale range to cover complex texture and contour changes; main scale channel weights, i.e. weight values concentrated in a single main scale to reduce redundant calculations.

4. The dynamic channel attention based lightweight agricultural pest detection system for implementing the dynamic channel attention based lightweight agricultural pest detection method according to any one of claims 1-3, characterized in that, It includes: Texture frame extraction module: continuously receive video frames, extract texture layers frame by frame through the difference operator, and write them in time sequence into the cache; Weight draft generation module: calculate the difference field of two consecutive texture layers, and then split the weight draft based on texture and contour feature comprehensive analysis; Channel mapping module: deploy a channel mapping link at the network entrance to multiply the weight draft with the current frame feature map channel by channel, while recording the weight difference table; Weight transition module: trigger the transition link according to the weight difference table, perform exponential contraction for weak stable channels, perform linear expansion for strong stable channels, and generate an updated weight table; Detection closing module: driving the detection layer to complete multi-scale candidate box inference using the updated weight table, and storing the current frame weight table back to the cache for reference by the next frame.

Citation Information

Patent Citations

  • A lightweight small object detection method combined with attention mechanism

    CN113065558B

  • A method and system for identifying pest species images

    CN113673340B

  • Forestry disease and pest monitoring system and method

    CN118038370A

  • Target detection method and system based on YOLOv9

    CN120070870A