Method and system for detecting dense leaves under complex illumination in field and computer equipment
Through the method of combining drone shooting and progressive feature pyramid networks with dense query refinement strategies, the blade detection problem under complex lighting and blade occlusion in the field is solved, and high-precision and efficient blade detection are achieved.
Patent Information
- Application Number
- CN202510885660.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-06-30
AI Technical Summary
In the prior art, it is difficult to achieve high-precision and efficient blade detection under complex light and dense blade occlusion in the field. Especially when complex light changes and blade occlusion are occluded, it is difficult to accurately detect blocked blades.
The blade image is taken by a drone, the image is segmented using a sliding window, and a feature pyramid network based on progressive fusion is constructed. Combining the intensive query refinement strategy and the Hungarian matching algorithm, the matching of the blade detection box is optimized and the final detection result is output.
It improves the accuracy and inspection rate of blade detection, reduces the adverse effects of complex lighting and occlusion, and achieves low-cost and rapid convergence of automated dense blade detection.
Smart Images

Figure CN120374965A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of dense target detection, and in particular to a method, system and computer device for detecting dense leaves under complex illumination in the field. Background Art
[0002] Crop growth monitoring is an important part of modern agricultural management, which can detect and solve problems affecting crop health and yield in a timely manner, thereby improving production efficiency and optimizing resource allocation. As the main organ for plants to carry out photosynthesis, leaves play a key role in plant growth by absorbing sunlight, carbon dioxide and water to synthesize organic compounds. Therefore, intelligent monitoring of leaf characteristics has become indispensable for evaluating the overall health of crops. Through systematic leaf monitoring, subtle morphological changes can be detected, potential diseases can be identified, and growth patterns can be analyzed, providing a scientific basis for agricultural management decisions.
[0003] In order to ensure the accuracy and efficiency of leaf monitoring, a dense target detection algorithm with powerful performance is required. Existing research has proposed a series of leaf detection methods. Among them, two-stage detectors (such as Faster R-CNN) generate proposal boxes through the RPN network and then perform fine-tuning and post-processing to obtain detection results. However, most current methods simply transfer computer vision technology to the agricultural field without optimizing for the complex illumination and dense leaf occlusion in the field.
[0004] The field environment is relatively complex. The strong sunlight throughout the day leads to significant light changes, and there are complex occlusion situations among the leaves. Existing methods have poor detection effects on leaves under these conditions. In addition, most existing leaf detection methods are for detecting the phenotype or diseases of individual leaves, but diseases often occur only in a small number of leaves at the early stage and the symptoms are mild, making it difficult for traditional methods to detect them in a timely manner. Therefore, an efficient dense leaf detection algorithm is needed that can detect single leaf images all day long and perform further processing.
[0005] In summary, the existing technology has the following deficiencies in the scenarios of complex illumination and dense leaf occlusion in the field: 1. It fails to effectively solve the problem of inconsistent features caused by light changes; 2. It is difficult to accurately detect occluded leaves in the case of dense leaf occlusion; 3. Lack of optimization for agricultural scenarios, making it difficult to meet the actual application requirements. Summary of the Invention
[0006] The object of the present invention is to provide a method, system and computer device for detecting dense leaves under complex field lighting conditions, which is used to achieve automatic dense leaf detection, can significantly reduce the adverse effects brought by complex field lighting, and enhance the accuracy and recall rate of the model for dense leaf detection.
[0007] To achieve the above object, the present invention provides a method for detecting dense leaves under complex field lighting conditions, including the following steps: Step S1: Use a drone to take vertical downward pictures of the leaves; Step S2: Segment the collected images using a sliding window, and screen out qualified images according to the criteria for annotation as a data set; Step S3: Construct a feature pyramid network based on progressive fusion, perform multi-level fusion on the decomposed multi-scale feature maps to eliminate the influence of lighting, and extract leaf phenotypic features; Step S4: Use a dense query refinement strategy to train the network, model individual leaves, process the detection frames of overlapping leaves, and optimize the query; Step S5: Use the Hungarian matching algorithm to match the detection frames and leaves, and output the final detection results.
[0008] Preferably, in step S2, the width and height of the sliding window are 9504×6336, and the step size is 5000.
[0009] Preferably, in step S2, the criteria include: Exclude images without target leaves; Screen out images with less than 200 leaves; Remove images containing interfering elements; Eliminate images in which the leaves are too scattered at the edge of the image and there are no leaves in the central area; Images with less than 50 leaves in the segmented images.
[0010] Preferably, in step S2, the annotation criteria are: randomly select half of the images for manual annotation, then use all of them as the training set to train the annotation model, and the model annotates the remaining half of the images and manually adjusts the annotation frames; The annotation frame only annotates the visible parts of the leaves. Targets with visible parts lower than 1 / 3 of the leaves are not annotated. Both mature leaves and primary leaves are annotated, and unexpanded leaves are not annotated.
[0011] Preferably, in step S3, to construct a feature pyramid network based on progressive fusion, perform multi-level fusion on the decomposed multi-scale feature maps to eliminate the influence of lighting and extract leaf phenotypic features, the specific operations are as follows: ; ; Among them, Represents the phenotypic characteristics of the output leaves at the highest level, Represents the fully connected neural network layer, Represents the 1x1 convolution operation, Represents the phenotypic characteristics of the input leaves at the highest level, AFA Represents the feature fusion module, Represents the upsampling operation, Represents the Output phenotypic characteristics of the Represents the Input phenotypic characteristics of the
[0012] Preferably, in step S3, the introduced AFA module obtains the fused feature of this layer through the feature of this layer and the feature of the previous layer. The specific operations are as follows: ; ; ; ; ; Among them, All represent the output of the intermediate process, Represents the activation function, Represents the input low-level feature, Represents the input high-level feature, Represents , Concatenate features along the channel dimension, Represents element-wise addition, Represents element-wise multiplication, Concat Represents the concatenation operation, Represents the average pooling operation, P Represents the fused feature of this layer, Represents the integrated feature in the channel dimension.
[0013] Preferably, in step S4, the dense query refinement strategy is specifically used for the DetectionTransformer type network; When the encoder generates the initial coordinates and queries, an additional network branch is used to generate additional queries and coordinates; The additional queries and coordinates, the original queries and coordinates adopt the same processing flow as the DetectionTransformer type network; The original queries eliminate redundant queries through non-maximum suppression operations in the decoder; After the additional queries are sorted, Top-K Hungarian matching is performed. After the original queries are subjected to non-maximum suppression operation, Hungarian matching is performed. Among them, in Top-K Hungarian matching, each instance selects Top-K query matches, and Hungarian matching can only select one query match. The formula is as follows: ; Among them, represents the output matching result, represents the Hungarian matching algorithm, represents the Top-K Hungarian algorithm where each instance can match Top-K queries, represents the non-maximum suppression operation, represents the queries generated by the original network, represents the queries additionally generated by the dense query refinement strategy, represents the operation of sorting by confidence.
[0014] Preferably, in step S4, the dense query refinement strategy uses two Loss functions for calculation. The original queries use the original Loss function, and the additional queries use the auxiliary Loss function. The formula is as follows: ; Among them, represents the overall Loss value of the network, represents the original Loss function, represents the auxiliary Loss function, represents the output of the original query matching, represents the output of the additional query matching.
[0015] The present invention also provides a dense leaf detection system under complex field lighting, including: An image acquisition module for using a drone to vertically shoot leaves downward in the air to obtain field images; An image preprocessing module for segmenting the acquired images using a sliding window and screening qualified image annotations according to a preset standard as a data set; A feature extraction module for constructing a feature pyramid network based on progressive fusion, performing multi-level fusion on the decomposed multi-scale feature maps to eliminate the influence of lighting and extract leaf phenotypic features; A network training module for training the network using the dense query refinement strategy, modeling individual leaves, processing the detection frames of overlapping leaves, and optimizing the queries; A detection matching module for using the Hungarian matching algorithm to match the detection frames and leaves and output the final detection results.
[0016] The present invention also provides a computer device, including a memory and a processor. The memory is used to store instructions, and the processor is used to execute the instructions to implement the method for detecting dense leaves under complex field illumination as described above.
[0017] Therefore, the present invention adopts the above method, system and computer device for detecting dense leaves under complex field illumination, and the beneficial technical effects are as follows: Existing object detection methods in the agricultural field are based on traditional object detection methods, simply performing dataset transfer training. Most of them detect the phenotypic diseases of single leaves, and it is difficult to play an actual role in the field scene affected by complex factors, easily ignoring the vast majority of occluded leaves, resulting in poor detection effects. In the field of dense object detection in the agricultural field, it is based on relatively early algorithms such as single-stage and two-stage algorithms. These algorithms do not have unique optimizations for densely occluded leaves. The complex field illumination makes the light on the leaf surface have large differences and inconsistent features, resulting in the network being difficult to accurately detect. And due to the excessive number of leaves, mutual occlusion and overlap, it is very difficult for these methods to detect occluded targets. These defects make it difficult for existing dense object detection algorithms in the agricultural field to achieve good results in practical applications.
[0018] In response to the challenges currently faced by those skilled in the art in dealing with the detection of dense leaf targets in the field, this solution starts directly from the source. Considering the characteristics of leaves with complex illumination and mutual occlusion, comprehensive detection results can be obtained after being processed by this method, and the recall rate and localization accuracy of the detection results are better than those of existing dense leaf detection methods. Through the present invention, the adverse factors brought by complex illumination and mutual occlusion are effectively reduced. Without spending too much computing power, it can quickly converge using fewer leaf training samples, so as to be put into practical application at low cost and achieve the effect of automatic leaf monitoring.
[0019] Compared with the prior art, this solution cleverly converts complex illumination and mutual occlusion into problems of algorithm robustness and training efficiency. Using a progressive fusion feature pyramid network and a dense query refinement strategy, even in the case of a complex sample environment and complex target relationships, effective features can be gradually extracted through the progressive fusion method, weakening the inconsistent feature phenomenon caused by complex illumination; at the same time, using the dense query optimization strategy, select and expand trainable samples during the training stage, and do not add other special measures during the inference stage to improve the inference efficiency, and its comprehensive detection performance far exceeds existing methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 It is a flowchart of a method, system and computer device for detecting dense leaves under complex field illumination according to the present invention; Figure 2 It is a structural diagram of a dense leaf detection network; Figure 3 It is the structural diagram of the Progressive Fusion Feature Pyramid Network; among them, Figure 3 In (A), it is the overall structure of the Progressive Fusion Feature Pyramid Network, where H and W respectively represent the height and width of the feature map; Figure 3 In (B), it is the overall structure of the AFA module; Figure 4 It is the network schematic diagram of the Dense Query Optimization Strategy, where the encoder and decoder are stacked for M layers; Figure 5 It is the comparison chart of the computational amount, number of parameters and average precision (NMS threshold 0.5) of the model on the Dense Kiwifruit Leaf Dataset; Figure 6 It is the comparison chart of the computational amount, number of parameters and average recall rate (number of queries 300) of the model on the Dense Kiwifruit Leaf Dataset; Figure 7 It is the influence of the Dense Query Optimization Strategy on the model performance in terms of the number of queries. Specific Embodiment
[0021] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.
[0022] Unless otherwise defined, the technical terms or scientific terms used in the present invention should have the ordinary meaning understood by those of ordinary skill in the field to which the present invention belongs.
[0023] Embodiment 1 In this embodiment, a neural network model based on the Progressive Feature Fusion Pyramid Network and Dense Query Optimization is used to cleverly convert complex lighting and mutual occlusion into algorithm robustness and training efficiency problems. The Progressive Fusion Feature Pyramid Network and Dense Query Refinement Strategy are used to enable effective features to be gradually extracted through the progressive fusion method even in the case of complex sample environments and complex target relationships, weakening the feature inconsistency phenomenon caused by complex lighting; at the same time, the Dense Query Optimization Strategy is used to preferentially select and expand trainable samples during the training stage, and no other special measures are added during the inference stage to improve the inference efficiency.
[0024] Referring to Figure 1 , in this embodiment, for the dense leaf detection method under complex field lighting, a dense leaf detection platform is adopted to complete the following steps: Step 1, use DJI Mavic Air2 drone as carrier, with maximum endurance time of 45 minutes, maximum endurance distance of 23 kilometers, and maximum flight speed of 5 meters per second. Equipped with SNOY A7R5 model camera, SONY SEL70200GM2 model visible light camera, and DJI Rhino3 model stabilizer for fixation and angle control. The shooting time is from June to September, located in a kiwi fruit base in a county in Guizhou Province, China. The captured image size is 6100w pixel JPEG format. The flight speed and direction of the drone, the camera's shooting angle of view are manually controlled, and the camera is 80-90 degrees vertical to the ground. The drone has accurate GPS positioning capability, which can record the position and height of each image in detail. The drone's flight altitude is about 16 meters, and the aperture value is 5.6, the exposure time is 1 / 125 seconds, ISO80, the focal length is 200 mm, the continuous flight is 600 seconds, the flight speed is 1 meter per second, and the drone performs grid scanning of the fields in the valley. First, it flies from the left side to the right side, then after moving forward a certain distance, it returns from the right side to the left side, and so on until the predetermined area is covered.
[0025] Step 2: Use the sliding window method to crop the image, with the window width and height being , with a step size of 5000, and evenly covering the image in width and height. The image screening criteria used include: (1) Exclude images that do not contain kiwi leaves; (2) Eliminate images with less than 200 leaves visually; (3) Remove images containing interfering elements such as roads or people; (4) Eliminate images where leaves are too scattered at the edge of the image and there are no leaves in the center area; (5) Images in which the number of leaves visually detected in the segmented image is less than 50.
[0026] The annotation standard is to randomly select half of the images for manual annotation, and then use all of them as training sets to train the annotation model. The model annotates the remaining half of the images and manually fine-tunes the annotation box. The annotation box only annotates the visible part of the leaf, and objects with visible parts less than 1 / 3 of the leaf are not annotated. Both mature leaves and nascent leaves are annotated, and leaves that have not unfolded are not annotated.
[0027] Step 3, such as Figure 2 As shown in the figure, the overall network structure diagram constructed includes a progressive fusion feature pyramid network and a dense query refinement strategy. Figure 3 As shown in the figure, the feature pyramid network based on progressive fusion is constructed, which uses a progressive method to fuse multi-scale features, thereby eliminating the feature differences caused by complex lighting. The formula is as follows: ; ; Among them, represents the phenotypic characteristics of the output leaves at the highest layer, represents the fully connected neural network layer, represents the 1x1 convolution operation, represents the phenotypic characteristics of the input leaves at the highest layer, AFA represents the feature fusion module, represents the upsampling operation, represents the phenotypic characteristics of the output leaves at the represents the phenotypic characteristics of the input leaves at the
[0028] The introduced AFA module obtains the fused features of this layer through the features of this layer and the features of the previous layer, effectively retaining more information and resisting the influence of light at the same time. Its formula is as follows: ; ; ; ; ; Among them, all represent the outputs of the intermediate process, represents the activation function, represents the input low-level features, represents the input high-level features, represents , concatenate the features along the channel dimension, represents element-wise addition, represents element-wise multiplication, Concat represents the concatenation operation, represents the average pooling operation, P represents the fused features of this layer, represents the integrated features in the channel dimension.
[0029] Step 4, as Figure 4 shown, the dense query refinement strategy is dedicated to the DetectionTransformer type network; When the encoder generates the initial coordinates and queries, an additional network branch is used to generate additional queries and coordinates; The additional queries and coordinates, the original queries and coordinates adopt the same processing flow as the DetectionTransformer type network; The original queries eliminate redundant queries through the non-maximum suppression operation in the decoder; After the additional queries are sorted, TopK Hungarian matching is performed, and after the original queries are subjected to non-maximum suppression operations, Hungarian matching is performed. Among them, in TopK Hungarian matching, an instance can select TopK query matches, while Hungarian matching can only select one query match. The formula is as follows: ; Among them, represents the output matching result, represents the Hungarian matching algorithm, represents the TopK Hungarian algorithm where each instance can match TopK queries, represents the non-maximum suppression operation, represents the queries generated by the original network, represents the queries additionally generated by the dense query refinement strategy, represents the operation of sorting by confidence.
[0030] The dense query refinement strategy is calculated using two Loss functions. The original queries use the original Loss function, and the additional queries use the auxiliary Loss function. The formula is as follows: ; Among them, represents the overall Loss value of the network, represents the original Loss function, represents the auxiliary Loss function, represents the output of the original query matching, represents the output of the additional query matching.
[0031] The initial learning rate is 2e-4, the weight decay coefficient is 1e-4, gradient clipping is achieved through L2 norm normalization, and the maximum threshold limit is 0.1. The stepwise learning rate scheduling strategy is activated in the 11th training epoch. Throughout the 12-epoch training process, ResNet-50 (R50) is always used as the fixed backbone architecture. The dataset is divided hierarchically, and the ratio of the training set to the validation set is 8:2. The final weights in the 12th epoch are only used for validation, and no intermediate checkpoints are selected. For the comparative network architectures, the parameter configurations specified in the original publications are strictly retained, and the R50 backbone is kept consistent in all models to ensure the comparability of the experiments. All computational processes follow the deterministic initialization protocol, and fixed random seeds are used for reproducibility verification.
[0032] Step 5, evaluate on the test samples, and use four main metrics for strict multi-faceted performance quantification: Average Precision, Precision, Recall, and F1-score. The calculation methods are as follows: ; Recall ; ; ; ; Among them, TP, FN, and FP are the numbers of true positive, false negative, and false positive samples respectively; AP is obtained by numerically integrating the Precision-Recall curve, represents the th category's AP , is the average value of AP over all categories, represents the number of dataset categories, represents the precision ( ) at a recall rate of . )
[0033] Comparative Experiment 1: Performance comparison of the model proposed in the present invention on the dense kiwifruit leaf dataset.
[0034] To verify the performance of the model proposed in the present invention, a performance comparison experiment was set up using the dense kiwifruit leaf dataset. The model proposed in the present invention was comprehensively compared with a variety of existing object detection methods, including the single-stage detectors ATSS, Sabl, YOLOv5L, the two-stage detectors Faster R-CNN, Cascade R-CNN, Libra R-CNN, Dtnamic R-CNN, and the end-to-end detectors DeformableDETR, DINO, RT-DETR, CO-DETR, DDQ. The test method is the same as in Example 1.
[0035] Combined with Table 1, this method has improved by 0.6% in mAP, and by 0.4% and 0.5% respectively in mAP@50 and mAP@75. It is worth noting that the average recall rate (AR@300) has increased by 1.1%. These results indicate that the model proposed in the present invention not only improves the recall rate of leaves, but also achieves higher bounding box localization accuracy and leaf classification accuracy. This highlights the robustness and effectiveness of this method in the dense leaf detection task. Through analysis, we found that the reason why the improvement of the AR@100 index is significantly lower than that of the AR@300 index is that when the maximum number of test anchor boxes is 100, it is difficult for the model to obtain enough anchor boxes to predict all leaves, and the number of leaves in some extreme data is greater than 100. These reasons make it difficult for us to judge the improvement of the model's recall rate through the AR@100 index. After increasing the number of test anchor boxes to 300, the number of instances that the model can predict is much higher than the actual number of instances, which will give the model a larger anchor box optimization space and inference redundancy. This is similar to the redundancy of using 100 Queries to predict targets on the single-digit instances of the COCO dataset in the DETR work. Therefore, we believe that AR@300 is a more accurate index than AR@100 in the dense leaf object detection task.
[0036] Table 1 Performance comparison results ;
[0037] Comparative experiment 2: Performance comparison of the model proposed in the present invention in terms of computational complexity, number of parameters and average precision.
[0038] Furthermore, to verify the performance comparison of the model in terms of computational complexity and number of parameters, the model obtained from the above experiment was used to calculate the computational complexity (FLOPs) and number of parameters (Params) indicators, and the average precision NMS threshold of 0.5 (mAP@50) and the average recall rate query number of 300 (AR@300) were used as the vertical axis indicators.
[0039] Combined Figure 5 and Figure 6 , it can be seen that the inference speeds of the YOLOv5L model and the RT-DETR model are much higher than those of other models, but the real-time detection model is difficult to play its advantages in the dense object detection scenario, and there are serious shortcomings in terms of accuracy. In the comparison with other detectors, although detectors such as ATSS have little difference from our model in terms of the mAP index, the AR@300 index differs by nearly 10%. This shows that there are still defects in the recall rate of these detectors. The model proposed in the present invention (Leaf-DETR) has higher recall rate and accuracy indicators, and only has a slight increase in the number of parameters and computational complexity. From the comprehensive analysis of multiple indicators, it is found that the model proposed in the present invention has only a slight computational resource cost and obtains more accurate results, which is applicable to the dense leaf object detection task.
[0040] Comparative Experiment 3: Performance comparison of the proposed model in terms of the number of queries.
[0041] The number of queries is one of the key parameters of the DetectionTransformer type network and affects the number of detection boxes in model initialization. The number of queries is generally related to the average number of targets in the target dataset. When the average number of targets is small, using a lower number of queries helps to speed up network training; when the average number of targets is large, using a higher number of queries helps to improve network accuracy. However, an increase in the number of queries will lead to a significant increase in computational consumption. In this experiment, by adjusting the number of queries, the dense kiwifruit leaf detection dataset was used for training and the mean average precision NMS threshold of 0.5 was adopted.
[0042] Combined with Figure 7 , it can be found that when increasing the number of queries in the model without the dense query optimization strategy, the trends of the two models are similar. When the number of queries continues to increase, the performance also improves. However, when the query reaches about 600, due to the lack of the dense query optimization strategy, the training of the model has a heavy burden, and similar queries greatly slow down the computational efficiency of the Hungarian matching algorithm. While the model equipped with the dense query optimization strategy has the function of iterative refinement of queries while increasing the number of queries, discarding redundant queries of the same instance in each iteration, reducing the inference burden of the model, and maintaining the performance stability of the model when the number of queries grows rapidly, without performance degradation due to the heavy query burden.
[0043] Therefore, the present invention adopts the above-mentioned method, system and computer device for dense leaf detection under complex field illumination. First, by using the progressive fusion feature pyramid network and the dense query refinement strategy, even in the case of complex sample environment and complex target relationships, effective features can be gradually extracted through the progressive fusion method, weakening the feature inconsistency phenomenon caused by complex illumination; at the same time, by using the dense query optimization strategy, trainable samples are preferably selected and expanded in the training stage, and no other special measures are added in the inference stage to improve the inference efficiency, and its comprehensive detection performance far exceeds the existing methods. Compared with the existing general object detection algorithms and the dense leaf detection algorithms in the agricultural field, the present invention can achieve better dense leaf detection performance and has good practical application potential.
[0044] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that they can still modify or equivalently replace the technical solutions of the present invention, and these modifications or equivalent replacements cannot make the modified technical solutions deviate from the spirit and scope of the technical solutions of the present invention.
Claims
1. A method for detecting dense leaves under complex field lighting conditions, characterized in that, It includes the following steps: Step S1: Use a drone to vertically shoot the leaves downward in the air; Step S2: Segment the acquired images using a sliding window, and screen and label qualified images according to the criteria as a dataset; Step S3: Construct a feature pyramid network based on progressive fusion, perform multi-level fusion on the decomposed multi-scale feature maps to eliminate the influence of illumination, and extract leaf phenotypic features; Step S4: Use a dense query refinement strategy to train the network. By modeling individual leaves, process the detection boxes of overlapping leaves, and optimize the queries; Step S5: Use the Hungarian matching algorithm to match the detection boxes and leaves, and output the final detection results.
2. The method for detecting dense leaves under complex field illumination according to claim 1, wherein In step S2, the width and height of the sliding window are 9504×6336, and the step size is 5000.
3. A method for detecting dense leaves under complex field lighting according to claim 1, characterized in that, In step S2, the criteria include: Exclude images without target leaves; Screen out images with less than 200 leaves; Remove images containing interfering elements; Eliminate images in which the leaves are too scattered at the edges of the image and there are no leaves in the central area; Images with less than 50 leaves in the segmented images.
4. A method for detecting dense leaves under complex field illumination according to claim 1, characterized in that, In step S2, the annotation criteria are: Randomly select half of the images for manual annotation, and then use all of them as the training set to train the annotation model. The model annotates the remaining half of the images and manually adjusts the annotation boxes; The annotation box only annotates the visible parts of the leaves. Targets with visible parts lower than 1 / 3 of the leaves are not annotated. Both mature leaves and primary leaves are annotated, and unexpanded leaves are not annotated.
5. A method for detecting dense leaves under complex field lighting according to claim 1, characterized in that, In step S3, construct a feature pyramid network based on progressive fusion, perform multi-level fusion on the decomposed multi-scale feature maps to eliminate the influence of illumination, and extract leaf phenotypic features. The specific operations are as follows: ; ; Among them, represents the phenotypic characteristics of the highest-level output leaves, represents the fully connected neural network layer, represents the 1x1 convolution operation, represents the phenotypic characteristics of the highest-level input leaves, AFA represents the feature fusion module, represents the upsampling operation, represents the phenotypic characteristics of the output leaves of the represents the phenotypic characteristics of the input leaves of the 6. The method for detecting dense leaves under complex field lighting according to claim 1, characterized in that In step S3, the introduced AFA module obtains the fused feature of this layer through the feature of this layer and the feature of the previous layer. The specific operations are as follows: ; ; ; ; ; Among them, both represent the output of the intermediate process, represents the activation function, represents the low-level features of the input, represents the high-level features of the input, represents , concatenate features along the channel dimension, represents element-wise addition, represents element-wise multiplication, Concat represents the concatenation operation, represents the average pooling operation, P represents the fused features of this layer, represents the integrated features in the channel dimension.
7. A method for detecting dense leaves under complex field lighting according to claim 1, characterized in that, In step S4, the dense query refinement strategy is specifically used for the DetectionTransformer type network; When the encoder generates the initial coordinates and queries, an additional network branch is used to generate additional queries and coordinates; The additional queries and coordinates, and the original queries and coordinates adopt the same processing flow as the DetectionTransformer type network; The original queries eliminate redundant queries through non-maximum suppression operations in the decoder; After the additional queries are sorted, perform TopK Hungarian matching. After the original queries are subjected to non-maximum suppression operations, perform Hungarian matching. Among them, in TopK Hungarian matching, the instance selects TopK queries for matching, and Hungarian matching can only select one query for matching. The formula is as follows: ; Among them, represents the output matching result, represents the Hungarian matching algorithm, represents the TopK Hungarian algorithm where each instance can match TopK queries, represents the non-maximum suppression operation, represents the query generated by the original network, represents the query additionally generated by the dense query refinement strategy, represents the operation of sorting by confidence.
8. A method for detecting dense leaves under complex field lighting according to claim 1, characterized in that In step S4, the dense query refinement strategy uses two Loss functions for calculation. The original queries use the original Loss function, and the additional queries use the auxiliary Loss function. The formula is as follows: ; Among them, represents the overall network Loss value, represents the original Loss function, represents the auxiliary Loss function, represents the original query matching output, represents the additional query matching output.
9. A dense leaf detection system under complex field lighting, characterized in that, It includes: An image acquisition module for using a drone to vertically shoot the leaves downward in the air to obtain field images; An image preprocessing module for segmenting the acquired images using a sliding window, and screening and labeling qualified images according to the preset criteria as a dataset; A feature extraction module, which is used to construct a feature pyramid network based on progressive fusion, perform multi-level fusion on the decomposed multi-scale feature maps to eliminate the influence of illumination, and extract leaf phenotypic features; A network training module, which is used to train the network using a dense query refinement strategy, model individual leaves, process the detection boxes of overlapping leaves, and optimize the queries; A detection matching module, which is used to match the detection boxes and leaves using the Hungarian matching algorithm and output the final detection results.
10. A computer device, characterized in that, It includes a memory and a processor. The memory is used to store instructions, and the processor is used to execute the instructions to implement the dense leaf detection method under complex field illumination according to any one of claims 1 to 8.
Citation Information
Patent Citations
Leaf segmentation method based on multi-scale double-attention mechanism and full convolutional neural network
CN112837330A
Intelligent high-throughput method for measuring and calculating inflorescence density of field rape and application
CN115424152A
Aero-engine blade defect detection method based on multi-scale DETR
CN117173449A
Water surface floating object identification and detection method, equipment and product
CN119888450A