Method, device and equipment for determining pollen abortion rate of Chinese cabbage and storage medium

The deep learning object detection model predicts the cabbage pollen picture, which solves the problem of insufficient accuracy and reliability in traditional detection methods, and achieves higher detection accuracy and reliability.

CN119516355APending Publication Date: 2025-02-25ZHEJIANG INSTITUTE OF LANDSCAPE PLANTS & FLOWERS (ZHEJIANG XIAOSHAN COTTON & HEMP RESEARCH INSTITUTE) +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411392433.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-08
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

Traditional manual detection technology and machine learning-based automated detection methods have problems such as time-consuming, subjective deviations and insufficient comprehensive feature design when detecting the abortion rate of cabbage pollen, resulting in insufficient detection accuracy and reliability.

Method used

The deep learning object detection model is used to predict and process the cabbage pollen pictures, and the abortion rate is calculated by automatically identifying and classifying the fertile and infertile categories of cabbage pollen. This model is trained through sample annotation images, which has better generalization ability and robustness.

Benefits of technology

It improves the accuracy and reliability of cabbage pollen abortion rate detection, reduces manual intervention and subjective bias, and enhances the adaptability and recognition accuracy of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119516355A_ABST
    Figure CN119516355A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a Chinese cabbage pollen abortion rate determination method and device, equipment and a storage medium, and relates to the technical field of artificial intelligence. The method comprises the following steps: acquiring a to-be-detected Chinese cabbage pollen picture; inputting the Chinese cabbage pollen picture into a deep learning target detection model for processing to obtain a predicted pollen frame and a pollen category corresponding to each pollen grain in the Chinese cabbage pollen picture; calculating the number of fertile frames and the number of non-fertile frames according to the predicted pollen frames and the pollen types, and obtaining the abortion rate of the Chinese cabbage pollen according to the number of the fertile frames and the number of the non-fertile frames. The method has better generalization ability and robustness based on a deep learning target detection model, and is used for achieving the technical effect of improving the accuracy and reliability of pollen abortion rate detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to artificial intelligence technology, and in particular to a method, device, equipment and storage medium for determining the pollen abortion rate of cabbage. Background Art

[0002] Cabbage is an important vegetable crop of the genus Brassica in the family Cruciferae. Due to its rich nutritional value and wide adaptability, it has become one of the important vegetables widely grown worldwide. In the sexual reproduction process of cabbage, pollen abortion is directly related to seed yield and quality. Therefore, timely and accurate acquisition of cabbage pollen abortion rate is of great reference value for predicting cabbage seed yield and analyzing potential losses.

[0003] Traditional manual detection technology requires researchers to shake cabbage pollen out of the anthers, then stain it with a staining solution, make a pressed sheet, and then observe and analyze it under an electron microscope. However, this method not only requires a lot of time and manpower, but also is highly dependent on the operator's skills and judgment, which is prone to subjective bias, resulting in inconsistencies in quantification and ultimately affecting the accuracy of the research results.

[0004] With the development of artificial intelligence technology, the current method of calculating the pollen sterility rate of cabbage mainly adopts the automated detection method based on machine learning. However, the traditional machine learning algorithm relies on manually constructed features. Since manually constructed features are difficult to comprehensively and accurately cover all relevant information, the generalization and robustness of the model are affected, thereby reducing the accuracy and reliability of pollen sterility rate detection. Summary of the invention

[0005] The embodiments of the present application provide a method, device, equipment and storage medium for determining the pollen abortion rate of cabbage, which are used to solve the technical problem that artificial structure features lead to poor generalization and robustness of the model, thereby affecting the accuracy and reliability of pollen abortion rate detection.

[0006] In a first aspect, the present application provides a method for determining the pollen sterility rate of cabbage, comprising:

[0007] Obtain the cabbage pollen image to be tested;

[0008] The cabbage pollen picture is input into the deep learning target detection model for processing, and the predicted pollen frame and pollen category corresponding to each pollen grain in the cabbage pollen picture are obtained; the pollen category includes fertile category and infertile category, and the deep learning target detection model is obtained after training based on the sample annotated picture, and the sample annotated picture is obtained based on the sample cabbage pollen picture;

[0009] According to the predicted pollen frames and pollen categories, the number of fertile frames and the number of infertile frames were calculated, and the abortion rate of cabbage pollen was obtained based on the number of fertile frames and the number of infertile frames.

[0010] In a possible implementation, before obtaining the cabbage pollen image to be detected, the method includes:

[0011] A plurality of sample cabbage pollen images are obtained, and each pollen grain in the plurality of sample cabbage pollen images is framed and selected using a labeling frame, and a first pollen category is correspondingly labeled to obtain a plurality of sample labeled images; the labeling frame is a rectangular boundary frame of the pollen; the first pollen category includes a fertile category and an infertile category;

[0012] Determine the training set and validation set based on the sample labeled pictures;

[0013] A detection model to be trained is established, and the training set and validation set are used to process the detection model to be trained to obtain a deep learning target detection model.

[0014] In a possible implementation, the detection model to be trained is a single-stage target detection model.

[0015] In a possible implementation, the training set and the validation set are used to process the detection model to be trained to obtain a deep learning target detection model, including:

[0016] Performing image data enhancement processing on the first sample labeled image in the training set to obtain a processed image, wherein the image data enhancement processing includes at least one of color random perturbation, random image cropping, image flipping, and adding Gaussian noise;

[0017] The processed images are used to train the detection model to be trained to obtain the detection model;

[0018] The validation set is input into the detection model to obtain the prediction box and the second pollen category corresponding to each pollen grain in multiple second sample labeled images in the validation set, where the second pollen category includes a fertile category and an infertile category;

[0019] Obtaining an accuracy score of the detection model according to the predicted frame and the first annotation frame corresponding to the second sample labeled image, as well as the first pollen category and the second pollen category;

