Single soybean seed vigor detection method based on dynamic time sequence

Through dynamic time series analysis and deep learning model, the accuracy of single soybean seed vitality detection in the existing technology is solved, efficient vitality evaluation and prediction of soybean seeds are achieved, and the quality of seed batches is improved.

CN119096748AActive Publication Date: 2024-12-10NANJING AGRICULTURAL UNIVERSITY

Patent Information

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

AI Technical Summary

Technical Problem

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

Method used

Using a single soybean seed vitality detection method based on dynamic time series, images during the germination process are collected regularly by cameras, soybean seeds are identified using the YOLOv7-OBB model, and phenotypic parameters and vitality index are calculated by combining the soybean extraction module and the root extraction module. Build a vitality detection model, and use the LSTM model for training and detection.

Benefits of technology

Accurate vitality evaluation and prediction of single soybean seeds is achieved, the quality and detection accuracy of seed batches are improved, and more comprehensive dynamic change characteristic information is provided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119096748A_ABST
    Figure CN119096748A_ABST
Patent Text Reader

Abstract

The invention provides a single soybean seed vigor detection method based on a dynamic time sequence. The single soybean seed vigor detection method comprises the following steps: S1, establishing a single soybean seed vigor detection model; comprising the following steps: S1.1, acquiring an image in a soybean seed germination process; s1.2, inputting the image into a YOLOv7-OBB soybean seed identification model, and outputting coordinates of an elliptical mask and a center point of an anchor frame; s1.3, the soybean extraction module obtains a single soybean seed binary image based on the step S1.2; s1.4, a root system extraction module S1.3 realizes image separation of cotyledons and seedlings, broken root repair and image separation of main roots and lateral roots, and calculates phenotypic parameters; s1.5, the vital index of the single soybean is determined through S1.4, principal component analysis; s1.6, constructing a single soybean seed activity detection model; s2, according to the single soybean seed vigor detection model, detecting the vigor of the soybean seeds to be detected. According to the method, quantitative evaluation and prediction of the activity of the single soybean are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of soybean seed quality detection, and in particular to a single soybean seed vitality detection method 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 quickly 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 crops can be significantly increased; high-vigor seeds can bring higher crop yields and quality, thereby increasing farmers' income and improving the economic benefits of the entire agricultural industry. Therefore, regular soybean seed vigor testing to ensure that the seeds used have high vigor is of great significance for improving agricultural production efficiency, ensuring food security, and promoting sustainable agricultural development.

[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 individual seeds, resulting in the presence of seeds with low vigor in the seed batch, thus affecting the quality of the seed batch. Summary of the invention

[0004] In view of the deficiencies in the prior art, the present invention aims to provide a single soybean seed vitality detection method based on dynamic time series, which can solve the existing problems.

[0005] In order to achieve the above object, the technical solution of the present invention is as follows:

[0006] The present invention is realized by the following technical scheme: a single soybean seed vitality detection method based on dynamic time series, comprising the following steps: S1, establishing a single soybean seed vitality detection model; comprising:

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

[0008] 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;

[0009] 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;

[0010] S1.4, 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 the single soybean seed, and calculates the phenotypic parameters of the single soybean seeds with the same number but different time series;

[0011] 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;

[0012] 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;

[0013] S2. Performing a soybean seed vitality detection test according to the single soybean seed vitality detection model.

[0014] Furthermore, the collected image is input into the YOLOv7-OBB soybean seed recognition model, and the elliptical mask and the coordinates of the center point of the anchor frame of the recognized soybean seed are output, including:

[0015] A YOLOv7-OBB soybean seed recognition model was 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 a soybean seed recognition model;

[0016] 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 ].

[0017] Furthermore, 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:

[0018] 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 ;

[0019] Based on the i anchor box center coordinate points P[P1,P2,…,Pi ] 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 ];

[0020] 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.

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

[0022] Furthermore, 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:

[0023] S1.41, based on the single soybean seed binary image F single_binary The skeleton is extracted by thinning algorithm (ThinningAlgorithm, an image processing technique used to simplify the object into a set of lines that represent the skeleton structure of the original object) 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;

[0024] The result of the difference operation shows which parts are in (F skeleton_b ) but exists in (F skeleton_a ) does not exist; it is determined that the cotyledons and seedlings 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 ,

[0025] 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 ;

[0026] 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

