Seed vigor detection method and system based on time series analysis and model optimization

By fusing and representing multi-time-lapse images and weight data and optimizing the model, the problems of unreliability and insufficient generalization of seed vigor detection are solved, achieving high-accuracy and low-cost seed vigor detection, which is suitable for large-scale seed sorting and quality control.

CN122115925APending Publication Date: 2026-05-29HUNAN HYBRID RICE RES CENT +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUNAN HYBRID RICE RES CENT
Filing Date
2026-01-06
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing seed vigor detection methods suffer from unreliability and insufficient generalization. Traditional methods are inefficient and destructive, while advanced imaging technologies are costly and have strict environmental requirements. RGB imaging is also difficult to reliably reflect the internal physiological state of seeds.

Method used

By acquiring seed images and weight data at multiple acquisition times, preprocessing and fusing characterization are performed to establish a deep learning model based on time series analysis and model optimization. The model parameters are optimized using Focal Loss and Optuna frameworks to identify regions related to seed germination potential, thereby improving detection accuracy and consistency.

Benefits of technology

It has improved the accuracy of seed vigor detection to 98.43%, solved the problem of identifying high-vigor seeds, reduced detection costs, and is suitable for large-scale applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122115925A_ABST
    Figure CN122115925A_ABST
Patent Text Reader

Abstract

The application relates to the field of agricultural engineering and computer vision technology, and provides a seed vitality detection method and system based on time series analysis and model optimization. The method comprises the following steps: acquiring image data and weight data of multiple sample seeds at multiple collection time points to generate vitality annotation labels, pre-processing the image data at the multiple collection time points, identifying a region of interest related to germination potential based on the pre-processed time series image data to construct a fusion representation, and obtaining time series fusion image data of each sample seed; and determining the vitality category of a seed to be detected based on an optimal model obtained through optimization. The method significantly improves the detection accuracy, effectively solves the problem of inaccurate prediction caused by weak early features, and focuses on high-vitality seeds that are difficult to identify, thereby greatly improving the identification ability of high-vitality seeds while ensuring overall accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of agricultural engineering and computer vision technology, specifically to a seed vigor detection method and system based on time series analysis and model optimization. Background Technology

[0002] Seed vigor is an important indicator for measuring seed quality, germination rate, and subsequent growth potential, and it is also a core parameter in seed grading and quality control. Existing technologies for detecting and evaluating seed vigor mainly include traditional physicochemical methods, advanced imaging technologies, and visible light-based RGB imaging methods, but all of them have limitations in terms of efficiency, cost, and scalability.

[0003] Traditional detection methods (such as tetrazolium salt staining) typically require a lot of manual operation and a long detection cycle, making it difficult to meet the needs of large-scale, rapid screening. They are also somewhat destructive and can damage seed components. Advanced imaging technologies (such as X-ray CT and hyperspectral imaging) offer high precision, but they rely on expensive specialized equipment and have high requirements for the acquisition environment, operating procedures, and calibration conditions, resulting in a high barrier to entry and limiting their promotion and widespread adoption.

[0004] RGB imaging technology is more economical and easier to set up and adapt to field applications. However, seed vigor is an intrinsic physiological characteristic, while RGB images mainly reflect external phenotypic information. The features they capture are often indirect and weakened, such as subtle color differences, surface texture, or morphological changes. The correlation between these external phenotypic features and internal physiological states is unstable, making it difficult to build stable models based on RGB images. Moreover, existing research has shown that predicting seed vigor solely based on RGB features is challenging. Even with deep learning models such as convolutional neural networks (CNNs) or visual transformers (ViTs), the prediction results may still exhibit unreliability and insufficient generalization. Summary of the Invention

[0005] To address the technical problems of unreliability and insufficient generalization in seed vigor detection in the prior art, this application provides a seed vigor detection method and system based on time series analysis and model optimization that has high reliability and strong generalization ability.

[0006] To achieve the above objectives, the first aspect of this application provides a seed vigor detection method based on time series analysis and model optimization, comprising: S1, acquire image data and weight data of multiple sample seeds at multiple acquisition times, and perform viability detection on the sample seeds according to a preset viability determination standard, label each sample seed as high viability or low viability, and obtain viability label; S2, preprocess the image data of the sample seed at each collection time, identify the region of interest related to germination potential based on the preprocessed image data at each collection time and construct a fusion representation to obtain the fusion image at each collection time; combine the fusion images of each sample seed at multiple collection times in chronological order to form a fusion image sequence, which is used as the time series fusion image data of the sample seed. S3, establish a candidate deep learning model set, use the time series fused image data as the input of the candidate models, train the candidate models and optimize their parameters based on the vitality label; score the discrimination performance of each candidate model according to the preset scoring rules, and determine the optimal model based on the scoring results; S4. Determine the vigor category of the seed to be tested based on the optimal model.