[0020] According to the accuracy score, the detection model is optimized to obtain a deep learning target detection model.

[0021] In a possible implementation, obtaining an accuracy score of the detection model according to the prediction box and the first annotation box corresponding to the second sample labeled image, as well as the first pollen category and the second pollen category, includes:

[0022] Calculate the intersection-over-union ratio between the first annotation box and the prediction box;

[0023] According to the intersection-over-union ratio, the first pollen category and the second pollen category, a first recall rate and a first accuracy rate of the fertile category, and a second recall rate and a second accuracy rate of the infertile category are obtained;

[0024] The first recall rate and the first accuracy rate are calculated to obtain a first accuracy rate score of the fertile category, and the second recall rate and the second accuracy rate are calculated to obtain a second accuracy rate score of the infertile category;

[0025] An accuracy score of the detection model is determined according to the first accuracy score and the second accuracy score.

[0026] In a possible implementation, according to the intersection-over-union ratio, and the first pollen category and the second pollen category, a first recall rate and a first accuracy rate of the fertile category, and a second recall rate and a second accuracy rate of the infertile category are obtained, including:

[0027] Determine whether the intersection-over-union ratio is greater than a preset value. If so, calculate the number of correct matching pairs corresponding to the first annotation box and the prediction box when the first pollen category and the second pollen category match, and the number of correct matching pairs includes the first correct matching pair corresponding to the fertile category and the second correct matching pair corresponding to the infertile category;

[0028] If not, then the number of fertile prediction boxes and the number of infertile prediction boxes that do not match the first annotation box and have incorrect categories, as well as the number of fertile first annotation boxes and the number of infertile first annotation boxes that do not match the prediction box and have incorrect categories are calculated, and the category error is used to indicate the situation where the first pollen category and the second pollen category do not match;

[0029] The first recall rate and the first accuracy rate are determined based on the first number of correct matches, the number of fertile prediction boxes, and the number of fertile first labeling boxes. The second recall rate and the second accuracy rate are determined based on the second number of correct matches, the number of infertile prediction boxes, and the number of infertile first labeling boxes.

[0030] In a possible implementation, a first recall rate and a first accuracy rate are obtained according to the first number of correct matching pairs, the number of fertile prediction boxes, and the number of fertile first labeling boxes, and a second recall rate and a second accuracy rate are obtained according to the second number of correct matching pairs, the number of infertile prediction boxes, and the number of infertile first labeling boxes, including:

[0031] The first number of correct matching pairs and the number of fertile first annotation boxes are calculated to obtain a first recall rate, and the first number of correct matching pairs and the number of fertile prediction boxes are calculated to obtain a first accuracy rate;

[0032] The second number of correct matching pairs and the number of infertile first labeling boxes are calculated to obtain a second recall rate, and the second number of correct matching pairs and the number of infertile prediction boxes are calculated to obtain a second accuracy rate.

[0033] In a second aspect, an embodiment of the present application provides a device for determining abortion rate of cabbage pollen, comprising:

[0034] An acquisition module is used to acquire the cabbage pollen image to be detected;

[0035] A processing module is used to input the cabbage pollen picture into the deep learning target detection model for processing, and obtain the predicted pollen frame and pollen category corresponding to each pollen grain in the cabbage pollen picture; the pollen category includes a fertile category and an infertile category, and the deep learning target detection model is obtained after training based on the sample annotated picture, and the sample annotated picture is obtained based on the sample cabbage pollen picture;

[0036] The calculation module is used to calculate the number of fertile frames and the number of infertile frames according to the predicted pollen frames and pollen categories, and obtain the sterility rate of cabbage pollen according to the number of fertile frames and the number of infertile frames.

[0037] In a possible implementation, the acquisition module is further used to:

[0038] A plurality of sample cabbage pollen images are obtained, and each pollen grain in the plurality of sample cabbage pollen images is framed and selected using a labeling frame, and a first pollen category is correspondingly labeled to obtain a plurality of sample labeled images; the labeling frame is a rectangular boundary frame of the pollen; the first pollen category includes a fertile category and an infertile category;

[0039] Determine the training set and validation set based on the sample labeled pictures;

[0040] A detection model to be trained is established, and the training set and validation set are used to process the detection model to be trained to obtain a deep learning target detection model.

[0041] In a possible implementation, the acquisition module is further used to:

[0042] Performing image data enhancement processing on the first sample labeled image in the training set to obtain a processed image, wherein the image data enhancement processing includes at least one of color random perturbation, random image cropping, image flipping, and adding Gaussian noise;

[0043] The processed images are used to train the detection model to be trained to obtain the detection model;

[0044] The validation set is input into the detection model to obtain the prediction box and the second pollen category corresponding to each pollen grain in multiple second sample labeled images in the validation set, where the second pollen category includes a fertile category and an infertile category;

[0045] Obtaining an accuracy score of the detection model according to the predicted frame and the first annotation frame corresponding to the second sample labeled image, as well as the first pollen category and the second pollen category;

[0046] According to the accuracy score, the detection model is optimized to obtain a deep learning target detection model.

[0047] In a possible implementation, the acquisition module is further used to:

[0048] Calculate the intersection-over-union ratio between the first annotation box and the prediction box;

[0049] According to the intersection-over-union ratio, the first pollen category and the second pollen category, a first recall rate and a first accuracy rate of the fertile category, and a second recall rate and a second accuracy rate of the infertile category are obtained;

[0050] The first recall rate and the first accuracy rate are calculated to obtain a first accuracy rate score of the fertile category, and the second recall rate and the second accuracy rate are calculated to obtain a second accuracy rate score of the infertile category;

[0051] An accuracy score of the detection model is determined according to the first accuracy score and the second accuracy score.

[0052] In a possible implementation, the acquisition module is further used to:

[0053] Determine whether the intersection-over-union ratio is greater than a preset value. If so, calculate the number of correct matching pairs corresponding to the first annotation box and the prediction box when the first pollen category and the second pollen category match, and the number of correct matching pairs includes the first correct matching pair corresponding to the fertile category and the second correct matching pair corresponding to the infertile category;

