Seed vigor migration classification method and system based on consistency of double-layer probability distribution

CN122903752APending Publication Date: 2026-10-13HUZHOU UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611359314.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-03
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

然而,这些方法普遍存在检测周期长、人力成本高以及具有破坏性等不足,难以满足大批量种子无损筛查的需求

Benefits of technology

[0017]与现有技术相比,本发明的有益效果为:本发明提出使用DPC-FS-PFCE(双层概率分布一致性-无参数校准增强)模型来进行水稻种子活力迁移分类,为不同品种水稻种子活力数据集之间的迁移分类提供统一优化框架。采用Softmax函数作为分类输出层,将模型输出的线性响应映射为类别概率分布,并采用多分类交叉熵损失函数代替回归预测误差,实现模型由连续变量预测向多类别分类任务的优化转换,采用双层概率分布一致性损失替代主从模型输出一致性项,提出DPC损失,通过联合优化主模型与从模型全局类别概率分布和局部样本预测概率分布,实现分类知识的有效迁移,采用多类别权重向量的方向一致性约束替代回归系数相关性约束,保持共享特征空间中的类别判别结构,实现主模型分类参数向从模型的稳定迁移,提高迁移分类模型的稳定性和泛化能力。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122903752A_ABST
    Figure CN122903752A_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of seed vigor evaluation, and specifically provides a seed vigor migration classification method and system based on double-layer probability distribution consistency, which comprises the following steps: obtaining spectral features of rice seed samples; dividing the spectral features into a master data set and a slave data set according to rice varieties; introducing a Softmax function, a multi-classification cross-entropy loss function, a double-layer probability distribution consistency loss, and a directional consistency constraint of a multi-class weight vector into a parameter-free calibration enhancement model, and reconstructing an original parameter-free calibration enhancement model used for a regression task into a double-layer probability distribution consistency-parameter-free calibration enhancement model used for classification; and based on the trained double-layer probability distribution consistency-parameter-free calibration enhancement model, performing migration classification on target rice seed vigor. The application improves the classification performance, stability and generalization ability of the model on the target variety data set.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of seed vigor assessment technology, specifically relating to a seed vigor migration classification method and system based on the consistency of two-layer probability distribution. Background Technology

[0002] Seed vigor is a crucial indicator for evaluating seed quality, directly impacting germination rate, seedling establishment, field growth, and final yield. Therefore, achieving non-destructive and accurate evaluation of seed vigor is of great significance for seed selection, seed grading, and storage management.

[0003] Traditional seed vigor testing primarily relies on standard germination tests, staining methods, and conductivity measurements. However, these methods generally suffer from drawbacks such as long testing cycles, high labor costs, and destructive nature, making them unsuitable for the non-destructive screening of large batches of seeds. Furthermore, most existing seed vigor testing models are built on single-variety or single-batch datasets, and their training process heavily depends on the sample characteristics and data distribution of that specific dataset. While these models may achieve good detection results on their own datasets, performance tends to decline when applied to seed data from other varieties or batches, indicating insufficient cross-dataset transfer and generalization capabilities. This limits the further application of near-infrared hyperspectral imaging technology in seed vigor testing.

[0004] Current research on near-infrared hyperspectral seed vigor detection mostly focuses on improving classification accuracy on a single dataset. Research on transfer classification between different seed variety datasets is relatively limited, making it difficult to fully utilize the potential knowledge associations between different datasets and limiting the transfer classification and generalization capabilities of the model.

[0005] Research on combining parameter-free calibration enhancement frameworks with near-infrared hyperspectral imaging for seed vigor transfer classification is limited. In particular, there are few studies on achieving stable knowledge transfer and classification optimization between different rice seed vigor datasets, which makes it difficult to meet the needs of non-destructive detection across datasets in complex agricultural scenarios.

[0006] Existing spectral transfer classification methods do not make sufficient use of category probability distribution information during the knowledge transfer process between the master and slave models. Under complex data distribution conditions, the stability, robustness, and generalization ability of the models still face challenges.

[0007] Therefore, there is an urgent need for a rice seed vigor transfer classification method that combines the consistency of two-layer probability distribution with a parameter-free calibration enhancement framework to achieve non-destructive, accurate and stable transfer classification between rice seed vigor datasets of different varieties, providing an efficient and reliable technical solution for non-destructive testing of agricultural seed quality. Summary of the Invention

[0008] The purpose of this invention is to provide a rice seed vigor transfer classification method and system using a two-layer probabilistic consistency-parameter-free calibration enhancement model, which enables the effective transfer of classification knowledge from different rice seed vigor datasets without the need to set complex spectral calibration parameters, thereby improving the accuracy, stability, and generalization ability of the transfer classification.

[0009] To achieve the above objectives, the present invention provides the following technical solution: A seed vigor migration classification method based on the consistency of two-layer probability distributions includes: Using a near-infrared hyperspectral imaging system, raw near-infrared hyperspectral image data of rice seed samples were acquired, and the raw near-infrared hyperspectral image data were preprocessed to extract the spectral features of each rice seed sample. According to rice varieties, the spectral features are divided into the main dataset and the secondary dataset; By introducing the Softmax function, multi-class cross-entropy loss function, two-layer probability distribution consistency loss, and directional consistency constraint of multi-class weight vectors into the parameterless calibration enhancement model, the original parameterless calibration enhancement model used for regression tasks is reconstructed into a two-layer probability distribution consistency-parameterless calibration enhancement model used for classification. The two-layer probability distribution consistency-parameterless calibration enhancement model includes a master model and a slave model. The master model is trained using the source training set, and the slave model is trained using the target training set. Based on the trained two-layer probability distribution consistency-parameter-free calibration enhancement model, the vigor of target rice seeds is classified by transfer.