[0007] In this embodiment of the application, S2 includes: S21, preprocess the image data of the same sample seed at each acquisition time to obtain the background-removed seed image as the preprocessed image data at each acquisition time. The preprocessing includes at least intensity histogram equalization, threshold segmentation, morphological processing and maximum connected component extraction. S22, based on the preprocessed image data at each acquisition time, the convex hull algorithm and rotating caliper algorithm are used to locate the bead hole end and the chalaza end and extract the corresponding region images; the seed hilum region is detected by color space conversion and threshold segmentation and the region image is extracted; a feature map representing the degree of seed damage is generated and the corresponding region image is extracted; the background-removed seed image and each region image are uniformly scaled to a preset size and then stitched along the channel dimension to form a multi-channel representation, and the multi-channel representation is compressed into a fusion image for subsequent processing by 1×1 convolution to obtain the fusion image corresponding to the acquisition time; S23, Perform S21 to S22 on the images of each sample seed at each acquisition time to obtain the fused image corresponding to each acquisition time of each sample seed, and arrange the fused images corresponding to each acquisition time of each sample seed in the order of acquisition time to obtain the time series fused image data of multiple sample seeds.

[0008] In this embodiment of the application, S3 includes: S31, establish a set of candidate deep learning models, each candidate deep learning model including at least an image backbone network for extracting features from the fused images at each acquisition time of the time series fused image data, a temporal fusion network for performing time-dimensional fusion of features at each time step, and a classifier for outputting the vitality category. S32, Focal Loss is used as the training loss function for the candidate deep learning model. Focal Loss includes at least a modulating factor γ for suppressing contributions from easily classified samples and a coefficient for balancing class weights. ; S33, the multiple sample seeds are divided into a training set and a validation set. The sample data of each sample seed includes the time-series fused image data and its corresponding viability label. The candidate deep learning models are trained on the training set, and the number of true positives is calculated on the validation set based on the viability label. With prediction accuracy Simultaneously, the true prior proportion of highly active samples in the validation set was calculated. ; S34, Construct a custom scoring function S, wherein the scoring function S includes at least a scoring term to encourage an increase in the number of true positives (TP) and a scoring term to constrain prediction accuracy. Higher than the true prior proportion Constraints or penalties; S35. Using the Optuna framework based on Bayesian optimization, with the goal of maximizing the scoring function S, the hyperparameters of each candidate deep learning model are automatically searched to obtain the optimal hyperparameter combination and its maximum score for each candidate model. The maximum scores of each candidate model are compared, and the model with the highest score is selected as the optimal model.

[0009] In this embodiment of the application, the multiple collection times in S1 include: the initial time when the sample seeds are taken out of the sample bank, and the 24th, 48th and 72nd hours after the germination experiment.

[0010] In this embodiment of the application, the preset vitality determination criterion is specifically as follows: The weight gain rate (SE) is calculated based on the weight data of the sample seeds at multiple collection times. At the 72nd hour of germination culture, the germination status of the sample seeds is evaluated based on the radicle state (RL) and plumule state (BL) in the image data of the sample seeds. Sample seeds that simultaneously meet the preset threshold for SE and the preset standards for RL and BL are labeled as high-viability seeds, and the remaining sample seeds are labeled as low-viability seeds, thus obtaining viability labeling tags.

[0011] In this embodiment of the application, S4 includes: Acquire time-series fused image data of the seed to be tested; input the time-series fused image data into the optimal model to obtain the vitality category output of the seed to be tested; determine the vitality category of the seed to be tested based on the vitality category output.

[0012] In this embodiment of the application, the image backbone network includes at least one or more of the ResNet series, InceptionV3, EfficientNet, and Vision Transformer, and the temporal fusion network includes at least LSTM.

[0013] A second aspect of this application provides a seed vigor detection system, comprising: The data acquisition module acquires image data and weight data of multiple sample seeds at multiple acquisition times, and performs viability detection on the sample seeds according to a preset viability determination standard, marking each sample seed as high viability or low viability to obtain a viability label. The fusion characterization construction module preprocesses the image data of the sample seeds at each acquisition time, identifies regions of interest related to germination potential based on the preprocessed image data at each acquisition time, and constructs fusion characterizations to obtain fusion images at each acquisition time; the fusion images of each sample seed at multiple acquisition times are arranged in chronological order to form a fusion image sequence, which is used as the time series fusion image data of the sample seed. The model building module establishes a set of candidate deep learning models, uses the time-series fused image data as model input, trains the candidate models based on the vitality labels, and optimizes their parameters; it scores the discrimination performance of each candidate model according to a preset scoring rule, and determines the optimal model based on the scoring results. The detection output module determines the vigor category of the seed to be tested based on the optimal model.

[0014] The above technical solution achieves the following technical effects: 1. To address the challenge that a single static image cannot accurately reflect seed vigor, this application utilizes continuous images and weight change data of seeds from multiple acquisition times. Furthermore, it combines these fused images from multiple acquisition times into a fused image sequence in chronological order. Incorporating region-of-interest enhancement and model optimization mechanisms, this time-series-based input feature-based approach effectively improves the accuracy and consistency of seed vigor detection. Experiments demonstrate that this method increases the detection accuracy to 98.43%, effectively solving the problem of inaccurate predictions caused by weak early features.

