A female parent tassel detection method and a female parent tassel detection system
The method for detecting male tassels of female parents by combining two models utilizes low-dimensional and high-dimensional features to identify male tassels of female parents, solving the problems of high learning difficulty and low accuracy in existing technologies, and achieving efficient and accurate detection of male tassels of female parents.
Patent Information
- Application Number
- CN202211292596.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-21
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2042-10-21
AI Technical Summary
Existing methods for detecting male tassels in female parents require the establishment of a comprehensive variety database and training to identify male tassels in female and male parents from the same plot. These methods are difficult to learn, have low accuracy, and poor adaptability, and cannot meet the seed companies' requirement for 99% accuracy.
A two-model approach is adopted. The first model identifies and labels the male spikes using low-dimensional features, while the second model calculates the feature distance and similarity matrix using high-dimensional features to determine the type of male spikes, thereby reducing the training set requirements and improving the identification accuracy.
It achieves over 99% recognition accuracy with a small training set, reduces recognition costs and learning difficulty, has better adaptability, and meets the testing needs of seed companies.
Smart Images

Figure CN115546774B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the application of image recognition technology in the field of seed production agriculture, and particularly to a method and system for detecting male and female tassels in female parent plants. Background Technology
[0002] To avoid pollination of the female parent's tassels during hybridization and affecting the purity of the produced seeds, seed companies perform multiple batches of mechanical or manual emasculation of the female parent. The traditional method of emasculation detection involves manually going to the field to count the residual emasculation between two batches. The detection path and statistical results are highly random, and it is difficult to meet the three requirements of detection efficiency, high coverage and uniform sampling. Therefore, image recognition technology has been applied to emasculation detection in the existing technology.
[0003] In the hybridization of crops within the same broad category, each plot contains both variety A and variety B. Variety A's tassels are removed to serve as the female parent, while variety B's tassels are retained to serve as the male parent. It is necessary to test and remove the tassels from the female parent to improve seed purity. Since the parent and female parent varieties differ in each plot, the aforementioned female parent, variety A, may serve as the male parent in other plots, and the aforementioned male parent, variety B, may serve as the female parent in other plots. Existing methods for detecting tassels in the female parent require the establishment of a database, uploading images of all varieties of the same crop category to the database, and maintaining and updating the database in real time as crop varieties are updated and added.
[0004] In existing technologies, the database-based identification method for removing male tassels of maternal parent A from a plot requires training a model to simultaneously identify male tassels of maternal parent A and paternal parent B in the same plot. The training effect is only applicable to plots where variety A is the maternal parent and variety B is the paternal parent. When variety A is the paternal parent and variety B is the maternal parent in another plot, the model needs to be retrained. Furthermore, when variety A or variety B is used as the maternal or paternal parent to cross with other varieties, the model needs to be retrained to identify male tassels of variety A or variety B, and it also needs to be trained to identify male tassels of another variety. This presents significant learning difficulties, and the identification accuracy can only reach 60%-70%, which cannot meet the seed company's requirement of 99% identification accuracy.
[0005] In view of this, it is necessary to improve the existing methods for detecting male ears of the female parent in order to solve the above problems. Summary of the Invention
[0006] The purpose of this invention is to disclose a method and system for detecting maternal male tassels, in order to solve the problems of high learning difficulty, low accuracy and poor adaptability of existing methods that require the establishment of a database of all crop varieties and then directly training to identify maternal and paternal male tassels in the same plot.
[0007] To achieve the above objectives, the present invention provides a method for detecting male ears of female parent plants, comprising the following steps:
[0008] S1. Orthophotos of crop plants in the tasseling stage of the collected plot;
[0009] S2. Based on the orthophoto image, a feature image including the male ear of the female parent or the male ear of the male parent is obtained;
[0010] S3. Extract high-dimensional features from each feature image;
[0011] S4. Calculate the feature distance between any two high-dimensional features to obtain a similarity matrix. The feature distance of similar features is close to the preset first feature value, and the feature distance of dissimilar features is close to the preset second feature value. The first feature value is less than the second feature value.
[0012] The highest and lowest values among the sums are determined by summing the distances in each row of the similarity matrix.
[0013] Calculate the difference between other sums and the highest and lowest values. When the difference between other sums and the highest value is smaller, the corresponding feature image is the female male ear, and when the difference between other sums and the lowest value is smaller, the corresponding feature image is the male ear of the father.
[0014] As a further improvement of the present invention, step S3 includes the following sub-steps:
[0015] S31. Establish a database of tassel types using various tassel image data, with tassels of the same variety classified as one type;
[0016] S32. Design a network model to extract high-dimensional features of tassels. Each time, three tassel images are read in, two of which are different tassels of variety A, including A0 and A1, and the other is a tassel of variety B.
[0017] S33. Based on the optimized loss function, train to minimize the Euclidean distance between the high-dimensional features extracted by A0 and A1 of the same class and maximize the Euclidean distance between the high-dimensional features extracted by A0 and B.
[0018] As a further improvement to the present invention, the loss function is: L = max(0,
[0019] Where L is the loss value. Let A1 be the Euclidean distance between A0 and A0. Let be the Euclidean distance between B and A0, and α be the minimum Euclidean distance correction coefficient between B and A0.
[0020] As a further improvement of the present invention, the following sub-steps are included after sub-step S33:
[0021] S34. During model training, the value of L gradually decreases. When L approaches 0 and the value stabilizes, the model training is complete.
[0022] As a further improvement of the present invention, step S4 includes the following sub-steps:
[0023] S41. Extract the high-dimensional features of any two feature images and calculate the Euclidean distance C between the high-dimensional features;
[0024] If C < α, then the two feature images are of the same type of plant, and the output feature distance approaches 0;
[0025] If C>α, then the two feature images are heterogeneous plants, and the output feature distance approaches 1.
[0026] As a further improvement to the present invention, it also includes:
[0027] S5. Based on the classification results in step S4, count the number of male tassels identified as female parent tassels to obtain the number of female parent male tassels a, and calculate the female parent male tassel removal rate T.
[0028] As a further improvement of the present invention, step S2 includes the following sub-steps:
[0029] S21. Using a trained tassel model, detect tassels in each image through low-dimensional features;
[0030] S22. Identify and extract feature images containing only one female or male male ear.
[0031] As a further improvement of the present invention, the high-dimensional features are extracted by a feature extraction network trained with ResNet as the backbone.
[0032] As a further improvement of the present invention, the feature dimension value of the high-dimensional feature is adjusted according to the accuracy and speed requirements of the computing platform.
[0033] This invention also discloses a female parent tassel detection system, comprising a receiving module, a first detection module, a second detection module, and an output module for implementing any of the above-described female parent tassel detection methods, wherein:
[0034] Receiver module: Acquires orthophotos of crop plants during the tasseling stage of the plot;
[0035] The first detection module detects the male ears in each image using low-dimensional features, identifies and extracts feature images containing only one female or male ear;
[0036] The second detection module extracts high-dimensional features from each feature image, calculates the feature distance between any two high-dimensional features to obtain a similarity matrix, calculates the sum of the distances in each row of the similarity matrix to obtain a sum value, and determines the male ear of the female parent based on the sum value.
[0037] Output module: Outputs the male ear ID of the female parent obtained by the second detection module.
[0038] Compared with the prior art, the beneficial effects of the present invention are:
[0039] Two models were established. The first model uses low-dimensional features to mark and extract all tassel images from the acquired orthophoto map, including images of female and male tassels. The second model extracts high-dimensional features of the female and male tassels. One high-dimensional feature is extracted from each image. The feature distance between any two high-dimensional features is calculated to obtain a similarity matrix. The sum of the distance values in each row of the similarity matrix is then used to determine whether the tassels in the current plot are female or male tassels. The first model is only used to identify tassels and does not need to consider crop varieties. Therefore, it requires a smaller training set to achieve the effect of identifying tassels through low-dimensional features. The second model only needs to be trained on a subset of tassel varieties. By subdividing the features, it can identify tassel varieties that have not been trained. As long as the features are included or partially included in the model, accurate identification can be achieved. Compared to existing technologies that require establishing a full-variety database and maintaining it in real time, this method effectively reduces the manpower and resources needed to identify the female parent's male tassel. Furthermore, compared to existing technologies that differentiate between the female and male parents' male tassels for the same plot, this method has better applicability and lower learning difficulty, achieving the 99% identification accuracy required by seed companies with a smaller training set. Attached Figure Description
[0040] Figure 1 This is an overall flowchart of the method for detecting male ears of the female parent in this invention;
[0041] Figure 2 This is a flowchart illustrating the specific steps in step S2 of the present invention.
[0042] Figure 3 This is a flowchart illustrating the specific steps in step S3 of the present invention.
[0043] Figure 4 This is a flowchart illustrating the specific steps in step S4 of the present invention.
[0044] Figure 5 This is a schematic diagram of the orthophoto acquisition route in this invention;
[0045] Figure 6 This is a schematic diagram illustrating the detection of male ears from the female parent in this invention. Detailed Implementation
[0046] The present invention will now be described in detail with reference to the embodiments shown in the accompanying drawings. However, it should be noted that these embodiments are not intended to limit the present invention. Equivalent changes or substitutions in function, method, or structure made by those skilled in the art based on these embodiments are all within the scope of protection of the present invention.
[0047] In summary, the method for detecting maternal male inflorescences disclosed in the various embodiments of this application can be used to identify maternal male inflorescences in hybrid crop plants in a plot. For example, hybrid crops include eight plant types: female and male parents of variety A, female and male parents of variety B, female and male parents of variety C, and female and male parents of variety D. When the crop plants planted in the same plot are male parents of variety A and female parents of variety B, it is necessary to remove the male inflorescences of female parents of variety B in the plot (the male inflorescences of female parents of variety B are those that remain after emasculation or those that grow later); when the crop plants planted in another plot are male parents of variety B and female parents of variety C, it is necessary to remove the male inflorescences of female parents of variety C in the plot (at this time, the male inflorescences of female parents of variety C are those that remain after emasculation or those that grow later).
[0048] The term "crop" includes, but is not limited to, corn, rice, soybeans, rapeseed, etc. Taking hybrid crop varieties A and B planted in the same plot as an example, the term "orthophoto map" refers to a high-resolution image of the same plot containing plants of varieties A and B, obtained through high-definition aerial photography equipment.
[0049] Taking hybrid crops A and B planted in the same plot as an example, when variety A is the male parent and variety B is the female parent, current technologies typically directly train the identification of the tassels of variety A and variety B. This training only distinguishes the tassels of varieties A as the male parent and variety B as the female parent. However, when varieties A and B are swapped in another plot (i.e., variety A as the female parent and variety B as the male parent), the model trained for this swap cannot be applied. The model needs to be retrained with varieties A as the female parent and variety B as the male parent. Therefore, the current direct identification method lacks generalization and has low adaptability. Taking corn as an example, since there are thousands of corn varieties, different seed companies may use different varieties, and new corn varieties are constantly being produced through hybridization. Establishing a corn tassel database capable of identifying all corn varieties would require significant manpower and resources, and it would need continuous maintenance and updates as corn varieties are added. It should be noted that by using a corn tassel database and building a model, corn tassel varieties can be directly identified from the original photographs. However, the accuracy of identification is only 60%-70%, which is insufficient to meet the seed companies' requirement for 99% accuracy in identification and detection.
[0050] The maternal male tassel detection method disclosed in this application establishes two models. One model does not require variety identification and is only used to identify male tassels, achieving an accuracy rate of over 99.7%. The second model distinguishes different male tassel species through high-dimensional features, achieving an accuracy rate of 99.7%, thus ensuring a detection effect of over 99%. Furthermore, the first model does not need to consider maize varieties, while the second model only needs to be trained on a subset of male tassel varieties. By subdividing features, it can distinguish between two male tassel varieties whose features are contained or partially contained within the model, even for male tassel varieties that have not been trained on. Therefore, both the first and second models require relatively small training sets, do not need to cover all maize varieties, significantly improve recognition accuracy, reduce training workload, and enhance adaptability, enabling practical applications.
[0051] Reference Figures 1 to 6 This invention discloses a method for detecting male tassels of female parents (hereinafter referred to as the detection method), comprising the following steps S1 to S4. The detection method aims to extract and label feature images containing male tassels of female or male parents from orthophoto maps using a first model. Then, it extracts high-dimensional features from each image using a second model and calculates the feature distance between any two high-dimensional features to obtain a similarity matrix. The feature distance of similar features is close to a preset first feature value, and the feature distance of dissimilar features is close to a preset second feature value. The first feature value is less than the second feature value. The maximum and minimum values are obtained by summing the values in each row of the similarity matrix. Other summed values are then compared with the maximum and minimum values, revealing that the number of summed values close to the maximum value is much smaller than the number of summed values close to the minimum value. Plants with IDs corresponding to the maximum value and those close to the maximum value are designated as Class I varieties, and plants with IDs corresponding to the minimum value and those close to the minimum value are designated as Class II varieties. The number of Class I varieties is much smaller than the number of Class II varieties. Since the plot has undergone multiple emasculation processes, the number of remaining or later-grown female male ears should be much smaller than the number of male male ears. Therefore, it can be determined that Class I varieties are female male ears and Class II varieties are male male ears, so as to further remove female male ears from the plot to ensure the purity of hybridization breeding. Compared with the existing technology that has low accuracy and is not practically applicable in targeted identification of male and female male ears, this application can directly identify the Class II variety as the female male ear by using similarity matrix and summation value when Class I and Class II varieties are swapped in another plot. When Class III varieties are introduced, the more numerous female male ears and fewer male male ears can also be directly identified by similarity matrix and summation value. Even if the introduced varieties have not been trained, they can still be distinguished, thus effectively reducing the learning difficulty. The combination of high-dimensional feature distance judgment and matrix numerical summation has higher recognition accuracy.
[0052] It should be noted that the method for detecting the female parent's male inflorescence in this application is implemented after the emasculation operation has been performed in the field. That is, the male inflorescences of the female parent plants have been removed from the field, while the male inflorescences of the male parent plants have been retained. However, there are situations where the male inflorescences of the female parent plants have not been completely removed, or where they have regrowed, leaving residual male inflorescences of the female parent. Based on this situation, the method of this application includes the following steps:
[0053] Step S1: Collect orthophoto maps of crop plants during the tasseling stage in the field. An orthophoto map is a planar map created from orthophotos, complete with a kilometer grid, inset borders, and annotations. Taking corn as an example, orthophoto maps of corn fields during the tasseling stage are collected using a drone, following a specified flight path, altitude, and heading. Because corn is planted in a regular pattern, the number of plants collected in each orthophoto map is consistent, facilitating subsequent calculation of the elimination rate. Step S1 yields a total of f orthophoto maps. The path for the drone to acquire the orthophoto maps is as follows: Figure 5 As shown, the five plots contain both male and female plants.
[0054] Step S2: Based on the orthophoto images, detect feature images including maternal or paternal male tassels. Establish the first model to detect all orthophoto images obtained in Step S1. Identify and label the maternal or paternal male tassel images in each orthophoto image using low-dimensional features, for subsequent steps to extract high-dimensional features for identifying maternal male tassels. This step is the first model in this detection method. In this embodiment, Step S2 is implemented based on a deep learning target detection model trained with a YOLOv5 architecture. It uses low-dimensional feature identification and labeling of all male tassels in the plot to perform a first-stage identification screening and cropping of all identification targets (i.e., plants) in the plot without distinguishing between varieties. The resulting images are a set containing maternal or paternal male tassels. This variety-indiscriminate male tassel identification screening can achieve an accuracy of over 99.7% with a smaller training set, and effectively reduces the learning pressure and identification quantity for subsequent accurate identification of maternal male tassels, thereby improving the accuracy of maternal male tassel identification. Step S2 involves obtaining n images, including either the maternal or paternal male ears, from f orthophoto images.
[0055] Step S3: Extract high-dimensional features from each feature image. High-dimensional features are extracted from all the tassel images obtained in Step S2 using a convolutional neural network. One high-dimensional feature is extracted from each image. As an example, in this implementation, the high-dimensional feature can be a 1*2048 feature vector. The dimension value can be freely set according to the accuracy and speed requirements of the computing platform during actual use. Using a smaller dimension can improve computing speed, but at the cost of some accuracy. Conversely, using a larger dimension will sacrifice computing speed to improve recognition accuracy. The dimension of 2048 is a value obtained after multiple experiments that yields high computing accuracy and appropriate computing speed. One high-dimensional feature is extracted from each of the n images obtained in Step S2, for a total of m high-dimensional features, where the value of n is equal to m.
[0056] Step S4: Calculate the feature distance between any two high-dimensional features to obtain a similarity matrix. The feature distance of similar features is close to a preset first feature value, and the feature distance of dissimilar features is close to a preset second feature value. The first feature value is less than the second feature value. Summate the distances in each row of the similarity matrix to obtain a summation value. Determine the highest and lowest values in the summation distance table. Compare other summation values in the summation distance table with the highest and lowest values. When the summation value is closer to the highest value, the feature image corresponding to the summation value is the female male ear. When the summation value is closer to the lowest value, the feature image corresponding to the summation value is the male ear of the male parent. After extracting m high-dimensional features in step S3, distance calculation is performed on any two extracted high-dimensional features (each high-dimensional feature needs to perform a distance calculation with itself during the distance calculation process, and the resulting value is 0). After the distance calculation, a similarity matrix composed of m*m distance values can be obtained. The m distances corresponding to each high-dimensional feature are summed to obtain a distance table composed of m values. In an optional embodiment, the first feature value can be 0, and the second feature value can be 1, so the similarity matrix is composed of 0 and 1. By comparison, the highest and lowest values contained in the m values constituting the distance table can be obtained. The larger the value, the less similar it is; the smaller the value, the more similar it is. Then, the other summed values in the distance table are compared with the values of the highest and lowest values. When the summed value is closer to the value of the highest value, the feature image corresponding to the summed value is determined to be a type I variety with fewer similarities; when the summed value is closer to the value of the lowest value, the feature image corresponding to the summed value is determined to be a type II variety with more similarities.
[0057] The applicant discovered that, since the plot had undergone multiple emasculations, the number of remaining or later-grown female male ears should be much smaller than the number of male ears of the male parent. Therefore, it can be known that the Class I variety with fewer similar male ears is the female male ear, and the Class II variety with more similar male ears is the male male ear. When the male parent plant used for hybridization breeding in the plot is variety A and the female parent plant is variety B, it can be known that the Class I variety is the male ear of variety B as the female parent, and the Class II variety is the male ear of variety A as the male parent, so that the female male ears of variety B can be removed later. When varieties A and B are swapped in another plot (i.e., the female parent is variety A and the male parent is variety B), a distance table can be obtained again using the above method. Again, by comparing the summation value with the highest and lowest values, the summation value closer to the highest value is still classified as category I, and the summation value closer to the lowest value is classified as category II. In this case, based on the quantity distribution, category I varieties are identified as female parent male ears, and the female parent male ears are those of variety A; category II varieties are identified as male parents, and the male parents are those of variety B. Therefore, when varieties A and B are swapped, this detection method can be applied to detect female parent male ears without retraining, significantly improving the adaptability of female parent male ear detection and reducing learning difficulty. Furthermore, even for untrained variety C male ears, after identification by the first model, they can be determined as either female or male parent male ears using the quantity distribution method in the second model, using the same method as above, and will not be repeated here.
[0058] Combination Figure 2 As shown, in this embodiment, step S2 includes sub-steps S21 to S22:
[0059] S21. Using a trained tassel model, detect the tassels in each image through low-dimensional features. Establish the first model to identify orthophotos obtained by drone. In this step, only the tassels need to be identified, and the crop variety does not need to be identified. The tassels differ significantly from other parts of the plant, so accurate identification can be achieved through low-dimensional features. The model only requires a small training set to achieve accurate identification, that is, high-precision identification is achieved with a relatively small training set.
[0060] S22. Identify and crop feature images containing only one male or female tassel. Each orthophoto image contains multiple plant images, and the female cultivar B may contain more than one male tassel. Therefore, all male tassels identified in step S21 need to be identified and cropped. To facilitate the extraction of high-dimensional features in subsequent steps, each male tassel identified in step S21 needs to be identified and cropped, resulting in n male tassel images. Each of the n male tassel images contains only one male tassel image, and the male tassel images of both the male cultivar A and the female cultivar B are included in the n images. In subsequent processes, only the high-dimensional features of the n male tassel images need to be extracted for judgment, effectively narrowing the target range of high-dimensional feature extraction and judgment to determine the female tassel, thereby reducing the difficulty of judgment and learning, and improving the identification accuracy of the female tassel. By combining steps S21 and S22, the accuracy of judging and marking male ears can reach 99.7%. Combined with subsequent steps, the accuracy of detecting male ears of the maternal parent can reach 99%.
[0061] Combination Figure 3 As shown, in this embodiment, step S3 includes sub-steps S31 to S34:
[0062] S31. Establish a tassel type database using various tassel image data, grouping tassels of the same variety into one category. The database will be created using varieties A, B, and C as examples. Assume that images of tassels from varieties A, B, and C are uploaded to the database, with multiple images of each variety uploaded. The database will group multiple images of tassels from variety A into one category, multiple images of tassels from variety B into another category, and multiple images of tassels from variety C into yet another category. This database will be used as a dataset during subsequent model training.
[0063] S32. Design a network model to extract high-dimensional features of the male inflorescence. Each time, three images of male inflorescences are read in: two images of different varieties A (A0 and A1), and one image of variety B. To distinguish between male inflorescences of different varieties, the model needs to be trained using images from the dataset in step S31. Each time, two different varieties are distinguished. In this embodiment, variety A and variety B male inflorescences are used as examples. During one training process, images A0 and A1 from the variety A dataset are read in, and one image of variety B (hereinafter referred to as the B image) is read in from the variety B dataset. By reading images A0, A1, and B, subsequent steps compare the Euclidean distance between A0 and A1, and between A0 and B. The model is trained in subsequent steps until the Euclidean distance for male inflorescences of the same variety approaches 0, and the Euclidean distance for male inflorescences of different varieties approaches 1, thus achieving the goal of detecting the female male inflorescence through the sum of Euclidean distances. In this embodiment, the high-dimensional features are extracted using a feature extraction network trained with ResNet as the backbone.
[0064] S33. Based on the optimized loss function, train to minimize the Euclidean distance between the high-dimensional features extracted by A0 and A1 of the same class and maximize the Euclidean distance between the high-dimensional features extracted by A0 and B.
[0065] The loss function is:
[0066] Where L is the loss value. Let A1 be the Euclidean distance between A0 and A0. Let be the Euclidean distance between B and A0, and α be the minimum Euclidean distance correction coefficient between B and A0.
[0067] Since A0 and A1 are images of the same variety of tassel, their high-dimensional features should be similar. However, A0 and A1 are not from the same tassel, so there should be subtle differences between their high-dimensional features. Therefore, the calculated Euclidean distance between the high-dimensional features of A0 and A1 approaches 0 but is not equal to 0. Since A0 and B are tassels of two different varieties read from different training sets, the difference in high-dimensional features between A0 and B is greater than the difference between A0 and A1. Therefore, the Euclidean distance between A0 and B is greater than the Euclidean distance between A0 and A1. Optionally, the α used to represent the minimum Euclidean distance correction coefficient between B and A0 is set to around 0.3, and can be dynamically adjusted during model training.
[0068] S34. During model training, the value of L gradually decreases. When L approaches 0 and its value stabilizes, model training is complete. L is used as a loss value to evaluate the model quality during training. The larger the L value, the worse the model quality. At the beginning of training, due to the randomness of the parameters within the model, the value of L is large and fluctuates greatly. The network will adjust its own parameters according to the sharing of L among the parameters during training to reduce the value of L. During training, the value of L will gradually decrease and approach 0. When the value of L stabilizes, it indicates that model training is complete.
[0069] Taking a database containing male tassels of three varieties (A, B, and D) as an example, the model was trained on varieties A and B during the above training process. Next, it needs to be trained on varieties B and D, and then on varieties D and A. When training to identify varieties B and D, three images (B0, B1, and D) are read; when training to identify varieties D and A, three images (D0, D1, and A) are read. The training method is the same as that for A and B, except that α is replaced with the minimum Euclidean distance correction coefficient between D and B0, and between A and D0. After three training iterations, the training sets for all three varieties (A, B, and D) in the database are complete. When the plant varieties used for hybrid seed production in the plot are A / B, B / D, or D / A, and regardless of which variety's male tassel is the female parent, accurate identification and judgment can be performed. As can be seen from the above, when more than three varieties (A, B, and D) are uploaded to the database, the model is trained sequentially according to the training method of the loss function until each L value approaches 0 and remains stable. The model is then trained and can be directly applied to other hybrid seed production plots for maternal male tassel detection.
[0070] The sub-steps S31 to S34 described above constitute the training process for the second model among the two models in this detection method. This model only needs to be trained on a subset of male spike varieties. When the target object contains untrained male spike varieties, accurate identification can be achieved as long as the detailed features of the untrained male spike variety are included or partially included in the model. Since this detection method trains the model by extracting high-dimensional features, and in this embodiment, the dimension of the high-dimensional features is 1*2048, the features are sufficiently detailed and the feature dimension is high enough. Therefore, the model can include some features of untrained male spikes from different varieties of the same species, thus enabling accurate identification even without training. For example, only 50+ male spike varieties need to be uploaded to the database and trained as described above. Accurate identification can be achieved when the features of the untrained male spikes are partially included in the model. When the model training dataset is large enough to include some features of continuously emerging new varieties of male spikes, accurate identification of new varieties of male spikes can be achieved without real-time database maintenance or uploading of new variety images. Compared to existing technologies that require uploading images of all types of crops to a database and maintaining them in real time—an impractical and costly method—this method effectively reduces the manpower and resources required for model maintenance and lowers the cost of identifying the male tassel of the maternal parent.
[0071] Combination Figure 4 As shown, step S4 includes sub-steps S41 to S44:
[0072] S41. Extract the high-dimensional features of any two feature images and calculate the Euclidean distance C between the high-dimensional features;
[0073] If C < α, then the two feature images are of the same type of plant, and the output feature distance approaches 0;
[0074] If C>α, then the two feature images are heterogeneous plants, and the output feature distance approaches 1.
[0075] Since α is the minimum Euclidean distance correction coefficient between dissimilar plants, taking varieties A and B as examples, the Euclidean distance between variety B and variety A must be at least α. This can be understood as α being the threshold for the Euclidean distance between varieties B and A. The Euclidean distance between the high-dimensional features extracted from any two feature images is calculated. When the distance value is greater than α, it can be determined that the two high-dimensional features extracted from the two feature images are dissimilar plants, and a feature distance value close to 1 is output. When the distance value is less than α, it can be determined that the two high-dimensional features extracted from the two feature images are similar plants, and a feature distance close to 0 is output. These feature distances are used to fill the similarity matrix in step S42. As mentioned above, a total of n images of tassels are obtained in step S2, and one high-dimensional feature is extracted from each image, resulting in a total of m high-dimensional features, where m = n. Therefore, by extracting any two high-dimensional features and calculating the Euclidean distance, a total of m*m Euclidean distances can be obtained.
[0076] S42. Obtain a similarity matrix with an m*m size. Form a similarity matrix from the m*m Euclidean distances obtained in step S41 above, and fill the m Euclidean distances corresponding to each high-dimensional feature into the same row, so that a summation distance table can be formed later by summing the features.
[0077] S43. Summate the m Euclidean distance values corresponding to each high-dimensional feature to obtain a summed distance table consisting of m summed values. Since the m Euclidean distances corresponding to each high-dimensional feature are filled in the same row, the summation of the m Euclidean distances in each row is the m summed values of the m high-dimensional features, which can then be compared numerically.
[0078] S44. Determine the highest value h and the lowest value j in the distance table, calculate the differences between the other summation values x in the distance table and h and j. When h - x > x - j, the characteristic image corresponding to this summation value is the female parent tassel; when h - x < x - j, the characteristic image corresponding to this summation value is the male parent tassel. As can be seen from step S41, when two high-dimensional features are not of the same variety, the Euclidean distance calculated is a floating-point number approaching 1; when two high-dimensional features are of the same variety, the Euclidean distance calculated is a floating-point number approaching 0, and when calculating the Euclidean distance between a high-dimensional feature and itself, the obtained Euclidean distance is 0. After obtaining the m summation values included in the distance table, obtain the highest value h and the lowest value j among the m summation values. Set the characteristic image corresponding to the high-dimensional feature with the highest value h and the summation value x closer to h as the variety of class Ι, and set the characteristic image corresponding to the high-dimensional feature with the lowest value j and the summation value x closer in magnitude to j as the variety of class ΙΙ. By comparing the summation values in the distance table, it can be seen that the lowest value j and the summation value x (i.e., the variety of class ΙΙ) closer in magnitude to j account for the vast majority of the m values, and the highest value h and the summation value x (i.e., the variety of class Ι) closer in magnitude to h account for a very small number of the m values. As described above, there have been multiple emasculation operations in the plot, so the number of female parent tassels is much less than the number of male parent tassels during the detection process. It can be known that the variety of class Ι is the female parent tassel, and the variety of class ΙΙ is the male parent tassel. When the male parent plant of the plants used for cross-breeding in the plot is variety A and the female parent plant is variety B, it can be known that the variety of class Ι is the tassel of variety B as the female parent, and the variety of class ΙΙ is the tassel of variety A as the male parent. As Figure 6 shown, output the ID of the female parent tassel and mark it on the original orthophoto map for subsequent removal of the female parent tassel of variety B.
[0079] Combined with Figure 1 shown, in this embodiment, it further includes step S5:
[0080] S5. Count the number of female parent tassels determined according to the classification result in step S4. The number of female parent tassels is a, and calculate the removal rate T of the female parent tassel. The removal rate of the female parent tassel is obtained from the total number a of female parent tassels detected in the plot and the total number of plants in the plot. The smaller the obtained removal rate value, the fewer the remaining female parent tassels after multiple emasculations in the plot, indicating that this detection method has good detection accuracy and can effectively identify a very small number of remaining female parent tassels in the plot.
[0081] To assess the model's accuracy in detecting male tassels of the maternal parent, a precision test is performed: the number in the test set ID indicates the number of male tassel images, and the variety of each male tassel image is known. Using the model training method described above, the test set contains 10 categories (i.e., 10 varieties), each category has 10 IDs, and each ID contains 10 images. Male tassels of the same variety from the same plot are placed under the same ID; male tassels of the same variety from different plots are not placed under the same ID but are placed in the same category (introducing male tassels of the same variety from other plots increases the testing difficulty and precision). The similarity between any two images in the test set is measured, resulting in a 1000*1000 similarity matrix. The detection result is either similar or dissimilar. The detection result is compared with the known results; 1 is assigned if the results are the same, and 0 is assigned if they are different. The accuracy is calculated as: Accuracy = Number of identical results / 1000 * 1000.
[0082] Table 1: Accuracy Testing Table
[0083]
[0084] As shown in Table 1, the accuracy of this detection method can reach 100% for a single dataset containing only two different varieties in the same plot. For hybrid breeding plots containing only two different varieties of male tassels that require identification of the female parent and emasculation, the detection rate of the female parent male tassels is 99.8%-100%, which is significantly improved compared to the 60%-70% detection rate of the existing technology. It also effectively reduces the training load and can be put into practical application.
[0085] This invention also discloses a female parent tassel detection system, comprising a receiving module, a first detection module, a second detection module, and an output module for implementing any of the above-described female parent tassel detection methods, wherein:
[0086] Receiving module: Acquires orthophotos of crop plants during the tasseling stage of the plot. Plans the drone's flight path, specifies the drone's flight altitude and heading; the drone flight path is as follows... Figure 5 As shown, taking five plots to be tested as an example, from plot one through plot two, plot three, plot four to plot five, all orthophoto images to be tested are collected. The five plots are of the same parent and parent type.
[0087] The first detection module detects the tassels in each image using low-dimensional features, identifies and extracts feature images containing only one female or male tassel. All tassel images are extracted from the orthophoto image acquired by the receiving module, with each image containing only one female and one male tassel. The detection, identification, and extraction of tassels are performed using low-dimensional features, resulting in high detection accuracy and low detection difficulty.
[0088] The second detection module extracts high-dimensional features from each feature image, calculates the feature distance between any two high-dimensional features to obtain a similarity matrix, sums the distances in each row of the similarity matrix to obtain a sum value, and determines the female parent's male ear based on the sum value. A similarity matrix is formed by calculating high-dimensional features pairwise, and a distance table is obtained by summing each row of the matrix. The female parent's male ear is determined based on the sum value in the distance table. The specific determination process is the same as described above and will not be repeated here.
[0089] Output module: Outputs the male ear ID of the female parent detected by the second detection module. For example... Figure 6 As shown, the image corresponding to the ID of the detected female parent tassel is marked in the orthophoto image, and then removed, thus ending the entire female parent tassel detection process.
[0090] The detailed descriptions listed above are merely specific descriptions of feasible embodiments of the present invention, and are not intended to limit the scope of protection of the present invention. All equivalent embodiments or modifications made without departing from the spirit of the present invention should be included within the scope of protection of the present invention.
[0091] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
[0092] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
Claims
1. A method for detecting male ears of female parent, characterized in that, Includes the following steps: S1. Orthophotos of crop plants in the tasseling stage of the collected plot; S2. Based on the orthophoto image, a feature image including the male ear of the female parent or the male ear of the male parent is obtained; S3. Extract high-dimensional features from each feature image; Step S3 includes the following sub-steps: S31. Establish a database of tassel types using various tassel image data, with tassels of the same variety classified as one type; S32. Design a network model to extract high-dimensional features of tassels. Each time, three tassel images are read in, two of which are different tassels of variety A, including A0 and A1, and the other is a tassel of variety B. S33. Based on the optimized loss function, train to minimize the Euclidean distance between the high-dimensional features extracted by A0 and A1 of the same class and maximize the Euclidean distance between the high-dimensional features extracted by A0 and B; S4. Calculate the feature distance between any two high-dimensional features to obtain a similarity matrix. The feature distance between similar features is close to a preset first feature value, and the feature distance between dissimilar features is close to a preset second feature value. The first feature value is less than the second feature value. The similarity matrix is composed of the first feature value and the second feature value. Summing is performed on each row of the similarity matrix to obtain a summation value, and the highest and lowest values among the summation values are determined. Calculate the difference between other sums and the highest and lowest values. When the difference between other sums and the highest value is smaller, the corresponding feature image is the female male ear, and when the difference between other sums and the lowest value is smaller, the corresponding feature image is the male ear of the father.
2. The method for detecting male ears of the female parent according to claim 1, characterized in that, The loss function is: Where L is the loss value. Let A1 be the Euclidean distance between A0 and A0. Let be the Euclidean distance between B and A0, and α be the minimum Euclidean distance correction coefficient between B and A0.
3. The method for detecting male ears of the female parent according to claim 2, characterized in that, The following sub-steps are included after sub-step S33: S34. During model training, the value of L gradually decreases. When L approaches 0 and the value stabilizes, the model training is complete.
4. The method for detecting male ears of the female parent according to claim 3, characterized in that, Step S4 includes the following sub-steps: S41. Extract the high-dimensional features of any two feature images and calculate the Euclidean distance C between the high-dimensional features; If C < α, then the two feature images are of the same type of plant, and the output feature distance approaches 0; If C>α, then the two feature images are heterogeneous plants, and the output feature distance approaches 1.
5. The method for detecting male ears of the female parent according to any one of claims 1 to 4, characterized in that, Also includes: S5. Based on the classification results in step S4, count the number of male tassels identified as female parent tassels to obtain the number of female parent male tassels a, and calculate the female parent male tassel removal rate T.
6. The method for detecting male ears of the female parent according to claim 5, characterized in that, Step S2 includes the following sub-steps: S21. Using a trained tassel model, detect tassels in each image through low-dimensional features; S22. Identify and extract feature images containing only one female or male male ear.
7. The method for detecting male ears of the female parent according to claim 1, characterized in that, The high-dimensional features are extracted by a feature extraction network trained with ResNet as the backbone.
8. The method for detecting male ears of the female parent according to claim 6, characterized in that, The feature dimension values of the high-dimensional features are adjusted according to the accuracy and speed requirements of the computing platform.
9. A system for detecting male tassels in female parents, characterized in that, The method includes a receiving module, a first detection module, a second detection module, and an output module for implementing the maternal male ear detection method according to any one of claims 1-8, wherein: Receiver module: Acquires orthophotos of crop plants during the tasseling stage of the plot; The first detection module detects the male ears in each image using low-dimensional features, identifies and extracts feature images containing only one female or male ear; The second detection module extracts high-dimensional features from each feature image, calculates the feature distance between any two high-dimensional features to obtain a similarity matrix, calculates the sum of each row in the similarity matrix, and determines the male ear of the female parent based on the sum value. Output module: Outputs the IDs of the male and female offspring detected by the second detection module.
Citation Information
Patent Citations
Unsupervised cross-domain self-adaptive pedestrian re-identification method
CN111967294A
Feature detection method and device for target object
CN112381028A