[0010] Preferably, the near-infrared hyperspectral imaging system includes: Near-infrared hyperspectral camera is used to capture the characteristics of rice seed samples in order to acquire raw near-infrared hyperspectral image data; The uniform light source system uses two sets of three-lamp arrays, with a total of six 35-watt halogen lamps, to provide light for the near-infrared hyperspectral camera. Sample placement platform for placing rice seed samples; A white calibration plate is used to acquire a white reference image for black and white correction processing; A computer is used to control the sample stage to acquire raw near-infrared hyperspectral image data using push-broom imaging. The spectral range of the near-infrared hyperspectral imaging system is 900-1700 nm.

[0011] Preferably, the method for preprocessing the near-infrared hyperspectral image data includes: The raw near-infrared hyperspectral image data was black and white corrected using white and black reference images; The near-infrared hyperspectral image data after black and white correction is used to separate the seed region from the background through mask segmentation. The whole seed region is taken as the region of interest, and the average spectrum of all pixels in the region of interest is calculated as the spectral feature of the seed sample. The extracted spectral features were sequentially processed using Savitzky-Gore smoothing filtering and standard normal transformation to obtain the final spectral features.

[0012] Preferably, in the dual-layer probability distribution consistency-parameter-free calibration enhancement model, to address the issues of category probability distribution shifts and inconsistencies in the discriminant feature space among different seed varieties, a joint constraint mechanism between the probability space and the feature discriminant space is constructed: The Softmax function is a classification output layer used to map the linear response output by the model to a class probability distribution; The multi-class cross-entropy loss function is used to adjust the model optimization objective from the prediction error of continuous variables to a measure of the difference between the class probability distribution and the true class label, based on the characteristics of seed vigor multi-class classification tasks, thereby realizing the optimization of the transfer model under classification tasks. The two-layer probability distribution consistency loss is used to address the problem of probability distribution differences between the prediction results of the master model and the slave model in multi-class transfer classification tasks. Based on the parameter-free calibration enhancement model transfer framework, the model output space is transformed into a class probability space, and the classification knowledge is preserved during the transfer process by jointly constraining the class probability statistical distribution and the sample prediction probability distribution. The direction consistency constraint of the multi-class weight vector is used to extend the parameter correlation constraint in the parameterless calibration enhancement model to the classification weight space according to the requirement of maintaining the category discrimination structure in the feature space in the multi-class transfer classification task. By constraining the direction consistency of the corresponding category weight vectors of the master model and the slave model, the category discrimination structure in the shared feature space is maintained, and the classification parameters of the master model are transferred to the slave model.

[0013] Preferably, the two-layer probability distribution consistency loss includes the average probability distribution consistency loss and the sample probability distribution consistency loss, and the calculation formula is as follows: , in =0.75, For the consistency loss of the two-layer probability distribution, The loss is the consistency loss of the average probability distribution. The loss is the consistency of the sample probability distribution. The calculation process for the consistency loss of the average probability distribution is as follows: , in, This represents the consistency loss of the average probability distribution. The average of the class probability vectors of all samples in the main model. This is the average of the class probability vectors of all samples in the model; The number of categories for the classification task; Represents the number of samples in the main model. This represents the number of samples from the model; The process for calculating the consistency loss of the sample probability distribution is as follows: , in, For sample probability distribution consistency loss, This represents the number of corresponding samples used in the probability distribution consistency calculation. Main model The class prediction probability vector of each sample. To start from model number 1 The class prediction probability vector of each sample.

[0014] Preferably, the directional consistency of the multi-class weight vectors is calculated using the following formula: , , in, This represents the directional consistency of the multi-class weight vector. The main model parameter matrix, From the model parameter matrix; , ,in, To share the number of features, Main model Category 1 The weights corresponding to the features To start from model number 1 Category 1 The weights corresponding to the features This represents the consistency constraint function for the direction of multi-class weight vectors, where thres represents the preset similarity threshold.

[0015] This invention also provides a seed vigor migration classification system based on the consistency of two-layer probability distribution, used to implement the method, comprising: The data processing module is used to acquire raw near-infrared hyperspectral image data of rice seed samples using a near-infrared hyperspectral imaging system, and to preprocess the raw near-infrared hyperspectral image data to extract the spectral features of each rice seed sample. The dataset partitioning module is used to divide spectral features into a main dataset and a secondary dataset according to rice variety; The model training module is used to introduce the Softmax function, multi-class cross-entropy loss function, two-layer probability distribution consistency loss, and direction consistency constraint of multi-class weight vectors into the parameterless calibration enhancement model, reconstructing the original parameterless calibration enhancement model for regression tasks into a two-layer probability distribution consistency-parameterless calibration enhancement model for classification. The two-layer probability distribution consistency-parameterless calibration enhancement model includes a master model and a slave model. The master model is trained using the source training set, and the slave model is trained using the target training set. The transfer classification module is used to perform transfer classification of the vigor of target rice seeds based on the trained two-layer probability distribution consistency-parameter-free calibration enhancement model.

[0016] Preferably, the data processing module includes: The black and white correction unit is used to perform black and white correction on the original near-infrared hyperspectral image data using white reference images and black reference images; The spectral feature acquisition unit is used to separate the seed region from the background by mask segmentation of the near-infrared hyperspectral image data after black and white correction, and to take the whole seed region as the region of interest, and calculate the average spectrum of all pixels in the region of interest as the spectral feature of the seed sample. The spectral feature processing unit is used to sequentially perform Savitzky-Gory smoothing filtering and standard normal variable transformation on the extracted spectral features to obtain the final spectral features.

[0017] Compared with existing technologies, the beneficial effects of this invention are as follows: This invention proposes to use the DPC-FS-PFCE (Dual-Layer Probability Distribution Consistency-Parameterless Calibration Enhancement) model for rice seed vigor transfer classification, providing a unified optimization framework for transfer classification between different rice seed vigor datasets. It employs the Softmax function as the classification output layer, mapping the linear response of the model output to a class probability distribution. A multi-class cross-entropy loss function is used to replace the regression prediction error, achieving an optimized transformation of the model from continuous variable prediction to multi-class classification tasks. A dual-layer probability distribution consistency loss replaces the consistency term in the master-slave model output, proposing the DPC loss. By jointly optimizing the global class probability distribution and local sample prediction probability distribution of the master and slave models, effective transfer of classification knowledge is achieved. A directional consistency constraint of the multi-class weight vector replaces the correlation constraint of the regression coefficient, maintaining the class discrimination structure in the shared feature space and achieving stable transfer of the master model's classification parameters to the slave model, thus improving the stability and generalization ability of the transfer classification model.

