Seed vigor detection method and device based on hyperspectral imaging and storage medium

By using a seed vigor detection method based on hyperspectral imaging, and employing a cascaded model of convolutional neural network and LightGBM classifier, the spectral feature bands of seeds are extracted and the model is trained. This solves the problem of strong subjectivity in weight setting in seed vigor detection and achieves efficient and accurate seed vigor level identification.

CN121564541APending Publication Date: 2026-02-24YUXI ZHONGYAN SEED CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511695564.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-18
Publication Date
2026-02-24

AI Technical Summary

Technical Problem

In existing seed vigor testing, the weighting of multiple vigor indicators is highly subjective and the evaluation standards are inconsistent, resulting in low accuracy and poor repeatability of the test results.

Method used

By acquiring the original spectral data of the target seeds, extracting the target feature bands, and inputting them into the target model trained based on the comprehensive vigor score of the sample seeds and the preset vigor threshold, the seed vigor level identification result is output. The model is trained using a convolutional neural network and a LightGBM classifier cascade model.

Benefits of technology

This technology improves the accuracy and repeatability of seed vigor testing under non-destructive testing conditions, ensuring the objectivity and consistency of test results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121564541A_ABST
    Figure CN121564541A_ABST
Patent Text Reader

Abstract

The invention discloses a seed vigor detection method and device based on hyperspectral imaging and a storage medium. The method relates to the technical field of seed vigor detection, and comprises the following steps: acquiring original spectral data of a target seed to be detected; extracting a target characteristic wave band in the original spectrum data; the target characteristic wave band is input into a target model, and the target model is obtained through training based on the comprehensive activity score of the sample seed, the spectral data of the sample seed and a preset activity threshold value; the comprehensive vigor score of the sample seed is a score obtained based on the importance score of the M vigor indexes of the sample seed and the true value of the M vigor indexes of the sample seed; and outputting a seed vigor grade identification result of the target seed through the target model. According to the method and the device, the problems of low accuracy and poor repeatability of a detection result caused by high subjectivity of weight setting of multiple vigor indexes and inconsistent evaluation standards in seed vigor detection in related technologies are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of seed vigor detection technology, and more specifically, to a seed vigor detection method, apparatus, and storage medium based on hyperspectral imaging. Background Technology

[0002] Seed vigor is a core indicator for evaluating sowing quality, directly determining the emergence rate, uniformity, and final yield in the field. High-vigor seeds exhibit faster emergence and stronger resistance under adverse conditions, which is crucial for ensuring stable crop yields and reducing reseeding costs. In existing seed vigor testing systems, evaluation typically relies on the comprehensive measurement of multiple vigor indicators, such as germination rate, germination potential, electrical conductivity, and seedling length. While these indicators reflect seed vigor levels from different perspectives, in practical applications, the weighting of each indicator often depends on experience or subjective judgment, lacking a unified and objective standard. This leads to significant differences in evaluation results for the same sample from different laboratories or operators, resulting in poor comparability and repeatability. Furthermore, in existing technologies, traditional destructive testing methods render the seeds unsuitable for sowing after the measurement. While hyperspectral imaging technology can rapidly acquire seed spectral information, the lack of objective and unified vigor reference values ​​significantly limits its modeling effectiveness.

[0003] There is currently no effective solution to the problem that the weighting of multiple vigor indicators in seed vigor detection in related technologies is highly subjective and the evaluation standards are inconsistent, resulting in low accuracy and poor repeatability of the test results. Summary of the Invention

[0004] The main objective of this application is to provide a seed vigor detection method, device, and storage medium based on hyperspectral imaging, in order to solve the problems in related technologies where the weighting of multiple vigor indicators in seed vigor detection is highly subjective and the evaluation standards are inconsistent, resulting in low accuracy and poor repeatability of the detection results.

[0005] To achieve the above objectives, according to one aspect of this application, a seed vigor detection method based on hyperspectral imaging is provided. The method includes: acquiring raw spectral data of the target seed to be detected; extracting target feature bands from the raw spectral data; inputting the target feature bands into a target model, wherein the target model is a model trained based on the comprehensive vigor score of sample seeds, the spectral data of the sample seeds, and a preset vigor threshold; the sample seeds and the target seed are seeds of the same species; the comprehensive vigor score of the sample seeds is a score obtained based on the importance scores of M vigor indicators of the sample seeds and the true values ​​of the M vigor indicators of the sample seeds; the preset vigor threshold is a threshold determined based on the comprehensive vigor score of the sample seeds; and M is an integer greater than 1; and outputting the seed vigor level identification result of the target seed through the target model.

[0006] Optionally, the target model is trained through the following steps: determining the initial model; dividing the sample seeds into N groups, where N is an integer greater than 1; obtaining the true values ​​of the M vitality indicators for each group and the spectral data for each group; extracting the feature bands from the spectral data of each group; determining the comprehensive vitality score of each group based on the true values ​​of the M vitality indicators for each group; determining the seed vitality level of each group based on the comprehensive vitality score of each group and a preset vitality threshold; training the initial model based on the seed vitality level of each group and the feature bands from the spectral data of each group to obtain the target model.

[0007] Optionally, determining the overall vitality score for each group based on the true values ​​of the M vitality indicators for each group includes: determining the importance score of each vitality indicator based on the true values ​​of the M vitality indicators for each group; normalizing the importance score of each vitality indicator to determine the weight of each vitality indicator; and calculating the overall vitality score for each group based on the true values ​​of the M vitality indicators for each group and the weight of each vitality indicator.

[0008] Optionally, determining the importance score of each vitality indicator based on the true values ​​of the M vitality indicators for each group includes: assigning a vitality label to each group according to the preset vitality judgment rules and the true values ​​of the M vitality indicators for each group; inputting the true values ​​of the M vitality indicators for each group and the vitality label of each group into the random forest classification model; and outputting the importance score of each vitality indicator through the random forest classification model.

[0009] Optionally, the initial model includes an initial convolutional neural network and an initial classifier. The initial model is trained based on the seed vigor level of each group and the feature bands in the spectral data of each group to obtain the target model, which includes: training the initial convolutional neural network based on the feature bands in the spectral data of each group and the seed vigor level of each group to obtain a target convolutional neural network; extracting spectral feature data of the feature bands in the spectral data of each group through the target convolutional neural network to obtain spectral feature data of each group; training the initial classifier based on the spectral feature data of each group and the seed vigor level of each group to obtain a target classifier; and obtaining the target model based on the target convolutional neural network and the target classifier.