[0054] If not, then the number of fertile prediction boxes and the number of infertile prediction boxes that do not match the first annotation box and have incorrect categories, as well as the number of fertile first annotation boxes and the number of infertile first annotation boxes that do not match the prediction box and have incorrect categories are calculated, and the category error is used to indicate the situation where the first pollen category and the second pollen category do not match;

[0055] The first recall rate and the first accuracy rate are determined based on the first number of correct matches, the number of fertile prediction boxes, and the number of fertile first labeling boxes. The second recall rate and the second accuracy rate are determined based on the second number of correct matches, the number of infertile prediction boxes, and the number of infertile first labeling boxes.

[0056] In a possible implementation, the acquisition module is further used to:

[0057] The first number of correct matching pairs and the number of fertile first annotation boxes are calculated to obtain a first recall rate, and the first number of correct matching pairs and the number of fertile prediction boxes are calculated to obtain a first accuracy rate;

[0058] The second number of correct matching pairs and the number of infertile first labeling boxes are calculated to obtain a second recall rate, and the second number of correct matching pairs and the number of infertile prediction boxes are calculated to obtain a second accuracy rate.

[0059] In a third aspect, an embodiment of the present application provides a device for determining abortion rate of cabbage pollen, comprising: a memory, a processor;

[0060] The memory stores computer-executable instructions;

[0061] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the above first aspect and / or various possible implementations of the first aspect.

[0062] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the first aspect above and / or various possible implementations of the first aspect.

[0063] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the above first aspect and / or various possible implementation methods of the first aspect.

[0064] The method, device, equipment and storage medium for determining the cabbage pollen sterility rate provided in the embodiment of the present application predict the cabbage pollen picture to be detected through a deep learning target detection model, obtain the predicted pollen frame and pollen category corresponding to each pollen grain in the cabbage pollen picture, calculate the number of fertile frames and the number of infertile frames according to the predicted pollen frame and pollen category, and obtain the cabbage pollen sterility rate according to the number of fertile frames and the number of infertile frames. Among them, the deep learning target detection model has better generalization ability and robustness, and uses the deep learning algorithm to automatically learn complex feature representations, thereby achieving higher accuracy in the identification and classification of pollen grains, and improving the accuracy and reliability of pollen sterility rate detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0066] Figure 1 A schematic diagram of a method for determining the pollen sterility rate of cabbage provided in an embodiment of the present application Figure 1 ;

[0067] Figure 2 A schematic diagram of a method for determining the pollen sterility rate of cabbage provided in an embodiment of the present application Figure 2 ;

[0068] Figure 3 A schematic diagram of the result of labeling a sample image provided in an embodiment of the present application;

[0069] Figure 4 A schematic diagram of a method for determining the pollen sterility rate of cabbage provided in an embodiment of the present application Figure 3 ;

[0070] Figure 5 A schematic diagram of the structure of a device for determining the pollen abortion rate of cabbage provided in an embodiment of the present application;

[0071] Figure 6 A schematic diagram of the structure of a device for determining the pollen abortion rate of cabbage provided in an embodiment of the present application.

[0072] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0073] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0074] In the process of sexual reproduction of cabbage, pollen, as an important component, has a very direct and close relationship with seed yield and quality. Mature pollen grains will first attach to the stigma of the pistil, begin to germinate after absorbing water, and then the pollen tube grows and passes through the stigma and ovary to reach the ovule and embryo sac, releasing its contents for double fertilization to form seeds. However, in actual planting, due to abnormal environmental factors such as temperature and humidity, pollen is prone to abortion, which will seriously affect the seed yield and quality of cabbage. Therefore, timely and accurate acquisition of the abortion rate of cabbage pollen is of great reference value for predicting the yield of cabbage seeds and analyzing potential losses.

[0075] Among the existing methods for determining pollen abortion rate, traditional manual detection techniques have problems such as being time-consuming and labor-intensive, highly random, and highly subjective. In addition, although the currently used automated detection methods based on machine learning have improved efficiency, these methods rely on manually designed features. Since such feature design is not comprehensive or precise enough, the robustness and generalization ability of the model are insufficient, thus affecting the accuracy and reliability of the pollen abortion rate detection results.

[0076] In response to the above technical problems, the embodiments of the present application provide a method, device, equipment and storage medium for determining the cabbage pollen abortion rate. The cabbage pollen abortion rate is obtained by automatically detecting the cabbage pollen image to be detected using a deep learning target detection model. Since the deep learning target detection model has stronger generalization ability and robustness, the accuracy and reliability of pollen abortion rate detection are improved.

[0077] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0078] Figure 1 A schematic diagram of a method for determining the pollen sterility rate of cabbage provided in an embodiment of the present application Figure 1 ,like Figure 1 As shown, the method includes:

[0079] S101, obtaining a cabbage pollen image to be detected.

[0080] In this embodiment, the cabbage pollen image can be pre-generated and stored in a storage device. When the cabbage pollen to be detected is detected, the execution body of the method for determining the cabbage pollen abortion rate provided in the embodiment of the present application executes and reads the image corresponding to the cabbage pollen to be detected from the storage device.

[0081] Regarding the method of generating cabbage pollen images, one possible implementation method is to first use a brush to brush pollen grains onto a glass slide, and use a dropper to add Alexander dye solution to stain for about 5 to 10 hours, then use a microscope to observe the cabbage pollen, and use a connected camera or imaging device to take a picture of the cabbage pollen.

[0082] S102: Input the cabbage pollen picture into a deep learning target detection model for processing to obtain a predicted pollen frame and pollen category corresponding to each pollen grain in the cabbage pollen picture.