[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 region T[T1,T2,…,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 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 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, 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 algorithmfeature [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 .

[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 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.

[0035] Furthermore, 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.

[0036] Furthermore, the method of determining the vitality index of a single soybean by analyzing the phenotypic parameters and principal components of single soybean seeds with the same number but different time series includes:

[0037] 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;

[0038] The weights of vitality parameters were determined through principal component analysis;

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

[0040] 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:

[0041] 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

[0042] 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;

[0043] 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;

[0044] The generated training data set is input into the LSTM model to obtain the trained single soybean seed vitality detection model.

[0045] A computer-readable storage medium stores a computer program, wherein the computer program is executed by a processor to detect the vitality 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 single soybean seed vitality detection method based on dynamic time series of the present invention extracts the phenotypic characteristics of the single soybean image in the dynamic time series, calculates the single soybean seed vitality index, replaces manual quantitative evaluation and prediction of the vitality of the single soybean, and through the root cutting and repair algorithm, can improve the detection accuracy of soybean root phenotypic parameters; improve the quality of seed batches.

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

[0049] The disclosure of the present invention is 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 It is a schematic diagram of the process of the single soybean seed vitality detection method based on dynamic time series of the present invention;

[0051] Figure 2 This is a schematic diagram of the physical structure of the case detection of the implementation of the present invention. DETAILED DESCRIPTION

[0052] It is easy to understand that according to the technical solution of the present invention, without changing the essential spirit of the present invention, a person skilled in the art can propose a variety of interchangeable structural modes and implementation modes. Therefore, the following specific implementation modes and 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 to the technical solution of the present invention.

[0053] The present invention provides a single soybean seed vitality detection method based on dynamic time series, such as Figure 1 As shown, the vitality detection method comprises the following steps:

[0054] S1. Establishing a single soybean seed vitality detection model; specifically including:

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

[0056] 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;

[0057] Specifically, the operation method is:

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

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

[0060] Establish and use VIA tool (Visualization and Image Analysis, a tool for image analysis and data visualization) to collect a large number of labeled soybean seed images and mark the soybean seeds with ellipses. After the labeling is completed, the ellipse label is converted into the minimum circumscribed rectangle label with a rotation angle;

[0061] The dataset is divided into training set, test set and validation set, usually with a ratio of 70%, 15% and 15%. The training set of soybean collection images is input into the YOLOv7-OBB model for migration 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 image collected in S1.1, and convert the obtained i rotated rectangular anchor frames 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 ].

[0063] 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;

[0064] The specific method is:

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

[0066] S1.32, 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 of a single soybean grain seed.

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

[0068] S1.33, according to the single soybean seed binary image F single_binary [F single_binary_1 ,F single_binary_2 ,…,

[0069] F single_binary_i ] are sorted and numbered, and the images are named according to the acquisition time and number.

[0070] The region growing algorithm is a seed point-based image segmentation technique that gradually constructs the connected region of the entire image by merging adjacent pixels with similar attributes into the same region. When processing soybean seed images, the region growing algorithm is used to extract the connected region of a single soybean. The specific 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 pixels at the center or on the boundary of a single soybean. Manual selection: For small data sets, seed points can be selected manually. For large data sets, automatic thresholding methods or image analysis techniques can be used to determine seed points. 2. Set growth criteria, color / grayscale similarity: define the threshold range of color or grayscale to determine whether pixels belong to the same connected region. Spatial proximity: define the spatial distance threshold to limit the maximum distance between seed points. Connectivity: define connectivity rules, such as 4-connectivity (only horizontal and vertical movement is allowed) or 8-connectivity (diagonal movement is allowed). 3. Perform region growing and traverse seed points: start from one or more seed points and traverse the pixels in its neighborhood. Determine whether to grow: For each neighborhood pixel, check whether it meets the growth criteria (color / grayscale, spatial proximity and connectivity). If it does, add it to the current connected region. Update connected regions: Record the added pixels to avoid repeated growth. Stop condition: When no new pixels 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 grayscale difference between them, they can be merged into a larger connected region. Remove small regions: Use morphological operations (such as opening or closing operations) to remove connected regions with too small an area. These may be noise or other objects other than soybean seeds. 5. Result display, visualize the results: Use OpenCV or other image processing libraries to display the final connected regions to verify the effect of region growing.

[0071] S1.4, 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 the single soybean seed, and calculates the phenotypic parameters of the single soybean seeds with the same number but different time series;

[0072] Specifically, S1.41, based on the single soybean seed binary image F single_binary The skeleton is extracted by thinning algorithm (Thinning Algorithm, an image processing technique used to simplify the object into a set of lines that represent the skeleton structure of the original object) 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;

[0073] The result of the difference operation shows which parts are in (F skeleton_b ) but exists in (F skeleton_a ) does not exist; it is determined that the cotyledons and seedlings 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 ,

[0074] 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 ;

[0075] 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

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

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

[0078] 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;

[0079] 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 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, circumferencet, circularityt, seedling length Seedling_lengtht, seedling area Seedling_areat, seedling average width Seedling_widtht, lateral root number Numbert;

[0084] S1.44. Phenotypic parameters with the same number and different time series are saved in csv format in chronological order.

[0085] 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;

[0086] Specifically, S1.51, based on the phenotypic parameters of a single soybean seed with the same number but different time series, illustratively, based on the phenotypic parameters P of a single soybean seed with t different time series parameter [P parameter_1 ,P parameter_2 ,...,P parameter_t], determine the vitality parameters, wherein the vitality parameters include the area change rate of soybean seeds in the water absorption and swelling stage, the seedling length, the soybean seedling length change rate in the seedling growth stage and the number of lateral roots; illustratively, the area change rate of soybean seeds in 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 in different time series, and the seedling length change rate: [length change rate = {length change} / {time}]. The number of lateral roots is based on the counting of the number of lateral roots in different time series.

[0087] S1.52. Determine the weights of the vigor parameters by principal component analysis; wherein principal component analysis (PCA) is a statistical method for converting multiple related variables into a smaller number of unrelated variables, called principal components. These principal components are sorted from largest to smallest according to the extent to which they each explain the variance of the original data. Exemplarily, when determining the weights of soybean seed vigor parameters, PCA can help identify which parameters contribute most to the total variation, thereby determining their importance.

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

[0089] S1.6. The data set of the vitality detection model constructed by using the phenotypic parameters and vitality index is input into the LSTM model for training to obtain a single soybean seed vitality detection model.

[0090] 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

[0091] 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;

[0092] 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;

[0093] The generated training data set is input into the LSTM model (Long Short-Term Memory model, which is a special recurrent neural network model) to obtain the trained single soybean seed vitality detection model.

[0094] S2. performing a soybean seed vitality test according to the single soybean seed vitality test model;

[0095] The present invention also discloses a computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to detect the vitality of a single soybean seed based on a dynamic time series. Figure 2 As shown, a soybean seed 1 is placed on a panel, a camera 2 is fixed above the panel, and the camera is connected to a computer 3 to continuously capture the physiological process of germination. The captured images are named according to the capture time and input into the computer to execute a single soybean seed vitality detection method based on a dynamic time series.

[0096] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on 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", and "set" should be understood in a broad sense, for example, it can be fixedly connected or set, or it can be detachably connected or set, or connected or set in one piece. For ordinary technicians in this field, 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 used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "several" is two or more, unless otherwise clearly and specifically defined.

[0099] The technical scope of the present invention is not limited to the contents in the above description. 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 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 the single soybean seed, and calculates the phenotypic parameters of the single soybean seeds with the same number but different time series; 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 phenotypic parameters include length, width, aspect ratio, area, perimeter, circularity, seedling length, seedling area, average seedling width, and number of lateral roots.

5. The method for detecting the vitality of a single soybean seed based on a dynamic time series according to claim 4, characterized in that: 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 .

6. The method for detecting the vitality of a single soybean seed based on a dynamic time series according to claim 5, 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 main 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.

7. 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 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.

8. The method for detecting the vitality of a single soybean seed based on a dynamic time series according to claim 7, 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%, wherein rate1 is the rate of change of soybean area during the water absorption and swelling stage, length is the seedling length at 168 hours, rate2 is the rate of change of soybean seedling length during the seedling growth stage (24 hours to 96 hours), and num is the number of lateral roots at 168 hours.

9. The method for detecting the vitality of a single soybean seed based on a dynamic time series according to claim 8, 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], circumference 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], number of lateral roots 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.

10. 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-9 methods for detecting the vitality of a single soybean seed based on a dynamic time series.

Citation Information

Patent Citations

  • Seed bud length and root length detection method based on image processing

    CN112907545A

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

    CN115512232A

  • Method and system for judging soybean seedling emergence uniformity

    CN116168292A

  • Rice seed vigor detection method based on multispectral image analysis

    CN116941380A

  • Seed germination activity automatic detection phenotype platform based on YOLOv4 convolutional neural network

    CN117689856A

Cited By

  • Seed detection method and device based on photoacoustic spectrometry technology

    CN119757229A