[0018] This invention combines near-infrared hyperspectral technology, spectral feature extraction, bilayer probability distribution consistency constraints, and a parameter-free calibration enhancement framework to achieve effective transfer of classification knowledge between viability datasets of different rice varieties. This improves the accuracy, stability, and generalization ability of the transferred classification, providing valuable tools for agricultural researchers. Attached Figure Description

[0019] To more clearly illustrate the technical solution of the present invention, the drawings used in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a flowchart of a method according to an embodiment of the present invention; Figure 2 These are the spectral curves of three datasets before and after spectral preprocessing in an embodiment of the present invention; Figure 2 (a) in the image is the original spectrum of "Chunyou 83"; Figure 2 (b) in the image is the smoothed image obtained after SG smoothing of the original spectrum of "Chunyou 83"; Figure 2 (c) in the figure is the result of SNV processing on the smoothed image of "Chunyou 83"; Figure 2 (d) in the image is the original spectrum of "Zhongzao 39"; Figure 2 (e) in the image is the smoothed image obtained after SG smoothing of the original spectrum of "Zhongzao 39"; Figure 2 (f) in the figure is the result of SNV processing on the smoothed map of "Zhongzao 39"; Figure 2 (g) in the image represents the original spectrum of "Zhongzu 53"; Figure 2 (h) in the image is the smoothed image obtained after SG smoothing of the original spectrum of “Zhongzu 53”. Figure 2 (i) is the image obtained after SNV processing of the smoothed image of "Group 53"; Figure 3 This is a structural diagram of the DPC-FS-PFCE model according to an embodiment of the present invention; Figure 4 The figures show the migration classification performance curves of the three probabilistic consistency strategies in this invention under different master data ratios. Figure 4 In Figure (a), the effect of the M53 dataset on transfer classification accuracy is shown under different proportions of samples from the main model. Figure 4 (b) shows the effect of the Zhongzao 39 dataset on the transfer classification accuracy with different proportions of samples in the main model. Figure 4 In the diagram, (c) represents the effect of the mixed dataset on the transfer classification accuracy with different proportions of samples from the main model. Detailed Implementation

[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0022] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0023] Example 1: like Figure 1 As shown, a seed vigor migration classification method based on the consistency of a two-layer probability distribution includes: S1: Using a near-infrared hyperspectral imaging system, raw near-infrared hyperspectral image data of rice seed samples is acquired, and the raw near-infrared hyperspectral image data is preprocessed to extract the spectral features of each rice seed sample; a further implementation method is that the near-infrared hyperspectral imaging system includes: A near-infrared hyperspectral camera is used to capture images of rice seed samples to obtain raw near-infrared hyperspectral image data. A uniform light source system, employing two sets of three-lamp arrays with a total of six 35-watt halogen lamps, provides light to the near-infrared hyperspectral camera to achieve uniform illumination. A sample stage is used to hold the rice seed samples to ensure their stability during imaging. A white calibration plate is used to acquire a white reference image for black-and-white correction. A computer controls the sample stage to acquire raw near-infrared hyperspectral image data using push-broom imaging. The spectral range of the near-infrared hyperspectral imaging system is 900-1700 nm.

[0024] A further embodiment includes a method for preprocessing near-infrared hyperspectral image data comprising: The raw near-infrared hyperspectral image data was black and white corrected using white and black reference images; The near-infrared hyperspectral image data after black and white correction is used to separate the seed region from the background through mask segmentation. The whole seed region is taken as the region of interest (ROI), and the average spectrum of all pixels in the region of interest is calculated as the spectral feature of the seed sample.

[0025] The extracted spectral features were first denoised using the Savitzky-Golay (SG) smoothing method. By setting the window width and polynomial order, the spectral response at the center wavelength was calculated using polynomial fitting within a sliding window to reduce the impact of random noise on the spectral signal while preserving the positions of spectral peaks and absorption features. After SG smoothing, the smoothed spectral data underwent Standard Normal Variate (SNV) transformation to obtain the final spectral features.

[0026] This embodiment also provides the following steps for preparing rice seed samples: Select three varieties of rice seeds and place them in an artificial climate chamber for accelerated aging treatment. The aging times are 36 hours and 72 hours, respectively, to accelerate the decay process of seed vigor and allow the seed vigor to form a gradient change in a short period of time, thereby simulating the natural aging process. This yields three types of vigor samples: unaged, aged for 36 hours, and aged for 72 hours, with the number of samples in each type distributed as 600, 150, and 150, respectively. The artificial climate chamber is set at a constant temperature of 40°C and 100% relative humidity.

[0027] S2: Based on rice varieties, the spectral features are divided into main dataset and secondary dataset. Specifically, this embodiment constructs a cross-variety migration classification scenario based on the differences in seed spectral distribution among different rice varieties. The obtained spectral features are divided into datasets according to rice varieties. The rice variety data with relatively complete sample information and used to establish a basic seed vigor classification model is defined as the main dataset, i.e., the source domain data; the data belonging to different rice varieties from the main dataset and used to verify and implement cross-variety migration classification is defined as the secondary dataset, i.e., the target domain data.

[0028] The above classification method corresponds to the transfer classification objective of this invention. Because different rice varieties differ in seed coat structure, chemical composition, and internal substance content, even at the same seed vigor level, their near-infrared hyperspectral characteristics may still exhibit certain distribution shifts. Therefore, this invention uses data from one rice variety as the master dataset and data from other rice varieties as slave datasets. Classification knowledge is transferred from the master model to the slave model to reduce the impact of spectral distribution differences between different varieties on seed vigor classification results.