[0010] Optionally, after obtaining the original spectral data of the target seed to be detected, the method further includes: using a Savitzky-Golay filter to remove noise from the original spectral data to obtain preprocessed original spectral data.

[0011] Optionally, extracting target feature bands from the original spectral data includes: extracting target feature bands from the original spectral data using a non-information variable removal method.

[0012] According to another aspect of this application, a seed vigor detection device based on hyperspectral imaging is provided, comprising: an acquisition unit for acquiring raw spectral data of a target seed to be detected; an extraction unit for extracting target feature bands from the raw spectral data; an input unit for inputting the target feature bands into a target model, wherein the target model is a model trained based on the comprehensive vigor score of a sample seed, the spectral data of the sample seed, and a preset vigor threshold, the sample seed and the target seed are seeds of the same species, the comprehensive vigor score of the sample seed is a score obtained based on the importance scores of M vigor indicators of the sample seed and the true values ​​of the M vigor indicators of the sample seed, the preset vigor threshold is a threshold determined based on the comprehensive vigor score of the sample seed, and M is an integer greater than 1; and an output unit for outputting the seed vigor level identification result of the target seed through the target model.

[0013] Optionally, the target model in the input unit is trained through the following steps: a first determination subunit for determining the initial model; a division subunit for dividing the sample seeds into N groups, where N is an integer greater than 1; an acquisition subunit for acquiring the true values ​​of the M vitality indicators for each group and the spectral data for each group; a first extraction subunit for extracting the feature bands from the spectral data of each group; a second determination subunit for determining the comprehensive vitality score of each group based on the true values ​​of the M vitality indicators for each group; a third determination subunit for determining the seed vitality level of each group based on the comprehensive vitality score of each group and a preset vitality threshold; and a training subunit for training the initial model based on the seed vitality level of each group and the feature bands from the spectral data of each group to obtain the target model.

[0014] Optionally, the second determining subunit includes: a first determining module, used to determine the importance score of each vitality indicator based on the true values ​​of the M vitality indicators for each group; a second determining module, used to normalize the importance score of each vitality indicator and determine the weight of each vitality indicator; and a calculation module, used to calculate the comprehensive vitality score of each group based on the true values ​​of the M vitality indicators for each group and the weight of each vitality indicator.

[0015] Optionally, the first determining module includes: an assigning submodule, used to assign a vitality label to each group according to a preset vitality judgment rule and the true values ​​of the M vitality indicators of each group; an input submodule, used to input the true values ​​of the M vitality indicators of each group and the vitality label of each group into the random forest classification model; and an output submodule, used to output the importance score of each vitality indicator through the random forest classification model.

[0016] Optionally, the training subunit includes: a first training module for training the initial model, including an initial convolutional neural network and an initial classifier, based on the feature bands in the spectral data of each group and the seed vigor level of each group, to obtain a target convolutional neural network; an extraction module for extracting spectral feature data of the feature bands in the spectral data of each group through the target convolutional neural network, to obtain spectral feature data of each group; a second training module for training the initial classifier based on the spectral feature data of each group and the seed vigor level of each group, to obtain a target classifier; and a third determination module for obtaining a target model based on the target convolutional neural network and the target classifier.

[0017] Optionally, the device further includes a filtering unit, used to remove noise from the original spectral data after acquiring the original spectral data of the target seed to be detected using a Savitzky-Golay filter, so as to obtain preprocessed original spectral data.

[0018] Optionally, the extraction unit includes a second extraction subunit, used to extract target feature bands from the original spectral data using a non-information variable elimination method.

[0019] According to another aspect of this application, a computer-readable storage medium is also provided, wherein the computer-readable storage medium includes a stored executable program, wherein, when the executable program is running, it controls the device where the computer-readable storage medium is located to perform the above-described seed viability detection method based on hyperspectral imaging.

[0020] According to another aspect of this application, an electronic device is also provided, comprising: a memory storing an executable program; and a processor for running the program, wherein the program executes the above-described seed viability detection method based on hyperspectral imaging during runtime.

[0021] In this embodiment, the original spectral data of the target seed to be detected is acquired; target feature bands are extracted from the original spectral data; and the target feature bands are input into a target model. The target model is trained based on the comprehensive vigor score of the sample seed, the spectral data of the sample seed, and a preset vigor threshold. The sample seed and the target seed are seeds of the same species. The comprehensive vigor score of the sample seed is a score obtained based on the importance scores of M vigor indicators and the true values ​​of the M vigor indicators of the sample seed. The preset vigor threshold is a threshold determined based on the comprehensive vigor score of the sample seed, where M is an integer greater than 1. The target model outputs the seed vigor level identification result of the target seed, solving the technical problem in related technologies where the weighting of multiple vigor indicators in seed vigor detection is highly subjective and the evaluation standards are inconsistent, leading to low accuracy and poor repeatability of the detection results. In this application, by extracting the target feature bands from the original spectral data of the target seed to be detected and inputting the target feature bands into the trained target model, the target model outputs the seed vigor level identification result of the target seed. The target model is trained based on the comprehensive vigor score of the sample seed, the spectral data of the sample seed, and a preset vigor threshold, thereby achieving the technical effect of improving the accuracy of seed vigor detection. Attached Figure Description

[0022] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings: Figure 1 A hardware block diagram of a computer terminal for implementing a seed viability detection method based on hyperspectral imaging is shown. Figure 2 This is a flowchart of an optional seed viability detection method based on hyperspectral imaging according to an embodiment of this application; Figure 3 This is a schematic diagram of an optional seed viability detection device based on hyperspectral imaging, according to an embodiment of this application. Figure 4 A schematic diagram of an optional electronic device according to an embodiment of this application. Detailed Implementation

