Leymus chinensis seed setting rate identification method, system, equipment and medium
By performing chemical pretreatment and training of deep learning models on wool seeds, the problem of high cost and low accuracy of wool seed fruit rate statistical methods in the existing technology is solved, and efficient and accurate recognition of fruit rate is achieved, which is suitable for large-scale breeding needs.
Patent Information
- Application Number
- CN202510714438.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-07-01
AI Technical Summary
The existing statistical methods for seed fruiting rate of goat grass are costly and have low accuracy, making it difficult to meet the needs of fast and high-throughput breeding.
By chemically pretreating the seeds of the grass seeds, the seed pigment and cellulose are degraded to increase transparency, and using a deep learning framework, especially the YOLO algorithm, the seed fruiting rate recognition model of the grass seed is trained to achieve image acquisition and recognition.
It improves the efficiency and accuracy of the recognition of seed fruiting rate of goat grass, reduces costs, meets the needs of large-scale testing, and provides reliable technical support for goat grass breeding.
Smart Images

Figure CN120236149A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of forage seed identification, and particularly to a method, system, device and medium for identifying the seed setting rate of Leymus chinensis seeds. Background Art
[0002] Leymus chinensis ( Leymus chinensis (Trin.) Tzvelev) is a perennial herbaceous plant that is cold-resistant, drought-resistant and salt-alkali tolerant, with a high protein content and good palatability, and is an important forage resource. Against the backdrop of the dual challenges of global food security and ecological protection, as an important forage grass and ecological restoration plant, the importance of Leymus chinensis breeding research has become increasingly prominent. However, traditional breeding methods are restricted by the "three lows" problems of Leymus chinensis, namely low germination rate, low heading rate and low seed setting rate, which seriously affect the breeding process of excellent varieties and their commercial application in the industry. Therefore, in the process of Leymus chinensis breeding, the breeding of new germplasms and new varieties with high seed setting rate is of great significance for the development of the forage industry and the restoration of the ecological environment. At present, the methods for counting the seed setting rate of Leymus chinensis seeds mainly include manual seed counting and X-ray irradiation, but both of these two technologies have certain defects: (1) Manual seed counting: The method of judging the seed setting rate by manually touching the seeds not only takes a long time and has cumbersome steps, but also easily leads to an increase in errors due to tactile fatigue, and cannot meet the actual needs of rapid and high-throughput breeding.
[0003] (2) X-ray irradiation: Although X-rays can be used to detect the internal structure of seeds, its equipment cost is high, the usage cost is high (average 100 yuan per sheet), and the operation is also relatively complex. Therefore, it is difficult to be widely used in the large-scale detection of Leymus chinensis seeds.
[0004] Therefore, there is an urgent need for an efficient and low-cost method for identifying the seed setting rate of Leymus chinensis seeds. Summary of the Invention
[0005] The present invention provides a method, system, device and medium for identifying the seed setting rate of Leymus chinensis seeds, so as to solve the defects of the existing methods for counting the seed setting rate of Leymus chinensis seeds, such as high cost and low accuracy.
[0006] A method for constructing a seed setting rate identification model of Leymus chinensis seeds provided by the present invention includes: Performing chemical pretreatment on Leymus chinensis seeds to degrade the pigments and cellulose of the seed coat of Leymus chinensis to increase the transparency of the seed coat, and obtaining pretreated Leymus chinensis seeds; Performing image acquisition on the pretreated Leymus chinensis seeds to obtain Leymus chinensis seed images, and labeling the seed setting category labels of each Leymus chinensis seed on the Leymus chinensis seed images; According to the Leymus chinensis seed images and the seed setting category labels of each Leymus chinensis seed thereon, using a deep learning framework to train and obtain a seed setting rate identification model of Leymus chinensis seeds.
[0007] According to a method for constructing a recognition model of the seed setting rate of Leymus chinensis seeds provided by the present invention, the chemical pretreatment of Leymus chinensis seeds to degrade the pigments and cellulose of the seed coat to increase the transparency of the seed coat, and obtain pretreated Leymus chinensis seeds, includes: Collect mature seed spikes from Leymus chinensis plants and perform threshing treatment to separate Leymus chinensis seeds; Under room temperature conditions, soak Leymus chinensis seeds in an alkaline solution (NaOH solution) to soften and transparentize Leymus chinensis seeds; Wash the soaked Leymus chinensis seeds with distilled water to remove the residual alkaline solution (NaOH solution), and then soak the Leymus chinensis seeds in distilled water to further remove the pigments and other impurities on the surface of Leymus chinensis seeds.
[0008] According to a method for constructing a recognition model of the seed setting rate of Leymus chinensis seeds provided by the present invention, the chemical pretreatment of Leymus chinensis seeds to degrade the pigments and cellulose of the seed coat to increase the transparency of the seed coat, and obtain pretreated Leymus chinensis seeds, includes: Collect mature seed spikes from Leymus chinensis plants and perform threshing treatment to separate Leymus chinensis seeds; Under room temperature conditions, soak the threshed Leymus chinensis seeds in 20% NaOH solution for 1.5 to 2 hours, and then soak them in water for 12 to 24 hours to soften and transparentize Leymus chinensis seeds, achieving the effect that the seed setting situation of the seeds can be visually recognized through a light-emitting board; Wash the soaked Leymus chinensis seeds 3 times with distilled water to remove the residual alkaline solution.
[0009] According to a method for constructing a recognition model of the seed setting rate of Leymus chinensis seeds provided by the present invention, the image acquisition of the chemically pretreated Leymus chinensis seeds to obtain Leymus chinensis seed images, and label the seed setting category labels of each Leymus chinensis seed on the Leymus chinensis seed images, includes: Place the pretreated Leymus chinensis seeds on the light-emitting board in a randomly scattered manner, and avoid seed overlap; Use a shooting device fixed 15 cm above the light-emitting board to shoot the Leymus chinensis seeds on the light-emitting board to obtain Leymus chinensis seed images; Select and label the seed setting category labels of the Leymus chinensis seeds in the Leymus chinensis seed images, where the seed setting categories include set seeds, non-set seeds, and others; Generate a corresponding JSON format annotation file for each Leymus chinensis seed image to record the coordinates and seed setting category labels of each annotation box in the Leymus chinensis seed image.
[0010] A method for constructing a recognition model of the seed setting rate of Leymus chinensis seeds provided by the present invention. In the seed setting category, the definition of "seed set" is that there is obvious dark substance visible to the naked eye inside the seed coat and its length is greater than 1 / 3 of the surrounding translucent area; the definition of "not seed set" is that there is no obvious dark substance visible to the naked eye inside the seed coat or its length is less than 1 / 3 of the surrounding translucent area; the definition of "others" is non-seed structure or unable to form a complete seed coat.
[0011] A method for constructing a recognition model of the seed setting rate of Leymus chinensis seeds provided by the present invention. The deep learning framework uses the YOLO algorithm. Based on the Leymus chinensis seed image and the seed setting category label of each Leymus chinensis seed thereon, using the deep learning framework, a recognition model of the seed setting rate of Leymus chinensis seeds is trained, including: Convert the annotation file in JSON format corresponding to each Leymus chinensis seed image into YOLO format to obtain the annotation file in YOLO format corresponding to each Leymus chinensis seed image. Among them, each line in the annotation file in YOLO format records the seed setting category of a Leymus chinensis seed and the coordinates of the normalized annotation box. Divide the Leymus chinensis seed image and its corresponding annotation file in YOLO format into a training set, a test set, and a validation set according to a preset ratio. Use the YOLO algorithm to train the model on the training set, enable the model to learn the morphological manifestations of Leymus chinensis seeds with different seed setting categories in the Leymus chinensis seed image, and evaluate the model performance through the test set and the validation set, and adjust the model parameters to optimize the recognition accuracy to obtain a recognition model of the seed setting rate of Leymus chinensis seeds.
[0012] A method for recognizing the seed setting rate of Leymus chinensis seeds provided by the present invention, including: Perform chemical pretreatment on the Leymus chinensis seeds to be measured according to the method for constructing the recognition model of the seed setting rate of Leymus chinensis seeds described in any one of the above, and perform image acquisition to obtain an image of the Leymus chinensis seeds to be measured. Based on the image of the Leymus chinensis seeds to be measured, through the recognition model of the seed setting rate of Leymus chinensis seeds obtained by the method for constructing the recognition model of the seed setting rate of Leymus chinensis seeds described in any one of the above, obtain the seed setting rate of the Leymus chinensis seeds corresponding to the image of the Leymus chinensis seeds to be measured.
[0013] A method for recognizing the seed setting rate of Leymus chinensis seeds provided by the present invention. Based on the image of the Leymus chinensis seeds to be measured, through the recognition model of the seed setting rate of Leymus chinensis seeds obtained by the method for constructing the recognition model of the seed setting rate of Leymus chinensis seeds described in any one of the above, obtaining the seed setting rate of the Leymus chinensis seeds corresponding to the image of the Leymus chinensis seeds to be measured, including: Based on the image of the Leymus chinensis seeds to be measured, use the recognition model of the seed setting rate of Leymus chinensis seeds to recognize the seed setting category of the Leymus chinensis seeds in the image of the Leymus chinensis seeds to be measured, and obtain the number of Leymus chinensis seeds with the seed setting category of "seed set", the number of Leymus chinensis seeds with the seed setting category of "not seed set", and the number of Leymus chinensis seeds with the seed setting category of "others" in the image of the Leymus chinensis seeds to be measured. Based on the number of Leymus chinensis seeds with the fruiting category of fruiting, the number of Leymus chinensis seeds with the fruiting category of non-fruiting, and the number of Leymus chinensis seeds with the fruiting category of others in the Leymus chinensis seed image to be measured, the fruiting rate of the Leymus chinensis seeds corresponding to the Leymus chinensis seed image to be measured is obtained.
[0014] According to a method for identifying the fruiting rate of Leymus chinensis seeds provided by the present invention, the expression formula for the fruiting rate of Leymus chinensis seeds is: , In the expression formula for the fruiting rate of Leymus chinensis seeds, represents the fruiting rate of the Leymus chinensis seeds corresponding to the Leymus chinensis seed image to be measured, represents the number of Leymus chinensis seeds with the fruiting category of fruiting in the Leymus chinensis seed image to be measured, represents the number of Leymus chinensis seeds with the fruiting category of non-fruiting in the Leymus chinensis seed image to be measured.
[0015] The present invention also provides a system for identifying the fruiting rate of Leymus chinensis seeds, including: An image acquisition module, configured to: chemically preprocess the Leymus chinensis seeds to be measured and perform image acquisition according to the method for constructing the fruiting rate identification model of Leymus chinensis seeds described in any one of the above to obtain the Leymus chinensis seed image to be measured; A Leymus chinensis seed fruiting rate identification module, configured to: obtain the fruiting rate of the Leymus chinensis seeds corresponding to the Leymus chinensis seed image to be measured according to the Leymus chinensis seed fruiting rate identification model obtained by the method for constructing the fruiting rate identification model of Leymus chinensis seeds described in any one of the above based on the Leymus chinensis seed image to be measured.
[0016] The present invention also provides an electronic device, including a processor and a memory storing a computer program, and when the processor executes the computer program, the method for constructing the fruiting rate identification model of Leymus chinensis seeds and / or the method for identifying the fruiting rate of Leymus chinensis seeds described in any one of the above is implemented.
[0017] The present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method for constructing the fruiting rate identification model of Leymus chinensis seeds and / or the method for identifying the fruiting rate of Leymus chinensis seeds described in any one of the above is implemented.
[0018] The present invention also provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, the computer can execute the method for constructing the fruiting rate identification model of Leymus chinensis seeds and / or the method for identifying the fruiting rate of Leymus chinensis seeds described in any one of the above.
[0019] A method, system, device and medium for identifying the seed setting rate of Leymus chinensis seeds provided by the present invention soak Leymus chinensis seeds in an alkaline solution first and then in clean water to degrade the pigments and cellulose in the seed coat of Leymus chinensis to increase the transparency of the seed coat, so as to achieve the purpose of visually identifying the seed setting situation of seeds on a light-emitting plate; collect the images of Leymus chinensis seeds on the light-emitting plate after chemical pretreatment, and use a deep learning framework to train a model to learn the morphological manifestations of Leymus chinensis seeds with different seed setting categories in the images of Leymus chinensis seeds, so as to obtain a high-precision model for identifying the seed setting rate of Leymus chinensis seeds; only need to input the image of the Leymus chinensis seeds to be tested after the same chemical pretreatment into the model, and the model can quickly and accurately identify the number of set seeds, un-set seeds and other seeds in the image of the Leymus chinensis seeds to be tested, and then calculate the seed setting rate. The present invention can greatly improve the efficiency and adaptability of identifying the seed setting rate of Leymus chinensis seeds, reduce costs, and provide reliable technical support for Leymus chinensis breeding. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0021] Figure 1 It is a schematic flow chart of a method for identifying the seed setting rate of Leymus chinensis seeds provided by the present invention.
[0022] Figure 2 It is a schematic flow chart of a specific embodiment of a method for identifying the seed setting rate of Leymus chinensis seeds provided by the present invention.
[0023] Figure 3 It shows the process of chemical pretreatment of Leymus chinensis seeds. A: Preparation of sodium hydroxide medicine and preparation of 20% sodium hydroxide solution; B: Soaking seeds at room temperature; C: Seed state after soaking at room temperature for 30 minutes; D: Seed state after soaking at room temperature for 1.5 hours; E: Seed washing; F: Soaking for 24 hours after washing; G: Seeds with residual pigments removed by soaking; H: Drying with filter paper; I: Leymus chinensis seeds before treatment with 20% NaOH; J: Leymus chinensis seeds after treatment with 20% NaOH. The red frame category is un-set, the black square category is set; the blue square category is other.
[0024] Figure 4 It shows the process of image acquisition of the pretreated Leymus chinensis seeds. A: Light-emitting plate before white balance; B: Light-emitting plate after white balance; C: Installation of the image acquisition platform; D: Image acquisition effect; E-F: Adjust the appropriate focal length according to the effect of D.
[0025] Figure 5An example of labeling the seed-setting category labels of each Leymus chinensis seed on the Leymus chinensis seed image is shown. The green box indicates seed setting; the red box indicates non-seed setting.
[0026] Figure 6 Shows the construction process of the Leymus chinensis seed setting rate recognition model. A: Label format conversion and dataset division; B: Schematic diagram of model operation; C: Model operation accuracy and effect; D: Randomly selected training recognition effect diagram; E: Evaluation of the accuracy rate of the selected effect diagram.
[0027] Figure 7 Schematic diagram of the structure of a Leymus chinensis seed setting rate recognition system provided by the present invention.
[0028] Figure 8 Schematic diagram of the structure of the electronic device provided by the present invention. Detailed implementation manners
[0029] To make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below with reference to the accompanying drawings in the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention, and they should not be construed as limiting the present invention. Based on the embodiments in the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of the present invention. In the description of the present invention, it should be understood that the terms used are only for the purpose of description and cannot be construed as indicating or implying relative importance.
[0030] A Leymus chinensis seed setting rate recognition method provided by the present invention includes two aspects: the construction and application of the Leymus chinensis seed setting rate recognition model. Figure 1 Schematic diagram of the process of a Leymus chinensis seed setting rate recognition method provided by the present invention. Figure 2 Schematic diagram of the process of a specific embodiment of a Leymus chinensis seed setting rate recognition method provided by the present invention. The execution subject of a Leymus chinensis seed setting rate recognition method provided by the present invention can be any applicable terminal-side device or network-side device, such as a Leymus chinensis seed setting rate recognition device, etc.
[0031] See Figure 1 and 2 , a Leymus chinensis seed setting rate recognition method provided by the present invention may include: S110. Chemically pretreat the Leymus chinensis seeds to obtain pretreated Leymus chinensis seeds.
[0032] In one embodiment, see Figure 3 , S110 may include: At room temperature, after soaking the threshed Leymus chinensis seeds in 20% NaOH solution for 1.5 to 2 hours, soak them in water for 12 to 24 hours to soften and transparentize the Leymus chinensis seeds, achieving the effect that the seed setting situation can be visually identified through a light-emitting plate; Wash the soaked Leymus chinensis seeds with distilled water 3 times to remove the residual alkaline solution.
[0033] Soaking and treating the threshed Leymus chinensis seeds with 20% NaOH solution to make them transparent and soft is a necessary condition for improving the accuracy and efficiency of labeling the seed setting type labels in the Leymus chinensis seed images, and it is also a key condition for improving the accuracy of the model in learning the morphological manifestations of Leymus chinensis seeds of different seed setting categories in the Leymus chinensis seed images.
[0034] S120. Collect images of the preprocessed Leymus chinensis seeds to obtain Leymus chinensis seed images, and label the seed setting category labels of each Leymus chinensis seed on the Leymus chinensis seed images.
[0035] In one embodiment, referring to Figure 4 and 5 , S120 may include: Place the preprocessed Leymus chinensis seeds on the light-emitting plate in a randomly scattered manner (using the light-emitting plate can further increase the transparency recognition of the preprocessed Leymus chinensis seeds and improve the model recognition accuracy), and avoid seed overlap; Use a shooting device (such as a high-definition camera) fixed 15 cm above the light-emitting plate to shoot the Leymus chinensis seeds on the light-emitting plate to obtain Leymus chinensis seed images, with 30 - 40 seeds in each picture, and a total of 3000 pictures are taken, with a total of about 100000 Leymus chinensis seed samples; Use the LabelMe image annotation tool to select and label the Leymus chinensis seeds in the Leymus chinensis seed images with the seed setting category labels. Among them, the seed setting categories include set, not set, and others. Among them, in the seed setting category, the definition of set is that there is obvious dark substance visible to the naked eye inside the seed coat and its length is greater than 1 / 3 of the surrounding translucent area, the definition of not set is that there is no obvious dark substance visible to the naked eye inside the seed coat or its length is less than 1 / 3 of the surrounding translucent area, and the definition of others is non-seed structure or unable to form a complete seed coat; Generate a corresponding JSON format annotation file for each Leymus chinensis seed image to record the coordinates and seed setting category labels of each annotation box in the Leymus chinensis seed image.
[0036] S130. According to the Leymus chinensis seed images and the seed setting category labels of each Leymus chinensis seed on them, use a deep learning framework to train and obtain a Leymus chinensis seed setting rate recognition model.
[0037] In one embodiment, the deep learning framework uses the YOLO algorithm, specifically it can be the YOLOv8 algorithm, referring toFigure 6 , S130 may include: S1301. Convert the annotation file in JSON format corresponding to each Leymus chinensis seed image into the YOLO format to obtain the annotation file in the YOLO format corresponding to each Leymus chinensis seed image. Among them, each line in the annotation file in the YOLO format records the fruiting category of a Leymus chinensis seed and the coordinates of the normalized annotation box. Specifically, this conversion can be implemented through the yolofile.py script. The specific steps are as follows: Read the JSON file of LabelMe: Read the annotation file of each image to obtain the width, height, and annotation shape data of the image.
[0038] Manually set the mapping between categories and IDs: Set the ID mappings for three categories: Not fruiting -> Non-viable Fruiting -> Viable Others -> Other.
[0039] Calculate the normalized coordinates: The YOLO format requires normalizing the coordinates of the bounding box to the range of [0,1]. According to the upper left and lower right coordinates of the annotation box, calculate the center coordinates (center_x, center_y) of the box in the image, as well as the width (width) and height (height) of the box, and then normalize these coordinates.
[0040] S1302. Divide the Leymus chinensis seed images and their corresponding annotation files in the YOLO format into a training set, a test set, and a validation set according to a preset ratio of 8:1:1. Specifically, according to the requirements of the YOLO algorithm, create three folders, namely train, val, and test, in the dataset folder, and copy the images and the corresponding YOLO format label (.txt) files to their respective folders according to the above ratio. Among them, in order to ensure the randomness of data division, use random.shuffle() to randomly shuffle the order of the images, and then allocate the files to the corresponding folders according to the division ratio. When copying the data, it will be checked whether the target folder already has the same file to prevent duplicate copying.
[0041] S1303. Use the YOLO algorithm to train the model on the training set, enable the model to learn the morphological manifestations of Leymus chinensis seeds with different fruiting categories in the Leymus chinensis seed images, and evaluate the model performance through the test set and the validation set, and adjust the model parameters to optimize the recognition accuracy to obtain a Leymus chinensis seed fruiting rate recognition model.
[0042] In one embodiment, before training, the Leymus chinensis seed images can be preprocessed first, such as preprocessing such as cropping and normalization, to improve the generalization ability of the model.
[0043] In one embodiment, the process of setting up the model deep learning environment is as follows: Install Anaconda, create a new virtual environment named "yolov8", and specify the Python version as 3.8.
[0044] Install necessary libraries such as numpy, opencv-python, pyyaml, etc.
[0045] Install the CUDA Toolkit library to ensure compatibility with the GPU driver.
[0046] Configure the environment variables so that the system can recognize the CUDA path.
[0047] Clone the YOLOv8 GitHub repository to the local environment.
[0048] Install the dependent libraries required by YOLOv8, such as torch, torchvision, etc.
[0049] Run the test script provided by YOLOv8 to verify whether the environment is set up successfully.
[0050] Model training, evaluation, and prediction are as follows: Configure the hyperparameters for model training, such as image size (1024x1024), batch size (16), learning rate (0.001), momentum (0.9), weight decay (0.0005), etc. Set the number of training epochs and the warmup stage. Use the logging module to record key information during the training process, such as loss values, learning rate changes, and training progress. Set the device to "cuda" to enable GPU acceleration for model training.
[0051] After the model training is completed, evaluate metrics such as the precision, recall rate, F1 score, confusion matrix, and IoU of the model. Use the trained model to predict new images and draw the prediction results (detection boxes, class labels, and confidence levels) on the images. Save the images with prediction results and the text files containing the prediction box information.
[0052] Model training precision and effectiveness evaluation are as follows: 1. Loss analysis Analyze the changes in the detection box, class, and distance losses during the training process to ensure that the model is gradually optimized and converges.
[0053] 2. Precision and Recall Evaluate the precision and recall rate of the model to determine the accuracy and missed detection rate of the model when detecting targets.
[0054] 3. mAP50 and mAP50-95 Evaluate the average precision of the model at different IoU thresholds to determine the detection performance of the model under loose and strict conditions.
[0055] The overall evaluation is as follows: Comprehensively evaluate the loss, precision, recall, and average precision of the model to determine the overall performance of the model.
[0056] The recognition effect is as follows: Use the test set to test the model and show the classification accuracy and recognition rate of the model for the target seed categories.
[0057] S140. Chemically preprocess the to-be-tested Leymus chinensis seeds according to S110 and perform image acquisition to obtain the to-be-tested Leymus chinensis seed images.
[0058] In one embodiment, the to-be-tested Leymus chinensis seed images can be images captured by a camera device for the field Leymus chinensis seeds after chemical preprocessing.
[0059] S150. According to the to-be-tested Leymus chinensis seed images, obtain the seed setting rate of the to-be-tested Leymus chinensis seeds corresponding to the to-be-tested Leymus chinensis seed images through the Leymus chinensis seed setting rate recognition model.
[0060] In one embodiment, S150 may include: According to the to-be-tested Leymus chinensis seed images, identify the seed setting categories of the Leymus chinensis seeds in the to-be-tested Leymus chinensis seed images through the Leymus chinensis seed setting rate recognition model, and obtain the number of Leymus chinensis seeds with the seed setting category of set, the number of Leymus chinensis seeds with the seed setting category of not set, and the number of Leymus chinensis seeds with the seed setting category of others in the to-be-tested Leymus chinensis seed images; According to the number of Leymus chinensis seeds with the seed setting category of set, the number of Leymus chinensis seeds with the seed setting category of not set, and the number of Leymus chinensis seeds with the seed setting category of others in the to-be-tested Leymus chinensis seed images, obtain the seed setting rate of the to-be-tested Leymus chinensis seeds corresponding to the to-be-tested Leymus chinensis seed images, where the expression of the seed setting rate of Leymus chinensis seeds is: , In the expression of the seed setting rate of Leymus chinensis seeds, represents the seed setting rate of the to-be-tested Leymus chinensis seeds corresponding to the to-be-tested Leymus chinensis seed images, represents the number of Leymus chinensis seeds with the seed setting category of set in the to-be-tested Leymus chinensis seed images, represents the number of Leymus chinensis seeds with the seed setting category of not set in the to-be-tested Leymus chinensis seed images.
[0061] In this embodiment, the seed setting rate identification model of Leymus chinensis seeds is used to identify the seed setting rates of 4 different Leymus chinensis germplasm materials. The model identification results are almost exactly the same as the results of manual discrimination (enlarging the model identification result diagram and manually distinguishing between seeded and unseeded), indicating that the identification accuracy of this model is relatively high ( Figure 6 B-E), fully meeting the industrialization requirements of Leymus chinensis.
[0062] A method, system, device and medium for identifying the seed setting rate of Leymus chinensis seeds provided by the present invention. After soaking Leymus chinensis seeds in 20% NaOH for 1.5 to 2 hours and then soaking them in water for 12 to 24 hours, the pigments and cellulose of the Leymus chinensis seed coat are degraded to increase the transparency of the seed coat, achieving the purpose of visually identifying the seed setting situation of seeds through a light-emitting board; collecting images of transparent Leymus chinensis seeds after chemical treatment, and then using a deep learning framework to train the model to learn the morphological characteristics of Leymus chinensis seeds of different seed setting categories in the Leymus chinensis seed images, obtaining a high-precision Leymus chinensis seed setting rate identification model; only by inputting the Leymus chinensis seed image of the transparent Leymus chinensis seeds to be tested after the same chemical pretreatment into this identification model, the model can quickly and accurately identify the number of seeded seeds, unseeded seeds and other seeds in the Leymus chinensis seed image to be tested, and then calculate the seed setting rate of Leymus chinensis seeds. The present invention can greatly improve the efficiency and adaptability of identifying the seed setting rate of Leymus chinensis seeds, reduce costs at the same time, and provide reliable technical support for Leymus chinensis breeding.
[0063] A method, system, device and medium for identifying the seed setting rate of Leymus chinensis seeds provided by the present invention has the characteristics of high accuracy, low cost, high efficiency and strong adaptability, and can be used in production: High accuracy: Chemical pretreatment of the Leymus chinensis seeds to be tested can soften and transparentize them, which can not only improve the accuracy and efficiency of labeling the seed setting type tags on the Leymus chinensis seed images, but also improve the accuracy of the model learning the morphological characteristics of Leymus chinensis seeds of different seed setting categories. Through the deep learning model to classify and identify Leymus chinensis seeds, the recognition rate exceeds 95%, and it can effectively distinguish seeded seeds, unseeded seeds and other impurities.
[0064] Low cost: Traditional X-ray detection methods require professional scanning equipment (more than 1 million yuan), and the usage cost is high (the market price is 100 yuan per sheet), while the present invention does not require expensive equipment investment and can be realized only with ordinary image acquisition equipment and computing resources.
[0065] High efficiency: The automated identification process based on the deep learning model greatly reduces the time and labor intensity of manual operations, can quickly process a large number of Leymus chinensis seed samples, and meets the needs of large-scale Leymus chinensis seed detection.
[0066] Strong adaptability: Aiming at the complex characteristics of Leymus chinensis seeds (such as the very small volume of Leymus chinensis seeds, the hard and opaque seed coat, the inconsistent size and shape of seeds, and the inability to distinguish the fruiting situation with the naked eye), through optimizing image processing and model training, the present invention can effectively cope with these challenges and has good adaptability.
[0067] The Leymus chinensis seed fruiting rate recognition system provided by the present invention will be described below. The Leymus chinensis seed fruiting rate recognition system described below can be mutually corresponding and referred to the Leymus chinensis seed fruiting rate recognition method described above.
[0068] See Figure 7 , a Leymus chinensis seed fruiting rate recognition system provided by the present invention may include: A chemical pretreatment module, configured to: perform chemical pretreatment on the to-be-tested Leymus chinensis seeds according to the method for constructing the Leymus chinensis seed fruiting rate recognition model described in any one of the above, to obtain the to-be-tested Leymus chinensis seeds after chemical pretreatment.
[0069] An image acquisition module, configured to: collect images of the Leymus chinensis seeds after chemical pretreatment and made transparent, to obtain to-be-tested Leymus chinensis seed images; A Leymus chinensis seed fruiting rate recognition module, configured to: according to the to-be-tested Leymus chinensis seed images, obtain the Leymus chinensis seed fruiting rate corresponding to the to-be-tested Leymus chinensis seed images through the Leymus chinensis seed fruiting rate recognition model obtained by the method for constructing the Leymus chinensis seed fruiting rate recognition model described in any one of the above.
[0070] Figure 8 Illustrates a schematic physical structure diagram of an electronic device, such as Figure 8 shown. The electronic device may include: a processor 810, a communication interface 820, a memory 830, and a communication bus 840. Among them, the processor 810, the communication interface 820, and the memory 830 communicate with each other through the communication bus 840. The processor 810 can call the logical instructions in the memory 830 to execute the following steps: Perform chemical pretreatment on the to-be-tested Leymus chinensis seeds according to the method for constructing the Leymus chinensis seed fruiting rate recognition model described in any one of the above, to obtain the to-be-tested Leymus chinensis seeds after chemical pretreatment, and perform image acquisition to obtain the to-be-tested Leymus chinensis seed images of the to-be-tested Leymus chinensis seeds that are transparent after chemical pretreatment; according to the to-be-tested Leymus chinensis seed images, obtain the Leymus chinensis seed fruiting rate corresponding to the to-be-tested Leymus chinensis seed images through the Leymus chinensis seed fruiting rate recognition model obtained by the method for constructing the Leymus chinensis seed fruiting rate recognition model described in any one of the above.
[0071] In addition, when the logical instructions in the above-mentioned memory 830 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs.
[0072] On the other hand, the present invention also provides a computer program product. The computer program product includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can perform the following steps: Perform chemical pretreatment on the to-be-tested Leymus chinensis seeds according to the method for constructing the Leymus chinensis seed seed-setting rate recognition model described in any one of the above, to obtain the to-be-tested Leymus chinensis seeds after chemical pretreatment, and perform image acquisition to obtain the to-be-tested Leymus chinensis seed image of the transparent to-be-tested Leymus chinensis seeds after chemical pretreatment; according to the to-be-tested Leymus chinensis seed image and the Leymus chinensis seed seed-setting rate recognition model obtained by the method for constructing the Leymus chinensis seed seed-setting rate recognition model described in any one of the above, obtain the Leymus chinensis seed seed-setting rate corresponding to the to-be-tested Leymus chinensis seed image.
[0073] On another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it is configured to perform the following steps: Perform chemical pretreatment on the to-be-tested Leymus chinensis seeds according to the method for constructing the Leymus chinensis seed seed-setting rate recognition model described in any one of the above, to obtain the to-be-tested Leymus chinensis seeds after chemical pretreatment, and perform image acquisition to obtain the to-be-tested Leymus chinensis seed image of the transparent to-be-tested Leymus chinensis seeds after chemical pretreatment; according to the to-be-tested Leymus chinensis seed image and the Leymus chinensis seed seed-setting rate recognition model obtained by the method for constructing the Leymus chinensis seed seed-setting rate recognition model described in any one of the above, obtain the Leymus chinensis seed seed-setting rate corresponding to the to-be-tested Leymus chinensis seed image.
[0074] The device embodiments described above are merely illustrative. 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, i.e., they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without creative work.
[0075] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0076] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of each embodiment of the present invention.
Claims
1. A method for constructing a recognition model of the seed setting rate of Leymus chinensis seeds, characterized in that, Comprising: Chemically pretreat the Leymus chinensis seeds to degrade the pigment and cellulose of the seed coat of Leymus chinensis to increase the transparency of the seed coat, obtaining pretreated Leymus chinensis seeds; Collect images of the pretreated Leymus chinensis seeds to obtain Leymus chinensis seed images, and label the fruiting category labels of each Leymus chinensis seed on the Leymus chinensis seed images; According to the Leymus chinensis seed images and the fruiting category labels of each Leymus chinensis seed thereon, use a deep learning framework to train and obtain a Leymus chinensis seed setting rate recognition model.
2. The method for constructing a recognition model for the seed setting rate of Leymus chinensis seeds according to claim 1, wherein, The chemically pretreating the Leymus chinensis seeds to degrade the pigment and cellulose of the seed coat of Leymus chinensis to increase the transparency of the seed coat, obtaining pretreated Leymus chinensis seeds, includes: Collect mature seed spikes from Leymus chinensis plants and perform threshing treatment to separate Leymus chinensis seeds; Under room temperature conditions, soak the Leymus chinensis seeds in an alkaline solution to soften and transparentize the Leymus chinensis seeds; Wash the soaked Leymus chinensis seeds with distilled water to remove the residual alkaline solution, and then soak the Leymus chinensis seeds in distilled water to further remove the pigments and other impurities on the surface of the Leymus chinensis seeds.
3. The method for constructing the recognition model of the seed setting rate of Leymus chinensis seeds according to claim 2, wherein, The collecting images of the chemically pretreated Leymus chinensis seeds to obtain Leymus chinensis seed images, and labeling the fruiting category labels of each Leymus chinensis seed on the Leymus chinensis seed images, includes: Place the chemically pretreated Leymus chinensis seeds on a light-emitting plate in a randomly scattered manner, and avoid seed overlap; Use a photographing device fixed above the light-emitting plate to photograph the Leymus chinensis seeds on the light-emitting plate to obtain Leymus chinensis seed images; Select and label the fruiting category labels for the Leymus chinensis seeds in the Leymus chinensis seed images, wherein the fruiting categories include fruiting, non-fruiting, and others; Generate a corresponding JSON format annotation file for each Leymus chinensis seed image, which is used to record the coordinates and fruiting category labels of each annotation box in the Leymus chinensis seed image; And / or, in the fruiting category, the definition of fruiting is that there is obvious dark substance visible to the naked eye inside the seed coat and its length is greater than 1 / 3 of the surrounding translucent area, the definition of non-fruiting is that there is no obvious dark substance visible to the naked eye inside the seed coat or its length is less than 1 / 3 of the surrounding translucent area, and the definition of others is non-seed structure or unable to form a complete seed coat.
4. The method for constructing a recognition model for the seed setting rate of Leymus chinensis seeds according to claim 3, characterized in that, The deep learning framework adopts the YOLO algorithm, and the training the Leymus chinensis seed setting rate recognition model according to the Leymus chinensis seed images and the fruiting category labels of each Leymus chinensis seed thereon by using the deep learning framework includes: Convert the JSON format annotation file corresponding to each Leymus chinensis seed image into the YOLO format to obtain the YOLO format annotation file corresponding to each Leymus chinensis seed image, wherein each line in the YOLO format annotation file records the fruiting category of a Leymus chinensis seed and the coordinates of the normalized annotation box; Divide the Leymus chinensis seed images and their corresponding YOLO format annotation files into a training set, a test set, and a validation set according to a preset ratio; Use the YOLO algorithm to perform model training on the training set, enable the model to learn the morphological manifestations of Leymus chinensis seeds with different fruiting categories in the Leymus chinensis seed images, and perform model performance evaluation through the test set and the validation set, and adjust the model parameters to optimize the recognition accuracy rate to obtain the Leymus chinensis seed setting rate recognition model.
5. A method for identifying the seed setting rate of Leymus chinensis seeds, characterized in that, Comprising: Perform chemical pretreatment on the to-be-tested Leymus chinensis seeds according to the method for constructing the recognition model of the seed setting rate of Leymus chinensis seeds described in any one of claims 1-4, and perform image acquisition to obtain the to-be-tested Leymus chinensis seed image; According to the to-be-tested Leymus chinensis seed image, obtain the seed setting rate of the to-be-tested Leymus chinensis seeds corresponding to the to-be-tested Leymus chinensis seed image through the recognition model of the seed setting rate of Leymus chinensis seeds obtained by the method for constructing the recognition model of the seed setting rate of Leymus chinensis seeds described in any one of claims 1-4.
6. The method for identifying the seed setting rate of Leymus chinensis seeds according to claim 5, characterized in that, The obtaining of the seed setting rate of the to-be-tested Leymus chinensis seeds corresponding to the to-be-tested Leymus chinensis seed image through the recognition model of the seed setting rate of Leymus chinensis seeds obtained by the method for constructing the recognition model of the seed setting rate of Leymus chinensis seeds described in any one of claims 1-5 includes: According to the to-be-tested Leymus chinensis seed image, identify the seed setting categories of the Leymus chinensis seeds in the to-be-tested Leymus chinensis seed image through the recognition model of the seed setting rate of Leymus chinensis seeds, and obtain the number of Leymus chinensis seeds with the seed setting category of set, the number of Leymus chinensis seeds with the seed setting category of not set, and the number of Leymus chinensis seeds with the seed setting category of other in the to-be-tested Leymus chinensis seed image; According to the number of Leymus chinensis seeds with the seed setting category of set, the number of Leymus chinensis seeds with the seed setting category of not set, and the number of Leymus chinensis seeds with the seed setting category of other in the to-be-tested Leymus chinensis seed image, obtain the seed setting rate of the to-be-tested Leymus chinensis seeds corresponding to the to-be-tested Leymus chinensis seed image.
7. The method for identifying the seed setting rate of Leymus chinensis seeds according to claim 6, characterized in that, The expression formula of the seed setting rate of Leymus chinensis seeds is: , In the expression for the seed setting rate of Leymus chinensis seeds, represents the seed setting rate of the Leymus chinensis seeds corresponding to the image of the Leymus chinensis seeds to be measured, represents the number of Leymus chinensis seeds with the seed setting category of set seeds in the image of the Leymus chinensis seeds to be measured, represents the number of Leymus chinensis seeds with the seed setting category of non-set seeds in the image of the Leymus chinensis seeds to be measured.
8. A recognition system for the seed setting rate of Leymus chinensis seeds, characterized in that, including: An image acquisition module, configured to: perform chemical pretreatment on the to-be-tested Leymus chinensis seeds according to the method for constructing the recognition model of the seed setting rate of Leymus chinensis seeds described in any one of claims 1-4, and perform image acquisition to obtain the to-be-tested Leymus chinensis seed image; A Leymus chinensis seed setting rate recognition module, configured to: according to the to-be-tested Leymus chinensis seed image, obtain the seed setting rate of the to-be-tested Leymus chinensis seeds corresponding to the to-be-tested Leymus chinensis seed image through the recognition model of the seed setting rate of Leymus chinensis seeds obtained by the method for constructing the recognition model of the seed setting rate of Leymus chinensis seeds described in any one of claims 1-4.
9. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method for constructing the recognition model of the seed setting rate of Leymus chinensis seeds described in any one of claims 1 to 4 and / or the method for recognizing the seed setting rate of Leymus chinensis seeds described in any one of claims 5 to 7.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the method for constructing the recognition model of the seed setting rate of Leymus chinensis seeds described in any one of claims 1 to 4 and / or the method for recognizing the seed setting rate of Leymus chinensis seeds described in any one of claims 5 to 7.
Citation Information
Patent Citations
Method for measuring and calculating maturing rate of rice
CN116797529A
Novel magnifying glass operation panel
CN207007691U
Workstation for seed inspection of convenient storage seed
CN208066735U
Multifunctional seed checkout stand
CN2867820Y