[0029] S3: Introducing the Softmax function, multi-class cross-entropy loss function, two-layer probability distribution consistency loss, and directional consistency constraint of multi-class weight vectors into the parameterless calibration enhancement model, the original parameterless calibration enhancement model FS-PFCE for regression tasks is reconstructed into a two-layer probability distribution consistency-parameterless calibration enhancement model DPC-FS-PFCE for classification. The two-layer probability distribution consistency-parameterless calibration enhancement model includes a master model and a slave model. The master model is trained using the source training set, and the slave model is trained using the target training set. Figure 3 As shown.

[0030] A further implementation involves constructing a joint constraint mechanism between the probability space and the feature discrimination space in the two-layer probability distribution consistency-parameter-free calibration enhancement model to address the issues of class probability distribution shifts and inconsistencies in the discriminant feature space among different seed varieties. The Softmax function is used in the classification output layer to map the linear response of the model output to a class probability distribution; further, the specific calculation process of the Softmax function is as follows: , To improve the stability of the numerical values, this invention adopts the log_softmax formula: , in Represents the model for the first The predicted sample belongs to the _th ... The probability of a class To obtain samples from the model, The number of categories for the classification task (in this invention) ), Indicates from the model number The sample corresponds to the first The linear response value of the class, The representative indicates that from the model number 1 The sample corresponds to the first The linear response value of the class is expressed as follows: ,in , The maximum value of the Logits vector for each sample. Represents the first from the model classification layer The transpose of the class-corresponding weight vector. Representative from model number 1 The bias term corresponding to the class.

[0031] The multi-class cross-entropy loss function is used to adjust the model optimization objective from continuous variable prediction error to a measure of the difference between the class probability distribution and the true class label, based on the characteristics of seed vigor multi-class classification tasks, thereby achieving optimization of the transfer model under classification tasks; furthermore, the multi-class cross-entropy loss function The specific calculation process is as follows: , in To obtain from the model parameter matrix, It uses one-hot encoded labels, which ensures that only the true class is selected during the calculation process, guaranteeing that the model can fully learn the mapping relationship between the model and the class. This represents the number of samples from the model.

[0032] , Representing the The true category label corresponding to each sample.

[0033] The two-layer probability distribution consistency loss is used to address the problem of probability distribution differences between the prediction results of the master model and the slave model in multi-class transfer classification tasks. Based on the parameter-free calibration enhancement model transfer framework, the model output space is transformed into a class probability space, and the classification knowledge is maintained during the transfer process by jointly constraining the class probability statistical distribution and the sample prediction probability distribution.

[0034] A further implementation method involves the two-layer probability distribution consistency loss (DPC) comprising the average probability distribution consistency (MPC) loss and the sample probability distribution consistency (SPC) loss, calculated as follows: , in =0.75, For the consistency loss of the two-layer probability distribution, The loss is the consistency loss of the average probability distribution. This represents the consistency loss of the sample probability distribution.

[0035] The calculation process for the consistency loss of the average probability distribution is as follows: , in, This represents the consistency loss of the average probability distribution. The average of the class probability vectors of all samples in the main model. This is the average of the class probability vectors of all samples in the model; The number of categories for the classification task; Represents the number of samples in the main model. This represents the number of samples from the model.

[0036] The calculation process for the sample probability distribution consistency loss is as follows: , in, For sample probability distribution consistency loss, This represents the number of corresponding samples used in the probability distribution consistency calculation. Main model The class prediction probability vector of each sample. To start from model number 1 The class prediction probability vector of each sample.

[0037] The objective function of the model is obtained as follows: , in, and In the objective function and The weight.

[0038] The direction consistency constraint of the multi-class weight vector is used to extend the parameter correlation constraint in the parameterless calibration enhancement model to the classification weight space according to the requirement of maintaining the category discrimination structure in the feature space in the multi-class transfer classification task. By constraining the direction consistency of the corresponding category weight vectors of the master model and the slave model, the category discrimination structure in the shared feature space is maintained, and the classification parameters of the master model are transferred to the slave model.

[0039] A further implementation method involves ensuring the directional consistency of multi-class weight vectors. The calculation formula is as follows: , , in, This represents the directional consistency of the multi-class weight vector. The main model parameter matrix, From the model parameter matrix; , ,in, To share the number of features, Main model Category 1 The weights corresponding to the features To start from model number 1 Category 1 The weights corresponding to the features This represents a constraint function for the consistency of the direction of multi-class weight vectors. Physically, it restricts the average directional similarity between the corresponding class weight vectors of the master model and the slave model to no less than a preset similarity threshold (thres). When this constraint is satisfied, it indicates that the master model and the slave model maintain consistent class discrimination directions in the shared feature space, thus ensuring the effective transfer of class discrimination knowledge during the transfer process.

[0040] S4: Based on the trained two-layer probability distribution consistency-parameter-free calibration enhancement model, transfer classification of the vigor of target rice seeds is performed.

[0041] Regarding the model training process, the master model and slave model in this invention are trained sequentially, rather than alternately. First, the master model is trained using the master dataset. The master model takes the spectral features of the master dataset as input, converts the model output into predicted probabilities for each vitality category using the Softmax function, and optimizes the parameters using a multi-class cross-entropy loss function. After the master model training is complete, its classification weights and intercept parameters are extracted and fixed. Based on the fixed master model parameters, the class probability distribution of the master dataset is calculated as reference information for subsequent slave model transfer optimization. Subsequently, the slave model is trained using the slave dataset. During slave model optimization, the master model parameters are not updated. Instead, a two-layer probability distribution consistency loss constraint is used to constrain the class probability distributions output by the master and slave models, and a direction consistency constraint using multi-class weight vectors ensures that the master and slave models maintain similar class discrimination directions in the shared feature space. Therefore, the training process of this invention includes a master model pre-training stage and a slave model transfer optimization stage, with the master model training results serving as a reference for knowledge transfer in the slave model.