[0015] 2. This application addresses the data imbalance problem of difficulty in identifying highly viable seeds: In real-world samples, highly viable seeds are often scarce and easily overlooked by the model. By introducing the Focal Loss function and combining it with Optuna for automated parameter tuning, this application allows the model to focus on those difficult-to-identify highly viable seeds, thereby significantly improving the ability to identify them while maintaining overall accuracy.

[0016] 3. This application not only analyzes the entire image, but also specifically extracts key regions of interest (ROIs) such as the embryo and root of the seed for fusion analysis. This method effectively filters out background noise interference, enabling the model to maintain stable predictive performance under different shooting environments.

[0017] 4. Compared to chemical staining methods (which damage seeds) or CT scans (which require expensive equipment), this application only requires a general-purpose camera and a precision balance to complete the detection. This method does not damage the seeds and is low in cost, making it ideal for large-scale seed sorting and quality control in agricultural production. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 The diagram illustrates different seed germination states in embodiments of this application. Figure 2 This illustration schematically shows a diagram of the seed image preprocessing workflow in an embodiment of this application; Figure 3 This schematic diagram illustrates the region of interest of a seed in a specific embodiment of this application; Figure 4 This illustration schematically shows the relationship between TP and accuracy in different models in specific embodiments of this application; Figure 5 This illustration shows the results of Optuna optimization in multiple models in a specific embodiment of this application; Figure 6 The flowcharts in specific embodiments of this application are illustrated schematically; Figure 2 In the diagram, a1 represents the original image; a2 represents intensity histogram equalization; a3 represents thresholding; a4 represents morphological operations; a5 represents the maximum connected component; and a6 represents the processed image. Figure 3 In the image, b1 is the original image; b2 is the micropyle end and chalaza end; b3 is the hilum region; and b4 is the degree of seed damage. Detailed Implementation

[0020] To facilitate understanding of this application, the following description will be more comprehensive and detailed in conjunction with the accompanying drawings and preferred embodiments, but the scope of protection of this application is not limited to the following specific embodiments.

[0021] Unless otherwise defined, all technical terms used herein have the same meaning as commonly understood by those skilled in the art. The technical terms used herein are for the purpose of describing particular embodiments only and are not intended to limit the scope of this application.

[0022] Unless otherwise specified, all raw materials, reagents, instruments and equipment used in this application are available on the market or can be prepared by existing methods.

[0023] Figure 6 The schematic diagram illustrates a flowchart of an embodiment of this application; in one embodiment of this application, a seed viability detection method based on time series analysis and model optimization is provided, including the following steps: S1. Acquire image and weight data of multiple seed samples for model training at multiple acquisition times. Based on the image and weight data at multiple acquisition times, perform vitality detection on the multiple seed samples according to the preset vitality judgment criteria, and label each seed sample as high vitality or low vitality to obtain a vitality label. Specifically, this step involves collecting data on the initial state of each sample seed and conducting a germination experiment on the sample seeds. Image data and weight data of each sample seed are collected at different time periods during the germination experiment. The weight data is used to characterize the macroscopic state of the seed, such as water content and material reserves, while the image data is used to characterize the visible features of the seed, such as appearance and embryonic region texture. The collection period can be set at fixed intervals, such as once every 24 hours. The sample seeds are classified into vigor grades based on preset standards and vigor labels are generated. The preset standards can be a combination of indicators such as weight gain rate, radicle, and plumule status. The sample seeds are divided into high-vigor seeds and low-vigor seeds, which is convenient for subsequent model training and validation. S2, preprocess the image data of each sample seed at each collection time, identify the region of interest related to germination potential based on the preprocessed image data at each collection time and construct a fusion representation to obtain the fusion image of each seed at each collection time; then combine the fusion images of a sample seed at multiple collection times in chronological order to form a fusion image sequence, which is used as the time series fusion image data of that sample seed, thus obtaining the time series fusion image data of multiple sample seeds for training, and each sample seed also has a viability label; S3. Establish a candidate deep learning model set, using time-series fused image data of multiple sample seeds as model input, and train and optimize the candidate models based on the vitality labels of the sample seeds. At the same time, a training strategy to alleviate sample class imbalance is introduced during the training process. The discrimination performance of each candidate model is scored according to the preset scoring rules, and the optimal model is determined based on the scoring results. S4. Determine the viability category of the seed to be tested based on the optimal model. This step involves acquiring time-series image data of the seed to be tested using the same acquisition and preprocessing procedures as the training, and constructing corresponding time-series fused image data. This fused time-series data is then input into the optimal model, which outputs the viability category of the seed to be tested, thus achieving automatic differentiation between high-viability and low-viability seeds.

[0024] By identifying and constructing a fusion representation from seed image data, and then assembling a fusion image sequence from seed images collected at multiple times in chronological order, combined with region of interest enhancement and model optimization mechanisms, differences in germination potential can be captured early, reducing errors caused by fluctuations in a single indicator and improving the accuracy and consistency of seed vigor detection.