[0083] In this embodiment, the cabbage pollen picture is input into the deep learning target detection model. The deep learning target detection model extracts and analyzes the cabbage pollen picture and identifies various features and patterns in the cabbage pollen picture. Based on these features and the extracted information, the deep learning target detection model will try to locate the position of each pollen grain and generate a predicted rectangular bounding box for it. The rectangular bounding box is the minimum circumscribed box, that is, the predicted pollen box, which roughly frames the range of the pollen grain. At the same time, the deep learning target detection model will also classify each pollen grain according to the learned knowledge and patterns to determine whether it belongs to a specific pollen category.

[0084] The pollen categories include fertile and infertile categories. The deep learning target detection model is obtained after training based on sample annotated images, and the sample annotated images are obtained based on sample cabbage pollen images.

[0085] S103. Calculate the number of fertile frames and the number of infertile frames according to the predicted pollen frames and pollen categories, and obtain the abortion rate of cabbage pollen according to the number of fertile frames and the number of infertile frames.

[0086] In this embodiment, all predicted pollen frames and pollen categories are traversed. For each predicted pollen frame, if its category is marked as fertile, then the number of fertile frames is increased by 1; if the category is marked as infertile, then the number of infertile frames is increased by 1 to obtain the number of fertile frames N. 可育 and the number of infertile frames N 不可育 According to the formula: The abortion rate of cabbage pollen was calculated.

[0087] The embodiment of the present application provides a method for determining the sterility rate of cabbage pollen, which predicts and processes the cabbage pollen picture to be detected through a deep learning target detection model, obtains the predicted pollen frame and pollen category corresponding to each pollen grain in the cabbage pollen picture, calculates the number of fertile frames and the number of infertile frames according to the predicted pollen frame and pollen category, and obtains the sterility rate of cabbage pollen according to the number of fertile frames and the number of infertile frames. Among them, the deep learning target detection model has better generalization ability and robustness, and uses the deep learning algorithm to automatically learn complex feature representations, thereby achieving higher accuracy in the identification and classification of pollen grains, and improving the accuracy and reliability of pollen sterility rate detection.

[0088] Figure 2 A schematic diagram of a method for determining the pollen sterility rate of cabbage provided in an embodiment of the present application Figure 2 ,like Figure 2 As shown, in this embodiment Figure 1 Based on the embodiment, a possible implementation of a method for determining the pollen sterility rate of cabbage is described in detail, and the method comprises:

[0089] S201. Acquire multiple sample cabbage pollen images, select each pollen grain in the multiple sample cabbage pollen images using a labeling frame, and label the first pollen category accordingly to obtain multiple sample labeled images.

[0090] In this embodiment, the acquisition and generation of the sample cabbage pollen image is similar to the acquisition and generation of the cabbage pollen image to be detected in step S101, and will not be repeated here. However, it should be noted that the sample cabbage pollen image is collected from a variety of different cabbage plants to ensure the diversity and representativeness of the sample, and these sample cabbage pollen images should include pollen of different maturity and different environmental conditions.

[0091] Next, use a labeling tool, such as image labeling software or a custom script, to select each pollen grain in the multiple sample cabbage pollen images, draw a labeling frame and label the first pollen category of each pollen grain, that is, fertile category or infertile category, to obtain multiple sample labeled images. Take one of the sample labeled images as an example, Figure 3 As shown, Figure 3 Schematic diagram of the result of the sample marking picture provided in the embodiment of the present application. Among them, the marked box is the rectangular boundary box of the pollen, and the rectangular boundary box is the minimum circumscribed box. The red box represents the fertile category, and the green box represents the infertile category. It should be noted that the method for distinguishing between the fertile category and the infertile category is: the pollen grains with full and undamaged, red protoplasm and green pollen walls are fertile, and the pollen grains with deformed, damaged and overall green are infertile.

[0092] As an optional implementation, the multiple sample labeled images contain at least 10,000 annotation boxes, and the number of annotation boxes for the fertile category and the number of annotation boxes for the infertile category are no less than 5,000 each.

[0093] S202: Determine a training set and a validation set based on sample labeled images.

[0094] In this embodiment, all sample labeled images are shuffled and divided into a training set according to a certain ratio, for example, an optional division ratio of 9:1. These training set images will be used for model learning and parameter adjustment. The remaining 10% of the sample labeled images are divided into a validation set. The validation set is used to measure the performance of the model at different stages of training to determine whether the model has problems such as overfitting or underfitting, and then guide further adjustment and improvement of the model.

[0095] S203: Establish a detection model to be trained, and perform image data enhancement processing on the first sample labeled picture in the training set to obtain a processed picture.

[0096] In this embodiment, after the detection model to be trained is established, the first sample labeled image in the training set is first subjected to image data enhancement processing, and the image data enhancement processing includes at least one of color random perturbation, random image cropping, image flipping, and adding Gaussian noise. The images obtained by image data enhancement processing have diversity and richness, which can help the detection model to be trained to better learn and understand the characteristics of cabbage pollen, and improve the accuracy and reliability of the detection model to be trained in practical applications.

[0097] The detection model to be trained may be a single-stage target detection model. The single-stage target detection model includes a single shot multi-box detector, a YOLO series deep learning model, etc. A single shot multi-box detector (Single Shot MultiBox Detector, SSD) is a target detection algorithm based on deep learning. YOLO is the abbreviation of You Only Look Once, and the YOLO series deep learning model is an end-to-end single-stage target detection algorithm.

[0098] S204: Use the processed images to train the detection model to be trained to obtain a detection model.

[0099] In this embodiment, the above training process is explained by taking the detection model to be trained as a single multi-frame detector as an example: a pre-trained convolutional neural network is used to extract features from the processed image to obtain a series of high-level feature maps. For each feature map, convolution operations are performed using convolution kernels of different sizes (such as 1x1, 3x3, 5x5, etc.) to obtain a multi-scale feature fusion map. An anchor frame is generated at each feature point in the multi-scale feature fusion map, and the position and category of the target are predicted by classifying and regressing the generated anchor frame. The loss function of each anchor frame is calculated, and the Adaptive Moment Estimation (Adam) algorithm is used to train the model, and the model parameters are adjusted to minimize the loss function, and finally the detection model is obtained.