[0042] During the model transfer optimization process, a two-layer probability distribution consistency constraint is applied to the class probability distributions obtained from the master model and slave model using the Softmax function. This two-layer consistency constraint includes mean probability consistency and sample probability consistency. Mean probability consistency constrains the consistency of the master and slave datasets at the overall class probability distribution level. The mean class probability vectors output by the master and slave models are averaged along the sample dimension to obtain the corresponding average class probability vectors for the master and slave datasets. The mean probability consistency loss is calculated based on the cosine similarity between the two average class probability vectors, ensuring that the overall class probability distribution output by the slave model approaches that of the master model. Sample probability consistency further constrains the consistency of the master and slave models at the sample level class probability distribution. The sample probability consistency loss is constructed by calculating the cosine similarity between the sample probability vectors output by the two models and averaging them, ensuring that the class probability distribution of the slave model at the sample level maintains a similar trend to that of the master model.

[0043] In the objective function of the secondary model, a weighted combination of multi-class cross-entropy loss and two-level probability distribution consistency loss is applied, while simultaneously imposing a directional consistency constraint on the multi-class weight vector. Specifically, the weight of the multi-class cross-entropy loss is set to 0.6, and the overall weight of the two-level probability distribution consistency loss is set to 0.4. Within the two-level probability distribution consistency loss, the combined weights of the mean probability consistency loss and the sample probability consistency loss are set to 0.75 and 0.25, respectively. Thus, the secondary model can both learn the classification characteristics of the target variety using the true class labels from the dataset and perform transfer optimization using the overall probability distribution information, sample-level probability distribution information, and class discrimination structure formed by the main model.

[0044] Regarding the training hyperparameters, in this embodiment, the main model is trained using an existing multinomial logistic regression model, with a maximum number of iterations set to 2000, a regularization parameter C set to 100, L1 regularization applied, and the existing stochastic average gradient (SAGA) algorithm used for solving. After the main model training is complete, its classification weights and intercept parameters are extracted and fixed as reference parameters in the model transfer optimization process.

[0045] The model is first initialized using an existing multinomial logistic regression model, with a maximum number of iterations set to 1000. After initialization, the objective function of the DPC-FS-PFCE is optimized using the existing Sequential Least Squares Programming (SLSQP) algorithm, with a maximum number of iterations set to 500 and a convergence tolerance of 1 × 10⁻⁶. -4 The numerical difference step size eps is set to 1×10. -4 The threshold for the consistency constraint of the multi-class weight vector direction is set to 0.9.

[0046] Example 2: This embodiment provides a specific application process of the method described in Embodiment 1: 1. Sample preparation. The rice seeds used in this example are "Chunyou 83", "Zhongzao 39" and "Zhongzu 53", a total of 3 rice varieties. There are 600 samples of "Chunyou 83" and 150 samples of each of the other two rice varieties, for a total of 900 samples.

[0047] Artificial seed aging by controlling parameters such as temperature and humidity can rapidly simulate the long-term natural aging process, yielding experimental data with good batch consistency and high reproducibility of experimental conditions. In this study, each rice variety was divided into three groups: no aging, aging for 36 hours, and aging for 72 hours. The aging experiment was conducted using an artificial climate chamber, set at a constant temperature of 40°C and a relative humidity of 100%, at which point the aging experiment was completed.

[0048] 2. One-dimensional spectral data of the samples were collected to construct a near-infrared hyperspectral acquisition system for rice seeds. This system used an FX17 near-infrared spectral camera and its integrated Lab Scanner hyperspectral imaging platform. The system consists of a near-infrared hyperspectral camera, a uniform light source system, a sample stage, a white calibration plate, and a computer, as detailed below: (1) Near-infrared hyperspectral camera: FX17 near-infrared hyperspectral camera was selected, with a spectral range of 900-1700nm.

[0049] (2) Uniform light source system: It consists of six 35-watt halogen lamps and adopts two sets of three-lamp arrays to provide uniform and sufficient light for the near-infrared hyperspectral camera and reduce noise interference caused by light source and shadow.

[0050] (3) Sample stage: Made of high-gloss black material and equipped with a white calibration plate for system calibration; the sample stage is driven by a stepper motor, and the scanning speed is set to 24.70 mm / s. Rice seeds are placed on it to ensure that the rice seeds remain stable during the shooting process.

[0051] (4) Computer: The system was initialized using Lumo Scanner 2020 control software, and the system was used to acquire the raw hyperspectral feature data. In the calculation, PyCharm software was used to complete the preprocessing and modeling of the raw hyperspectral images.

[0052] After the acquisition system was set up, near-infrared hyperspectral data acquisition was performed; the specific process is as follows: (1) The seeds were randomly grouped according to variety and vigor level, with 50 seeds in each group.

[0053] (2) Each time, a group (50 grains) of rice seeds is placed in a counting plate and the counting plate is placed on the sample platform, that is, each near-infrared hyperspectral image data contains 50 rice seeds.

[0054] 3. Standard Germination Experiment: This invention strictly follows the national standard GB / T 3543.4-2025 for standard germination experiments. Spectral data corresponds one-to-one with germination results. Each seed is numbered during spectral acquisition, with 50 seeds per group. Each group is arranged in 10 rows and 5 columns, with row numbers AJ and column numbers 1-5. The seeds in the first row and first column are numbered A1. Artificially aged rice seeds are placed on moistened germination paper and then placed in germination boxes with pre-moistened germination paper at the bottom. The germination boxes are placed in a climate chamber at a constant temperature of 30℃ for a 14-day standard germination experiment. Seed germination is observed daily, and water is replenished as needed. The initial counting day is day 5, and the final counting day is day 14. Seed vigor is strictly determined according to the ISTA standard. The germination count, germination rate, and germination potential of different rice varieties at the three stages are shown in Table 1.