[0023] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0024] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0025] Example 1 According to an embodiment of this application, a method embodiment for seed viability detection based on hyperspectral imaging is also provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0026] The method embodiment provided in Embodiment 1 of this application can be executed on a mobile terminal, computer terminal, or similar computing device. Figure 1 A hardware block diagram of a computer terminal (or mobile device) for implementing a seed viability detection method based on hyperspectral imaging is shown. Figure 1 As shown, the computer terminal 10 (or mobile device) may include one or more processors 102 (shown as 102a, 102b, ..., 102n in the figure) 102 (processor 102 may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of a BUS bus), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0027] It should be noted that the aforementioned one or more processors 102 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10 (or mobile device). As involved in the embodiments of this application, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).

[0028] The memory 104 can be used to store software programs and modules for application software, such as the program instructions / data storage device corresponding to the seed viability detection method based on hyperspectral imaging in this embodiment. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby realizing the aforementioned seed viability detection method based on hyperspectral imaging. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0029] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.

[0030] The display may be, for example, a touchscreen liquid crystal display (LCD) that allows the user to interact with the user interface of the computer terminal 10 (or mobile device).

[0031] Under the aforementioned operating environment, this application provides the following: Figure 2 The method for seed viability detection based on hyperspectral imaging is shown. Figure 2 This is a flowchart of a seed viability detection method based on hyperspectral imaging according to Embodiment 1 of this application.

[0032] Step S201: Obtain the raw spectral data of the target seed to be detected.

[0033] Optionally, a batch of target seeds to be tested can be placed within the field of view of a hyperspectral imaging system to acquire raw spectral data of the target seeds, which can be reflectance spectra. By acquiring the raw spectral data of the target seeds to be tested, their surface physicochemical information can be obtained in one go without damaging the seeds. Furthermore, seeds with different vigor levels will produce weak but detectable differences in reflectance in the visible-near infrared region due to differences in cell wall integrity, enzyme activity, and fat content, providing a raw information source for subsequent detection of the vigor level of the target seeds.

[0034] Step S202: Extract the target feature bands from the original spectral data.

[0035] Optionally, extracting target feature bands from the original spectral data aims to retain the bands most relevant to seed vigor. By removing bands from the original spectral data that contribute little to seed vigor classification, the target model can focus on more important bands when detecting seed vigor, thereby improving detection accuracy.

[0036] Step S203: Input the target feature band into the target model. The target model is a model trained based on the comprehensive vigor score of the sample seeds, the spectral data of the sample seeds, and a preset vigor threshold. The sample seeds and the target seeds are seeds of the same species. The comprehensive vigor score of the sample seeds is a score obtained based on the importance scores of the M vigor indicators of the sample seeds and the true values ​​of the M vigor indicators of the sample seeds. The preset vigor threshold is a threshold determined based on the comprehensive vigor score of the sample seeds, where M is an integer greater than 1.

[0037] Optionally, the target model is a model trained based on the initial model and training samples. The training samples include the comprehensive vigor score of the sample seeds, the spectral data of the sample seeds, and the preset vigor threshold. The sample seeds and the target seeds are seeds of the same species, which can ensure that the spectral data and the distribution of seed physiological characteristics are consistent. For example, the target seed is a certain tobacco seed, and the sample seeds can be one or more tobacco seeds such as MS Yunyan 87 and Yunyan 99.

[0038] Optionally, the overall vigor score of the sample seeds is a score obtained based on the importance scores of the M vigor indicators of the sample seeds and the true values ​​of the M vigor indicators of the sample seeds. Vigor indicators can be germination potential (GP), root length (PRL), seedling height (SW), etc. For example, M=3, and the true values ​​of the 3 vigor indicators are GP=93.3%, PRL=1.49cm, and SW=0.58cm.

[0039] Optionally, the distribution of the overall vitality score of all training seeds can be divided by quantiles (e.g., the top 35%) to obtain a preset vitality threshold. Then, the sample seeds with an overall vitality score ≥ the preset vitality threshold are marked as high vitality, and the rest are low vitality.

[0040] Optionally, the initial model can be a cascaded model of convolutional neural network and LightGBM classifier. During the training phase of the target model, the characteristic bands of the spectral data of the sample seeds are used as input and the seed vigor level of the sample seeds is used as output. Hyperparameter optimization can be completed through grid search-cross-validation. The trained target model learns the mapping relationship from "characteristic bands → deep representation → vigor level", so as to achieve efficient and accurate identification of the seed vigor level of the target seeds under the conditions of no chemical reagents and no damage.

[0041] Step S204: Output the seed vigor level identification result of the target seed through the target model.

[0042] Optionally, the target model can output the seed level identification result of the target seed based on the feature information in the target feature band. The seed level identification result of the target seed can be either a high-activity seed or a low-activity seed, and the seed activity level identification result can also be either a high-activity seed, a medium-activity seed, or a low-activity seed.

[0043] The seed vigor detection method based on hyperspectral imaging provided in this application involves acquiring the original spectral data of the target seed to be detected; extracting the target feature bands from the original spectral data; and inputting the target feature bands into a target model. The target model is a model trained based on the comprehensive vigor score of the sample seed, the spectral data of the sample seed, and a preset vigor threshold. The sample seed and the target seed are seeds of the same species. The comprehensive vigor score of the sample seed is a score obtained based on the importance scores of M vigor indicators and the true values ​​of the M vigor indicators of the sample seed. The preset vigor threshold is a threshold determined based on the comprehensive vigor score of the sample seed, where M is an integer greater than 1. The target model outputs the seed vigor level identification result of the target seed. This solves the technical problem in related technologies where the weighting of multiple vigor indicators in seed vigor detection is highly subjective and the evaluation standards are inconsistent, leading to low accuracy and poor repeatability of the detection results. In this application, target feature bands are extracted from the original spectral data of the target seed to be detected, and the target feature bands are input into a trained target model. The target model outputs the seed vigor level identification result of the target seed. The target model is a model trained based on the comprehensive vigor score of the sample seed, the spectral data of the sample seed, and a preset vigor threshold, thereby achieving the technical effect of improving the accuracy of seed vigor detection.

[0044] Optionally, in the seed vigor detection method based on hyperspectral imaging provided in this application embodiment, the target model is trained through the following steps: The first step is to determine the initial model.

[0045] Optionally, the initial model is an untrained model. The initial model can be a cascaded model of a convolutional neural network and a LightGBM classifier. The convolutional kernel in the convolutional neural network slides along the wavelength dimension, which can automatically extract spectral feature data from the spectral data, such as the shape features of absorption peaks / valleys in the spectral data.