[0100] Among them, the processed pictures can, for example, form a training batch, and the size of the processed pictures and the batch size are mainly determined by the performance of the running device and the selected detection model to be trained. For example, on a device equipped with a 1080Ti graphics card, the picture size used is 512x512, and each batch includes 12 processed pictures. During the training process of the model, a possible implementation method is that the learning rate of the model is 0.001, and the entire training process requires 100,000 iterations. The learning rate determines the step size of the model parameter update in each iteration.

[0101] S205: Input the verification set into the detection model to obtain the prediction box and the second pollen category corresponding to each pollen grain in the plurality of second sample labeled images in the verification set.

[0102] In this embodiment, when the verification set is input into the detection model, the detection model uses its learned knowledge and pattern recognition capabilities to detect and locate each pollen grain in each second sample labeled image. It will determine the area where each pollen grain appears on the second sample labeled image based on image features and existing training information, and mark it out in the form of a prediction box. The prediction box is a rectangular bounding box, that is, the minimum circumscribed box. At the same time, the detection model will also classify and judge each detected pollen grain to determine the second pollen category to which it belongs. The second pollen category includes a fertile category and an infertile category.

[0103] S206. Obtain an accuracy score of the detection model according to the prediction box and the corresponding first annotation box in the second sample labeled image, as well as the first pollen category and the second pollen category.

[0104] In this embodiment, the prediction frame is analyzed with the original first annotation frame in the second sample labeled image, and the matching degree of the prediction frame and the corresponding first annotation frame in the second sample labeled image in terms of position and size is compared, that is, the intersection and union ratio between the first annotation frame and the prediction frame is calculated to determine whether the intersection and union ratio is greater than a preset value; if so, the correct matching pairs corresponding to the first annotation frame and the prediction frame are calculated when the first pollen category and the second pollen category match, including the correct matching pairs of the fertile and infertile categories. If the intersection and union ratio is not greater than the preset value, the number of fertile detection frames, the number of infertile detection frames, the number of fertile first annotation frames, and the number of infertile first annotation frames that are not matched and have incorrect categories are calculated. According to the number of correct matching pairs of fertile, the number of fertile detection frames, and the number of fertile first annotation frames, the recall rate and accuracy of the fertile category are obtained; according to the number of correct matching pairs of infertile, the number of infertile detection frames, and the number of infertile first annotation frames, the recall rate and accuracy of the infertile category are obtained. According to the recall rate and accuracy of the fertile and infertile categories, the accuracy score of the detection model is calculated.

[0105] Among them, the accuracy score of the detection model is used to reflect the performance of the model. The accuracy score can be used to understand the shortcomings of the model and provide a basis and direction for further optimizing the model's structure, parameters, training methods, etc.

[0106] S207. Optimize the detection model according to the accuracy score to obtain a deep learning target detection model.

[0107] In this embodiment, after the accuracy score is obtained, the detection model is optimized in a targeted manner based on the accuracy score. If the accuracy score is low, the problems existing in the detection model are analyzed. For example, the detection model may not extract certain features accurately enough, or there may be deviations in the classification decision. Based on these problems, a series of measures can be taken to optimize the detection model. For example, model parameters such as learning rate, number of layers, etc. can be adjusted to improve the performance of the model; increase the amount or diversity of training data to allow the model to learn more situations. Through continuous testing, adjustment and verification, the accuracy of the model is gradually improved until a satisfactory effect is achieved, and finally a deep learning target detection model is obtained.

[0108] S208. Obtain a cabbage pollen picture to be detected, input the cabbage pollen picture into a deep learning target detection model for processing, and obtain a predicted pollen frame and pollen category corresponding to each pollen grain in the cabbage pollen picture.

[0109] Step S208 is similar to the above-mentioned steps S101 to S102 and will not be described in detail here.

[0110] S209, calculating the number of fertile frames and the number of infertile frames according to the predicted pollen frames and categories, and obtaining the abortion rate of cabbage pollen according to the number of fertile frames and the number of infertile frames.

[0111] Step S209 is similar to the above step S103 and will not be described again.

[0112] The embodiment of the present application provides a method for determining the abortion rate of cabbage pollen, which obtains multiple sample cabbage pollen pictures and performs frame selection and annotation to determine the training set and the validation set. A detection model to be trained is established and the training set pictures are subjected to image data enhancement processing for training to obtain a detection model, and then the accuracy score is obtained by judging the model through the validation set. The deep learning target detection model is obtained based on the accuracy score optimization model, and the predicted pollen frame and category of the cabbage pollen picture to be detected are predicted using the deep learning target detection model, and the number of fertile frames and infertile frames is calculated to obtain the abortion rate. Therefore, the generalization ability and adaptability of the model are enhanced by means such as data enhancement; through the deep learning target detection model, the abortion of cabbage pollen can be automatically identified and classified, and the accuracy and reliability of pollen abortion rate detection are improved.

[0113] Figure 4 A schematic diagram of a method for determining the pollen sterility rate of cabbage provided in an embodiment of the present application Figure 3 ,like Figure 4 As shown, in this embodiment Figure 2Based on the embodiment, a possible implementation method for obtaining the accuracy score of the detection model according to the prediction box and the first annotation box corresponding to the second sample labeled picture, as well as the first pollen category and the second pollen category is described in detail. The method includes:

[0114] S401: Calculate the intersection-over-union ratio between the first labeled box and the predicted box.

[0115] In this embodiment, calculating the intersection over union (IoU) between each first annotation box and the corresponding prediction box is one of the important indicators for judging the performance of the model in object detection. The intersection over union measures the degree of overlap between the prediction box and the actual annotation box (the first annotation box), that is, the ratio of the overlapping area of ​​the prediction box and the first annotation box to the total coverage area of ​​the prediction box and the first annotation box.