[0025] In a specific embodiment of this application, multiple collection times in S1 include: the initial time when the sample seeds are taken out of the sample bank, and the 24th, 48th, and 72nd hours after the germination experiment.

[0026] Specifically, the sample seeds were subjected to germination culture, and RGB image data of the sample seeds were collected at 24 hours, 48 ​​hours and 72 hours after the start of culture, and the weight data were obtained by weighing. Taking corn seeds as an example, the seeds were placed in a 96-well germination petri dish and soaked in 40°C water for 1 hour at room temperature. Two layers of moistened filter paper were then placed on the seed surface, and the petri dish was sealed with a lid to maintain humidity. The petri dish was then transferred to a growth incubator set at 30°C with a 16-hour light / 8-hour dark cycle. During the incubation period, the culture medium was changed daily, and the filter paper was sprayed to maintain humidity. Each seed was photographed and weighed at 24, 48, and 72 hours after the start of treatment. Image and weight data were continuously recorded throughout the germination process.

[0027] In a further embodiment, the preset vitality determination criterion is specifically as follows: The weight gain rate (SE) is calculated based on the weight data of the sample seeds at multiple collection times. At the 72nd hour of germination culture, the germination status of the sample seeds is evaluated based on the radicle state (RL) and plumule state (BL) in the image data of the sample seeds. Sample seeds that simultaneously meet the preset threshold for SE and the preset standards for RL and BL are labeled as high-viability seeds, and the remaining sample seeds are labeled as low-viability seeds, thus obtaining viability labeling tags.

[0028] In this step, ; Where W0 represents the initial weight data of the sample seeds, W3 represents the weight data of the seeds at 72 hours of germination, and RL and BL represent the radicle and plumule status assessed on day 3 of the germination test according to standard GB / T 3543.1-2025, respectively; The specific definition of seed vigor standards is as follows:

[0029] Seeds that simultaneously meet all three criteria are classified as high-viability seeds, while seeds that fail to germinate or germinate poorly (not meeting all three criteria) are designated as low-viability seeds. Figure 1 The seeds shown in (A) are high-vitality seeds, while the two seeds shown in (B) are low-vitality seeds.

[0030] In a specific embodiment of this application, S2 is used to convert the time-series image data of a single seed sample into time-series fused image data that is beneficial for characterizing germination potential, specifically including S21 to S23; S21, background suppression processing is performed on the image data at each acquisition time in the time series image data of a single seed sample to obtain the background-free seed image corresponding to that acquisition time. Background suppression processing is used to reduce the interference of background factors such as petri dishes, filter paper, water stains, and shadows on the appearance representation of seeds, making the subsequent key region localization more stable. In an optional implementation, background suppression processing can obtain the seed foreground through color space conversion and threshold segmentation, and then combine it with morphological operations to eliminate noise and bridging artifacts, and extract the largest connected region to generate a seed mask. Finally, the seed mask is multiplied point by point with the original image to obtain the background-free seed image, thus forming a consistent foreground image input at each acquisition time; S22, based on the background-removed seed image, the Region of Interest (ROI) related to seed germination potential is identified and a fused image is constructed. Specifically, the convex hull algorithm is used to obtain the envelope shape of the seed's outer contour, and a rotating caliper algorithm is combined to determine the seed's principal axis direction and extreme points at both ends, thereby locating the micropyle and chalaza ends and extracting the corresponding region images, so that the end structure changes can be highlighted. The hilum region is detected by color space conversion and threshold segmentation, and the region image is extracted to enhance the representation ability of hilum color, texture, and boundary changes. A feature map representing the degree of seed damage is generated and the corresponding region image is extracted. The damage degree feature map can be used to enhance appearance signals related to low viability, such as cracks, breakage, abnormal spots, or surface defects. The background-removed seed image and the corresponding region images of the micropyle end region, chalaza end region, hilum region, and damage degree feature map are uniformly scaled to a preset size and then stitched along the channel dimension to form a multi-channel representation. like Figure 3As shown in the example, the preset size is 224×224 pixels. The seed image after background removal is a 3-channel RGB image, and the four ROI region images are also 3-channel images. After stitching, a 15-channel representation is formed. Subsequently, a 1×1 convolution is used to compress and fuse the multi-channel representation, compressing the 15 channels into a more information-concentrated 3-channel fused image for subsequent processing. The parameters of the 1×1 convolution are preset to ensure the consistency and reproducibility of the fusion mapping between different acquisition times and different samples.

[0031] S23, Perform S21 to S22 on the images of each sample seed at each acquisition time to obtain the fused image corresponding to each acquisition time, and arrange the fused images corresponding to each acquisition time in the order of acquisition time to obtain the time series fused image data of each sample seed, and summarize to obtain the time series fused image data of multiple sample seeds.

[0032] By stably generating fused images at each acquisition moment and organizing them in a temporal sequence, subtle changes in the temporal dimension, such as swelling, discoloration, cracking, and precursors of radicle breakthrough, can be continuously characterized in a unified representation space, providing more sufficient temporal evidence for subsequent models to distinguish vitality categories.