[0046] The second step is to divide the sample seeds into N groups, where N is an integer greater than 1.

[0047] Optionally, N groups can be obtained by subjecting the sample seeds to different fission treatments. For example, the sample seeds can be subjected to controlled deterioration treatment to accelerate aging. The initial moisture content of the sample seeds can be determined using a high-temperature oven method. The seed moisture content can be adjusted to 20%, and the seeds can be sealed in aluminum foil bags and equilibrated in a refrigerator at 4°C for 1 day. The aluminum foil bags can then be placed in an aging chamber and treated at (45±0.5)°C for 0h, 12h, 24h, 36h, 48h, 72h, and 96h, respectively, to obtain 7 deteriorated seeds with different treatment times, forming sample data covering the entire viability range. Then, 15 replicates of sample seeds at each deterioration time are set up, with 50 seeds in each replicate, resulting in 7*15=105 groups.

[0048] The third step is to obtain the true values ​​of the M vitality indicators for each group and the spectral data for each group.

[0049] For example, moist germination paper can be placed in a rectangular plastic box (30cm×40cm×4cm), and seeds can be placed inside. The germination temperature is set to (25±1)℃, and germination is carried out for 14 days in a 12h light / 12h dark environment. The germination progress of tobacco seeds is monitored daily, and seeds with a radicle length ≥2mm are considered to have germinated. On day 6, the germination potential and germination rate of each group of seeds are recorded. On day 14, the seedling germination rate, root length, and seedling height of each group of seeds are recorded. Four vigor indicators are measured for each group of seeds: germination potential (GP), germination rate (GE), root length (PRL), and seedling height (SW). The specific measurement methods are as follows: GP=N e / N t ×100% GE=N g / N t ×100% Where, N e N represents the number of seeds that germinated normally on day 6 of germination. g N represents the number of seeds that germinated normally on day 14 of germination. tThis represents the total number of seeds tested.

[0050] Seedling height: Lay the plant flat on a horizontal table and use a ruler to measure the longest distance from the base of the seedling to the tip of the longest leaf after it has extended. Repeat the measurement for 10 seedlings. Root length: Lay the plant flat on a horizontal table and use a ruler to measure the longest distance from the base of the root to the root tip after the longest root of the seedling extends. Repeat the measurement for 10 plants.

[0051] The fourth step is to extract the characteristic bands from the spectral data of each group.

[0052] Alternatively, a method of eliminating non-information variables can be used to extract characteristic bands from the spectral data of each group.

[0053] The fifth step is to determine the overall vitality score for each group based on the true values ​​of the M vitality indicators for each group.

[0054] Optionally, the importance score of each vitality indicator can be determined based on the true values ​​of the M vitality indicators for each group. Then, the importance score of each vitality indicator is normalized to determine its weight. Finally, the overall vitality score for each group can be calculated based on the true values ​​of the M vitality indicators and their respective weights.

[0055] The sixth step is to determine the seed vitality level of each group based on the comprehensive vitality score and the preset vitality threshold of each group.

[0056] Optionally, the distribution of the overall viability score of all sample seeds can be divided according to quantiles (e.g., the top 35%) to obtain a preset viability threshold (e.g., 0.8596). Then, the sample seeds with an overall viability score ≥ 0.8596 are marked as high viability, and the rest are low viability.

[0057] Step 7: Train the initial model based on the seed vigor level of each group and the characteristic bands in the spectral data of each group to obtain the target model.

[0058] Optionally, the initial model can be a cascaded model of convolutional neural network and LightGBM classifier. During the training phase of the target model, the characteristic bands of the spectral data of the sample seeds are used as input and the seed vigor level of the sample seeds is used as output. Hyperparameter optimization can be completed through grid search-cross-validation. The trained target model learns the mapping relationship from "characteristic bands → deep representation → vigor level", thereby achieving efficient and accurate identification of the seed vigor level of the target seeds under the conditions of no chemical reagents and no damage.

[0059] Optionally, in the seed vigor detection method based on hyperspectral imaging provided in this application embodiment, determining the comprehensive vigor score of each group based on the true values ​​of the M vigor indicators for each group includes: The first step is to determine the importance score of each vitality indicator based on the true values ​​of the M vitality indicators for each group.

[0060] For example, the true values ​​of the three vitality indicators for the three groups are: Group 1: GP=93.3%, SW=0.58, PRL=1.49; Group 2: GP=82.9%, SW=0.47, PRL=0.86; Group 3: GP=43.2%, SW=0.23, PRL=0.65; First, the vitality label of each group can be determined based on preset rules. The vitality label of each group and the true values ​​of the three vitality indicators of each group are input into the random forest classification model, and the importance score of each vitality indicator is output. For example, the importance scores of GP, SW and PRL are 0.0486, 0.0202 and 0.0122, respectively.

[0061] The second step is to normalize the importance score of each vitality indicator and determine the weight of each vitality indicator.

[0062] For example, the importance scores for GP, SW, and PRL are 0.0486, 0.0202, and 0.0122, respectively, totaling 0.0810. The weight of GP is approximately 0.60 (0.0486 / 0.0810), the weight of SW is approximately 0.25 (0.0202 / 0.0810), and the weight of PRL is approximately 0.15 (0.0122 / 0.0810).

[0063] The third step is to calculate the overall vitality score for each group based on the true values ​​of the M vitality indicators for each group and the weight of each vitality indicator.

[0064] For example, the overall vitality scores of the three groups are: 0.60×93.3%+0.25×0.58+0.15×1.49≈0.93, 0.60×82.9%+0.25×0.47+0.15×0.86≈0.74, and 0.60×43.2%+0.25×0.23+0.15×0.65≈0.41.

[0065] Optionally, in the seed vigor detection method based on hyperspectral imaging provided in this application embodiment, the importance score of each vigor index is determined according to the true values ​​of the M vigor indices for each group, including: The first step is to assign a vitality label to each group based on the preset vitality judgment rules and the actual values ​​of the M vitality indicators for each group.