[0116] It should be noted that since the prediction box and the first annotation box are both rectangular bounding boxes, both carry the position information of the rectangular bounding boxes when they are formed. Therefore, the overlapping area and the total coverage area can be calculated through their position information.

[0117] S402: Determine whether the intersection-over-union ratio is greater than a preset value.

[0118] S403: If yes, then calculate the number of correct matching pairs corresponding to the first annotation box and the prediction box when the first pollen category and the second pollen category match, the correct matching pairs including the first correct matching pairs corresponding to the fertile category and the second correct matching pairs corresponding to the infertile category.

[0119] In this embodiment, a preset value of intersection-and-union ratio is set to determine whether the intersection-and-union ratio between each first annotation frame and the prediction frame is greater than the preset value. If so, the first annotation frame and the corresponding prediction frame are successfully matched. And determine whether the first pollen category corresponding to the first annotation frame is consistent with the second pollen category corresponding to the prediction frame. If so, the first correct matching pair number corresponding to the fertile category and the second correct matching pair number corresponding to the infertile category are calculated respectively.

[0120] S404, if not, then calculate the number of fertile prediction boxes and the number of infertile prediction boxes that do not match the first annotation box and have the wrong category, as well as the number of fertile first annotation boxes and the number of infertile first annotation boxes that do not match the prediction box and have the wrong category.

[0121] In this embodiment, all prediction frames are traversed, and when the intersection-and-union ratio is less than or equal to the preset value, it means that the first annotation frame and the corresponding prediction frame are not successfully matched. Therefore, find out those prediction frames that have not been successfully matched with the first annotation frame. At the same time, it is also necessary to find out the prediction frames in which the second pollen category does not match the first pollen category. Combining these two situations, the number of fertile prediction frames and the number of infertile prediction frames are calculated. Similarly, find out those first annotation frames that have not been successfully matched with the prediction frame. At the same time, it is also necessary to find out the first annotation frames in which the first pollen category does not match the second pollen category. Combining these two situations, the number of fertile first annotation frames and the number of infertile first annotation frames are calculated.

[0122] The category error is used to indicate a situation where the first pollen category and the second pollen category do not match.

[0123] S405. Calculate the number of first correct matching pairs and the number of first fertile annotation boxes to obtain a first recall rate, and calculate the number of first correct matching pairs and the number of fertile prediction boxes to obtain a first accuracy rate.

[0124] In this embodiment, the first correct matching pair number is TP 1 , the number of fertile first annotation boxes is FN 可育 According to the number of the first correct matching pairs and the number of the first fertile annotation boxes, the first recall rate Recall is obtained 可育 Recall 可育 =TP 1 / (TP 1 +FN 可育 );The number of fertile prediction frames is FP 可育 , according to the first number of correct matching pairs and the number of fertile prediction boxes, the first accuracy Precision is obtained 可育 For: Precision 可育 =TP 1 / (TP 1 +FP 可育 ).

[0125] Among them, recall rate is used to measure the ability of the detection model to find all relevant samples, focusing on examining the comprehensive coverage of the detection model on the target. Accuracy is used to judge the accuracy of the prediction results of the detection model. Taking these two indicators into consideration, we can have a more comprehensive understanding of the performance of the model in different aspects, so as to optimize and improve the detection model.

[0126] S406, calculating the second number of correct matching pairs and the number of infertile first labeling boxes to obtain a second recall rate, and calculating the second number of correct matching pairs and the number of infertile prediction boxes to obtain a second accuracy rate.

[0127] In this embodiment, the second correct matching number is TP2 , the number of the first infertile annotation box is FN 不可育 According to the second number of correct matches and the number of infertile first annotation boxes, the second recall rate Recall 不可育 Recall 不可育 =TP 2 / (TP 2 +FN 不可育 );The number of infertility prediction frames is FP 不可育 , according to the second number of correct matching pairs and the number of infertile prediction boxes, the second accuracy Precision is obtained 不可育 For: Precision 不可育 =TP 2 / (TP 2 +FP 不可育 ).

[0128] S407, calculating the first recall rate and the first accuracy rate to obtain a first accuracy rate score for the fertile category, and calculating the second recall rate and the second accuracy rate to obtain a second accuracy rate score for the infertile category.

[0129] In this embodiment, according to the first recall rate Recall 可育 And the first accuracy Precision 可育 , get the first accuracy score of the fertile category: F1score = 2Recall 可育 ×Precision 可育 / (Recall 可育 +Precision 可育 ). According to the second recall rate Recall 不可育 And the second accuracy Precision 不可育 , get the second accuracy score of the infertile category: F2score = 2Recall 不可育 ×Precision 不可育 / (Recall 不可育 +Precision 不可育 ).

[0130] S408: Determine the accuracy score of the detection model according to the first accuracy score and the second accuracy score.

[0131] In this embodiment, the accuracy score of the detection model is determined according to the first accuracy score F1score and the second accuracy score F2score: Fscore=(F1Score+F2Score) / 2.

[0132] The embodiment of the present application provides a method for determining the sterility rate of cabbage pollen, by calculating the intersection-and-union ratio between the first annotation frame and the prediction frame, and according to the intersection-and-union ratio, the first pollen category and the second pollen category, the first recall rate and the first accuracy rate of the fertile category, and the second recall rate and the second accuracy rate of the infertile category are obtained, and the accuracy score of the detection model is determined according to the above recall rate and accuracy rate. This method can comprehensively judge the detection performance of the model for different categories (fertile and infertile), and accurately measure the effect of the model in recognition and matching; the advantages and disadvantages of the model can be quantified through the specific accuracy score calculation, so as to carry out targeted improvement and optimization; at the same time, distinguishing different categories can better understand the performance of the model when dealing with different situations, and provide a more detailed basis for the adjustment and application of the model.