[0033] In one example, the preprocessing of image data of the sample seed at each acquisition time specifically includes: like Figure 2 As shown, for the image data acquired at various time points, the image data format is RGB. The RGB images are converted to HSV color space, and histogram equalization is performed on the brightness channel to enhance the contrast of brightness distribution and reduce the impact of uneven illumination on the appearance of seeds. The images are then converted back to RGB space, and thresholding is used to separate the seeds from the background to enhance the distinction between the seed foreground and background. Morphological processing is used to eliminate bridging artifacts and noise. Bridging artifacts are used to describe the thin connected lines between the seeds and the background caused by water stains, reflections, or shadows, while noise is used to describe the scattered small areas formed after thresholding. Morphological processing is used to improve the coherence and boundary stability of the foreground region. The largest connected component is extracted as the seed mask to ensure that the mask corresponds to the main seed region and suppress background residue. The seed mask is multiplied point by point with the corresponding RGB image to obtain the background-removed seed image.

[0034] In a specific embodiment of this application, S3 includes: S31, Establish a set of candidate deep learning models, each candidate deep learning model including at least: The image backbone network is used to extract features from the fused images at each acquisition time in the time-series fused image data of the same sample seed, and outputs the image feature vectors at each time step; the temporal fusion network is used to fuse the image feature vectors at each time step in chronological order, and output the temporal representation; the classifier is used to map the temporal representation to the confidence or probability of the vitality class, and output the vitality class result. Image backbone networks should include at least the ResNet series, InceptionV3, EfficientNet, and VisionTransformer. Temporal fusion networks should include at least LSTM. As an example, the ResNet series can include different depth configurations such as ResNet18, ResNet50, and ResNet101 to cover feature extraction capabilities from lightweight to high capacity; the Vision Transformer can adopt a VIT structure to introduce global attention modeling capabilities; each candidate model is configured to adapt to classification tasks with imbalanced data, enabling it to stably learn discriminative features even when the proportion of high-activity and low-activity samples is inconsistent. To ensure input consistency, the fusion images obtained from the same sample seed at each acquisition time are all standardized to a preset size (e.g., 224×224) and a preset number of channels (e.g., 3-channel fusion image), and are arranged into a sequence of length 4 (initial time, 24h, 48h, 72h) according to the acquisition time order as the model input; In S32, Focal Loss is used as the training loss function for the candidate deep learning model to replace the standard cross-entropy loss function. Focal Loss includes at least a modulating factor γ for suppressing the contribution of easily classified samples and a coefficient for balancing class weights. Taking binary classification as an example, Focal Loss can be represented as: in, The predicted probability of the true class; when When >0, The term attenuates the loss contribution of high-confidence, easily classified samples, thereby relatively amplifying the loss weight of difficult-to-classify samples; when When the value is greater than 1, the inhibition effect is more pronounced, and the model will pay more attention to samples with subtle appearance differences that are easily misjudged during training. To balance the importance of different categories, and address the imbalance in the ratio of positive to negative samples in vitality data, settings can be configured... >0.5 Increase the loss weight of the high-activity category, making the model more sensitive to the discrimination of high-activity samples during the optimization process, thereby improving the prediction accuracy and stability of this category; S33: Multiple seed samples with viability labels are divided into training and validation sets. The sample data for each seed sample (used as model input) includes time-series fused image data and its corresponding viability label. The candidate deep learning models are trained using the training set, i.e., the training set is fed into each candidate deep learning model for parameter learning. Specifically, an optimizer (Adam) can be used to iteratively update the parameters of each candidate deep learning model on the training set. On the validation set, the number of true positives is calculated based on the viability labels. With prediction accuracy Simultaneously, the true prior proportion of highly active samples in the validation set was calculated. . This reflects the number of samples that were correctly predicted as highly viable. This reflects the proportion of samples predicted to be highly active that are actually highly active. It reflects the true proportion of highly active samples in the validation set and is used as the baseline prior level, thereby avoiding the model from gaining superficial improvement based solely on the class ratio; In this step, each candidate deep learning model is trained on a training set, enabling it to learn the mapping relationship between time-series features and viability categories on the training data. After training, the model is evaluated on a validation set. During evaluation, the time-series fused image data of each seed in the validation set is input into the candidate model to obtain the prediction result for each seed. The number of true positives is then calculated on the validation set based on the viability labels and the prediction results. Precision and the number of true positives. The prediction precision is used to reflect the model's ability to correctly detect the target viability class, while the prediction accuracy reflects the reliability of the model's predictions when the target viability class is correctly identified. Simultaneously, the system calculates the true prior proportion of high-viability samples in the validation set. It is used to characterize the proportion of highly active samples in the validation set in the total population, serving as a reference baseline for subsequent scoring constraints, thereby preventing the model from increasing the number of detections by excessively expanding the prediction range.

