Unmanned aerial vehicle tea anthracnose lightweight detection method and system, storage medium and equipment
By using the improved STC-YOLO fusion model of Swin-Transformer and YOLOv10, the adaptability and accuracy issues of the UAV tea anthracnose detection model in complex environments were solved, achieving lightweight and real-time detection, and improving the identification accuracy and robustness of tea anthracnose.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-17
- Publication Date
- 2026-03-20
AI Technical Summary
Existing drone-based anthrax detection models for tea leaves suffer from poor adaptability, low accuracy, and high computational complexity in complex lighting conditions, background interference, and the identification of small-scale lesions, making it difficult to achieve lightweight and real-time detection.
The STC-YOLO detection model, which integrates an improved Swin-Transformer with YOLOv10, enhances the model's detection capabilities in complex environments by introducing a lightweight LW-Swin Transformer module and a coordinate attention (CA) module in the Neck stage, combined with a high-resolution small target detection head.
It improves the accuracy and robustness of anthracnose detection in tea, reduces computational overhead, enables real-time detection on UAV platforms, and significantly reduces the false negative and false positive rates.
Smart Images

Figure CN121708511A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of intelligent detection of agricultural diseases, and particularly relates to a lightweight detection method and system for tea leaf anthracnose of a UAV, a storage medium and equipment. BACKGROUND
[0002] As an important economic crop in China, the growth of tea directly affects the yield and quality of the tea industry. However, tea gardens are easily affected by various diseases and pests in a changing natural environment. Tea anthracnose is one of the most representative and fastest spreading diseases. Anthracnose mainly infects tea leaves, and early symptoms are small and light brown pinhead-shaped patches. As the disease progresses, the patches gradually expand, the color deepens, and the edges become clear and necrotic. Ultimately, the leaves wither, fall off, and significantly reduce the quality and yield of tea. Due to the hilly terrain, high planting density, and overlapping leaf coverage in tea gardens, the disease patches have typical characteristics such as small size, weak contrast, easy confusion, and easy blocking, making it difficult to detect early-stage diseases.
[0003] Traditional tea garden disease monitoring mainly relies on manual inspection. However, tea gardens are usually located in hilly areas, have large areas, dense plants, and uneven lighting conditions, making manual detection inefficient, highly subjective, and unable to achieve real-time monitoring on a large scale. With the development of intelligent agriculture, unmanned aerial vehicles (UAVs) have become an important means of tea garden disease monitoring due to their high mobility, low cost, wide coverage, and fast imaging capabilities. UAV images combined with target detection algorithms can achieve non-contact identification of tea leaf lesions, providing a new possibility for early diagnosis of tea anthracnose. With the development of UAVs and intelligent vision technology, image-based automatic identification of tea diseases and pests has become a research hotspot, especially deep learning models provide a new technical path for lesion identification in complex natural scenes.
[0004] In recent years, a large number of researches on intelligent detection of tea garden pests and diseases have been carried out at home and abroad. Some methods construct deep learning models based on RGB and hyperspectral images, and realize the identification of tea leafhopper damage degree through ResNet18, VGG16 and other networks. The recognition accuracy of HSI combined with LSTM reaches 95.6%, indicating that multi-modal images have obvious advantages in tea garden pest and disease monitoring. Some methods use image segmentation combined with handcrafted features to realize the classification of healthy tea leaves and algal spot disease through SVM classifier, laying a foundation for early research on automatic identification of tea disease. Some methods propose LeafNet convolutional neural network to realize automatic identification of multiple diseases such as anthracnose and white star disease, with an accuracy of 90.1%, proving the effectiveness of CNN in extracting texture features of tea disease spots. With the development of target detection technology, a tea disease detection model based on YOLOv7 is constructed to realize high-precision identification of 97.3%, but there is still missed detection in complex light and small disease spot scenes. In order to further improve the classification performance of diseases, some methods also propose a variety of hybrid deep learning models, with the highest classification accuracy reaching 99.65%, showing the potential of deep learning architecture fusion in tea disease identification task.
[0005] Although relevant researches have made many progress, most of the existing models still face the following limitations: 1. Most models are based on indoor or static images, and lack optimization for motion blur, scale change, uneven illumination and other problems of unmanned aerial vehicle aerial images, which have poor adaptability to unmanned aerial vehicle aerial images.
[0006] 2. The detection rate of early anthracnose spots with extremely small size, weak texture and strong background interference is low.
[0007] 3. The model has large number of parameters and high computational complexity, which is difficult to meet the needs of real-time inference of unmanned aerial vehicle and lightweight loading of embedded model.
[0008] 4. Although the existing YOLO series models have real-time performance, the detection rate of small targets and occluded disease spots is still insufficient.
[0009] Therefore, for tea anthracnose, which has the characteristics of small size, weak contrast, easy occlusion and complex background, there is still a lack of a detection method that takes into account detection accuracy, lightweight and real-time performance. SUMMARY
[0010] The purpose of the present application is to overcome the problems existing in the prior art, and provide a lightweight detection method, system, storage medium and equipment for unmanned aerial vehicle tea anthracnose, propose a lightweight tea anthracnose detection model based on improved Swin-Transformer and YOLOv10 fusion, and improve the detection ability of unmanned aerial vehicle in complex environment of tea garden.
[0011] The object of the present application is achieved by the following technical solutions: In a first aspect, a lightweight detection method for tea leaf anthracnose by a UAV is provided, comprising the following steps: S1. Collecting image data of a tea garden by using a UAV; S2. Constructing an STC-YOLO detection model based on the image data of the tea garden, the STC-YOLO detection model comprising: a feature extraction network based on the Backbone structure of YOLOv10; a feature fusion network sequentially introducing a lightweight LW-Swin Transformer module and a coordinate attention CA module at the Neck stage; the LW-Swin Transformer module introduces a learnable parameter scaling normalization in the residual structure of the original Swin Transformer; the CA module is added after the feature fusion operation and is used for joint encoding of the input features in the channel and spatial directions; a detection head network adding a high-resolution small target detection head to the original detection layer; S3. Training the STC-YOLO detection model; S4. Deploying the trained STC-YOLO detection model on a UAV platform to realize real-time detection of tea leaf anthracnose.
[0012] In some embodiments, the LW-Swin Transformer module comprises a multi-head self-attention layer based on a shift window and a multi-layer perceptron layer, each layer applying layer normalization before and adopting a residual connection.
[0013] In some embodiments, the joint encoding of the input features in the channel and spatial directions comprises: performing one-dimensional global average pooling on the input features along the horizontal coordinate direction and the vertical coordinate direction respectively to obtain horizontal direction perception features and vertical direction perception features; encoding and direction weighting the horizontal direction perception features and the vertical direction perception features to generate two attention maps containing position information and direction information.
[0014] In some embodiments, the small target detection head is connected to the shallow features output by the feature fusion network to perform prediction.
[0015] In a second aspect, a lightweight detection system for tea leaf anthracnose by a UAV is provided, comprising: an image acquisition module for acquiring image data of a tea garden; The detection model construction module is configured to construct an STC-YOLO detection model based on the tea garden image data, and the STC-YOLO detection model comprises: A feature extraction network based on a Backbone structure of YOLOv10; A feature fusion network sequentially introducing a lightweight LW-Swin Transformer module and a coordinate attention CA module at a Neck stage; the LW-Swin Transformer module introduces a learnable parameter scaling normalization in a residual structure of an original Swin Transformer; and the CA module is added after a feature fusion operation and used for jointly encoding input features in a channel and a spatial direction. A detection head network adding a high-resolution small target detection head to an original detection layer; A model training module configured to train the STC-YOLO detection model; A real-time detection module configured to deploy the trained STC-YOLO detection model on a UAV platform to realize real-time detection of tea leaf anthracnose.
[0016] In a third aspect, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the UAV tea leaf anthracnose lightweight detection method in the first aspect.
[0017] In a fourth aspect, an electronic device is provided, which comprises a memory and a processor, and the memory stores computer instructions executable on the processor, and the processor executes the computer instructions to implement the UAV tea leaf anthracnose lightweight detection method in the first aspect.
[0018] It should be further explained that the technical features of the above-mentioned various option embodiments can be combined or replaced with each other to form new technical solutions without conflict.
[0019] Compared with the prior art, the present application has the following advantages: 1. The LW-Swin Transformer module is introduced at the Neck stage of YOLOv10. The module enhances the global modeling capability of the feature fusion stage, so that the model can better capture the global correlation features of the disease spots in the leaf texture and the environment background, reduce the interference of redundant information, and thus improve the robustness under the conditions of complex light, cluttered background and overlapping leaves in the tea garden. At the same time, the lightweight window self-attention mechanism effectively reduces the computational overhead, which is conducive to the real-time operation of the UAV platform.
[0020] 2.The Neck structure of the application introduces a lightweight coordinate attention (CA) module. CA can realize the joint encoding of channels and spatial directions at very low computational cost, so that the model can focus more accurately on the significant area of the lesion, while suppressing the interference of complex factors such as leaf texture, shadow, backlight, etc. This mechanism improves the model's expression ability for lesion reflection characteristics and position distribution, and improves the overall detection accuracy without significantly increasing the model parameters.
[0021] 3.The application develops a new small target detection head for the characteristics of small tea leaf anthracnose spots and early features. The early stage of tea leaf anthracnose spots is only about 1-3mm in diameter, and appears as a weak spot in the high-density leaf background in the unmanned aerial vehicle image, which is easily ignored by the standard detection head. The additional small target detection head introduced in the application predicts the high-resolution layer, significantly enhances the model's response to small lesions, effectively reduces the false negative and false positive rates, and improves the sensitivity of early disease identification.
[0022] In summary, the three improvements of the STC-YOLO detection model are closely related to the characteristics of tea leaf anthracnose disease. By improving the global modeling ability, small target sensitivity, and the accuracy of the attention area, the model's accuracy, robustness, and real-time performance in complex unmanned aerial vehicle imaging conditions are significantly enhanced. BRIEF DESCRIPTION OF DRAWINGS
[0023] Figure 1 The flowchart of the unmanned aerial vehicle tea leaf anthracnose lightweight detection method of the application; Figure 2 The network structure diagram of the STC-YOLO detection model of the application; Figure 3 The original Swin Transformer module diagram of the application; Figure 4 The LW-Swin Transformer module diagram of the application; Figure 5 The CA structure principle diagram of the application; Figure 6 The detection head network structure diagram of the application. DETAILED DESCRIPTION
[0024] The technical solutions of the application will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the application, not all embodiments. The components of the embodiments of the application described and shown in the drawings can be arranged and designed in various different configurations. Based on the embodiments in the application, all other embodiments obtained by those of ordinary skill in the art without creative labor are within the scope of protection of the application.
[0025] It should be noted that the defects of the above prior art solutions are the results obtained by the inventors after practice and careful study, therefore, the discovery process of the above problems and the solutions proposed by the embodiments of the present application to solve the above problems should be the contributions made by the inventors to the present application during the process of invention and creation, and should not be understood as technical contents known to those skilled in the art.
[0026] To solve the technical problems pointed out in the background art, the embodiments provided by the present application are as follows: In an exemplary embodiment, a lightweight unmanned aerial vehicle (UAV) detection method for tea leaf anthracnose is provided, which comprises the following steps: Figure 1 , comprising the following steps: S1. Collecting image data of a tea garden using a UAV; S2. Constructing an STC-YOLO detection model based on the image data of the tea garden, the STC-YOLO detection model comprising: a feature extraction network based on the Backbone structure of YOLOv10; a feature fusion network that sequentially introduces a lightweight LW-Swin Transformer module and a coordinate attention (CA) module at the Neck stage; the LW-Swin Transformer module introduces a learnable parameter scaling normalization in the residual structure of the original Swin Transformer; the CA module is added after the feature fusion operation and is used to jointly encode the input features in the channel and spatial directions; a detection head network that adds a high-resolution small target detection head based on the original detection layer; S3. Training the STC-YOLO detection model; S4. Deploying the trained STC-YOLO detection model on a UAV platform to realize real-time detection of tea leaf anthracnose.
[0027] Exemplarily, in step S1, the hardware environment is set as follows: UAV platform: DJI Lingling 4 Multispectral, equipped with an RGB sensor, used to collect multispectral and high-resolution visible light images of a tea garden.
[0028] Computing platform: NVIDIA RTX 4090 GPU is used in the training stage; NVIDIA Jetson Xavier NX embedded platform is used in the deployment stage.
[0029] Image acquisition: The flight height is set to 5-10 m, the resolution is set to 4000x3000 pixels, and the ground sampling distance (GSD) is ensured to be about 2.6 mm / pixel, which is sufficient to distinguish early lesions with a diameter of 1 mm or more.
[0030] The tea leaf anthracnose lesions in the images are finely labeled using the LabelImg tool. Due to the small size of the lesions, a rectangular box is used to tightly enclose the lesion area during labeling. According to the development stage of the lesion, the labeling is divided into two categories: early lesions (diameter 1-3 mm, light brown color, fuzzy edges) and medium lesions (diameter 3-5 mm, dark brown color, clear necrotic edges).
[0031] Further, to improve the robustness of the model, the collected images are preprocessed, including: Geometric transformation: Random horizontal / vertical flipping (probability 0.5), random rotation (±30°), random cropping (scaling ratio 0.8-1.2).
[0032] Color and light disturbance: To simulate the unmanned aerial vehicle shooting environment, random brightness adjustment (±30%), contrast adjustment (±20%), saturation adjustment (±20%), and Gaussian noise addition (σ=0.01) are used.
[0033] Simulated occlusion: Randomly add green leaf-shaped or shadow-shaped mosaic blocks to simulate leaf overlap and light occlusion, and enhance the model's ability to recognize partially occluded lesions.
[0034] In step S2, the traditional YOLO series model still has performance deficiencies in multi-scale feature extraction, global context modeling, and small target recognition due to the small size of the tea leaf anthracnose spots, weak contrast, easy occlusion, and strong background interference in the unmanned aerial vehicle aerial image. Therefore, the present application improves the YOLOv10 structure from three aspects: attention mechanism enhancement, global context optimization, and small target fine-grained perception, and proposes a lightweight high-precision STC-YOLO detection model suitable for unmanned aerial vehicle tea leaf anthracnose detection. The detailed structure and position are as shown in Figure 2 The red line frame in the figure is the improved part.
[0035] Specifically, in the natural tea garden scene, the images collected by the unmanned aerial vehicle often have missing or discontinuous local features of tea leaf anthracnose spots due to factors such as leaf overlap, uneven light, and dynamic blur. The traditional convolutional network has a limited local receptive field, making it difficult to capture long-distance correlation information across regions, which can easily lead to misjudgment of the lesion area. Therefore, the present application introduces a normalized improved LW-Swin Transformer module at the Neck stage of the YOLOv10 architecture to enhance the model's global feature modeling capability. As Figure 3As shown, the original Swin Transformer adopts a hierarchical structure, a shift window self-attention mechanism and a global context fusion strategy, which can effectively capture long-distance dependency information while maintaining linear complexity. Figure 4 As shown, the present application further adds a scaling normalization with learnable parameters to the residual structure of the original Swin Transformer, which makes the multi-path features scale consistent before fusion, improves the stability of weight allocation and suppresses the interference of redundant features, and enhances the adaptive learning ability of lesion-related features.
[0036] To ensure that the Swin Transformer can accurately allocate the weights of different path data streams, reduce the influence of redundant features, and promote the adaptive learning of the correlation between target features, the present application performs residual connectivity and scale normalization of the learnable parameters before the weighted summation of the Swin Transformer, and the principle formula is as follows: In the formula: is the normalized parameter; is the non-standardized learning parameter.
[0037] This scaling normalization method can simplify the calculation while maintaining the relative proportion of the original data. By dividing each value by and, the data is scaled to the range [0, 1]. In addition, this scaling is not sensitive to outliers, and even if there are abnormal data, it will not significantly affect the fluctuation of the results. The normalization of the residual network not only enhances the stability and generalization of the model, but also speeds up the convergence of the model during training.
[0038] The improved LW-Swin Transformer module significantly improves the model's ability to recognize weak texture, occluded and blurred lesion areas in complex tea garden scenes, effectively reduces missed and false detections, and enhances the model's robustness and feature expression ability under different shooting conditions.
[0039] Further, the early lesion size of tea leaf anthracnose is extremely small, the color difference with the leaf background is weak, and it is easily disturbed by light changes, leaf texture and occlusion factors, making the lesion features not significant in the unmanned aerial vehicle image and easily overwhelmed by background information. To improve the model's ability to perceive the local significant area of the lesion, the present application introduces a lightweight coordinate attention (CA) mechanism in the feature fusion network of YOLOv10, and its implementation principle is as follows: Figure 4C represents the number of channels, W represents the width, H represents the height, and 1 represents the dimension. The CA module obtains direction-aware features through one-dimensional global pooling in the X and Y directions, and then generates two attention maps containing position information and direction information after encoding and direction weighting. This structure embeds spatial position information into channel attention, enabling the model to have direction perception and position perception capabilities without significantly increasing computational complexity, and can more effectively suppress the influence of redundant background texture, shadow interference, and noise features on lesion identification. The specific processing process is as follows: Input and coordinate information embedding: Given the input feature map X∈R C×H×W The CA module does not directly perform two-dimensional global pooling (which would result in loss of position information), but instead performs one-dimensional global average pooling along the horizontal (X) coordinate direction and the vertical (Y) coordinate direction.
[0040] The pooling kernel with a height of H traverses the width direction to generate a CxHx1 feature vector, which encodes the global context in the vertical direction (Y axis).
[0041] The pooling kernel with a width of W traverses the height direction to generate a Cx1xW feature vector, which encodes the global context in the horizontal direction (X axis).
[0042] Joint encoding and attention generation: The two direction feature vectors are concatenated (Concat) and then fed into a shared 1x1 convolution (equivalent to a lightweight shared MLP) for nonlinear transformation and dimension reduction. Then, the output features are split into two independent parts, each using a 1x1 convolution to adjust back to the original channel number, and then using a Sigmoid activation function to generate two independent attention weight maps: height attention map and width attention map.
[0043] Weighted output: Finally, the original input feature map X is multiplied element-wise with the height attention map and the width attention map to obtain the output feature map enhanced in both height and width directions.
[0044] By introducing the CA module in the Neck stage, the model focuses more accurately on the key texture area of the anthracnose lesion, significantly improves the detection accuracy of weak contrast lesions and early small lesions, and at the same time maintains the lightweight operation advantage, providing support for real-time processing on the unmanned aerial vehicle platform.
[0045] Further, the most challenging feature of tea leaf anthracnose is the extremely small size (about 1-3 mm) and weak visual saliency of early lesions. The pixel ratio of lesions in the image is lower due to the limitations of flight height, imaging resolution and viewing angle in UAV images, and the original three-level detection layer of YOLOv10 is mainly designed for medium and large targets, and has limited ability to perceive the fine-grained texture information of small targets, which easily causes early lesions to be ignored. To solve this problem, the present application adds a 160x160 high-resolution small target detection head to the detection end of YOLOv10, and the improved detection layer structure is as shown in Figure 6 The detection head performs prediction on shallow features and can retain more local detailed structures, such as the initial light brown spots, slight necrosis edges and subtle color changes of early lesions, thereby improving the sensitivity of the model to small lesions in aerial images of tea gardens.
[0046] With the addition of the small target detection layer, the detection rate of the model for early and subtle lesions of tea leaf anthracnose is significantly improved, and the miss detection rate is reduced, especially in complex scenes such as long-distance shooting, overlapping and dense leaves, and unstable lighting, which performs more stably and helps to realize early monitoring and rapid warning of tea leaf anthracnose.
[0047] Further, the loss function used in the model training is the EIoU loss function, which replaces the aspect ratio by calculating the difference value of width and height respectively, and solves the problem of imbalance of detection target frames. The EIoU loss function can effectively avoid the failure caused by different image aspect ratios when detecting tea leaf anthracnose. Therefore, the use of EIOU loss function can better ensure the stability and real-time performance of the UAV when detecting target tea leaves.
[0048] Dataset division: all annotated data are randomly divided into training set, validation set and test set in the ratio of 7:2:1 to ensure that the samples of each class and under different shooting conditions are evenly distributed in the subsets. It is proposed that during the training process, the image input resolution is set to 640x640, the training round is 300 times, the initial learning rate is 0.002, the preheating learning rate is 3.0, the weight decay is set to 0.0005, and the batch size is 32.
[0049] In another exemplary embodiment, based on the same inventive concept as the method embodiment, a lightweight UAV tea leaf anthracnose detection system is provided, comprising: An image acquisition module for acquiring tea garden image data; A detection model construction module for constructing an STC-YOLO detection model based on the tea garden image data, the STC-YOLO detection model comprising: A feature extraction network based on the Backbone structure of YOLOv10; The feature fusion network sequentially introduces a lightweight LW-Swin Transformer module and a coordinate attention CA module in the Neck stage; the LW-Swin Transformer module introduces a learnable parameter scaling normalization in the residual structure of the original Swin Transformer; the coordinate attention CA module is added after the feature fusion operation, and is used for joint encoding of the input features in the channel and spatial direction; The detection head network increases a high-resolution small target detection head on the basis of the original detection layer; The model training module is configured to train the STC-YOLO detection model; The real-time detection module is configured to deploy the trained STC-YOLO detection model on a UAV platform to realize real-time detection of tea leaf anthracnose.
[0050] In another example embodiment, based on the same inventive concept as the method embodiment, a computer readable storage medium is provided, which stores a computer program, and the computer program is executed by a processor to implement the UAV tea leaf anthracnose lightweight detection method provided by the embodiment of the application. Based on this understanding, the technical solution of the present embodiment or the part that essentially contributes to the prior art or the part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device) to execute all or part of the steps of the method of the present application. The aforementioned storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program code storage media.
[0051] In another example embodiment, based on the same inventive concept as the method embodiment, an electronic device is provided, which includes a memory and a processor, the memory stores computer instructions executable on the processor, and the processor executes the computer instructions to perform the UAV tea leaf anthracnose lightweight detection method provided by the embodiment of the application.
[0052] The processor can be a single-core or multi-core central processing unit or a specific integrated circuit, or one or more integrated circuits configured to implement the present application.
[0053] Embodiments of the subject matter and the functional operations described in this specification can be implemented in various computing systems, including in computer software or firmware, in computer hardware, including the structural equivalents of such software and firmware, or in combinations of one or more of them. Embodiments of the subject matter described in this specification can be implemented as one or more computer programs, namely, one or more modules of computer program instructions encoded on a tangible non-transitory program carrier for execution by, or to control the operation of, data processing apparatus. Alternatively, or additionally, the program instructions can be encoded on an artificially generated propagated signal, for example, a machine-generated electrical, optical, or electromagnetic signal that is generated to encode information for transmission to suitable receiver apparatus for execution by a data processing apparatus. The computing system can include, among other computer-readable media, computer storage media (e.g., RAM, ROM, EEPROM, flash memory, or other memory technology), computer- readable non-transitory media (e.g., hard-disk storage, or other magnetic storage devices, or optical storage devices), or any other volatile or non-volatile computer-readable media.
[0054] The processes and logic flows described in this specification can be performed by one or more programmable computers executing one or more computer programs to perform functions by operating on input data and generating output. The processes and logic flows can also be performed by special purpose logic circuitry, for example, an FPGA (field programmable gate array) or an ASIC (application specific integrated circuit) and / or by programmable data processing apparatuses that can be
[0055] Processors suitable for the execution of a computer program include, by way of example, both general and special purpose microprocessors, or any other kind of central processing unit. Generally, a central processing unit will receive instructions and data from a read-only memory and / or a random access memory. Computer programs, also called programs, routines, software modules, software applications, components, or the like, can be written in any form of programming language, including compiled or interpreted languages, and / or computer
[0056] It should be understood that each block in a flowchart or block diagram can represent a module, segment, or portion of code, which contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the figures. For example, two consecutive blocks may actually be executed substantially in parallel, or they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0057] The above detailed embodiments are a description of the present invention. It should not be considered that the specific embodiments of the present invention are limited to these descriptions. For those skilled in the art, several simple deductions and substitutions can be made without departing from the concept of the present invention, and all of these should be considered to fall within the protection scope of the present invention.
Claims
1. A lightweight detection method for anthrax in tea leaves using unmanned aerial vehicles (UAVs), characterized in that, Includes the following steps: S1. Use drones to collect image data of tea gardens; S2. Construct an STC-YOLO detection model based on the tea garden image data. The STC-YOLO detection model includes: Feature extraction network based on the YOLOv10 backbone structure; The feature fusion network sequentially introduces a lightweight LW-Swin Transformer module and a coordinate attention (CA) module in the Neck stage. The LW-Swin Transformer module introduces a scaling and normalization of learnable parameters into the residual structure of the original Swing Transformer. The coordinate attention (CA) module is added after the feature fusion operation and is used to jointly encode the input features in terms of channel and spatial orientation. The detection head network adds a high-resolution small target detection head to the original detection layer; S3. Train the STC-YOLO detection model; S4. Deploy the trained STC-YOLO detection model on an unmanned aerial vehicle (UAV) platform to achieve real-time detection of anthrax in tea leaves.
2. The lightweight detection method for anthrax in tea leaves using a drone according to claim 1, characterized in that, The LW-Swin Transformer module includes a multi-head self-attention layer based on a shift window and a multi-layer perceptron layer. Layer normalization is applied before each layer, and residual connections are used.
3. The lightweight detection method for anthrax in tea leaves using a drone according to claim 1, characterized in that, The joint encoding of the input features by channel and spatial orientation includes: One-dimensional global average pooling is performed on the input features along the horizontal and vertical coordinate directions to obtain horizontal and vertical perceptual features. After encoding and weighting the horizontal and vertical perception features, two attention maps containing positional and orientation information are generated.
4. The lightweight detection method for anthrax in tea leaves using a drone according to claim 1, characterized in that, The small target detection head is connected to the shallow features output by the feature fusion network to perform prediction.
5. A lightweight detection system for anthrax in tea leaves using unmanned aerial vehicles (UAVs), characterized in that, include: The image acquisition module is used to collect image data of the tea garden. The detection model construction module is used to construct an STC-YOLO detection model based on the tea garden image data. The STC-YOLO detection model includes: Feature extraction network based on the YOLOv10 backbone structure; The feature fusion network sequentially introduces a lightweight LW-Swin Transformer module and a coordinate attention (CA) module in the Neck stage. The LW-Swin Transformer module introduces a scaling and normalization of learnable parameters into the residual structure of the original Swing Transformer. The coordinate attention (CA) module is added after the feature fusion operation and is used to jointly encode the input features in terms of channel and spatial orientation. The detection head network adds a high-resolution small target detection head to the original detection layer; The model training module is used to train the STC-YOLO detection model; The real-time detection module is used to deploy the trained STC-YOLO detection model on the UAV platform to achieve real-time detection of anthrax in tea.
6. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the lightweight detection method for anthrax in tea leaves by unmanned aerial vehicles as described in any one of claims 1-4.
7. An electronic device comprising a memory and a processor, wherein the memory stores computer instructions executable by the processor, characterized in that, When the processor executes computer instructions, it performs the lightweight detection method for anthrax in tea leaves as described in any one of claims 1-4.