Single Soybean Seed Vigor Detection Method Based on Dynamic Time Series

Through dynamic time series analysis and deep learning model, accurate detection of the vitality of soybeans is achieved, solving the problem that the vitality of soybeans cannot be accurately evaluated in the prior art, and improving seed quality and agricultural production efficiency.

CN119096748BActive Publication Date: 2025-06-10NANJING AGRICULTURAL UNIVERSITY
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411415493.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-11
Publication Date
2025-06-10
Estimated Expiration
2044-10-11

AI Technical Summary

Technical Problem

The prior art cannot accurately perform quantitative vitality analysis on single soybeans, resulting in low viability seeds in seed batches, affecting seed quality.

Method used

Using a dynamic time series-based single soybean seed vitality detection method, images during the germination process were collected regularly by the camera, soybean seed recognition was performed using the YOLOv7-OBB model, phenotypic parameters of single soybeans were extracted, and the vitality detection model was obtained through LSTM model training.

Benefits of technology

Accurate quantitative evaluation and prediction of the vitality of single soybeans has been achieved, the quality of seed batches has been improved, and agricultural production efficiency and food security have been enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119096748B_ABST
    Figure CN119096748B_ABST
Patent Text Reader

Abstract

The present invention provides a method for detecting the vigor of single soybean seeds based on dynamic time series, including S1, establishing a detection model for the vigor of single soybean seeds; including: S1.1, collecting images during the germination process of soybean seeds; S1.2, inputting the images into the YOLOv7-OBB soybean seed recognition model to output the elliptical mask and the coordinates of the center points of the anchor boxes; S1.3, the soybean extraction module obtains the binary image of single soybean seeds based on S1.2; S1.4, the root system extraction module separates the images of cotyledons and seedlings, repairs broken roots, and separates the images of the main root and lateral roots based on S1.3, and calculates phenotypic parameters; S1.5, through S1.4, the principal component analysis determines the vigor index of single soybean seeds; S1.6, constructing a detection model for the vigor of single soybean seeds; S2, according to the detection model for the vigor of single soybean seeds, detecting the vigor of the soybean seeds to be tested. The present invention realizes the quantitative evaluation and prediction of the vigor of single soybeans.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of soybean seed quality detection, and specifically to a method for detecting the vigor of single soybean seeds based on dynamic time series. Background Art

[0002] Soybean is one of the main commodities of the world's agribusiness, a rich source of protein, and a key crop for global food security. The importance of soybean in human consumption is increasing day by day. Soybean seeds with high vigor can germinate and grow rapidly under suitable growth conditions, laying a good foundation for the final yield of the crop. By screening out seeds with high vigor, the average yield of the crop can be significantly increased; high-vigor seeds can bring higher crop yields and quality, thus increasing farmers' income and improving the economic benefits of the entire agricultural industry. Therefore, regularly detecting the vigor of soybean seeds to ensure that the seeds used have high vigor is of great significance for improving agricultural production efficiency, ensuring food security, and promoting the sustainable development of agriculture.

[0003] Currently, seed quality assessment is usually based on germination experiments of seed batches. The biggest limitation is that it is impossible to accurately quantify and analyze single seeds, resulting in seeds with low vigor in the seed batch, thus affecting the quality of the seed batch. Summary of the Invention

[0004] Aiming at the deficiencies of the existing technology, the purpose of the present invention is to provide a method for detecting the vigor of single soybean seeds based on dynamic time series, which can solve the existing problems.

[0005] To achieve the above purpose, the technical solution of the present invention is as follows:

[0006] The present invention is realized through the following technical solution: A method for detecting the vigor of single soybean seeds based on dynamic time series, including the following steps: S1. Establish a detection model for the vigor of single soybean seeds; including:

[0007] S1.1. Use a camera to regularly collect images during the germination process of soybean seeds, and name the images according to the collection time;

[0008] S1.2. Input the collected images into the YOLOv7-OBB soybean seed recognition model, and output the elliptical mask and the coordinates of the center points of the anchor boxes of the recognized soybean seeds;

[0009] S1.3. The soybean extraction module processes the collected images and performs binary segmentation based on the elliptical mask and the coordinates of the center points of the anchor boxes to obtain a binary image of single soybean seeds, and at the same time numbers the seeds;

[0010] S1.4. The root system extraction module separates the images of cotyledons and seedlings, repairs broken roots, and separates the images of the main root and lateral roots based on the binary image of the single soybean seed, and calculates the phenotypic parameters of single soybean seeds with the same number but different time series.

[0011] S1.5. Determine the vigor index of single soybean seeds through the phenotypic parameters of single soybean seeds with the same number but different time series and principal component analysis.

[0012] S1.6. Construct a dataset for the vigor detection model with the phenotypic parameters and vigor index, and input it into the LSTM model for training to obtain a single soybean seed vigor detection model.