[0035] S34, Construct a custom scoring function S, which includes at least a scoring term to encourage an increase in the number of true positives (TP) and a constraint on prediction accuracy. Significantly higher than the true prior proportion Constraints or penalties.

[0036] As an example, the scoring function can be designed as follows:

[0037] in,( The term (which must be greater than 0) is used to ensure that the prediction accuracy is higher than the random prior level, avoiding inflated evaluations when the prior proportion is too high or too low; hyperparameters Used to balance the two weights, high Value is emphasized more Compared to prior improvement, high The value reflects the encouragement that more highly active samples are correctly identified. Through this scoring function, only when... and( When all reach a good level, Only then can a higher value be obtained, thereby guiding the model to maintain the reliability of predicting high activity while increasing the number of high-activity samples detected.

[0038] S35 employs the Optuna framework based on Bayesian optimization to maximize the scoring function. With the goal of automatically searching for hyperparameters of each candidate deep learning model, the optimal hyperparameter combination and its maximum score of each candidate model are obtained. The maximum scores of each candidate model are compared and the model with the highest score is selected as the optimal model.

[0039] As an example, Optuna's search hyperparameters can include at least... , and model learning rate It can be extended as needed to training-related parameters such as weight decay, batch size, and data augmentation intensity. Each trial completes training and validation based on the candidate hyperparameter configuration, and calculates... , and And further obtained Value, in To optimize the goal-driven Bayesian search, a better combination of hyperparameters was gradually approached. Finally, the maximum scores for different backbone networks, including the ResNet series, InceptionV3, EfficientNet, and ViT, were obtained. Based on this, the backbone network with the highest score and its hyperparameter configuration were selected as the optimal model for subsequent vitality category discrimination.

[0040] Table 1 shows an example of hyperparameter tuning results:

[0041] Table 2 shows examples of evaluation indicators;

[0042] In a specific embodiment, S4 includes: The process involves acquiring time-series fused image data of the seeds to be tested. Specifically, the seeds are acquired and preprocessed using the same acquisition and preprocessing procedures as those used in training, and corresponding time-series fused image data is constructed. This fused time-series data is then input into the optimal model, which outputs the viability category of the seeds to be tested, enabling automatic differentiation between high-viability and low-viability seeds.

[0043] In one embodiment, to verify the performance difference between time series analysis and static image analysis in seed vigor assessment, technicians conducted a model comparison experiment. The experimental design and conclusions can be used to support the technical effectiveness of vigor discrimination based on time series data.

[0044] Experiment 1 compares time series analysis models: Technicians constructed a time series analysis model based on the Long Short-Term Memory (LSTM) network to integrate multi-stage germination data to monitor the germination process and output vitality categories. For the weight change experiment, time series weight data from different germination stages (initial, day 1, day 2, and day 3) were selected as input features. The model achieved a classification accuracy of 86.91% on the test set (i.e., the validation set).

[0045] While maintaining a consistent temporal input structure, replacing the features input to the VIT+LSTM with image sequence data obtained from the same batch of samples at various acquisition times improved the accuracy of the VIT+LSTM model on the test set to 98.43%. This comparative result demonstrates that LSTM has an effective modeling capability for temporal data, and also indicates that time-series image data can more fully characterize germination dynamics, thereby significantly improving vitality discrimination performance.

[0046] Experiment 2 involved an end-to-end model comparison using static images. Technicians employed ResNet and Vision Transformer (ViT) architectures to perform end-to-end viability prediction based on RGB images acquired at different germination days, as shown in Table 3. When only images from day 3 of germination were used for classification, the accuracy improved to 96.51%, indicating that as germination progressed, visible morphological cues from the seeds gradually emerged and could be used for viability assessment. When using images from day 2, the accuracy dropped to 86.62% as the roots began to break through the seed coat, showing stronger individual differences or transitional characteristics in morphological changes at this stage, leading to increased difficulty in differentiation. Images from day 1 were even more difficult to predict viability because they did not yet show obvious signs of germination potential. When only static images of ungerminated seeds were considered, ResNet and ViT performed poorly overall, with the highest prediction accuracy being only 61.61%.

[0047] The comparative results above show that static images at a single moment are insufficient to reliably reflect vigor differences in the early stages of germination, although such data can still provide some biological clues and are suitable for early screening. In contrast, time series modeling that integrates information from multiple moments, especially time series image data, is more sensitive to dynamic changes during germination and can significantly improve the accuracy of vigor classification. This experimental conclusion corresponds to the technical approach of collecting data at multiple moments, constructing time series inputs, and training and optimizing the model, providing experimental evidence for the necessity and superiority of the time series scheme in the specification.

[0048] Table 3. Results for different datasets and models

[0049] In a specific embodiment, the sample seed and the seed to be tested are corn seeds. S1 includes: taking the sample seed out of the low temperature storage, placing the sample seed on the imaging platform, acquiring single-seed sample seed image data and storing it in BMP format, and simultaneously measuring the weight data of single-seed sample seeds.

[0050] In one example, corn seeds were retrieved from a 4°C cryogenic storage facility (i.e., a sample library), placed on an imaging platform, and images of individual seeds were simultaneously acquired using an imaging device. Simultaneously, a precision balance with an accuracy of 0.001 grams was used for weighing. The resolution reached 2448×2048 pixels, and the acquired images were stored in BMP format.

[0051] Based on the above method, multiple models were trained and validated, as detailed below: Taking the imbalanced ResNet model as an example: The 955 seeds were randomly divided into training and test sets in an 8:2 ratio. The model was optimized using the Adam optimizer, supplemented by cosine annealing to adjust the learning rate. To optimize hyperparameters, 500 trials were conducted using the Optuna automated tuning framework. After 500 Optuna-based hyperparameter optimization trials, the relationship between TP and prediction accuracy was determined. Figure 4 A significant negative correlation was found between the two, meaning that an increase in prediction accuracy (TP) is often accompanied by a decrease in precision. Some data points lie above the fitted curve. Furthermore, the degree of bias reflects the superiority of the model; an increase in bias is associated with improved model performance. Therefore, at the same TP value, both prediction accuracy and classification performance are improved.

[0052] The results of 500 trials for each model were screened according to the following criteria to determine acceptable results: precision > 0.7, number of true positives (TP) > 24, and score (S) > 3. A 3D scatter plot was then generated to visualize the relationship between the model score S and precision and TP. Figure 5In the graph, the light blue, light green, and light red dots represent the highest TP, the highest accuracy, and the highest model score S, respectively.

[0053] As shown in Table 4, among all models, ResNet50 exhibits the best overall performance, with the highest S-value of 6.362, a test precision of 74.4%, and 61 true positives. This model predicted 82 high-viability seeds, accounting for 43% of the test set. When precision was optimized, ResNet50 achieved a maximum precision of 85.29%, with 29 true positives and 34 predicted high-viability seeds, accounting for 17.8% of the test set. InceptionV3 had a high precision (84.21%), 32 true positives, and 38 predicted high-viability seeds, corresponding to 20% of the test set. ResNet18 had the highest number of true positives (75), predicted 105 high-viability seeds (55% of the test set), and achieved a precision of 70.14%, demonstrating its ability to identify positive samples without significantly sacrificing accuracy. In contrast, ResNet101, EfficientNet, and ViT performed relatively poorly. These findings highlight the importance of model architecture in shaping the performance of specific tasks and provide empirical support for selecting the appropriate model based on needs in practical applications.

[0054] Table 4. Comparison results of multiple models

[0055] In one embodiment, this application also provides a seed vigor detection system, comprising: The data acquisition module acquires image and weight data of multiple sample seeds at multiple acquisition times, and performs viability detection on the sample seeds according to the preset viability judgment criteria, marking each sample seed as high viability or low viability, and obtaining viability label; The fusion characterization construction module preprocesses the image data of the sample seeds at each acquisition time, identifies regions of interest related to germination potential based on the preprocessed image data at each acquisition time, and constructs fusion characterizations to obtain fusion images at each acquisition time; the fusion images of each sample seed at multiple acquisition times are arranged in chronological order to form a fusion image sequence, which is used as the time series fusion image data of that sample seed; The model building module establishes a set of candidate deep learning models, uses time-series fused image data as model input, trains the candidate models based on vitality labels and optimizes their parameters; scores the discrimination performance of each candidate model according to a preset scoring rule, and determines the optimal model based on the scoring results. The detection output module determines the vigor category of the seed to be tested based on the optimal model. The seed vigor detection system includes a processor and a memory. The aforementioned data modules are all stored as program units in the memory, and the processor executes the aforementioned program modules stored in the memory to implement the corresponding functions.

[0056] This application also provides a storage medium storing a program that, when executed by a processor, implements the above-described seed viability detection method based on time series analysis and model optimization.

[0057] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0058] The above are merely preferred embodiments of this application. It should be noted that this application is not limited to the above embodiments. For those skilled in the art, several improvements and modifications can be made without departing from the principles of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should also be considered within the scope of protection of this application.

Claims

1. A seed vigor detection method based on time series analysis and model optimization, characterized in that, include: S1, acquire image data and weight data of multiple sample seeds at multiple acquisition times, and determine and label the sample seeds according to the preset viability determination criteria to obtain a viability label for each sample seed; S2, preprocess the image data of the sample seeds at each acquisition time, identify the region of interest related to germination potential based on the preprocessed image data at each acquisition time and construct a fusion representation to obtain the fusion image at each acquisition time; assemble the fusion images of each sample seed at multiple acquisition times into a fusion image sequence in chronological order, as the time series fusion image data of each sample seed; S3, establish a candidate deep learning model set, use the time series fused image data as the input of the candidate models, train the candidate models and optimize their parameters based on the vitality label; score the discrimination performance of each candidate model according to the preset scoring rules, and determine the optimal model based on the scoring results; S4. Determine the vigor category of the seed to be tested based on the optimal model.

2. The seed vigor detection method based on time series analysis and model optimization as described in claim 1, characterized in that, S2 includes: S21, preprocess the image data of the same sample seed at each acquisition time to obtain the background-removed seed image as the preprocessed image data at each acquisition time. The preprocessing includes at least intensity histogram equalization, threshold segmentation, morphological processing and maximum connected component extraction. S22, based on the preprocessed image data at each acquisition time, the convex hull algorithm and rotating caliper algorithm are used to locate the bead hole end and the chalaza end and extract the corresponding region images; the seed hilum region is detected by color space conversion and threshold segmentation and the region image is extracted; a feature map representing the degree of seed damage is generated and the corresponding region image is extracted; the background-removed seed image and each region image are uniformly scaled to a preset size and then stitched along the channel dimension to form a multi-channel representation, and the multi-channel representation is compressed into a fusion image for subsequent processing by 1×1 convolution to obtain the fusion image corresponding to the acquisition time; S23, Perform S21 to S22 on the images of each sample seed at each acquisition time to obtain the fused image corresponding to each acquisition time of each sample seed, and arrange the fused images corresponding to each acquisition time of each sample seed in the order of acquisition time to obtain the time series fused image data of multiple sample seeds.

3. The seed vigor detection method based on time series analysis and model optimization as described in claim 1, characterized in that, S3 includes: S31, establish a set of candidate deep learning models, each candidate deep learning model including at least an image backbone network for extracting features from the fused images at each acquisition time of the time series fused image data, a temporal fusion network for performing time-dimensional fusion of the extracted time-by-time features, and a classifier for outputting the vitality category. S32, Focal Loss is used as the training loss function for the candidate deep learning model. Focal Loss includes at least a modulating factor γ to suppress contributions from easily classified samples and a coefficient to balance class weights. ; S33, the multiple sample seeds are divided into a training set and a validation set. The sample data of each sample seed includes the time-series fused image data and its corresponding liveness label. Each candidate deep learning model is trained using the training set, and the number of true positives for each candidate deep learning model is calculated on the validation set based on the liveness label. With prediction accuracy Simultaneously, the true prior proportion of highly active samples in the validation set was calculated. ; S34, Construct a custom scoring function S, wherein the scoring function S at least includes a scoring term to encourage an increase in the number of true positives (TP) and a scoring term to constrain prediction accuracy. Higher than the true prior proportion Constraints or penalties; S35. Using the Optuna framework based on Bayesian optimization, with the goal of maximizing the scoring function S, the hyperparameters of each candidate deep learning model are automatically searched to obtain the optimal hyperparameter combination and its maximum score for each candidate model. The maximum scores of each candidate model are compared, and the model with the highest score is selected as the optimal model.

4. The seed vigor detection method based on time series analysis and model optimization as described in claim 1, characterized in that, The multiple collection times in S1 include: the initial time when the sample seeds are taken out of the sample bank, and the 24th, 48th and 72nd hours after the germination experiment.

5. The seed vigor detection method based on time series analysis and model optimization as described in claim 4, characterized in that, The preset vitality determination criteria are as follows: The weight gain rate (SE) is calculated based on the weight data of the sample seeds at multiple collection times. At the 72nd hour of germination culture, the germination status of the sample seeds is evaluated based on the radicle state (RL) and plumule state (BL) in the image data of the sample seeds. Sample seeds that simultaneously meet the preset threshold for SE and the preset standards for RL and BL are labeled as high-viability seeds, and the remaining sample seeds are labeled as low-viability seeds, thus obtaining viability labeling tags.

6. The seed vigor detection method based on time series analysis and model optimization as described in claim 1, characterized in that, S4 include: Acquire time-series fused image data of the seed to be tested; The time-series fused image data is input into the optimal model to obtain the viability category output of the seed to be tested; The vigor category of the seed to be tested is determined based on the output of the vigor category.

7. The seed vigor detection method based on time series analysis and model optimization as described in claim 3, characterized in that, The image backbone network includes at least one or more of the ResNet series, InceptionV3, EfficientNet, and VisionTransformer, and the temporal fusion network includes at least LSTM.

8. A seed vigor detection system, characterized in that, include: The data acquisition module acquires image data and weight data of multiple sample seeds at multiple acquisition times, and performs viability detection on the sample seeds according to a preset viability determination standard, marking each sample seed as high viability or low viability to obtain a viability label. The fusion characterization construction module preprocesses the image data of the sample seeds at each acquisition time, identifies regions of interest related to germination potential based on the preprocessed image data at each acquisition time, and constructs fusion characterizations to obtain fusion images at each acquisition time; the fusion images of each sample seed at multiple acquisition times are arranged in chronological order to form a fusion image sequence, which is used as the time series fusion image data of the sample seed. The model building module establishes a set of candidate deep learning models, uses the time-series fused image data as model input, trains the candidate models based on the vitality labels, and optimizes their parameters; it scores the discrimination performance of each candidate model according to a preset scoring rule, and determines the optimal model based on the scoring results. The detection output module determines the vigor category of the seed to be tested based on the optimal model.