[0133] Figure 5 A schematic diagram of the structure of a device for determining abortion rate of cabbage pollen provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, a device 50 for determining the cabbage pollen sterility rate provided in this embodiment includes:

[0134] An acquisition module 501 is used to acquire a cabbage pollen image to be detected;

[0135] Processing module 502, for inputting the cabbage pollen picture into the deep learning target detection model for processing, and obtaining the predicted pollen frame and pollen category corresponding to each pollen grain in the cabbage pollen picture; the pollen category includes a fertile category and an infertile category, and the deep learning target detection model is obtained after training based on the sample annotated picture, and the sample annotated picture is obtained based on the sample cabbage pollen picture;

[0136] The calculation module 503 is used to calculate the number of fertile frames and the number of infertile frames according to the predicted pollen frames and pollen categories, and obtain the abortion rate of cabbage pollen according to the number of fertile frames and the number of infertile frames.

[0137] In a possible implementation, the acquisition module 501 is further configured to:

[0138] A plurality of sample cabbage pollen images are obtained, and each pollen grain in the plurality of sample cabbage pollen images is framed and selected using a labeling frame, and a first pollen category is correspondingly labeled to obtain a plurality of sample labeled images; the labeling frame is a rectangular boundary frame of the pollen; the first pollen category includes a fertile category and an infertile category;

[0139] Determine the training set and validation set based on the sample labeled pictures;

[0140] A detection model to be trained is established, and the training set and validation set are used to process the detection model to be trained to obtain a deep learning target detection model.

[0141] In a possible implementation, the acquisition module 501 is further configured to:

[0142] Performing image data enhancement processing on the first sample labeled image in the training set to obtain a processed image, wherein the image data enhancement processing includes at least one of color random perturbation, random image cropping, image flipping, and adding Gaussian noise;

[0143] The processed images are used to train the detection model to be trained to obtain the detection model;

[0144] The validation set is input into the detection model to obtain the prediction box and the second pollen category corresponding to each pollen grain in multiple second sample labeled images in the validation set, where the second pollen category includes a fertile category and an infertile category;

[0145] Obtaining an accuracy score of the detection model according to the predicted frame and the first annotation frame corresponding to the second sample labeled image, as well as the first pollen category and the second pollen category;

[0146] According to the accuracy score, the detection model is optimized to obtain a deep learning target detection model.

[0147] In a possible implementation, the acquisition module 501 is further configured to:

[0148] Calculate the intersection-over-union ratio between the first annotation box and the prediction box;

[0149] According to the intersection-over-union ratio, the first pollen category and the second pollen category, a first recall rate and a first accuracy rate of the fertile category, and a second recall rate and a second accuracy rate of the infertile category are obtained;

[0150] The first recall rate and the first accuracy rate are calculated to obtain a first accuracy rate score of the fertile category, and the second recall rate and the second accuracy rate are calculated to obtain a second accuracy rate score of the infertile category;

[0151] An accuracy score of the detection model is determined according to the first accuracy score and the second accuracy score.

[0152] In a possible implementation, the acquisition module 501 is further configured to:

[0153] Determine whether the intersection-over-union ratio is greater than a preset value. If so, calculate the number of correct matching pairs corresponding to the first annotation box and the prediction box when the first pollen category and the second pollen category match, and the number of correct matching pairs includes the first correct matching pair corresponding to the fertile category and the second correct matching pair corresponding to the infertile category;

[0154] If not, then the number of fertile prediction boxes and the number of infertile prediction boxes that do not match the first annotation box and have incorrect categories, as well as the number of fertile first annotation boxes and the number of infertile first annotation boxes that do not match the prediction box and have incorrect categories are calculated, and the category error is used to indicate the situation where the first pollen category and the second pollen category do not match;

[0155] The first recall rate and the first accuracy rate are determined based on the first number of correct matches, the number of fertile prediction boxes, and the number of fertile first labeling boxes. The second recall rate and the second accuracy rate are determined based on the second number of correct matches, the number of infertile prediction boxes, and the number of infertile first labeling boxes.

[0156] In a possible implementation, the acquisition module 501 is further configured to:

[0157] The first number of correct matching pairs and the number of fertile first annotation boxes are calculated to obtain a first recall rate, and the first number of correct matching pairs and the number of fertile prediction boxes are calculated to obtain a first accuracy rate;

[0158] The second number of correct matching pairs and the number of infertile first labeling boxes are calculated to obtain a second recall rate, and the second number of correct matching pairs and the number of infertile prediction boxes are calculated to obtain a second accuracy rate.

[0159] The present embodiment provides a device for determining the pollen abortion rate of cabbage, which can execute the method provided in the above method embodiment. The implementation principle and technical effect are similar, and will not be described in detail in this embodiment.

[0160] Figure 6 This is a schematic diagram of the structure of a device for determining the abortion rate of cabbage pollen provided in an embodiment of the present application. Figure 6 As shown, a cabbage pollen abortion rate determination device 60 provided in this embodiment includes: at least one processor 601 and a memory 602. Optionally, the device 60 also includes a communication component 603. The processor 601, the memory 602 and the communication component 603 are connected via a bus 604.

[0161] In a specific implementation process, at least one processor 601 executes the computer execution instructions stored in the memory 602, so that at least one processor 601 executes the above method.

[0162] The specific implementation process of the processor 601 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.

[0163] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0164] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.

[0165] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.

[0166] The present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.

[0167] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.

[0168] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.

[0169] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.

[0170] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.

[0171] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0172] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0173] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that 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, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0174] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.

[0175] It should be noted that the terms "first", "second", "third", "fourth", etc. in the claims, the specification and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the invention described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, products or devices.

[0176] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present invention and include common knowledge or customary technical means in the art not disclosed by the present invention, are not limited to the precise structure described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.

Claims