[0066] For example, the true values ​​of the three vitality indicators for the three groups are: Group 1: GP=93.3%, SW=0.58, PRL=1.49; Group 2: GP=82.9%, SW=0.47, PRL=0.86; Group 3: GP=43.2%, SW=0.23, PRL=0.65; The preset vigor determination rule can be based on the germination rate on day 14 to determine the seed vigor of each group. If the germination rate on day 14 is ≥92%, it is considered high vigor; otherwise, it is low vigor. In this case, the first group is high vigor, and the second and third groups are low vigor. Each group can be assigned a vigor label: a hard label of 1 for high vigor and 0 for low vigor. Therefore, the first group is assigned a vigor label of 1, and the second and third groups are assigned a vigor label of 0.

[0067] The second step is to input the true values ​​of the M vitality indicators for each group and the vitality label for each group into the random forest classification model.

[0068] For example, input the following groups into a random forest classification model: Group 1: GP=93.3%, SW=0.58, PRL=1.49, vitality label=1; Group 2: GP=82.9%, SW=0.47, PRL=0.86, vitality label=0; Group 3: GP=43.2%, SW=0.23, PRL=0.65, vitality label=0.

[0069] The third step is to output the importance score of each vitality indicator through a random forest classification model.

[0070] For example, the importance scores of each vitality indicator are output through the random forest classification model. The importance scores of GP, SW and PRL are 0.0486, 0.0202 and 0.0122, respectively.

[0071] Optionally, in the seed vigor detection method based on hyperspectral imaging provided in this application embodiment, the initial model includes an initial convolutional neural network and an initial classifier. The initial model is trained according to the seed vigor level of each group and the feature bands in the spectral data of each group to obtain the target model, which includes: The first step is to train an initial convolutional neural network based on the characteristic bands in the spectral data of each group and the seed vitality level of each group, so as to obtain the target convolutional neural network.

[0072] Optionally, the training objective of the target convolutional neural network is to accurately extract spectral feature data from the feature bands by learning the feature bands in the spectral data of each group and the seed vigor level of each group. The target convolutional neural network can automatically capture absorption peaks, valleys, slopes and inter-band correlation patterns in the feature bands and output discriminative spectral feature data for subsequent classifiers to accurately identify seed vigor levels.

[0073] The second step is to extract the spectral feature data of the characteristic bands in the spectral data of each group through the target convolutional neural network, and obtain the spectral feature data of each group.

[0074] Optionally, the spectral feature data for each group is discriminative feature data, capable of more accurately determining the seed vigor level. The target convolutional neural network (CNN) does not examine a single band in isolation, but rather the synergistic relationships between bands. It can analyze the combination patterns of absorption features: identifying whether multiple specific absorption valleys appear simultaneously. For example, a combination of protein-related absorption valleys and starch-related absorption valleys in a specific pattern may indicate high vigor. The CNN can also understand the entire feature band as a whole; for example, the spectral curve of a high-vigor seed may be generally more "full" or have a specific contour than that of a low-vigor seed.

[0075] The third step is to train an initial classifier based on the spectral feature data of each group and the seed vigor level of each group, and then obtain the target classifier.

[0076] Optionally, the initial classifier can be a LightGBM classifier. The initial classifier is trained with the spectral feature data of each group and the seed vigor level of each group. The trained target classifier can determine the seed vigor level based on the spectral feature data of the seeds, and can accurately classify seed vigor without loss and with high efficiency.

[0077] The fourth step is to obtain the target model based on the target convolutional neural network and the target classifier.

[0078] Optionally, the target convolutional neural network is responsible for feature extraction, and the target classifier is responsible for the final decision. The target model is a cascaded model of the target convolutional neural network and the target classifier.

[0079] Optionally, in the seed vigor detection method based on hyperspectral imaging provided in the embodiments of this application, after obtaining the original spectral data of the target seed to be detected, the method further includes: using a Savitzky-Golay filter to remove noise from the original spectral data to obtain preprocessed original spectral data.

[0080] Optionally, the Savitzky-Golay (SG) filter is a linear smoothing denoising algorithm implemented using a polynomial sliding window fitting combined with least squares. The Savitzky-Golay filter treats the spectral points within the window as a local polynomial curve, calculates the coefficients of this curve using the least squares method, and then replaces the center point of the window with the value of this fitted curve. This suppresses high-frequency noise while preserving peak shape, valley shape, and slope information, making it less prone to peak clipping than simple moving averages. Using the Savitzky-Golay filter to remove high-frequency noise from the original spectral data can significantly improve the signal-to-noise ratio, preserve absorption peak shape and slope information, and improve the accuracy of subsequent feature extraction and activity classification.

[0081] Optionally, in the seed vigor detection method based on hyperspectral imaging provided in this application embodiment, extracting the target feature bands in the original spectral data includes: extracting the target feature bands in the original spectral data using a non-information variable elimination method.

[0082] Optionally, Uninformative Variable Elimination (UVE) is a chemometric band selection strategy. It involves performing partial least squares regression on each true wavelength variable against an equal number of random noise variables, comparing their stability values, and discarding bands with stability lower than the noise level. This retains bands truly useful for seed vigor determination. Eliminating bands with lower stability than the noise level using UVE yields target feature bands that are truly sensitive to seed vigor assessment, improving the accuracy of subsequent seed vigor determination.

[0083] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0084] Example 2 This application also provides a seed vigor detection device based on hyperspectral imaging. It should be noted that the seed vigor detection device based on hyperspectral imaging in this application can be used to execute the seed vigor detection method based on hyperspectral imaging provided in this application. The following describes the seed vigor detection device based on hyperspectral imaging provided in this application.

[0085] According to an embodiment of this application, an apparatus for implementing the above-described seed vigor detection method based on hyperspectral imaging is also provided, such as... Figure 3 As shown, the device includes: an acquisition unit 301, an extraction unit 302, an input unit 303, and an output unit 304.

[0086] Specifically, the acquisition unit 301 is used to acquire the original spectral data of the target seed to be detected; Extraction unit 302 is used to extract target feature bands from the original spectral data; Input unit 303 is used to input the target feature band into the target model, wherein the target model is a model trained based on the comprehensive vigor score of the sample seeds, the spectral data of the sample seeds and a preset vigor threshold. The sample seeds and the target seeds are seeds of the same species. The comprehensive vigor score of the sample seeds is a score obtained based on the importance scores of the M vigor indicators of the sample seeds and the true values ​​of the M vigor indicators of the sample seeds. The preset vigor threshold is a threshold determined based on the comprehensive vigor score of the sample seeds, where M is an integer greater than 1. Output unit 304 is used to output the seed vigor level identification result of the target seed through the target model.