[0013] S2. Detect the vigor of the soybean seeds to be tested according to the single soybean seed vigor detection model.

[0014] Further, inputting the collected image into the YOLOv7-OBB soybean seed recognition model, and outputting the elliptical mask and the coordinates of the center point of the anchor box of the recognized soybean seed, including:

[0015] Establish a YOLOv7-OBB soybean seed recognition model, including: collecting soybean seed images, using the VIA tool to mark the soybean seeds in the images collected by the camera with ellipses, and after annotation, converting the ellipse labels into minimum circumscribed rectangle labels with rotation angles; dividing the dataset into a training set, a test set, and a validation set, and inputting the training set of soybean images into the YOLOv7-OBB model for transfer training to obtain a soybean seed recognition model.

[0016] Based on the established YOLOv7-OBB soybean seed recognition model, detect the image collected in S1.1, and convert the obtained i rotated rectangular anchor boxes into i minimum inscribed elliptical masks F mask [F mask_1 ,F mask_2 ,...,F mask_i and output their central coordinate points P[P 1 ,P 2 ,…,P i .

[0017] Further, the soybean extraction module processes the collected image and performs binary segmentation based on the elliptical mask and the coordinates of the center point of the anchor box to obtain a binary image of a single soybean seed, including:

[0018] Preprocess the collected original image through guided filter image enhancement and local adaptive contrast enhancement, convert the image from RGB to HSV color space, and obtain the binary image F of the soybean seed through color detection binary ;

[0019] Based on the center coordinates of i anchor boxes P[P 1 ,P 2 ,…,P i as seed points, the connected region of a single soybean is extracted according to the region growing algorithm, and then the binary image F of the single soybean seed is obtained single_binary [F single_binary_1 ,F single_binary_2 ,…,F single_binary_i ;

[0020] According to the center point coordinates P[P1, P2, …, Pi] corresponding to the binary image F of the single soybean seed single_binary [F single_binary_1 ,F single_binary_2 ,…,F single_binary_i , sort and number them, and name the images with the acquisition time and number.

[0021] Furthermore, the phenotypic parameters include length, width, length-width ratio, area, perimeter, circularity, seedling length, seedling area, average seedling width, and number of lateral roots.

[0022] Furthermore, the root system extraction module separates the images of cotyledons and seedlings, repairs broken roots, and separates the images of the main root and lateral roots according to the binary image of the single soybean seed; including:

[0023] S1.41. Based on the binary image F of the single soybean seed single_binary Perform skeleton extraction through the thinning algorithm (Thinning Algorithm, an image processing technique used to simplify an object into a set of lines that represent the skeleton structure of the original object), and output the original skeleton image F skeleton_a , and use the image F skeleton_b after hole filling and the original skeleton image F skeleton_a to perform a difference operation to determine whether the cotyledons and seedlings are adhered;

[0024] The result of the difference operation shows which parts exist in (F skeleton_b ) but do not exist in (F skeleton_a ); then it is determined that the cotyledons and seedlings are adhered, and the binary image F of the single soybean is single_binary subjected to a difference operation with the elliptical mask Fmask to obtain the binary image F of the root system root_binary ,

[0025] Otherwise, there is no adhesion, and the distance from the skeleton point to the edge pixel point is calculated to judge the cotyledon and root system regions, and the binary image F of the root system is obtained root_binary ;

[0026] S1.42. Traverse the eight-connected domain of the thinned root system skeleton image F root_skeleton to obtain the end point Pend1 [P end1_1 ,P end1_2 ,…, Pend1_x ]; endpoint P end1 [P end1_1 ,P end1_2 ,…,P end1_x ] are sorted, and the soybean binary image F is searched in a rectangular area of ​​n pixels with the endpoint of the maximum vertical coordinate as the center. binary Whether there are pixels in the

[0027] If there is a pixel point, update the connected area T of this point to the root binary map F root_binary ;

[0028] If there is no pixel, the algorithm is terminated;

[0029] According to the root binary map F root_binary The connected area T[T 1 ,T 2 ,…,T N ] to determine whether root breaking occurs, and take N-2 as the number of root breaking repairs;

[0030] Traverse the root binary graph F in sequence root_binary The connected area T[T 1 ,T 2 ,…,T N ], extract endpoints P respectively end2 [P end2_1 ,P end2_2 ,…,P end2_y ] coordinates and sort them on the Y axis, extracting the minimum and maximum points on the Y axis as candidate breakpoints P temp [P temp_1 ,P temp_2 ,…,P temp_2N ], then the remaining point is the lateral root endpoint P lateral_end [P lateral_end_1 ,P lateral_end_2 ,…,P lateral_end_2N-y ]. According to the position features, the minimum and maximum breakpoint candidate points of the Y axis are Ptemp As the root apex and root tail points, the remaining points are the breakpoints P break [P break_1 ,P break_2 ,…,P break_2N-2 ];

[0031] According to the repair root removal times N-2, the breakpoint P break Sorting and pairwise combination were performed, and fitting was performed through a second-order polynomial. The fitting curve was repaired with the average root width to obtain the repaired root binary map F root_binary_r ;

[0032] S1.43. For the binary image F of the repaired root system root_binary_r perform contour extraction, and detect the feature points P in the contour through the Douglas-Peuker algorithm feature [P feature_1 , P feature_2 , …, P feature_j , and judge the concavity and convexity of the feature points through cross multiplication, and separate the lateral roots by connecting adjacent concave points to obtain the binary image F of the main root root_binary_p .

[0033] Furthermore, the calculation of the phenotypic parameters of single soybean seeds with the same number but different time series includes:

[0034] Based on the binary image F of the repaired root system root_binary_r and the binary image F of the main root root_binary_p , extract the phenotypic parameter P corresponding to the single soybean seed parameter_t , where the phenotypic parameter P parameter_t includes length L t , width W t , length-width ratio Ratiot, area Areat, perimeter Circumferencet, circularity Circularityt, seedling length Seedling_lengtht, seedling area Seedling_areat, average seedling width Seedling_widtht, number of lateral roots Numbert.

[0035] Furthermore, the vigor parameters include the area change rate of soybean during the water absorption and swelling stage, seedling length, the seedling length change rate of soybean during the seedling growth stage, and the number of lateral roots.

[0036] Furthermore, the determination of the vigor index of single soybean seeds through the phenotypic parameters and principal component analysis of single soybean seeds with the same number but different time series includes:

[0037] Based on the phenotypic parameters P of single soybean seeds at t different time series parameter [P parameter_1 , P parameter_2 , …, P parameter_t , determine the vigor parameters;

[0038] Through principal component analysis, determine the weights of the vigor parameters;

[0039] Define the vigor index of a single soybean: vigor = rate1×21% + length×24% + rate2×30% + num×25%, where rate1 is the area change rate of the soybean during the water absorption and swelling stage, length is the seedling length at 168 h, rate2 is the seedling length change rate of the soybean during the seedling growth stage (24 h - 96 h), and num is the number of lateral roots at 168 h.

[0040] Input the dataset constructed by the phenotypic parameters and vigor index into the LSTM model for training to obtain a single soybean seed vigor detection model, including:

[0041] Take the phenotypic parameters (including length L[L 1 ,L 2 ,…,L t , width W[W 1 ,W 2 ,…,W t , aspect ratio Ratio[Ratio1, Ratio2, …, Ratiot], area Area[Area1, Area2, …, Areat], perimeter

[0042] Circumference[Circumference1, Circumference2, …, Circumferencet], circularity Circularity[Circularity1, Circularity2, …, Circularityt], seedling length Seedling_length[Seedling_length1, Seedling_length2, …, Seedling_lengtht], seedling area Seedling_area[Seedling_area1, Seedling_area2, …, Seedling_areat], average seedling width Seedling_width[Seedling_width1, Seedling_width2, …, Seedling_widtht], and number of lateral roots Number[Number1, Number2, …, Numbert]) as the features of the dataset, and take the vigor index as the label of the dataset;

[0043] Process outliers and missing values through moving averages and interpolation filling, perform data augmentation by multiplying by a factor k, and divide the dataset by proportion;

[0044] Input the generated training dataset into the LSTM model to obtain a trained single soybean seed vigor detection model.

[0045] A computer-readable storage medium stores a computer program thereon, and the computer program is executed by a processor to perform a method for detecting the viability of a single soybean seed based on a dynamic time series.

[0046] Compared with the prior art, the beneficial effects of the present invention include:

[0047] The method for detecting the viability of a single soybean seed based on a dynamic time series of the present invention extracts phenotypic characteristics from a single soybean image of a dynamic time series, calculates the viability index of a single soybean seed, replaces manual work to quantitatively evaluate and predict the viability of a single soybean, and through a root-breaking repair algorithm, can improve the detection accuracy of soybean root phenotypic parameters; improve the quality of seed batches.

[0048] The analysis of soybean seeds using dynamic time series of the present invention is a method that can reflect the dynamic changes during the seed development process, and the dynamic time series data covers the characteristic data of multiple time points, providing more and more comprehensive characteristic information. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The disclosure of the present invention will be described with reference to the accompanying drawings. It should be understood that the drawings are only for illustrative purposes and are not intended to limit the scope of protection of the present invention. In the drawings, the same reference numerals are used to refer to the same components. Among them:

[0050] Figure 1 is a schematic flow chart of the method for detecting the viability of a single soybean seed based on a dynamic time series of the present invention;

[0051] Figure 2 is a schematic structural diagram of the physical object detected in the embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION

[0052] It is easy to understand that according to the technical solution of the present invention, without changing the essence of the present invention, those of ordinary skill in the art can propose various structural ways and implementation ways that can be mutually replaced. Therefore, the following detailed description and the accompanying drawings are only exemplary descriptions of the technical solution of the present invention, and should not be regarded as the whole of the present invention or as a limitation or restriction on the technical solution of the present invention.

[0053] The present invention provides a method for detecting the viability of a single soybean seed based on a dynamic time series, as Figure 1 shown, the viability detection method includes the following steps:

[0054] S1. Establish a model for detecting the viability of a single soybean seed; specifically including:

[0055] S1.1. Use a camera to regularly collect images during the germination process of soybean seeds, and name the images according to the collection time;

[0056] S1.2. Input the collected images into the YOLOv7-OBB soybean seed recognition model, and output the elliptical mask of the recognized soybean seeds and the coordinates of the center points of the anchor boxes.

[0057] Specifically, the operation method is as follows:

[0058] S1.21. Establish the YOLOv7-OBB soybean seed recognition model, including:

[0059] Collect data, collect a large number of labeled soybean seed images (or use a camera for collection), including front, side, and tilted angle photos, so that the model can learn seeds in different postures.

[0060] Establish and use the VIA tool (Visualization and Image Analysis, a tool for image analysis and data visualization), mark the soybean seeds with ellipses for a large number of collected labeled soybean seed images. After annotation, convert the ellipse labels into minimum bounding rectangle labels with rotation angles.

[0061] Divide the data set into a training set, a test set, and a validation set, usually in the ratio of 70%, 15%, and 15%. The training set of the collected soybean images is input into the YOLOv7-OBB model for transfer training to obtain the YOLOv7-OBB soybean seed recognition model.

[0062] S1.22. Based on the established YOLOv7-OBB soybean seed recognition model, detect the images collected in S1.1, and convert the obtained i rotated rectangular anchor boxes into i minimum inscribed elliptical masks F mask [F mask_1 , F mask_2 ,..., F mask_i and output their central coordinate points P[P 1 , P 2 ,…, P i .

[0063] The soybean extraction module processes the collected images and performs binary segmentation based on the elliptical mask and the coordinates of the center points of the anchor boxes to obtain a binary image of single soybean seeds, and numbers the seeds at the same time.

[0064] Specifically, the method is as follows:

[0065] S1.31. Preprocess the collected original images through guided filter image enhancement and local adaptive contrast enhancement, convert the images from the RGB color space to the HSV color space, and obtain the binary image F of soybean seeds through color detection binary ;

[0066] S1.32. Based on the center coordinate points P[P 1 , P 2 , …, P i of i anchor boxes as seed points, extract the connected region of a single soybean according to the region growing algorithm, and then obtain the binary image of the single soybean seed

[0067] F single_binary [F single_binary_1 , F single_binary_2 , …, F single_binary_i ;

[0068] S1.33. Sort and number the center point coordinates P[P1, P2, …, Pi] corresponding to the binary image F single_binary [F single_binary_1 , F single_binary_2 , …,

[0069] F single_binary_i , and name the image with the acquisition time and the number.

[0070] Among them, the Region Growing Algorithm is an image segmentation technique based on seed points. By merging adjacent pixels with similar attributes into the same region, the connected regions of the entire image are gradually constructed. When processing soybean seed images, the Region Growing Algorithm is used to extract the connected regions of single soybeans. The specific operation steps are as follows: 1. Select seed points. First, one or more seed points need to be selected in the binary image. These seed points should be pixel points at the center or on the boundary of a single soybean. Manual selection: For small datasets, seed points can be selected manually. For large datasets, automatic thresholding methods or image analysis techniques can be used to determine the seed points. 2. Set growth criteria. Color / gray-scale similarity: Define the threshold range of color or gray-scale to determine whether a pixel point belongs to the same connected region. Spatial proximity: Define the spatial distance threshold to limit the maximum distance between seed points. Connectivity: Define the connection rule, such as 4-connectivity (only allowing horizontal and vertical movements) or 8-connectivity (allowing diagonal movements). 3. Perform region growth. Traverse the seed points: Starting from one or more seed points, traverse the pixel points in their neighborhoods. Determine whether to grow: For each neighborhood pixel point, check whether it meets the growth criteria (color / gray-scale, spatial proximity, and connectivity). If it meets, add it to the current connected region. Update the connected region: Record the added pixel points to avoid repeated growth. Stop condition: When no new pixel points meet the growth criteria, stop the growth process. 4. Post-processing. Merge adjacent regions: Check adjacent connected regions. If there is no obvious color or gray-scale difference between them, they can be merged into a larger connected region. Remove small regions: Use morphological operations (such as opening or closing) to remove connected regions with too small an area, which may be noise or other objects that are not soybean seeds. 5. Result display. Visualize the result: Use OpenCV or other image processing libraries to display the final connected region to verify the effect of region growth.

[0071] S1.4. The root system extraction module separates the images of cotyledons and seedlings, repairs broken roots, and separates the images of the main root and lateral roots according to the binary image of the single soybean seed, and calculates the phenotypic parameters of single soybean seeds with the same number but different time series.

[0072] Specifically, S1.41. Based on the binary image F of the single soybean seed single_binary Perform skeleton extraction through the Thinning Algorithm (an image processing technique used to simplify an object into a set of lines that represent the skeleton structure of the original object), and output the original skeleton image F skeleton_a , and use the image F after hole filling skeleton_b and the original skeleton image F skeleton_aUse the subtraction operation to determine whether the cotyledons and the seedling are adhered;

[0073] The result of the subtraction operation shows which parts exist in (F skeleton_b ) but do not exist in (F skeleton_a ); then it is determined that the cotyledons and the seedling are adhered, and the binary image F of a single soybean single_binary is subtracted from the elliptical mask Fmask to obtain the binary image F of the root system root_binary ,

[0074] Otherwise, there is no adhesion. Calculate the distance from the skeleton point to the edge pixel point to judge the cotyledon and root system regions, and obtain the binary image F of the root system root_binary ;

[0075] S1.42. Traverse the eight-connected domains of the refined root system skeleton image F root_skeleton to obtain the end points P end1 [P end1_1 , P end1_2 , …, Pend1_x ; Sort the ordinates of the end points P end1 [P end1_1 , P end1_2 , …, P end1_x , and search for whether there are pixel points in the binary image F of the soybean binary within a rectangular area of n pixels centered on the end point with the maximum ordinate;

[0076] If there are pixel points, update the connected region T of this point to the binary image F of the root system root_binary ;

[0077] If there are no pixel points, terminate the algorithm;

[0078] According to the number N of the connected regions T[T root_binary , T 1 , …, T 2 , …, T N of the binary image F of the root system, judge whether there is root breakage, and take N - 2 as the number of times to repair root breakage;

[0079] Traverse the connected regions T[T root_binary , T 1 , …, T 2 , …, T N of the binary image F of the root system in turn, extract the coordinates of the end points P end2 [P end2_1 , P end2_2 , …, P end2_y and sort them by the Y-axis coordinate, and extract the points with the minimum and maximum Y-axis coordinates as the candidate break points P temp [P temp_1 , Ptemp_2 ,…,P temp_2N ], then the remaining point is the lateral root endpoint P lateral_end [P lateral_end_1 ,P lateral_end_2 ,…,P lateral_end_2N-y ]. According to the position features, the minimum and maximum breakpoint candidate points of the Y axis are Ptemp As the root apex and root tail points, the remaining points are the breakpoints P break [P break_1 ,P break_2 ,…,P break_2N-2 ];

[0080] According to the repair root removal times N-2, the breakpoint P break Sorting and pairwise combination were performed, and fitting was performed through a second-order polynomial. The fitting curve was repaired with the average root width to obtain the repaired root binary map F root_binary_r ;

[0081] S1.43, the root binary map F after repair root_binary_r Perform contour extraction and detect feature points P in the contour using the Douglas-Peuker algorithm feature [P feature_1 ,P feature_2 ,…,P feature_j ], and use the cross product to determine the concavity of the feature points, and separate the lateral roots by connecting adjacent concave points to obtain the main root binary graph F root_binary_p ;

[0082] Among them, the Douglas-Peucker algorithm, also known as the "Douglas-Peucker" algorithm, can effectively reduce the number of contour points while maintaining the main shape features of the contour as much as possible. Steps to detect feature points in the contour using the Douglas-Peucker algorithm: Read the contour: First, extract the contour from the image and represent it as a one-dimensional point array. Apply the Douglas-Peucker algorithm: Use the Douglas-Peucker function mentioned above to simplify the set of contour points. Determine feature points: During the simplification process, each point retained by the algorithm is a key feature point of the contour. Iteration: For each pair of adjacent points, calculate their distance to the simplified line segment and retain the point with the largest distance.

[0083] Based on the repaired root binary map F root_binary_r and the primary root binary graph F root_binary_p , extract the phenotypic parameter P corresponding to a single soybean seed parameter_t , where the phenotypic parameter P parameter_t Including long L t , Width W t, aspect ratio Ratiot, area Areat, perimeter Circumferencet, circularity Circularityt, seedling length Seedling_lengtht, seedling area Seedling_areat, average seedling width Seedling_widtht, number of lateral roots Numbert;

[0084] S1.44. Save the phenotypic parameters of the same number but different time series in chronological order in csv format.

[0085] S1.5. Determine the vigor index of a single soybean seed through the phenotypic parameters and principal component analysis of single soybean seeds with the same number but different time series;

[0086] Specifically, S1.51. Based on the phenotypic parameters of single soybean seeds with the same number but different time series. Exemplarily, based on the phenotypic parameters P of single soybean seeds at t different time series parameter [P parameter_1 , P parameter_2 ,..., P parameter_t , determine the vigor parameters, where the vigor parameters include the area change rate of soybean seeds during the water absorption and swelling stage, seedling length, the seedling length change rate of soybeans during the seedling growth stage, and the number of lateral roots; Exemplarily, the area change rate of soybean seeds during the water absorption and swelling stage: Measure the area at different time points, calculate the area change amount: [Area change = final area - initial area]; Calculate the area change rate: [Area change rate = {Area change} / {Time}]; The seedling length is obtained based on the measurement of the seedling length at different time series, and the seedling length change rate: [Length change rate = {Length change} / {Time}]. The number of lateral roots is counted based on the number of lateral roots at different time series.

[0087] S1.52. Determine the weights of the vigor parameters through principal component analysis; where principal component analysis (PCA) is a statistical method used to transform multiple related variables into a smaller number of uncorrelated variables, called principal components. These principal components are sorted from largest to smallest according to their respective degrees of explaining the variance of the original data. Exemplarily, when determining the weights of soybean seed vigor parameters, PCA can help identify which parameters contribute the most to the total variation, thereby determining their importance.

[0088] S1.53. Define the vigor index of a single soybean: vigor = rate1 × 21% + length × 24% + rate2 × 30% + num × 25%, where rate1 is the area change rate of soybean seeds during the water absorption and swelling stage, length is the seedling length at 168h, rate2 is the seedling length change rate of soybeans during the seedling growth stage (24h - 96h), and num is the number of lateral roots at 168h.

[0089] S1.6. Use the phenotypic parameters and vitality index to construct a dataset for training the vitality detection model, and input it into the LSTM model to obtain a single-grain soybean seed vitality detection model.

[0090] Take the phenotypic parameters (including length L[L 1 ,L 2 ,…,L t , width W[W 1 ,W 2 ,…,W t , aspect ratio Ratio[Ratio1, Ratio2, …, Ratiot], area Area[Area1, Area2, …, Areat], perimeter

[0091] Circumference[Circumference1, Circumference2, …, Circumferencet], circularity Circularity[Circularity1, Circularity2, …, Circularityt], seedling length Seedling_length[Seedling_length1, Seedling_length2, …, Seedling_lengtht], seedling area Seedling_area[Seedling_area1, Seedling_area2, …, Seedling_areat], average seedling width Seedling_width[Seedling_width1, Seedling_width2, …, Seedling_widtht], and number of lateral roots Number[Number1, Number2, …, Numbert]) as the features of the dataset, and use the vitality index as the label of the dataset;

[0092] Process outliers and missing values through moving averages and interpolation filling, perform data augmentation by multiplying by a factor k, and divide the dataset by proportion;

[0093] Input the generated training dataset into the LSTM model (Long Short-Term Memory model, a special type of recurrent neural network model) to obtain a trained single-grain soybean seed vitality detection model.

[0094] S2. According to the single-grain soybean seed vitality detection model, detect the vitality of the soybean seeds to be tested;

[0095] The present invention also discloses a computer-readable storage medium, on which a computer program is stored, and the computer program is executed by a processor to implement a method for detecting the vigor of a single soybean seed based on dynamic time series. When implemented, as Figure 2 shown, the soybean seed 1 is placed on a panel, and the camera 2 is fixed above the panel. The camera is connected to the computer 3 to continuously collect the physiological process of germination. The collected images are named according to the collection time and input into the computer to execute the method for detecting the vigor of a single soybean seed based on dynamic time series.

[0096] In the description of the present invention, it should be understood that the orientation or positional relationship indicated by the terms "center", "longitudinal", "transverse", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", etc. is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus should not be construed as a limitation of the present invention.

[0097] In the description of this patent, it should be noted that unless otherwise clearly specified and limited, the terms "installed", "connected", "connected to", "set" should be understood in a broad sense. For example, it can be fixedly connected and set, or detachably connected and set, or integrally connected and set. For those of ordinary skill in the art, the specific meanings of the above terms in this patent can be understood according to specific circumstances.

[0098] In addition, the terms "first" and "second" are only used for descriptive purposes and should not be understood as indicating or implying relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the present invention, the meaning of "several" is two or more unless otherwise specifically defined.

[0099] The technical scope of the present invention is not limited to the content described above. Those skilled in the art can make various deformations and modifications to the above embodiments without departing from the technical idea of the present invention, and these deformations and modifications should all fall within the protection scope of the present invention.

Claims

1. A single soybean seed vitality detection method based on dynamic time series, characterized in that: include: S1. Establishing a single soybean seed vitality detection model; including: S1.

1. Use a camera to regularly collect images of soybean seeds during germination, and name the images according to the time of collection; S1.2, input the collected image into the YOLOv7-OBB soybean seed recognition model, and output the elliptical mask and anchor frame center point coordinates of the recognized soybean seeds; S1.3, the soybean extraction module processes the collected image and performs binary segmentation based on the elliptical mask and the coordinates of the center point of the anchor frame to obtain a single soybean seed binary image, and simultaneously performs seed numbering; S1.4, the root extraction module realizes the image separation of cotyledons and seedlings, the repair of broken roots, and the image separation of main roots and lateral roots according to the binary image of the single soybean seed, and calculates the phenotypic parameters of the single soybean seeds with the same number but different time series; specifically The phenotypic parameters include length, width, aspect ratio, area, perimeter, circularity, seedling length, seedling area, average seedling width, and number of lateral roots; The root system extraction module realizes the image separation of cotyledons and seedlings, the repair of broken roots, and the image separation of main roots and lateral roots according to the binary image of a single soybean seed; it includes: S1.41, based on the single soybean seed binary image F single_binary The skeleton is extracted through the refinement algorithm and the original skeleton graph F is output. skeleton_a , using the hole-filled image F skeleton_b With the original skeleton graph F skeleton_a Perform difference operation to determine whether the cotyledon and seedling are adhered; The result of the difference operation shows which parts are in F skeleton_b exists in but not in F skeleton_a does not exist; it is determined that the cotyledon and seedling are adhered, and the single soybean binary image F single_binary With elliptical mask Fmask Perform a difference operation to obtain the root binary graph F root_binary , Otherwise, no adhesion occurs, and the distance from the skeleton point to the edge pixel point is calculated to determine the cotyledon and root area, and the root binary map F is obtained. root_binary ; S1.42, traversal of the refined root skeleton diagram F root_skeleton The eight-connected domain, get the endpoint P end1 [P end1_1 ,P end1_2 ,…, Pend1_x ]; endpoint P end1 [P end1_1 ,P end1_2 ,…,P end1_x ] are sorted, and the soybean binary image F is searched in a rectangular area of ​​n pixels with the endpoint of the maximum vertical coordinate as the center. binary Whether there are pixels in the If there is a pixel point, update the connected area T of this point to the root binary map F root_binary ; If there is no pixel, the algorithm is terminated; According to the root binary map F root_binary The connected region T[T1,T2,…,T N ] to determine whether root breaking occurs, and take N-2 as the number of root breaking repairs; Traverse the root binary graph F in sequence root_binary The connected region T[T1,T2,…,T N ], extract endpoints P respectively end2 [P end2_1 ,P end2_2 ,…,P end2_y ] coordinates and sort them on the Y axis, extracting the minimum and maximum points on the Y axis as candidate breakpoints P temp [P temp_1 ,P temp_2 ,…,P temp_2N ], then the remaining point is the lateral root endpoint P lateral_end [P lateral_end_1 ,P lateral_end_2 ,…,P lateral_end_2N-y ]; According to the position characteristics, the minimum and maximum breakpoint candidate points of the Y axis are Ptemp As the root apex and root tail points, the remaining points are the breakpoints P break [P break_1 ,P break_2 ,…,P break_2N-2 ]; According to the repair root removal times N-2, the breakpoint P break Sorting and pairwise combination were performed, and fitting was performed through a second-order polynomial. The fitting curve was repaired with the average root width to obtain the repaired root binary map F root_binary_r ; S1.43, the root binary map F after repair root_binary_r Perform contour extraction and detect feature points P in the contour using the Douglas-Peuker algorithm feature [P feature_1 ,P feature_2 ,…,P feature_j ], and use the cross product to determine the concavity of the feature points, and separate the lateral roots by connecting adjacent concave points to obtain the main root binary graph F root_binary_p ; S1.

5. Determine the vitality index of a single soybean seed by analyzing the phenotypic parameters and principal component of single soybean seeds with the same number but different time series; S1.6, constructing a data set of vitality detection model using the phenotypic parameters and vitality index, inputting into LSTM model training to obtain a single soybean seed vitality detection model; S2. Performing a soybean seed vitality detection test according to the single soybean seed vitality detection model.

2. The method for detecting the vitality of a single soybean seed based on a dynamic time series according to claim 1, characterized in that: The method of inputting the collected image into the YOLOv7-OBB soybean seed recognition model and outputting the elliptical mask and the center point coordinates of the anchor frame of the recognized soybean seeds includes: A YOLOv7-OBB soybean seed recognition model is established, including: collecting soybean seed images, using the VIA tool to mark the soybean seeds with ellipses in the images captured by the camera, and after the labeling is completed, converting the ellipse labels into minimum circumscribed rectangle labels with rotation angles; dividing the data set into a training set, a test set, and a validation set, and inputting the training set of soybean images into the YOLOv7-OBB model for migration training to obtain the YOLOv7-OBB soybean seed recognition model; Based on the established YOLOv7-OBB soybean seed recognition model, the image collected by S1.1 is detected, and the obtained i rotated rectangular anchor frames are converted into i minimum inscribed ellipse masks F mask [F mask_1 ,F mask_2 ,...,F mask_i ] and output its center coordinate point P[P1,P2,…,P i ].

3. The single soybean seed vitality detection method based on dynamic time series according to claim 1, characterized in that: The soybean extraction module processes the collected image and performs binary segmentation based on the elliptical mask and the coordinates of the center point of the anchor frame to obtain a single soybean seed binary image, including: The collected original image is preprocessed by guided filtering image enhancement and local adaptive contrast enhancement, the image is converted from RGB to HSV color space, and the binary image F of soybean seeds is obtained by color detection. binary ; Based on the i anchor box center coordinate points P[P1,P2,…,P i ] as the seed point, and extract the connected region of a single soybean grain according to the region growing algorithm, and then obtain the binary map F of a single soybean grain seed. single_binary [F single_binary_1 ,F single_binary_2 ,…, F single_binary_i ]; According to the single soybean seed binary image F single_binary [F single_binary_1 ,F single_binary_2 ,…,F single_binary_i ] are sorted and numbered, and the images are named according to the acquisition time and number.

4. The method for detecting the vitality of a single soybean seed based on a dynamic time series according to claim 1, characterized in that: The method of calculating the phenotypic parameters of single soybean seeds with the same number but different time series includes: Based on the repaired root binary map F root_binary_r and the primary root binary graph F root_binary_p , extract the phenotypic parameter P corresponding to a single soybean seed parameter_t , where the phenotypic parameter P parameter_t Including long L t , Width W t , aspect ratio Ratiot, area Areat, circumferencet, circularityt, seedling length Seedling_lengtht, seedling area Seedling_areat, seedling average width Seedling_widtht, and lateral root number Numbert.

5. The method for detecting the vitality of a single soybean seed based on a dynamic time series according to claim 1, characterized in that: The method of determining the vitality index of a single soybean seed by analyzing the phenotypic parameters of single soybean seeds with the same number but different time series and principal component analysis includes: Phenotypic parameter P of a single soybean seed based on t different time series parameter [P parameter_1 ,P parameter_2 ,...,P parameter_t ], determine the vitality parameters; The weights of vitality parameters were determined through principal component analysis; The single soybean vigor index is defined as: vigor = rate1×21%+length×24%+rate2×30%+num×25%, where rate1 is the rate of change of soybean area during the water absorption and expansion stage, length is the seedling length at 168h, rate2 is the rate of change of soybean seedling length during the seedling growth stage (24h-96h), and num is the number of lateral roots at 168h; The vitality parameters include the area change rate of soybeans during the water absorption and swelling stage, the seedling length, the seedling length change rate of soybeans during the seedling growth stage, and the number of lateral roots.

6. The method for detecting the vitality of a single soybean seed based on a dynamic time series according to claim 1, characterized in that: The data set for constructing the vitality detection model with the phenotypic parameters and vitality index is input into the LSTM model for training to obtain a single soybean seed vitality detection model, including: The phenotypic parameters (including length L[L1, L2, ..., L t ], width W[W1,W2,…,W t ], aspect ratio Ratio[Ratio1,Ratio2,…,Ratiot], area Area[Area1,Area2,…,Areat], perimeter Circumference[Circumference1,Circumference2,…,Circumferencet], circularity[Circularity1,Circularity2,…,Circularityt], seedling length Seedling_length[Seedling_length1,Seedling_length2,…,Seedling_lengtht], seedling area Seedling_area[Seedling_area1,Seedling_area2,…,Seedling_areat], seedling average width Seedling_width[Seedling_width1,Seedling_width2,…,Seedling_widtht], lateral root number Number[Number1,Number2,…,Numbert]) are used as features of the dataset, and vitality index is used as the label of the dataset; Outliers and missing values ​​are handled by moving average and interpolation filling, data augmentation is performed by multiplying by a factor k, and the dataset is divided by ratio; The generated training data set is input into the LSTM model to obtain the trained single soybean seed vitality detection model.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: The computer program is executed by the processor to implement any one of 1-6 methods for detecting the vitality of a single soybean seed based on a dynamic time series.

Citation Information

Patent Citations

  • Crop seed germination condition identification model, construction method and application thereof

    CN115512232A