1. A method for determining the pollen sterility rate of cabbage, characterized in that: include: Obtain the cabbage pollen image to be tested; The cabbage pollen picture is input into a deep learning target detection model for processing, and a predicted pollen frame and pollen category corresponding to each pollen grain in the cabbage pollen picture are obtained; the pollen category includes a fertile category and an infertile category, and the deep learning target detection model is obtained after training based on a sample annotated picture, and the sample annotated picture is obtained based on a sample cabbage pollen picture; According to the predicted pollen frames and the pollen categories, the number of fertile frames and the number of infertile frames are calculated, and the abortion rate of cabbage pollen is obtained according to the number of fertile frames and the number of infertile frames.

2. The method according to claim 1, characterized in that Before obtaining the cabbage pollen picture to be detected, the method includes: Acquire multiple sample cabbage pollen images, select each pollen grain in the multiple sample cabbage pollen images using a labeling frame, and label the first pollen category accordingly, to obtain multiple sample labeled images; the labeling frame is a rectangular boundary frame of the pollen; the first pollen category includes a fertile category and an infertile category; Determine a training set and a validation set based on the sample labeled pictures; A detection model to be trained is established, and the detection model to be trained is processed using the training set and the validation set to obtain the deep learning target detection model.

3. The method according to claim 2, characterized in that The step of processing the to-be-trained detection model using the training set and the validation set to obtain the deep learning target detection model includes: Performing image data enhancement processing on the first sample labeled image in the training set to obtain a processed image, wherein the image data enhancement processing includes at least one of color random perturbation, random image cropping, image flipping, and adding Gaussian noise; Using the processed images to train the detection model to be trained to obtain a detection model; Inputting the verification set into the detection model to obtain a prediction box and a second pollen category corresponding to each pollen grain in a plurality of second sample labeled images in the verification set, wherein the second pollen category includes a fertile category and an infertile category; Obtaining an accuracy score of the detection model according to the prediction box and the first annotation box corresponding to the second sample labeled image, as well as the first pollen category and the second pollen category; According to the accuracy score, the detection model is optimized to obtain the deep learning target detection model.

4. The method according to claim 3, characterized in that The step of obtaining the accuracy score of the detection model according to the prediction frame and the first annotation frame corresponding to the second sample labeled image, as well as the first pollen category and the second pollen category, includes: Calculating an intersection-over-union ratio between the first labeled box and the predicted box; According to the intersection-over-union ratio, the first pollen category and the second pollen category, a first recall rate and a first accuracy rate of the fertile category, and a second recall rate and a second accuracy rate of the infertile category are obtained; The first recall rate and the first accuracy rate are calculated to obtain a first accuracy rate score of the fertile category, and the second recall rate and the second accuracy rate are calculated to obtain a second accuracy rate score of the infertile category; The accuracy score of the detection model is determined according to the first accuracy score and the second accuracy score.

5. The method according to claim 4, characterized in that The obtaining, according to the intersection-over-union ratio, the first pollen category and the second pollen category, a first recall rate and a first accuracy rate of the fertile category, and a second recall rate and a second accuracy rate of the infertile category includes: Determine whether the intersection-over-union ratio is greater than a preset value, and if so, calculate the number of correct matching pairs corresponding to the first annotation box and the prediction box when the first pollen category and the second pollen category match, wherein the number of correct matching pairs includes a first correct matching pair corresponding to the fertile category and a second correct matching pair corresponding to the infertile category; If not, then calculating the number of fertile prediction boxes and the number of infertile prediction boxes that do not match the first annotation box and have a wrong category, as well as the number of fertile first annotation boxes and the number of infertile first annotation boxes that do not match the prediction box and have a wrong category, wherein the category error is used to indicate a mismatch between the first pollen category and the second pollen category; The first recall rate and the first accuracy rate are determined based on the first number of correct matches, the number of fertile prediction boxes, and the number of fertile first labeling boxes; the second recall rate and the second accuracy rate are determined based on the second number of correct matches, the number of infertile prediction boxes, and the number of infertile first labeling boxes.

6. The method according to claim 5, characterized in that The obtaining of the first recall rate and the first accuracy rate according to the first number of correct matching pairs, the number of fertile prediction boxes, and the number of fertile first labeling boxes, and the obtaining of the second recall rate and the second accuracy rate according to the second number of correct matching pairs, the number of infertile prediction boxes, and the number of infertile first labeling boxes, includes: The first number of correct matches and the number of the first fertile annotation boxes are calculated to obtain the first recall rate, and the first number of correct matches and the number of the fertile prediction boxes are calculated to obtain the first accuracy rate; The second number of correct matches and the number of the first infertile marking boxes are calculated to obtain the second recall rate, and the second number of correct matches and the number of the infertile prediction boxes are calculated to obtain the second accuracy rate.

7. A device for determining the sterility rate of cabbage pollen, characterized in that: The device comprises: An acquisition module is used to acquire the cabbage pollen image to be detected; A processing module is used to input the cabbage pollen picture into a deep learning target detection model for processing, and obtain a predicted pollen frame and pollen category corresponding to each pollen grain in the cabbage pollen picture; the pollen category includes a fertile category and an infertile category, and the deep learning target detection model is obtained after training based on a sample annotated picture, and the sample annotated picture is obtained based on a sample cabbage pollen picture; A calculation module is used to calculate the number of fertile frames and the number of infertile frames according to the predicted pollen frames and the pollen categories, and obtain the abortion rate of cabbage pollen according to the number of fertile frames and the number of infertile frames.

8. A device for determining the sterility rate of cabbage pollen, characterized in that: The device comprises: a memory and a processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor executes the method for determining the pollen abortion rate of cabbage according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method for determining the cabbage pollen abortion rate as described in any one of claims 1 to 6.

10. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method for determining the pollen abortion rate of cabbage according to any one of claims 1 to 6 is implemented.

Citation Information

Cited By

  • Pollen viability detection method and device, computer equipment, medium and program product

    CN120673185A