[0055] Table 1 4. Preprocess the original hyperspectral image to extract the one-dimensional spectral features of each seed. White and black reference images are obtained using a Teflon standard plate and a lens cap, respectively, and then black-and-white correction is performed. The seed is separated from the background using masking and adaptive domain segmentation. The entire seed is selected as the Region of Interest (ROI), and the average spectrum of all pixels within that region is calculated as the characteristic spectrum of the seed. SG smoothing and SNV are then applied to obtain the preprocessed sample spectral feature data.

[0056] Based on the above process for extracting one-dimensional spectral features of seeds, spectral feature data of rice seeds from three varieties were extracted respectively. Figure 2 (a) in the image is the original spectrum of "Chunyou 83"; Figure 2 (b) in the image is the smoothed image obtained after SG smoothing of the original spectrum of "Chunyou 83"; Figure 2 (c) in the figure is the result of SNV processing on the smoothed image of "Chunyou 83"; Figure 2 (d) in the image is the original spectrum of "Zhongzao 39"; Figure 2 (e) in the image is the smoothed image obtained after SG smoothing of the original spectrum of "Zhongzao 39"; Figure 2 (f) in the figure is the result of SNV processing on the smoothed map of "Zhongzao 39"; Figure 2 (g) in the image represents the original spectrum of "Zhongzu 53"; Figure 2 (h) in the image is the smoothed image obtained after SG smoothing of the original spectrum of “Zhongzu 53”. Figure 2Figure (i) shows the smoothed graph of "Group 53" after SNV processing. Overall, the spectral curves of the three datasets show high consistency, with similar overall trends, indicating that different samples have similar spectral response characteristics. In the approximately 1000–1350 nm band, the overall reflectance of each spectral curve is high and fluctuates slowly with wavelength; a significant absorption trough appears near approximately 1400 nm, followed by a rapid decrease in reflectance; in the 1500–1600 nm band, the reflectance change tends to level off, and then decreases significantly again at the end of the band. There is some overlap in the spectral curves between different samples, but subtle differences are still observed in some bands, indicating that the spectra contain effective information that can characterize differences in seed vigor. After SG smoothing, random noise is significantly reduced, the spectral curves are smoother and more continuous, and the overall trend and characteristic peak positions of the original spectra are well preserved. After further SNV preprocessing, the spectral differences between different samples caused by scattering effects and baseline drift are effectively corrected, the baselines of each spectral curve tend to be consistent, and the degree of overlap is further improved. This can better highlight the spectral characteristics caused by differences in chemical composition between samples, and provide more stable and reliable spectral data for the construction of subsequent transfer classification models.

[0057] 5. Develop a DPC-FS-PFCE model for seed vigor classification across multiple varieties. The specific calculation process is the same as step S3 in Example 1. Figure 3 The diagram shows the architecture of the DPC-FS-PFCE model. Based on the FS-PFCE-free model, this model constructs a classification objective function and multi-class weight direction consistency constraints to achieve effective transfer of classification knowledge between different rice seed vigor datasets. Specifically, the classification objective function integrates MPC and SPC, jointly constraining the global class probability distribution and local sample prediction probability distribution of the master and slave models; the multi-class weight direction consistency constraints maintain the class discrimination structure in the shared feature space, improving the model's transfer classification accuracy, stability, and robustness without requiring complex spectral calibration parameters.

[0058] 6. Classification accuracy and F1 score are used as performance evaluation metrics for the model. Classification accuracy is defined as the proportion of correctly predicted samples out of the total number of samples, and the calculation formula is as follows: , This represents the number of samples whose true class is positive and which are correctly predicted as positive by the model. This represents the number of samples whose true class is negative and which were correctly predicted as negative by the model. This represents the number of samples whose true class is negative but which were incorrectly predicted as positive by the model. This represents the number of samples whose true class is positive but which are incorrectly predicted as negative by the model.

[0059] The F1 score is the harmonic mean of precision and recall. It provides a comprehensive measure of a model's performance in classification tasks, and is calculated as follows: , To express precision as a measure of the proportion of samples that the model predicts to be positive but actually belong to the positive class, the formula is as follows: , Recall rate, which measures the proportion of true positive samples correctly identified by the model, is calculated using the following formula: .

[0060] 7. To verify the effectiveness of probability distribution consistency constraints in near-infrared hyperspectral transfer classification, “Chunyou 83” was selected as the master dataset and “Zhongzu 53” was selected as the slave dataset. The direct transfer of the master model, the slave model, and the DPC-FS-PFCE method proposed in this study were compared. The overall transfer classification performance index of different models on the slave dataset “Zhongzu 53” is shown in Table 2.

[0061] Table 2 As shown in Table 2, in the transfer model from the main dataset "Chunyou 83" to the secondary dataset "Zhongzu 53", the accuracy of the DPC-FS-PFCE method is 93.33%, which is the best performing model. It is 11.11% better than the accuracy of the main model's direct prediction of 82.22% and 8.89% better than the accuracy of the secondary model of 84.44%.

[0062] Example 3: 1. Steps 1-6 are the same as steps 1-6 in Example 2.

[0063] 2. Select “Chunyou 83” as the main dataset and “Zhongzao 39” as the secondary dataset. Compare the direct transfer from the main model, the secondary model, and the DPC-FS-PFCE method proposed in this study. The overall transfer classification performance index of different models on the secondary dataset “Zhongzao 39” is shown in Table 3.

[0064] Table 3 As shown in Table 3, in the transfer model from the main dataset "Chunyou 83" to the secondary dataset "Zhongzao 39", the accuracy of the DPC-FS-PFCE method is 88.89%, which is the best performing model. It is 13.33% higher than the accuracy of the main model's direct prediction of 75.56% and 11.11% higher than the accuracy of the secondary model of 77.78%.

[0065] Example 4: 1. Steps 1-6 are the same as steps 1-6 in Example 2.

