Maize stamen detection method based on deep learning
Through the corn stamen detection network based on the YOLOV5n architecture, combined with EMA and AttFPN mechanisms, the image quality and algorithm efficiency problems of corn stamen detection on the remote sensing scale of the drone are solved, and high-precision corn stamen detection and growth status monitoring are achieved, supporting precise agricultural management.
Patent Information
- Application Number
- CN202510420378.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-03
- Publication Date
- 2025-07-22
AI Technical Summary
In the existing technology, in corn stamen detection on the remote sensing scale of drone, there is a contradiction between image quality and algorithm efficiency, making it difficult to achieve high-precision detection.
A corn stamen detection network based on the YOLOV5n architecture is adopted, combining the EMA index sliding average module, AttFPN attention mechanism and WI oUv2 loss function, multi-scale feature fusion and object detection are carried out, and a dynamic tracking feedback model is built to capture the degree of corn development equilibrium.
It significantly improves the accuracy and efficiency of corn stamen detection, and can capture changes in the growth balance degree during corn extraction in real time, providing a scientific basis for precise agricultural management.
Smart Images

Figure CN120356121A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of corn stamen detection, and more specifically, the present invention relates to a method for detecting corn stamens based on deep learning. Background Art
[0002] As an important staple food, corn is an indispensable raw material for industries such as food, light industry, and chemical industry. Selecting suitable corn varieties and scientific field management are important ways to increase yields. Corn phenotypes include external characteristics such as crop morphology, color, and structure, which can reflect the interactive effects of genotypes and environmental factors, and are of great significance for understanding crop growth and development, screening varieties, and estimating yields. The stamen is one of the important phenotypic indicators of corn. The appearance of the stamen is a sign that corn enters the tasseling stage. At the same time, the morphological characteristics of the stamen also affect the energy cost and shading area of pollen grain production. Traditional manual observation is time-consuming and laborious and cannot meet the needs of field production. Remote sensing technology has advantages such as good real-time performance, large coverage area, and low acquisition cost, and is one of the emerging research means in the fields of agriculture, ecology, environment, etc. The stamen is located at the top of the corn plant, which is convenient for using low-altitude remote sensing equipment such as unmanned aerial vehicles (UAVs) to carry out large-scale inspections. However, due to differences in varieties, water and fertilizer conditions, etc., the ear shapes of corn are different. Moreover, for UAV remote sensing images under natural conditions, the corn ear scale is small, there are occlusions, and the color differentiation is not obvious, etc., which pose challenges to stamen detection.
[0003] In recent years, the continuous update of deep learning technology has made it possible to learn more accurate and generalized models from massive data to handle the diversity and complexity of target phenotypes in remote sensing images. Using deep learning algorithms to detect plant parameters is one of the research hotspots. For corn, many scholars have carried out a large number of research on recognition methods based on platforms such as ground-based, vehicle-mounted, and UAVs. Liu et al. proposed an improved multi-scale efficient residual decomposition convolutional neural network model for corn row recognition to meet the needs of on-site automatic navigation of agricultural machinery; Guan et al. used a ground-based remote sensing platform to carry out corn canopy organ detection based on an improved DBi-YOLOv8 model, and achieved accurate counting of leaves, ears, and ear numbers; Yuan and Hao et al. established a dataset collected during the full tasseling period of corn and designed the RESAM-yolov8n method to identify stamens in UAV images, and obtained a relatively high counting accuracy when using original high-quality images. In summary, corn stamen detection is more suitable for applying remote sensing technology, but there is a contradiction between the image quality used and the algorithm efficiency. On the UAV remote sensing scale, more complex natural conditions make the detection algorithm need to be improved. To solve the above problems, a technical solution is provided now. Summary of the Invention
[0004] To overcome the above-mentioned defects of the prior art, the present invention provides a method for detecting corn stamens based on deep learning, and uses a corn stamen detection network based on the YOLOV5n architecture to solve the contradiction between the image quality and algorithm efficiency in the existing corn stamen detection, and the problem that the detection algorithm still needs to be improved at the scale of UAV remote sensing, so as to solve the problems raised in the above background technology.
[0005] To achieve the above object, the present invention provides the following technical solutions:
[0006] A method for detecting corn stamens based on deep learning, comprising the following steps:
[0007] Step 1, collect real-time first image data of the corn tasseling stage by using a camera carried by a UAV to fly and inspect the corn experimental field according to the planned route, and perform segmentation processing on the first image data to obtain second image data;
[0008] Step 2, use a corn stamen detection network based on the YOLOV5n architecture to perform stamen annotation on the second image data to obtain third image data, and divide the third image data into a training set, a validation set and a test set according to a ratio of 8:1:1;
[0009] Step 3, extract the morphological feature parameters of the corn ear based on the third image data, and obtain the phenotypic parameters of the corn plant during the corn tasseling stage based on the corn skeleton point cloud;
[0010] Step 4, build a dynamic tracking feedback model based on the morphological feature parameters and phenotypic parameters to capture the corn development balance degree during the corn tasseling stage.
[0011] As a further solution of the present invention, in step 2, the specific steps of using a corn stamen detection network based on the YOLOV5n architecture to perform stamen annotation on the second image data to obtain third image data are as follows:
[0012] Step 21, input layer: input the second image data with unified size into the corn stamen detection network;
[0013] Step 22, feature extraction network: use a lightweight YOLOv5n structure to extract multi-scale feature maps from the second image data, and introduce an EMA exponential moving average module to smooth the weight update and enhance the discrimination ability between corn stamens and the background;
[0014] Step 23, multi-scale feature fusion network: fuse multi-scale feature maps through the AttFPN attention mechanism to enhance the detection ability of corn stamens;
[0015] Step 24, detection head: use a YOLO multi-layer output head to output the class confidence and bounding box regression of corn stamens, and optimize it in combination with the WI oUv2 loss function;
[0016] Step 25, output layer: Output the bounding box of the corn stamen and the target confidence. Use non-maximum suppression (NMS) to screen multiple candidate boxes output by the detection head, remove duplicate detections, and obtain the final corn stamen detection result.
[0017] As a further solution of the present invention, in step 23, the specific method of fusing multi-scale feature maps through the AttFPN attention mechanism is as follows: During the feature fusion process, the features are weighted through the self-attention mechanism to enhance the attention of the multi-scale feature fusion network to the corn stamen area; the feature fusion adopts a vertical aggregation strategy and a horizontal aggregation strategy. The vertical aggregation strategy fuses information in the channel dimension of the feature map, stacks the multi-scale features in the channel dimension, and integrates them through the attention mechanism; the horizontal aggregation strategy realizes the unification of the spatial dimension by gradually aggregating the multi-scale feature maps in the width and height dimensions.
[0018] As a further solution of the present invention, in step 3, extract the morphological feature parameters of the corn ear based on the third image data, and obtain the phenotypic parameters of the corn plant during the tasseling period based on the corn skeleton point cloud; the morphological feature parameters include the ear length, ear width, and ear area of the corn ear; the phenotypic parameters include the plant height, leaf length, and stem-leaf position height of the corn.
[0019] As a further solution of the present invention, in step 4, build a dynamic tracking feedback model based on the morphological feature parameters and phenotypic parameters to capture the degree of corn development balance during the tasseling period. The specific steps of building the dynamic tracking feedback model include:
[0020] Step 41, obtain the corn ear feature vector F at time t based on the morphological feature parameters and phenotypic parameters t =[X E1 (t), B E (t)], where X E (t) is the morphological feature vector, and B E (t) is the phenotypic feature vector; the morphological feature vector X E (t)=[d E (t), k E (t), s E (t)], d E (t) is the ear length of the corn ear at time t, k E (t) is the ear width of the corn ear at time t, s E (t) is the ear area of the corn ear at time t; the phenotypic feature vector B E (t)=[h E (t), c E (t), y E (t)], h EThe plant height of corn at time point t is (t), c E The leaf length of corn at time point t is (t), y E The height of the corn stem and leaf at time point t;
[0021] Step 42: Based on the corn ear feature vector F at time point t t Dynamically update the corn ear feature vector F at the next time point t+1 , and the formula of the dynamic update function is:
[0022] F t+1 = f(F t , u t , ΔF t ) + ∈ t ;
[0023] ΔF t = F t - F t-1 ;
[0024] In the formula: F t+1 is the corn ear feature vector at time point t + 1, F t is the corn ear feature vector at time point t, u t is the external disturbance vector, ΔF t is the state change amount, ∈ t is the noise term, F t-1 is the corn ear feature vector at time point t - 1, and f(·) is the non - linear mapping function;
[0025] Step 43: Construct a feedback regulation function according to the corn ear feature vector F at time point t t :
[0026] u t = g(F t , F ref ) = λ(F ref - F t ) + η t ;
[0027] In the formula: u t is the external disturbance vector, g(·) is the feedback regulation function, λ is the feedback coefficient, F t is the corn ear feature vector at time point t, F ref is the preset standard corn ear feature vector, and η t is the external random disturbance term.
[0028] As a further solution of the present invention, the preset standard corn ear feature vector is obtained by collecting historical morphological feature parameters and historical phenotypic parameters, and calculating the average ear length, average ear width, and average ear area of the corn ear in the historical morphological feature parameters, as well as the average plant height, average leaf length, and average stem-leaf position height of the corn in the historical phenotypic parameters; based on the average ear length of the corn ear average ear width and average ear area to construct a standard morphological feature vector Based on the average plant height of the corn in the historical phenotypic parameters average leaf length and average stem-leaf position height to construct a standard phenotypic feature vector According to the standard morphological feature vector and the standard phenotypic feature vector the preset standard corn ear feature vector is obtained
[0029] The technical effects and advantages of a corn stamen detection method based on deep learning according to the present invention: The present invention collects real-time first image data during the tasseling period of corn by flying and inspecting a corn experimental field according to a planned route with a drone, and performs segmentation processing on the first image data to obtain second image data, providing high-quality input for subsequent detection and reducing the interference of background noise; using a corn stamen detection network based on the YOLOV5n architecture to label the stamens of the second image data to obtain third image data, which can better capture target details and significantly improve the detection accuracy; extracting the morphological feature parameters of the corn ear and the phenotypic parameters of the corn plant, and building a dynamic tracking and feedback model based on the morphological feature parameters and phenotypic parameters to capture the corn development balance degree during the corn tasseling period, which can capture the changes in the growth balance degree in real time during the corn tasseling period, timely detect growth abnormalities, and provide a scientific basis for precision agriculture management. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 is a schematic flow chart of a corn stamen detection method based on deep learning provided by the present invention;
[0031] Figure 2 is a schematic flow chart of step 2 in a corn stamen detection method based on deep learning provided by the present invention;
[0032] Figure 3 is a schematic diagram of obtaining second image data by performing segmentation processing on first image data provided by the present invention;
[0033] Figure 4It is a display diagram of the third image data of the corn ears at a height of 5m in the tasseling stage of corn in the same area collected at the same time point provided by the present invention;
[0034] Figure 5 It is a display diagram of the third image data of the corn ears at a height of 10m in the tasseling stage of corn in the same area collected at the same time point provided by the present invention;
[0035] Figure 6 It is a display diagram of the third image data of the corn ears at a height of 15m in the tasseling stage of corn in the same area collected at the same time point provided by the present invention;
[0036] Figure 7 It is a viewable diagram of the morphological characteristic parameters of corn ears and the plant phenotype parameters provided by the present invention. Detailed implementation manners
[0037] Next, the technical solutions in the present invention will be clearly and completely described in conjunction with the accompanying drawings in the present invention. Obviously, the described technical solutions are only a part of the present invention, rather than all of them. Based on the technical solutions in the present invention, all other technical solutions obtained by those of ordinary skill in the art without making creative efforts fall within the protection scope of the present invention.
[0038] Figure 1 It is a flow schematic diagram of a corn stamen detection method based on deep learning provided by the present invention. As Figure 1 shown, a corn stamen detection method based on deep learning includes the following steps:
[0039] Step 1, use a drone to carry a camera to collect real-time first image data of a corn experimental field by flying and inspecting according to a planned route, and perform segmentation processing on the first image data to obtain second image data, such as Figure 3 the schematic diagram of obtaining second image data by performing segmentation processing on the first image data shown;
[0040] Step 2, use a corn stamen detection network based on the YOLOV5n architecture to perform stamen annotation on the second image data to obtain third image data, and divide the third image data into a training set, a validation set, and a test set according to a ratio of 8:1:1;
[0041] Step 3, extract the morphological characteristic parameters of corn ears based on the third image data, and obtain the plant phenotype parameters of corn plants during the tasseling stage based on the corn skeleton point cloud;
[0042] Step 4, build a dynamic tracking feedback model based on the morphological characteristic parameters and the phenotype parameters to capture the corn development balance degree during the tasseling stage of corn.
[0043] Specifically, in step 1, the first image data includes real-time image data of the tasseling stage of corn in the same area at different time points within a day, and real-time image data of the tasseling stage of corn at different time points in different areas within a day; the image resolution of the first image data is 20 million pixels, the size is 5280×3956, and the aspect ratio is 4:3.
[0044] It should be noted that in step 1, the size of the second image data is 640*640.
[0045] Specifically, as Figure 2 shown in the schematic flowchart of step 2 in a corn stamen detection method based on deep learning, in step 2, the specific steps of using a corn stamen detection network based on the YOLOV5n architecture to perform stamen annotation on the second image data to obtain the third image data are as follows:
[0046] Step 21, input layer: Input the second image data with unified size into the corn stamen detection network.
[0047] By unifying the size of the second image data, it can ensure that all input image sizes are the same, which is convenient for the network to process in batches, reduce the feature extraction deviation caused by inconsistent sizes, and at the same time, the preprocessed image has high quality, which is beneficial to subsequent object detection.
[0048] Step 22, feature extraction network: Use the lightweight YOLOv5n structure to extract multi-scale feature maps from the second image data, and introduce the EMA exponential moving average module to smooth the weight update and enhance the discrimination ability between corn stamens and the background.
[0049] Using the YOLOv5n structure can significantly reduce the model parameter quantity and calculation amount, improve the inference speed while ensuring the detection accuracy, and is very suitable for real-time inspection applications of unmanned aerial vehicles. Through the extraction of multi-scale feature maps, the network can capture corn stamen features of different sizes and levels, especially more effective for the detection of smaller targets. Introducing the EMA exponential moving average module smooths the weight update during the training process, reduces noise interference, improves the model's discrimination ability between corn stamens and complex backgrounds, and enhances the robustness and stability of the model.
[0050] Step 23, multi-scale feature fusion network: Fusion the multi-scale feature maps through the AttFPN attention mechanism to enhance the detection ability of corn stamens.
[0051] When fusing multi-scale features, the attention mechanism can adaptively allocate weights, so that the key target area (i.e., corn stamens) is more prominently represented. Through multi-scale fusion, both low-level detail information and high-level semantic information are retained, effectively improving the accuracy and recall rate of small target detection.
[0052] Step 24, Detection Head: The YOLO multi-layer output head is adopted to output the class confidence of corn stamens and bounding box regression, and it is optimized by combining with the WI oUv2 loss function.
[0053] Using the YOLO multi-layer detection head to perform classification and bounding box regression simultaneously on feature maps of different scales can capture target information more comprehensively. It is especially suitable for targets like corn stamens that are small in size and vulnerable to background interference. By introducing the WIoUv2 loss function, the bounding box regression can be optimized more precisely, considering the aspect ratio and center point offset, significantly improving the positioning accuracy during small target detection.
[0054] Step 25, Output Layer: Output the bounding box of corn stamens and the target confidence. Use NMS (Non-Maximum Suppression) to screen multiple candidate boxes output by the detection head, remove duplicate detections, and obtain the final corn stamen detection result.
[0055] As Figure 4 shown in the third image data display diagram of the corn ear at a height of 5m during the tasseling stage of corn in the same area collected at the same time point, as Figure 5 shown in the third image data display diagram of the corn ear at a height of 10m during the tasseling stage of corn in the same area collected at the same time point, as Figure 6 shown in the third image data display diagram of the corn ear at a height of 15m during the tasseling stage of corn in the same area collected at the same time point, it can be observed that most of the corn ears are detected, and each bounding box is associated with a detection class and confidence score. Among the numerous corn ear bounding boxes, each box has a high confidence, indicating that the algorithm can accurately identify the characteristics of corn ears.
[0056] Using the NMS method effectively filters out duplicate detected candidate boxes, ensuring the uniqueness and accuracy of the final output result. By outputting the bounding box and target confidence, the detection result can be further screened in combination with post-processing strategies to improve the reliability of detection, and finally obtain accurate third image data.
[0057] By using the lightweight and efficient YOLOv5n network architecture, and introducing EMA smoothing, AttFPN attention mechanism, and WI oUv2 optimization strategy, the precise detection of small corn stamen targets is achieved, while taking into account real-time performance and detection accuracy. It not only improves the quality of image annotation but also greatly enhances the algorithm efficiency in large-scale agricultural remote sensing applications such as UAV patrol, providing a solid data foundation for subsequent corn development status assessment and precision agriculture management.
[0058] Specifically, in step 23, the fusion of multi-scale feature maps through the AttFPN attention mechanism is as follows: during the feature fusion process, the self-attention mechanism is used to weight the features, enhancing the attention of the multi-scale feature fusion network to the corn stamen region; for feature fusion, a vertical aggregation strategy and a horizontal aggregation strategy are adopted. The vertical aggregation strategy performs information fusion in the channel dimension of the feature map, stacking multi-scale features in the channel dimension and integrating them through the attention mechanism; the horizontal aggregation strategy realizes the unification of the spatial dimension by gradually aggregating multi-scale feature maps in the width and height dimensions.
[0059] Progressive Spatial Guided Aggregation (PSGA) in the vertical (channel direction) and horizontal (spatial direction) is adopted. By iteratively fusing low-level details and high-level semantic features multiple times, the detailed information of the target is further retained, and the feature expression ability is improved.
[0060] Through the self-attention mechanism, dynamic weighting is performed on each layer of features during the feature fusion process, enabling the network to pay more attention to key regions such as corn stamens, thereby reducing background interference and improving detection accuracy; the vertical aggregation strategy fuses multi-scale features in the channel dimension, stacking low-level details and high-level semantic information, and highlighting key information through the attention mechanism, which helps to capture the subtle features of the target and is particularly crucial for small target detection; the horizontal aggregation strategy gradually fuses features of each scale in the spatial dimension to achieve the unification of spatial information of images with different resolutions, which helps to maintain the spatial continuity and structural integrity of the target; Progressive Spatial Guided Aggregation (PSGA) can retain both rich low-level detail information and high-level abstract semantic information through multiple iterative fusions, thereby forming a more discriminative feature representation and enhancing the network's ability to express target details; as a small target, the corn stamen is easily overlooked in a complex background. Using PSGA can effectively strengthen the feature response to the small target area, making the network more targeted when performing multi-scale feature fusion, thereby improving the recall rate and detection accuracy. The vertical and horizontal two-way aggregation strategy enables feature fusion to consider both the semantic association between channels and the integrity of spatial information, which helps to maintain stable detection performance in different scenarios and at different scales and enhances the robustness of the model; by combining the AttFPN attention mechanism with vertical and horizontal progressive feature aggregation, not only can the key features of the corn stamen region be extracted and strengthened more accurately, but also multi-scale information can be effectively fused, ultimately achieving high-precision and robust detection of small corn stamen targets.
[0061] Specifically, in step 3, morphological feature parameters of the corn ear are extracted based on the third image data, and phenotypic parameters of the corn plant during the tasseling stage are obtained based on the corn skeleton point cloud; the morphological feature parameters include the ear length, ear width, and ear area of the corn ear; the phenotypic parameters include the plant height, leaf length, and stem-leaf position height of the corn.
[0062] Specifically, in step 4, a dynamic tracking feedback model is built based on morphological feature parameters and phenotypic parameters to capture the development balance degree of maize during the tasseling stage. The specific steps for building the dynamic tracking feedback model are as follows:
[0063] Step 41: Obtain the maize ear feature vector F at time t based on morphological feature parameters and phenotypic parameters t =[X E1 (t), B E (t)], where X E (t) is the morphological feature vector and B E (t) is the phenotypic feature vector; the morphological feature vector X E (t)=[d E (t), k E (t), s E (t)], d E (t) is the ear length of the maize ear at time t, k E (t) is the ear width of the maize ear at time t, s E (t) is the ear area of the maize ear at time t; the phenotypic feature vector B E (t)=[h E (t), c E (t), y E (t)], h E (t) is the plant height of the maize at time t, c E (t) is the leaf length of the maize at time t, y E (t) is the height of the maize stem and leaf position at time t;
[0064] Step 42: Dynamically update the maize ear feature vector F at the next time point based on the maize ear feature vector F at time t t , and the formula of the dynamic update function is: t+1 ;
[0065] F t+1 =f(F t , u t , ΔF t ) + ∈ t ;
[0066] ΔF t =F t -F t-1 ;
[0067] In the formula: F t+1 is the maize ear feature vector at time t + 1, F t is the maize ear feature vector at time t, u t is the external interference vector, ΔF t is the state change amount, ∈ t is the noise term, Ft-1 is the ear of corn feature vector at time point t-1, and f(·) is a non-linear mapping function;
[0068] Step 43, according to the ear of corn feature vector F at time point t t Construct a feedback regulation function:
[0069] u t = g(F t , F ref ) = λ(F ref - F t ) + η t ;
[0070] Where: u t is the external disturbance vector, g(·) is the feedback regulation function, λ is the feedback coefficient, F t is the ear of corn feature vector at time point t, F ref is the preset standard ear of corn feature vector, η t is the external random disturbance term;
[0071] If the current corn growth state F t deviates from the ideal state F ref , the feedback regulation function will output a larger adjustment amount u t , indicating that the field management measures need to be strengthened (such as increasing fertilization, adjusting irrigation or pest control measures), and then reflected in the change of the ear of corn feature vector through the dynamic update function at the next time point.
[0072] The ear feature vectors extracted at each moment (including ear length, ear width, ear area, and plant height, leaf length, and stem-leaf position height of the plant) can comprehensively reflect the growth state of maize. The dynamic update formula can capture the subtle changes that occur over time during the tasseling period of maize, enabling real-time dynamic tracking. The feedback adjustment function can output an adjustment amount based on the deviation between the current state and the ideal state. When the growth state of maize deviates from the ideal state, the feedback adjustment will prompt field managers to strengthen management measures (such as increasing fertilization, adjusting irrigation, and strengthening pest and disease control), thereby achieving closed-loop control and precise management. The external disturbance vector contains information on multiple aspects such as pest and disease indices, nutrient supply amounts, and weather indices, enabling the model to comprehensively reflect the impact of environmental factors on maize growth. Considering the mechanism of external factors improves the adaptability and robustness of the model to the actual complex field environment; collecting morphological characteristics (such as ear length, ear width, and ear area of maize ears) and phenotypic characteristics (such as plant height, leaf length, and stem-leaf position height) can comprehensively evaluate the development of maize. Through dynamic tracking feedback, the model can not only capture the growth state at a single moment but also identify the change trends between different moments, helping to judge the balance degree and potential problems in field growth; providing data support for agricultural management enables management measures to be adjusted in a timely manner based on real-time feedback. Through the closed-loop feedback mechanism, farmers or managers can precisely control field management measures according to the adjustment suggestions output by the model, thereby increasing crop yields and growth balance and reducing resource waste. By constructing a standard feature vector as a benchmark and using a dynamic tracking feedback model to monitor the growth state of maize in real time and combining external environmental disturbance factors, precise capture of the balance degree of maize development during the tasseling period is achieved, providing a scientific and timely decision-making basis for field management and having significant practical application value.
[0073] It should be noted that the external disturbance vector includes pest and disease indices, nutrient supply amounts, and weather indices.
[0074] Specifically, the preset standard maize ear feature vector is obtained by collecting historical morphological feature parameters and historical phenotypic parameters, and calculating the average ear length, average ear width, and average ear area of maize ears in the historical morphological feature parameters, as well as the average plant height, average leaf length, and average stem-leaf position height of maize in the historical phenotypic parameters; based on the average ear length of the maize ear average ear width and average ear area a standard morphological feature vector is constructed Based on the average plant height of maize in the historical phenotypic parameters average leaf length and average stem-leaf position height a standard phenotypic feature vector is constructed According to the standard morphological feature vector and the standard phenotypic feature vector Obtain the preset standard maize ear feature vector
[0075] Such as Figure 7 The viewable diagram of maize ear morphological feature parameters and plant phenotypic parameters shown in the figure. In the upper left area, the morphological indexes of the maize ear collected at the current moment are listed, such as ear length, ear width, and ear area, etc., which intuitively reflect the development of the ear; the upper right area shows the phenotypic data at the overall plant level, including plant height, leaf length, and stem and leaf position height, which helps to evaluate the overall growth state of maize; the lower left area plots the change trends of morphological and phenotypic parameters in the form of time series (such as continuous observations from t - 3 to t), which intuitively shows the development dynamics of maize during the tasseling period; the lower right area compares the currently observed morphological and phenotypic indexes with the preset standard state, and evaluates whether the maize reaches the ideal growth level from multiple dimensions, which is convenient to identify the situation of uneven development or deviation from the target.
[0076] By collecting historical morphological and phenotypic parameter data and calculating the average value, the standard maize ear feature vector is obtained, which represents the ideal state of maize under the best growth conditions and provides an objective and unified benchmark for real-time detection and feedback regulation.
[0077] In the embodiment of the present invention, a drone is used to carry a camera to collect real-time first image data of a maize experimental field during flight inspection along a planned route, and the first image data is segmented to obtain second image data, which provides high-quality input for subsequent detection and reduces the interference of background noise; a maize stamen detection network based on the YOLOV5n architecture is used to label the second image data to obtain third image data, which can better capture target details and significantly improve the detection accuracy; the morphological feature parameters of the maize ear and the phenotypic parameters of the maize plant are extracted, and a dynamic tracking feedback model is built based on the morphological feature parameters and the phenotypic parameters to capture the maize development balance degree during the maize tasseling period, which can capture the change of the growth balance degree in real time during the maize tasseling period, timely discover growth abnormalities, and provide a scientific basis for precision agriculture management.
[0078] The above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present application, and all of them 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.
[0079] Finally: The above is only the preferred scheme of the present invention and is not used to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A corn stamen detection method based on deep learning, characterized in that, It includes the following steps: Step 1: Use a drone carrying a camera to collect real-time first image data of a corn experimental field during the tasseling stage by flying along a planned route, and perform segmentation processing on the first image data to obtain second image data; Step 2: Use a corn stamen detection network based on the YOLOV5n architecture to label the stamens in the second image data to obtain third image data, and divide the third image data into a training set, a validation set, and a test set according to a ratio of 8:1:1; Step 3: Extract the morphological feature parameters of the corn ear based on the third image data, and obtain the phenotypic parameters of the corn plant during the tasseling stage based on the corn skeleton point cloud; Step 4: Build a dynamic tracking feedback model based on the morphological feature parameters and phenotypic parameters to capture the corn development balance degree during the tasseling stage.
2. The maize stamen detection method based on deep learning according to claim 1, wherein In Step 2, the specific steps of using a corn stamen detection network based on the YOLOV5n architecture to label the stamens in the second image data to obtain third image data are as follows: Step 21, Input layer: Input the second image data with unified size into the corn stamen detection network; Step 22, Feature extraction network: Use the lightweight YOLOv5n structure to extract multi-scale feature maps from the second image data, and introduce the EMA exponential moving average module to smooth the weight update and enhance the ability to distinguish corn stamens from the background; Step 23, Multi-scale feature fusion network: Use the AttFPN attention mechanism to fuse multi-scale feature maps to enhance the detection ability of corn stamens; Step 24, Detection head: Use the YOLO multi-layer output head to output the class confidence and bounding box regression of the corn stamens, and optimize it in combination with the WIoUv2 loss function; Step 25, Output layer: Output the corn stamen bounding box and target confidence, and use NMS non-maximum suppression to screen multiple candidate boxes output by the detection head to remove duplicate detections and obtain the final corn stamen detection result.
3. The maize stamen detection method based on deep learning according to claim 2, wherein, In Step 23, using the AttFPN attention mechanism to fuse multi-scale feature maps specifically means: Use the self-attention mechanism to weight the features during the feature fusion process to enhance the attention of the multi-scale feature fusion network to the corn stamen area; Feature fusion uses the vertical aggregation strategy and the horizontal aggregation strategy. The vertical aggregation strategy performs information fusion in the channel dimension of the feature map, stacks the multi-scale features in the channel dimension, and integrates them through the attention mechanism; The horizontal aggregation strategy realizes the unification of the spatial dimension by gradually aggregating the multi-scale feature maps in the width and height dimensions.
4. The maize stamen detection method based on deep learning according to claim 1, wherein In Step 4, building a dynamic tracking feedback model based on the morphological feature parameters and phenotypic parameters to capture the corn development balance degree during the tasseling stage. The specific steps of building the dynamic tracking feedback model include: Step 41: Obtain the maize ear feature vector F at time t based on the morphological feature parameters and phenotypic parameters t = [X E1 (t), B E (t)], where X E (t) is the morphological feature vector and B E (t) is the phenotypic feature vector; the morphological feature vector X E (t) = [d E (t), k E (t), s E (t)], d E (t) is the ear length of the maize ear at time t, k E (t) is the ear width of the maize ear at time t, s E (t) is the ear area of the maize ear at time t; the phenotypic feature vector BE(t) = [hE(t), cE(t), yE(t)], hE(t) is the plant height of the maize at time t, cE(t) is the leaf length of the maize at time t, and yE(t) is the stem-leaf position height of the maize at time t; Step 42: Based on the ear of corn feature vector F at time point t t Dynamically update the ear of corn feature vector F at the next time point t+1 , and the formula for the dynamic update function is: F t+1 = f(F t , u t , ΔF t ) + ∈ t ; ΔF t = F t - F t-1 ; Where: F t+1 is the maize ear feature vector at time point t + 1, F t is the maize ear feature vector at time point t, u t is the external disturbance vector, ΔF t is the state change amount, ∈ t is the noise term, F t-1 is the maize ear feature vector at time point t - 1, f(·) is the non-linear mapping function; Step 43: According to the corn ear feature vector F at time point t t Construct a feedback regulation function: u t = g(F t , F ref ) = λ(F ref - F t ) + η t ; where: u t is the external interference vector, g(·) is the feedback regulation function, λ is the feedback coefficient, F t is the ear of corn feature vector at time point t, F ref is the preset standard ear of corn feature vector, η t is the external random perturbation term.
5. The maize stamen detection method based on deep learning according to claim 4, characterized in that The preset standard corn ear feature vector is obtained by collecting historical morphological feature parameters and historical phenotypic parameters, and calculating the average ear length, average ear width, and average ear area of the corn ear in the historical morphological feature parameters, as well as the average plant height, average leaf length, and average stem-leaf position height of the corn in the historical phenotypic parameters; based on the average ear length of the corn ear average ear width and average ear area a standard morphological feature vector is constructed Based on the average plant height of the corn in the historical phenotypic parameters average leaf length and average stem-leaf position height a standard phenotypic feature vector is constructed According to the standard morphological feature vector and the standard phenotypic feature vector the preset standard corn ear feature vector is obtained