[0087] The seed vigor detection device based on hyperspectral imaging provided in this application embodiment acquires the original spectral data of the target seed to be detected through an acquisition unit 301; an extraction unit 302 extracts the target feature bands from the original spectral data; an input unit 303 inputs the target feature bands into a target model, wherein the target model is a model trained based on the comprehensive vigor score of the sample seed, the spectral data of the sample seed, and a preset vigor threshold. The sample seed and the target seed are seeds of the same species. The comprehensive vigor score of the sample seed is a score obtained based on the importance scores of M vigor indicators of the sample seed and the true values ​​of the M vigor indicators of the sample seed. The preset vigor threshold is a threshold determined based on the comprehensive vigor score of the sample seed, where M is an integer greater than 1; and an output unit 304 outputs the seed vigor level identification result of the target seed through the target model. This solves the problem in related technologies where the weight setting of multiple vigor indicators in seed vigor detection is highly subjective and the evaluation standards are inconsistent, resulting in low accuracy and poor repeatability of the detection results. This achieves the technical effect of improving the accuracy of seed vigor detection.

[0088] Optionally, in the seed vigor detection device based on hyperspectral imaging provided in this application embodiment, the target model in the input unit 303 is trained through the following steps: a first determination subunit, used to determine the initial model; a division subunit, used to divide the sample seeds into N groups, where N is an integer greater than 1; an acquisition subunit, used to acquire the true values ​​of M vigor indicators for each group and the spectral data of each group; a first extraction subunit, used to extract the feature bands in the spectral data of each group; a second determination subunit, used to determine the comprehensive vigor score of each group based on the true values ​​of the M vigor indicators for each group; a third determination subunit, used to determine the seed vigor level of each group based on the comprehensive vigor score of each group and a preset vigor threshold; and a training subunit, used to train the initial model based on the seed vigor level of each group and the feature bands in the spectral data of each group to obtain the target model.

[0089] Optionally, in the seed vigor detection device based on hyperspectral imaging provided in this application embodiment, the second determining subunit includes: a first determining module, used to determine the importance score of each vigor indicator based on the true values ​​of the M vigor indicators for each group; a second determining module, used to normalize the importance score of each vigor indicator and determine the weight of each vigor indicator; and a calculation module, used to calculate the comprehensive vigor score of each group based on the true values ​​of the M vigor indicators for each group and the weight of each vigor indicator. Optionally, in the seed vigor detection device based on hyperspectral imaging provided in this application embodiment, the first determining module includes: an assigning submodule, used to assign a vigor label to each group according to a preset vigor judgment rule and the true values ​​of the M vigor indicators for each group; an input submodule, used to input the true values ​​of the M vigor indicators for each group and the vigor label of each group into a random forest classification model; and an output submodule, used to output the importance score of each vigor indicator through the random forest classification model.

[0090] Optionally, in the seed vigor detection device based on hyperspectral imaging provided in this application embodiment, the training subunit includes: a first training module, used to train the initial model including an initial convolutional neural network and an initial classifier, based on the feature bands in the spectral data of each group and the seed vigor level of each group, to obtain a target convolutional neural network; an extraction module, used to extract the spectral feature data of the feature bands in the spectral data of each group through the target convolutional neural network, to obtain the spectral feature data of each group; a second training module, used to train the initial classifier based on the spectral feature data of each group and the seed vigor level of each group, to obtain a target classifier; and a third determination module, used to obtain a target model based on the target convolutional neural network and the target classifier.

[0091] Optionally, in the seed vigor detection device based on hyperspectral imaging provided in this application embodiment, the device further includes: a filtering unit, used to remove noise from the original spectral data after acquiring the original spectral data of the target seed to be detected using a Savitzky-Golay filter to obtain preprocessed original spectral data.

[0092] Optionally, in the seed vigor detection device based on hyperspectral imaging provided in this application embodiment, the extraction unit includes: a second extraction subunit, used to extract the target feature bands in the original spectral data using a non-information variable elimination method.

[0093] It should be noted that the acquisition unit 301, extraction unit 302, input unit 303, and output unit 304 mentioned above correspond to steps S201 to S204 in Embodiment 1. The four units and the corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in Embodiment 1. It should be noted that the above modules or units can be hardware or software components stored in memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n). The above modules can also be part of a device and run in the computer terminal 10 provided in Embodiment 1.

[0094] Example 3 Embodiments of this application may provide a computer terminal, which may be any computer terminal device in a group of computer terminals. Optionally, in this embodiment, the aforementioned computer terminal may also be replaced with a mobile terminal or an electronic device, etc.

[0095] Optionally, in this embodiment, the computer terminal may be located in at least one of a plurality of network devices in a computer network.

[0096] In this embodiment, the computer terminal described above can execute the program code for the following steps in the seed vigor detection method based on hyperspectral imaging: acquiring the original spectral data of the target seed to be detected; extracting the target feature bands from the original spectral data; inputting the target feature bands into the target model, wherein the target model is a model trained based on the comprehensive vigor score of the sample seed, the spectral data of the sample seed, and a preset vigor threshold, the sample seed and the target seed are seeds of the same species, the comprehensive vigor score of the sample seed is a score obtained based on the importance scores of the M vigor indicators of the sample seed and the true values ​​of the M vigor indicators of the sample seed, the preset vigor threshold is a threshold determined based on the comprehensive vigor score of the sample seed, and M is an integer greater than 1; and outputting the seed vigor level identification result of the target seed through the target model.

[0097] Optionally, the aforementioned computer terminal can execute the program code for the following steps in the seed vigor detection method based on hyperspectral imaging: The target model is trained through the following steps: determining the initial model; dividing the sample seeds into N groups, where N is an integer greater than 1; obtaining the true values ​​of the M vigor indices for each group and the spectral data for each group; extracting the characteristic bands from the spectral data of each group; determining the comprehensive vigor score for each group based on the true values ​​of the M vigor indices for each group; determining the seed vigor level for each group based on the comprehensive vigor score and a preset vigor threshold; training the initial model based on the seed vigor level for each group and the characteristic bands from the spectral data of each group to obtain the target model.