[0066] 2. To verify the effectiveness of probability distribution consistency constraints in near-infrared hyperspectral transfer classification, “Chunyou 83” was selected as the master dataset, and a mixed dataset of “Zhongzu 53” and “Zhongzao 39” was selected, with a total of 300 samples as slave datasets. The direct transfer of the master model, the slave model, and the DPC-FS-PFCE method proposed in this study were compared. The overall transfer classification performance index of different models on the mixed slave datasets of different varieties is shown in Table 4.

[0067] Table 4 Example 5: 1. Steps 1-6 are the same as steps 1-6 in Example 2. 2. To analyze the applicability of different probability distribution consistency strategies in transfer classification, master models were built using 100%, 80%, and 60% of the master dataset, respectively. The classification performance of Mean-FS-PFCE, Sample-FS-PFCE, and DPC-FS-PFCE on different slave datasets was compared. The experimental results are shown in Table 5. Overall, the three probability distribution consistency strategies generally maintained good transfer classification performance under different master dataset proportions. However, as the proportions of the master and slave datasets changed, each strategy gradually exhibited different performance characteristics. A comprehensive analysis of the experimental results reveals that different probability distribution consistency strategies have their own applicable scenarios. Sample-FS-PFCE achieved higher classification accuracy on certain datasets, while DPC-FS-PFCE showed a more balanced overall performance.

[0068] Table 5 Figure 4 The performance curves of three probabilistic consistency strategies for transfer classification under different principal data ratios are presented. Overall, different spectral datasets show varying degrees of sensitivity to changes in the principal data ratio, but the performance fluctuation of DPC-FS-PFCE remains relatively small across all three datasets. For dataset 1-Zhongzu (… Figure 4In (a) of the dataset, as the proportion of master data increases, the classification accuracy of all three strategies improves and gradually converges; for dataset 2-Zhongzao (early 39), i.e., Dataset2-Zhongzao ( Figure 4 In (b) of the dataset, the overall changes in the three strategies are relatively small. In contrast, Dataset3-Mix (… Figure 4 In (c) of this study, due to the more complex category composition, the differences between different strategies are more pronounced. Specifically, Mean-FS-PFCE shows a continuous decline with changes in the proportion of master data, Sample-FS-PFCE fluctuates significantly, while DPC-FS-PFCE consistently maintains a high classification accuracy.

[0069] Based on Examples 2-5, it can be found that the DPC-FS-PFCE model performs better than other models in the transfer classification of the vitality of multiple rice varieties. At the same time, the study shows that the DPC-FS-PFCE model has the smallest overall change when the sample size of the master data gradually decreases, indicating that the fusion of global probability information and local probability information can effectively improve the model's adaptability to changes in the master data and enhance the stability and robustness of the spectral transfer classification process.

[0070] Example 6: This invention also provides a seed vigor migration classification system based on the consistency of a two-layer probability distribution, used to implement the method described in Embodiment 1, comprising: The data processing module is used to acquire raw near-infrared hyperspectral image data of rice seed samples using a near-infrared hyperspectral imaging system, and to preprocess the raw near-infrared hyperspectral image data to extract the spectral features of each rice seed sample.

[0071] The dataset partitioning module is used to divide spectral features into a main dataset and a secondary dataset according to rice variety.

[0072] The model training module is used to introduce the Softmax function, multi-class cross-entropy loss function, two-layer probability distribution consistency loss, and direction consistency constraint of multi-class weight vectors into the parameterless calibration enhancement model. It reconstructs the original parameterless calibration enhancement model for regression tasks into a two-layer probability distribution consistency-parameterless calibration enhancement model for classification. The two-layer probability distribution consistency-parameterless calibration enhancement model includes a master model and a slave model. The master model is trained using the source training set, and the slave model is trained using the target training set.

[0073] The transfer classification module is used to perform transfer classification of the vigor of target rice seeds based on a trained two-layer probability distribution consistency-parameter-free calibration enhancement model.

[0074] A further embodiment of the implementation includes a data processing module comprising: The black-and-white correction unit is used to perform black-and-white correction on the raw near-infrared hyperspectral image data using white and black reference images.

[0075] The spectral feature acquisition unit is used to separate the seed region from the background by masking the near-infrared hyperspectral image data after black and white correction, and to take the whole seed region as the region of interest, and calculate the average spectrum of all pixels in the region of interest as the spectral feature of the seed sample.

[0076] The spectral feature processing unit is used to sequentially perform Savitzky-Gory smoothing filtering and standard normal variable transformation on the extracted spectral features to obtain the final spectral features.

[0077] The above embodiments are merely descriptions of preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made by those skilled in the art to the technical solutions of the present invention without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.

Claims

1. A seed vigor migration classification method based on the consistency of two-layer probability distribution, characterized in that, include: Using a near-infrared hyperspectral imaging system, raw near-infrared hyperspectral image data of rice seed samples were acquired, and the raw near-infrared hyperspectral image data were preprocessed to extract the spectral features of each rice seed sample. According to rice varieties, the spectral features are divided into the main dataset and the secondary dataset; By introducing the Softmax function, multi-class cross-entropy loss function, two-layer probability distribution consistency loss, and directional consistency constraint of multi-class weight vectors into the parameterless calibration enhancement model, the original parameterless calibration enhancement model used for regression tasks is reconstructed into a two-layer probability distribution consistency-parameterless calibration enhancement model used for classification. The two-layer probability distribution consistency-parameterless calibration enhancement model includes a master model and a slave model. The master model is trained using the source training set, and the slave model is trained using the target training set. Based on the trained two-layer probability distribution consistency-parameter-free calibration enhancement model, the vigor of target rice seeds is classified by transfer.

2. The seed vigor migration classification method based on the consistency of two-layer probability distribution according to claim 1, characterized in that, The near-infrared hyperspectral imaging system includes: Near-infrared hyperspectral camera is used to capture the characteristics of rice seed samples in order to acquire raw near-infrared hyperspectral image data; The uniform light source system uses two sets of three-lamp arrays, with a total of six 35-watt halogen lamps, to provide light for the near-infrared hyperspectral camera. Sample placement platform for placing rice seed samples; A white calibration plate is used to acquire a white reference image for black and white correction processing; A computer is used to control the sample stage to acquire raw near-infrared hyperspectral image data using push-broom imaging. The spectral range of the near-infrared hyperspectral imaging system is 900-1700 nm.

3. The seed vigor migration classification method based on the consistency of two-layer probability distribution according to claim 2, characterized in that, The method for preprocessing the near-infrared hyperspectral image data includes: The raw near-infrared hyperspectral image data was black and white corrected using white and black reference images; The near-infrared hyperspectral image data after black and white correction is used to separate the seed region from the background through mask segmentation. The whole seed region is taken as the region of interest, and the average spectrum of all pixels in the region of interest is calculated as the spectral feature of the seed sample. The extracted spectral features were sequentially processed using Savitzky-Gore smoothing filtering and standard normal transformation to obtain the final spectral features.

4. The seed vigor migration classification method based on the consistency of two-layer probability distribution according to claim 1, characterized in that, In the aforementioned two-layer probability distribution consistency-parametric calibration enhancement model, to address the issues of class probability distribution shifts and inconsistencies in the discriminant feature spaces among different seed varieties, a joint constraint mechanism between the probability space and the feature discriminant space is constructed: The Softmax function is a classification output layer used to map the linear response output by the model to a class probability distribution; The multi-class cross-entropy loss function is used to adjust the model optimization objective from the prediction error of continuous variables to a measure of the difference between the class probability distribution and the true class label, based on the characteristics of seed vigor multi-class classification tasks, thereby realizing the optimization of the transfer model under classification tasks. The two-layer probability distribution consistency loss is used to address the problem of probability distribution differences between the prediction results of the master model and the slave model in multi-class transfer classification tasks. Based on the parameter-free calibration enhancement model transfer framework, the model output space is transformed into a class probability space, and the classification knowledge is preserved during the transfer process by jointly constraining the class probability statistical distribution and the sample prediction probability distribution. The direction consistency constraint of the multi-class weight vector is used to extend the parameter correlation constraint in the parameterless calibration enhancement model to the classification weight space according to the requirement of maintaining the category discrimination structure in the feature space in the multi-class transfer classification task. By constraining the direction consistency of the corresponding category weight vectors of the master model and the slave model, the category discrimination structure in the shared feature space is maintained, and the classification parameters of the master model are transferred to the slave model.

5. The seed vigor migration classification method based on the consistency of two-layer probability distribution according to claim 1, characterized in that, The two-layer probability distribution consistency loss includes the average probability distribution consistency loss and the sample probability distribution consistency loss, and the calculation formula is as follows: , in =0.75, For the consistency loss of the two-layer probability distribution, The loss is the consistency loss of the average probability distribution. The loss is the consistency of the sample probability distribution. The calculation process for the consistency loss of the average probability distribution is as follows: , in, This represents the consistency loss of the average probability distribution. The average of the class probability vectors of all samples in the main model. This is the average of the class probability vectors of all samples in the model; The number of categories for the classification task; Represents the number of samples in the main model. This represents the number of samples from the model; The process for calculating the consistency loss of the sample probability distribution is as follows: , in, For sample probability distribution consistency loss, This represents the number of corresponding samples used in the probability distribution consistency calculation. Main model The class prediction probability vector of each sample. To start from model number 1 The class prediction probability vector of each sample.

6. The seed vigor migration classification method based on the consistency of two-layer probability distribution according to claim 5, characterized in that, The directional consistency of the multi-class weight vector is calculated using the following formula: , , in, This represents the directional consistency of the multi-class weight vector. The main model parameter matrix, From the model parameter matrix; , ,in, To share the number of features, Main model Category 1 The weights corresponding to the features To start from model number 1 Category 1 The weights corresponding to the features This represents the consistency constraint function for the direction of multi-class weight vectors, where thres represents the preset similarity threshold.

7. A seed vigor migration classification system based on the consistency of a two-layer probability distribution, used to implement the seed vigor migration classification method based on the consistency of a two-layer probability distribution as described in any one of claims 1-6, characterized in that, include: The data processing module is used to acquire raw near-infrared hyperspectral image data of rice seed samples using a near-infrared hyperspectral imaging system, and to preprocess the raw near-infrared hyperspectral image data to extract the spectral features of each rice seed sample. The dataset partitioning module is used to divide spectral features into a main dataset and a secondary dataset according to rice variety; The model training module is used to introduce the Softmax function, multi-class cross-entropy loss function, two-layer probability distribution consistency loss, and direction consistency constraint of multi-class weight vectors into the parameterless calibration enhancement model, reconstructing the original parameterless calibration enhancement model for regression tasks into a two-layer probability distribution consistency-parameterless calibration enhancement model for classification. The two-layer probability distribution consistency-parameterless calibration enhancement model includes a master model and a slave model. The master model is trained using the source training set, and the slave model is trained using the target training set. The transfer classification module is used to perform transfer classification of the vigor of target rice seeds based on the trained two-layer probability distribution consistency-parameter-free calibration enhancement model.

8. The seed vigor migration classification system based on the consistency of two-layer probability distribution according to claim 7, wherein the data processing module comprises: The black and white correction unit is used to perform black and white correction on the original near-infrared hyperspectral image data using white reference images and black reference images; The spectral feature acquisition unit is used to separate the seed region from the background by mask segmentation of the near-infrared hyperspectral image data after black and white correction, and to take the whole seed region as the region of interest, and calculate the average spectrum of all pixels in the region of interest as the spectral feature of the seed sample. The spectral feature processing unit is used to sequentially perform Savitzky-Gory smoothing filtering and standard normal variable transformation on the extracted spectral features to obtain the final spectral features.