[0098] Optionally, the aforementioned computer terminal can execute program code for the following steps in the seed vigor detection method based on hyperspectral imaging: determining the comprehensive vigor score of each group based on the true values ​​of the M vigor indicators for each group includes: determining the importance score of each vigor indicator based on the true values ​​of the M vigor indicators for each group; normalizing the importance score of each vigor indicator to determine the weight of each vigor indicator; and calculating the comprehensive vigor score of each group based on the true values ​​of the M vigor indicators for each group and the weight of each vigor indicator.

[0099] Optionally, the aforementioned computer terminal can execute the program code for the following steps in the seed vigor detection method based on hyperspectral imaging: determining the importance score of each vigor indicator based on the true values ​​of the M vigor indicators for each group, including: assigning a vigor label to each group according to the preset vigor judgment rules and the true values ​​of the M vigor indicators for each group; inputting the true values ​​of the M vigor indicators for each group and the vigor label of each group into the random forest classification model; and outputting the importance score of each vigor indicator through the random forest classification model.

[0100] Optionally, the aforementioned computer terminal can execute program code for the following steps in the seed vigor detection method based on hyperspectral imaging: The initial model includes an initial convolutional neural network and an initial classifier. Training the initial model based on the seed vigor level of each group and the feature bands in the spectral data of each group to obtain the target model includes: training the initial convolutional neural network based on the feature bands in the spectral data of each group and the seed vigor level of each group to obtain a target convolutional neural network; extracting spectral feature data of the feature bands in the spectral data of each group through the target convolutional neural network to obtain spectral feature data of each group; training the initial classifier based on the spectral feature data of each group and the seed vigor level of each group to obtain a target classifier; and obtaining the target model based on the target convolutional neural network and the target classifier.

[0101] Optionally, the aforementioned computer terminal can execute program code for the following steps in the seed vigor detection method based on hyperspectral imaging: after acquiring the original spectral data of the target seed to be detected, the method includes: using a Savitzky-Golay filter to remove noise from the original spectral data to obtain preprocessed original spectral data.

[0102] Optionally, the computer terminal described above can execute program code for the following steps in the seed vigor detection method based on hyperspectral imaging: extracting target feature bands from the original spectral data, including: extracting target feature bands from the original spectral data using a non-information variable elimination method.

[0103] Optionally, Figure 4 This is a structural block diagram of an electronic device according to an embodiment of this application. Figure 4 As shown, the electronic device may include: one or more ( Figure 4 (Only one is shown) Processor 402, memory 404, memory controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.

[0104] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the seed viability detection method and device based on hyperspectral imaging in this application embodiment. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby realizing the aforementioned seed viability detection method based on hyperspectral imaging. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0105] The processor can access the information and application programs stored in the memory via the transmission device to execute the steps described above in the seed viability detection method based on hyperspectral imaging.

[0106] This application provides a solution for seed vigor detection based on hyperspectral imaging. The method involves acquiring the raw spectral data of the target seed; extracting target feature bands from the raw spectral data; and inputting these target feature bands into a target model. The target model is trained based on the comprehensive vigor score of sample seeds, the spectral data of the sample seeds, and a preset vigor threshold. The sample seeds and the target seed are from the same species. The comprehensive vigor score of the sample seeds is obtained based on the importance scores of M vigor indicators and the true values ​​of the M vigor indicators. The preset vigor threshold is a threshold determined based on the comprehensive vigor score of the sample seeds, where M is an integer greater than 1. The target model outputs the seed vigor level identification result of the target seed. This solution addresses the technical problems in related technologies where the weighting of multiple vigor indicators in seed vigor detection is highly subjective and the evaluation standards are inconsistent, leading to low accuracy and poor repeatability. This method improves the accuracy of seed vigor detection.

[0107] Those skilled in the art will understand that Figure 4 The structure shown is for illustrative purposes only; the electronic device can also be a smartphone, tablet, or other terminal device. Figure 4 This does not limit the structure of the aforementioned electronic device. For example, electronic devices may also include components that are more... Figure 4 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 4 The different configurations shown.

[0108] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0109] Example 4 Embodiments of this application also provide a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the seed vigor detection method based on hyperspectral imaging provided in Embodiment 1.

[0110] Optionally, in this embodiment, the storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals.

[0111] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: acquiring the original spectral data of the target seed to be detected; extracting the target feature bands from the original spectral data; inputting the target feature bands into a target model, wherein the target model is a model trained based on the comprehensive vigor score of the sample seed, the spectral data of the sample seed, and a preset vigor threshold, the sample seed and the target seed are seeds of the same species, the comprehensive vigor score of the sample seed is a score obtained based on the importance scores of the M vigor indicators of the sample seed and the true values ​​of the M vigor indicators of the sample seed, the preset vigor threshold is a threshold determined based on the comprehensive vigor score of the sample seed, and M is an integer greater than 1; and outputting the seed vigor level identification result of the target seed through the target model.

[0112] Optionally, the storage medium is also configured to store program code for performing the following steps: the target model is trained through the following steps: determining an initial model; dividing the sample seeds into N groups, where N is an integer greater than 1; obtaining the true values ​​of the M vitality indicators for each group and the spectral data of each group; extracting the feature bands from the spectral data of each group; determining the comprehensive vitality score of each group based on the true values ​​of the M vitality indicators for each group; determining the seed vitality level of each group based on the comprehensive vitality score of each group and a preset vitality threshold; training the initial model based on the seed vitality level of each group and the feature bands from the spectral data of each group to obtain the target model.

[0113] Optionally, the storage medium is also configured to store program code for performing the following steps: determining the overall vitality score of each group based on the true values ​​of the M vitality indicators for each group includes: determining the importance score of each vitality indicator based on the true values ​​of the M vitality indicators for each group; normalizing the importance score of each vitality indicator to determine the weight of each vitality indicator; and calculating the overall vitality score of each group based on the true values ​​of the M vitality indicators for each group and the weight of each vitality indicator.

[0114] Optionally, the storage medium is also configured to store program code for performing the following steps: determining the importance score of each vitality indicator based on the true values ​​of the M vitality indicators for each group, including: assigning a vitality label to each group according to a preset vitality judgment rule and the true values ​​of the M vitality indicators for each group; inputting the true values ​​of the M vitality indicators for each group and the vitality label of each group into a random forest classification model; and outputting the importance score of each vitality indicator through the random forest classification model.

[0115] Optionally, the storage medium is also configured to store program code for performing the following steps: the initial model includes an initial convolutional neural network and an initial classifier; training the initial model based on the seed vigor level of each group and the feature bands in the spectral data of each group to obtain the target model includes: training the initial convolutional neural network based on the feature bands in the spectral data of each group and the seed vigor level of each group to obtain a target convolutional neural network; extracting spectral feature data of the feature bands in the spectral data of each group through the target convolutional neural network to obtain spectral feature data of each group; training the initial classifier based on the spectral feature data of each group and the seed vigor level of each group to obtain a target classifier; and obtaining the target model based on the target convolutional neural network and the target classifier.

[0116] Optionally, the storage medium is also configured to store program code for performing the following steps: after acquiring the raw spectral data of the target seed to be detected, the method includes: using a Savitzky-Golay filter to remove noise from the raw spectral data to obtain preprocessed raw spectral data.

[0117] Optionally, the storage medium is also configured to store program code for performing the following steps: extracting target feature bands from the raw spectral data, including: extracting target feature bands from the raw spectral data using a non-information variable elimination method.

[0118] Optionally, in the seed vigor detection method based on hyperspectral imaging provided in the embodiments of this application, this application also provides a computer program product, which, when executed on a data processing device, is a program suitable for executing the steps of the seed vigor detection method based on hyperspectral imaging.

[0119] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0120] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0121] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of units or modules may be electrical or other forms.

[0122] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0123] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0124] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0125] The above are merely preferred embodiments of this application. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for detecting crop seed vigor based on hyperspectral imaging, characterized in that, include: Obtain the raw spectral data of the target seed to be detected; Extract the target feature bands from the original spectral data; The target feature band is input into the target model, wherein the target model is a model trained based on the comprehensive vigor score of the sample seeds, the spectral data of the sample seeds, and a preset vigor threshold. The sample seeds and the target seeds are seeds of the same species. The comprehensive vigor score of the sample seeds is a score obtained based on the importance scores of M vigor indicators of the sample seeds and the true values ​​of the M vigor indicators of the sample seeds. The preset vigor threshold is a threshold determined based on the comprehensive vigor score of the sample seeds, where M is an integer greater than 1. The target model outputs the seed vigor level identification result of the target seed.

2. The method according to claim 1, characterized in that, The target model is trained through the following steps: Determine the initial model; The sample seeds are divided into N groups, where N is an integer greater than 1; Obtain the true values ​​of the M vitality indicators for each group and the spectral data for each group; Extract the characteristic bands from the spectral data of each group; The overall vitality score for each group is determined based on the true values ​​of the M vitality indicators for each group; The seed vitality level of each group is determined based on the overall vitality score of each group and the preset vitality threshold. The initial model is trained based on the seed vigor level of each group and the characteristic bands in the spectral data of each group to obtain the target model.

3. The method according to claim 2, characterized in that, The overall vitality score for each group is determined based on the true values ​​of the M vitality indicators for each group, including: Based on the true values ​​of the M vitality indicators for each group, determine the importance score of each vitality indicator; The importance scores of each vitality indicator are normalized to determine the weight of each vitality indicator. The overall vitality score for each group is calculated based on the true values ​​of the M vitality indicators for each group and the weight of each vitality indicator.

4. The method according to claim 3, characterized in that, Based on the true values ​​of the M vitality indicators for each group, the importance score for each vitality indicator is determined as follows: Based on the preset vitality judgment rules and the actual values ​​of the M vitality indicators for each group, assign a vitality label to each group; Input the true values ​​of the M vitality indicators for each group and the vitality label for each group into the random forest classification model; The importance score for each vitality indicator is output through the random forest classification model.

5. The method according to claim 2, characterized in that, The initial model includes an initial convolutional neural network and an initial classifier. The initial model is trained based on the seed vigor level of each group and the characteristic bands in the spectral data of each group to obtain the target model, which includes: The initial convolutional neural network is trained based on the characteristic bands in the spectral data of each group and the seed vitality level of each group to obtain the target convolutional neural network; The spectral feature data of each group is obtained by extracting the spectral feature data of the characteristic bands in the spectral data of each group through the target convolutional neural network. The initial classifier is trained based on the spectral feature data of each group and the seed vigor level of each group to obtain the target classifier; The target model is obtained based on the target convolutional neural network and the target classifier.

6. The method according to claim 1, characterized in that, After acquiring the raw spectral data of the target seed to be detected, the method includes: The noise in the original spectral data is removed by using a Savitzky-Golay filter to obtain the preprocessed original spectral data.

7. The method according to claim 1, characterized in that, Extracting the target feature bands from the original spectral data includes: The target feature bands in the original spectral data are extracted using the method of eliminating non-information variables.

8. A seed vigor detection device based on hyperspectral imaging, characterized in that, include: The acquisition unit is used to acquire the raw spectral data of the target seed to be detected; Extraction unit, used to extract target feature bands from the original spectral data; The input unit is used to input the target feature band into the target model, wherein the target model is a model trained based on the comprehensive vigor score of the sample seeds, the spectral data of the sample seeds, and a preset vigor threshold. The sample seeds and the target seeds are seeds of the same species. The comprehensive vigor score of the sample seeds is a score obtained based on the importance scores of M vigor indicators of the sample seeds and the true values ​​of the M vigor indicators of the sample seeds. The preset vigor threshold is a threshold determined based on the comprehensive vigor score of the sample seeds, where M is an integer greater than 1. The output unit is used to output the seed vigor level identification result of the target seed through the target model.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored executable program, wherein, when the executable program is executed, it controls the device on which the computer-readable storage medium is located to perform the seed viability detection method based on hyperspectral imaging as described in any one of claims 1 to 7.

10. An electronic device, characterized in that, include: Memory, which stores executable programs; A processor for running the program, wherein the program executes the seed viability detection method based on hyperspectral imaging as described in any one of claims 1 to 7.