Maize germplasm resource vitality cross-germplasm discrimination method, system, device and medium
By segmenting and extracting features from hyperspectral images of maize seeds using a bi-branch spectral Transformer model and a moving inverted bottleneck UNet model, the problem of insufficient accuracy and stability in cross-germplasm maize seed viability determination is solved, achieving efficient and accurate seed quality detection.
Patent Information
- Application Number
- CN202510760259.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-09
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2045-06-09
AI Technical Summary
Existing technologies lack accuracy and stability in determining the viability of maize seeds across germplasms. Traditional algorithms fail to fully explore the potential connections and differences between varieties, resulting in low computational efficiency of the discrimination model and making it difficult to meet the needs of rapid detection.
A bi-branch spectral Transformer model and a moving inverted bottleneck UNet model were used to segment and extract features from hyperspectral images of maize seeds, respectively. Hyperspectral data were combined for preprocessing and feature selection to construct a cross-germplasm viability detection model, which was then used to make discrimination based on the feature patterns of the embryo and endosperm regions.
It significantly improves the accuracy and reliability of viability assessment for maize germplasm resources across germplasm, enabling a deeper exploration of seed intrinsic information and providing strong technical support for seed quality testing in agricultural production.
Smart Images

Figure CN120651770B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of maize viability determination technology, and in particular to a method, system, device and medium for cross-germplasm determination of maize germplasm resource viability. Background Technology
[0002] Hyperspectral imaging technology can acquire continuous-band spectral information of seeds, including their chemical composition, structure, and other characteristics, and is a commonly used method for non-destructive testing of seed viability. However, due to differences in genetic background, chemical composition, and other factors, different varieties of maize seeds exhibit significant differences in their spectral characteristics, posing a challenge to the accurate determination of seed viability across germplasms.
[0003] Currently, most traditional algorithms fail to fully explore the potential connections and differences between maize seed varieties when processing data on different varieties. Their ability to integrate key information such as seed spectral characteristics is also insufficient, resulting in poor accuracy and stability of the discrimination models. Faced with a large volume of diverse seed data, these algorithms have low computational efficiency and struggle to meet the demands of rapid detection in actual production. Summary of the Invention
[0004] The technical problem to be solved by this invention is to address the shortcomings of existing technologies. Specifically, it provides a method, system, device, and medium for cross-germplasm identification of maize germplasm resource viability, as detailed below:
[0005] 1) In a first aspect, the present invention provides a method for cross-germplasm discrimination of maize germplasm resource viability, the specific technical solution of which is as follows:
[0006] Obtain hyperspectral images of each maize seed sample in the sample maize germplasm resources, and obtain viability tag data of each maize seed sample in the sample maize germplasm resources;
[0007] Threshold segmentation was performed on the hyperspectral image of each sample of maize seed to obtain the hyperspectral image of each sample of maize seed after background removal. Then, region segmentation was performed on the hyperspectral image of each sample of maize seed after background removal to determine the hyperspectral image of the embryo region and the hyperspectral image of the endosperm region.
[0008] Based on the hyperspectral images of the embryo region and the endosperm region, hyperspectral data of the embryo region and the endosperm region were obtained.
[0009] The hyperspectral data of each sample of corn seeds were obtained from the background-removed hyperspectral image of each sample of corn seeds.
[0010] Preprocess each hyperspectral data point;
[0011] Feature selection was performed on each preprocessed hyperspectral data, and the constructed bi-branch spectral Transformer maize germplasm cross-germplasm viability detection model was trained by combining the viability label data of each sample maize seed.
[0012] Using a trained dual-branch spectral Transformer maize germplasm cross-germplasm viability detection model, cross-germplasm maize samples were identified, and the viability prediction results of cross-germplasm maize samples were obtained.
[0013] The beneficial effects of the cross-germplasm discrimination method for maize germplasm resources provided by this invention are as follows:
[0014] In the process of determining the viability of maize seeds, different parts of the seed contribute differently to seed viability. For example, the endosperm, as the main source of nutrients during seed germination, directly affects whether the seed can germinate normally. This invention can fully utilize pre-processed hyperspectral data from different parts of maize seeds to train a bi-branched spectral Transformer maize germplasm cross-germplasm viability detection model. This allows the trained bi-branched spectral Transformer maize germplasm cross-germplasm viability detection model to accurately capture the characteristic patterns of maize seeds of different varieties under viability states, effectively solving the problems of low accuracy and poor stability of traditional cross-germplasm algorithms. In practical applications, by comparing the characteristics of the segmented embryo region, endosperm region, and the entire seed region, this invention can more deeply explore the intrinsic information of maize germplasm resource viability, significantly improving the accuracy and reliability of cross-germplasm maize germplasm resource viability determination, and providing strong technical support for seed quality testing in agricultural production.
[0015] Based on the above scheme, the method for cross-germplasm identification of maize germplasm resource viability of the present invention can be further improved as follows.
[0016] Furthermore, the hyperspectral images of each sample maize seed after background removal were segmented to determine the hyperspectral images of the embryo region and the endosperm region, including:
[0017] By manually annotating, the boundaries of the embryo region and the endosperm region in the hyperspectral images of multiple maize seeds were annotated to obtain embryo annotation data and endosperm annotation data.
[0018] Using hyperspectral images of multiple maize seeds, combined with embryo and endosperm annotation data, the constructed mobile inverted bottleneck UNet germplasm hyperspectral image segmentation model was trained.
[0019] Using the trained mobile inverted bottleneck UNet germplasm hyperspectral image segmentation model, the hyperspectral image of each sample of maize seed after background removal is segmented to determine the hyperspectral image of the embryo region and the hyperspectral image of the endosperm region.
[0020] The beneficial effects of adopting the above-mentioned further scheme are as follows: Existing hyperspectral detection methods often do not fully consider the feature differences of different parts of the seed. On the one hand, they ignore the feature differences of different parts of the seed and use the average analysis method of all pixels in the seed region, which weakens important feature information. Moreover, traditional image segmentation is inaccurate for segmenting irregular corn seeds, which easily leads to omission or incorrect division of segmented areas, resulting in deviations in feature analysis based on segmentation results and failing to provide a reliable basis for viability determination. However, this application can accurately determine the hyperspectral images of the embryo region and the endosperm region through the moving inverted bottleneck UNet germplasm hyperspectral image segmentation model, providing a reliable basis for viability determination.
[0021] Furthermore, each hyperspectral data point undergoes preprocessing, including:
[0022] Each hyperspectral data point undergoes noise reduction, baseline drift correction, light scattering correction, and data scaling.
[0023] Furthermore, the dual-branch spectral Transformer maize germplasm cross-germplasm viability detection model includes: a multi-scale CNN module, a Transformer module, a multi-level feature fusion attention module, and a linear classification module. The multi-scale CNN module calculates local features for each preprocessed hyperspectral data point, the Transformer module calculates global features for each preprocessed hyperspectral data point, the multi-level feature fusion attention module maps local and global features into multiple feature maps of consistent dimension, assigns attention score weights to each feature map through activation function layers, and fuses all feature maps based on the assigned attention score weights to obtain multi-level global-local fused features. The linear classification module sequentially performs global average pooling and linear layer operations on the multi-level global-local fused features to obtain the viability prediction result.
[0024] Furthermore, hyperspectral images of each maize seed sample in the sample maize germplasm resource were obtained, and viability tag data of each maize seed sample in the sample maize germplasm resource were obtained, including:
[0025] Hyperspectral imaging devices were used to acquire hyperspectral images of each maize seed in the sample maize germplasm resources, and viability tag data of each maize seed in the sample maize germplasm resources were obtained through germination experiments.
[0026] 2) Secondly, the present invention also provides a cross-germplasm discrimination system for maize germplasm resource viability, the specific technical solution of which is as follows:
[0027] It includes an acquisition module, a segmentation module, a hyperspectral data acquisition module, a preprocessing module, a model training module, and a discrimination module;
[0028] The acquisition module is used to: acquire hyperspectral images of each sample maize seed in the sample maize germplasm resources, and obtain viability tag data of each sample maize seed in the sample maize germplasm resources;
[0029] The segmentation module is used to: perform threshold segmentation on the hyperspectral image of each sample of maize seed to obtain the hyperspectral image of each sample of maize seed after removing the background, and perform region segmentation on the hyperspectral image of each sample of maize seed after removing the background to determine the hyperspectral image of the embryo region and the hyperspectral image of the endosperm region.
[0030] The hyperspectral data acquisition module is used to: obtain hyperspectral data of the embryo region and hyperspectral data of the endosperm region based on the hyperspectral images of the embryo region and the endosperm region;
[0031] The hyperspectral data acquisition module is also used to: obtain the hyperspectral data of each sample of corn seeds from the background-removed hyperspectral image of each sample of corn seeds;
[0032] The preprocessing module is used to preprocess each hyperspectral data point.
[0033] The model training module is used to: perform feature selection on each preprocessed hyperspectral data, and train the constructed dual-branch spectral Transformer maize germplasm cross-germplasm viability detection model by combining the viability label data of each sample maize seed;
[0034] The discrimination module is used to: use the trained dual-branch spectral Transformer maize germplasm cross-germplasm viability detection model to discriminate cross-germplasm maize and obtain the viability prediction results of cross-germplasm maize maize.
[0035] Based on the above scheme, the maize germplasm resource viability cross-germplasm discrimination system of the present invention can be further improved as follows.
[0036] Furthermore, the segmentation module is specifically used for:
[0037] By manually annotating, the boundaries of the embryo region and the endosperm region in the hyperspectral images of multiple maize seeds were annotated to obtain embryo annotation data and endosperm annotation data.
[0038] Using hyperspectral images of multiple maize seeds, combined with embryo and endosperm annotation data, the constructed mobile inverted bottleneck UNet germplasm hyperspectral image segmentation model was trained.
[0039] Using the trained mobile inverted bottleneck UNet germplasm hyperspectral image segmentation model, the hyperspectral image of each sample of maize seed after background removal is segmented to determine the hyperspectral image of the embryo region and the hyperspectral image of the endosperm region.
[0040] Furthermore, each hyperspectral data point undergoes preprocessing, including:
[0041] Each hyperspectral data point undergoes noise reduction, baseline drift correction, light scattering correction, and data scaling.
[0042] Furthermore, the dual-branch spectral Transformer maize germplasm cross-germplasm viability detection model includes: a multi-scale CNN module, a Transformer module, a multi-level feature fusion attention module, and a linear classification module. The multi-scale CNN module calculates local features for each preprocessed hyperspectral data point, the Transformer module calculates global features for each preprocessed hyperspectral data point, the multi-level feature fusion attention module maps local and global features into multiple feature maps of consistent dimension, assigns attention score weights to each feature map through activation function layers, and fuses all feature maps based on the assigned attention score weights to obtain multi-level global-local fused features. The linear classification module sequentially performs global average pooling and linear layer operations on the multi-level global-local fused features to obtain the viability prediction result.
[0043] Furthermore, the acquisition module is specifically used for:
[0044] Hyperspectral imaging devices were used to acquire hyperspectral images of each maize seed in the sample maize germplasm resources, and viability tag data of each maize seed in the sample maize germplasm resources were obtained through germination experiments.
[0045] 3) In a third aspect, the present invention also provides an electronic device, the electronic device including a processor coupled to a memory, the memory storing at least one computer program, the at least one computer program being loaded and executed by the processor, so that the electronic device implements any of the above-mentioned methods for cross-germplasm identification of maize germplasm resource viability.
[0046] 4) In a fourth aspect, the present invention also provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements any of the above-mentioned methods for cross-germplasm identification of maize germplasm resource viability.
[0047] It should be noted that the beneficial effects of the technical solutions of the second to fourth aspects of the present invention and their corresponding possible implementations can be found in the above description of the technical effects of the first aspect and its corresponding possible implementations, and will not be repeated here. Attached Figure Description
[0048] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments of the present invention will be briefly introduced below:
[0049] Figure 1 This is one of the flowcharts illustrating a method for cross-germplasm identification of maize germplasm resource viability according to an embodiment of the present invention;
[0050] Figure 2 A schematic diagram of the network structure of the UNet germplasm hyperspectral image segmentation model with a moving inverted bottleneck.
[0051] Figure 3 A schematic diagram of the network structure of the dual-branch spectral Transformer maize germplasm cross-germplasm viability detection model;
[0052] Figure 4 The interface diagram of the detection software corresponding to the cross-germplasm discrimination method for maize germplasm resource viability;
[0053] Figure 5 This is a second schematic flowchart of a method for cross-germplasm identification of maize germplasm resource viability according to an embodiment of the present invention;
[0054] Figure 6 This is a schematic diagram of a cross-germplasm discrimination system for maize germplasm resources according to an embodiment of the present invention;
[0055] Figure 7 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0056] The principles and features of the present invention are described below. The examples given are only for explaining the present invention and are not intended to limit the scope of the present invention.
[0057] The technical solution of the present invention and how the technical solution of the present invention solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of the present invention will now be described with reference to the accompanying drawings.
[0058] like Figure 1 As shown in the figure, a method for cross-germplasm identification of maize germplasm resource viability according to an embodiment of the present invention includes the following steps:
[0059] S1. Obtain hyperspectral images of each sample maize seed in the sample maize germplasm resources, and obtain viability tag data of each sample maize seed in the sample maize germplasm resources.
[0060] In this process, hyperspectral images were acquired using a hyperspectral imaging device, and then germination experiments were conducted to obtain viability label data for all samples. The viability label data was divided into those that germinated (viable) and those that did not germinate (not viable).
[0061] S2. Threshold segmentation is performed on the hyperspectral image of each sample of corn seed to obtain the hyperspectral image of each sample of corn seed after removing the background. Then, region segmentation is performed on the hyperspectral image of each sample of corn seed after removing the background to determine the hyperspectral image of the embryo region and the hyperspectral image of the endosperm region.
[0062] The hyperspectral image of each sample of corn seeds is thresholded to obtain a background-removed hyperspectral image of each sample of corn seeds. The specific implementation process is as follows:
[0063] First, threshold segmentation is used to separate the corn seeds from the background. Specifically, a single-channel image with the largest spectral reflectance difference between the seeds and the background is selected from the hyperspectral full-channel image. An appropriate threshold is set for this single-channel image. Pixels with reflectance values less than the threshold are considered background and represented by 0, while pixels with reflectance values greater than the appropriate threshold form a corn seed mask. The corn seed mask is applied to the hyperspectral full-channel image to remove the background, eliminate noise, and separate the seed region, resulting in a hyperspectral image of the seed region, which is the hyperspectral image of each sample corn seed after background removal.
[0064] Specifically, the hyperspectral image of each sample maize seed after background removal is used for region segmentation to determine the hyperspectral images of the embryo region and the endosperm region, including:
[0065] By manually annotating, the boundaries of the embryo region and the endosperm region in the hyperspectral images of multiple maize seeds were annotated to obtain embryo annotation data and endosperm annotation data.
[0066] Using hyperspectral images of multiple maize seeds, combined with embryo and endosperm annotation data, the constructed mobile inverted bottleneck UNet germplasm hyperspectral image segmentation model was trained.
[0067] Using the trained mobile inverted bottleneck UNet germplasm hyperspectral image segmentation model, the hyperspectral image of each sample of maize seed after background removal is segmented to determine the hyperspectral image of the embryo region and the hyperspectral image of the endosperm region.
[0068] like Figure 2As shown, the moving inverted bottleneck UNet germplasm hyperspectral image segmentation model is an improvement on UNet. Specifically, it is obtained by adding a bottleneck module, an initial block, and a moving inverted bottleneck convolutional module to UNet. UNet can specifically be MBUNet. The hyperspectral image of the sample maize seeds after background removal is processed by an initial block. The output of the initial block is used as the input of the first moving inverted bottleneck convolutional module, and a convolutional layer is used to downsample the output of the initial block to obtain the first downsampled result. The first downsampled result is then processed by four bottleneck modules to obtain the first processed result. The first processed result is then used as the input of the second moving inverted bottleneck convolutional module, and a convolutional layer is used to downsample the first processed result to obtain the second downsampled result. The second downsampled result is then processed by seven bottleneck modules to obtain the second processed result. The second processed result is then used as the input of the third moving inverted bottleneck convolutional module, and a convolutional layer is used to further process the second processed result. A downsampling operation is performed to obtain the third downsampling result. The third downsampling result is then processed through 7 bottleneck modules to obtain the fourth processing result. A convolutional layer is then used to upsample the fourth processing result and the output of the third moving-flip bottleneck convolutional module to obtain the first upsampling result. The first upsampling result is then processed through 2 bottleneck modules to obtain the fifth processing result. A convolutional layer is then used to upsample the fifth processing result and the output of the second moving-flip bottleneck convolutional module to obtain the second upsampling result. The second upsampling result is then processed through 2 bottleneck modules to obtain the sixth processing result. A convolutional layer is then used to upsample the sixth processing result and the output of the first moving-flip bottleneck convolutional module to obtain the third upsampling result. The third upsampling result is then processed through 1 bottleneck module to obtain the seventh processing result. A transformation convolutional layer is then used to process the seventh processing result to obtain the hyperspectral images of the embryo region and the endosperm region.
[0069] The initial block performs convolution operations (which can be implemented using a 3×3 convolutional layer) and max pooling operations on the input, and then concatenates the results of the two operations to obtain the output of the initial block.
[0070] The moving-flip bottleneck convolution module sequentially performs convolution operations (specifically implemented using a 1×1 convolutional layer), separable convolution operations (specifically implemented using a 1×1 separable convolutional layer), squeeze excitation module, and zeroing layer (specifically implemented using a 1×1 convolutional layer) on the input. Then, it adds the processing result to the input of the moving-flip bottleneck convolution module element by element to obtain the output of the moving-flip bottleneck convolution module.
[0071] The bottleneck module performs convolution operations (specifically, 1×1 convolutional layers) and asymmetric operations on the input, then divides the results into two paths for processing. In the first path, the results are processed through a 3×1 convolutional layer with a ReLU activation function and a 1×3 convolutional layer. In the second path, the results are max-pooled. The outputs of the first and second paths are then processed sequentially through a ReLU activation function and a 1×1 convolutional layer, and a 1×1 convolutional layer with a ReLU activation function and a zeroing layer. The processed results are then added element-wise to the input of the bottleneck module and processed through a BN+ReLU activation function to obtain the output of the bottleneck module.
[0072] The bottleneck module first uses pointwise convolution to reduce the dimensionality of the input features, and then restores the original feature dimensionality, thereby significantly reducing the number of parameters. The initial block performs dimensionality reduction and basic feature extraction on the input image, transforming high-resolution features into low-dimensional feature maps to reduce the computational complexity of the network. Skip connections pass the encoder's feature maps to the corresponding layers of the decoder, realizing the fusion of high-resolution spatial information and low-resolution semantic information, and enhancing the network's ability to capture both local details and global information. MBConv is used to reduce the spatial information loss caused by skip connections, thereby improving the overall segmentation performance.
[0073] In training the constructed mobile inverted bottleneck UNet germplasm hyperspectral image segmentation model, seed images and segmentation label data (i.e., embryo and endosperm label data) from the segmentation dataset are input into the model to obtain prediction results. A loss function is used to calculate the loss between the segmentation result and the true labels. The optimizer calculates and updates the parameter gradients through backpropagation, and adjusts the hyperparameters in a timely manner based on performance to improve the model's generalization ability and segmentation accuracy. Finally, a segmentation result with a smaller loss value is obtained. The hyperspectral image of the embryo region is obtained through mapping, and the hyperspectral image of the endosperm region is obtained through subtraction of the embryo region image.
[0074] S3. Based on the hyperspectral images of the embryo region and the endosperm region, obtain the hyperspectral data of the embryo region and the endosperm region;
[0075] Specifically, the average reflectance of the hyperspectral image of the embryo region is extracted as the hyperspectral data of the embryo region. Similarly, the average reflectance of the hyperspectral image of the endosperm region is extracted as the hyperspectral data of the endosperm region.
[0076] S4. Obtain the hyperspectral data of each sample corn seed from the hyperspectral image after removing the background.
[0077] The average reflectance of the hyperspectral image of the sample corn seed was extracted as the hyperspectral data of the sample corn seed.
[0078] The hyperspectral data of the embryo region, endosperm region, and whole germplasm of each maize seed sample were obtained, and together with their corresponding viability label data, they constituted the dataset of the dual-branch spectral Transformer maize germplasm cross-germplasm viability detection model. Specifically, the hyperspectral image of the seed region constituted the whole germplasm hyperspectral data, the segmented hyperspectral image of the embryo region constituted the embryo region hyperspectral data, and the segmented hyperspectral image of the endosperm region constituted the endosperm region hyperspectral data.
[0079] The hyperspectral data was divided into three datasets: whole germplasm, embryo region, and endosperm region, X = {X0, X1, X2} ∈ B. R×C Where X0 is the whole grain germplasm hyperspectral dataset, X1 is the embryo region germplasm hyperspectral dataset, X2 is the endosperm region germplasm hyperspectral dataset, B is the number of batches, and C is the number of hyperspectral data bands.
[0080] S5. Preprocess each hyperspectral data point, specifically by performing noise reduction, baseline drift correction, light scattering correction, and data scaling. Each hyperspectral data point refers to: the hyperspectral data of the embryo region of each sample maize seed, the hyperspectral data of the endosperm region of each sample maize seed, and the hyperspectral data of each sample maize seed.
[0081] Data preprocessing is categorized into four types based on four perspectives: noise reduction, baseline drift correction, light scattering correction, and data scaling. These categories address noise present in the hyperspectral spectrum, baseline drift, light scattering factors, and the risk of model overfitting due to different data scales. Each preprocessing category contains multiple corresponding preprocessing methods. For example, the noise reduction preprocessing category includes methods such as moving average smoothing, SG filtering, and wavelet transform. Single preprocessing methods and combined preprocessing methods are employed. Combined preprocessing methods involve selecting two or more preprocessing categories, while only one preprocessing method is selected within each category.
[0082] S6. Feature selection is performed on each preprocessed hyperspectral data, and the constructed dual-branch spectral Transformer maize germplasm cross-germplasm viability detection model is trained by combining the viability label data of each sample maize seed.
[0083] like Figure 3As shown, the constructed dual-branch spectral Transformer maize germplasm cross-germplasm vitality detection model includes: a multi-scale CNN module (also known as a multi-scale convolution module), a Transformer module, a multi-level feature fusion attention module, and a linear classification module. The multi-scale CNN module is used to calculate the local features of each preprocessed hyperspectral data point, the Transformer module is used to calculate the global features of each preprocessed hyperspectral data point, the multi-level feature fusion attention module is used to map the local and global features into multiple feature maps of the same dimension, and assign attention score weights to each feature map through activation function layers. Based on the assigned attention score weights, all feature maps are fused to obtain multi-level global-local fused features. The linear classification module is used to sequentially perform global average pooling and linear layer operations on the multi-level global-local fused features to obtain the vitality prediction result.
[0084] The multi-scale CNN module is used to calculate local features (preprocessed hyperspectral data of the embryo region, endosperm region, and preprocessed hyperspectral data of each sample maize seed). The Transformer module calculates global features (preprocessed hyperspectral data of the embryo region, endosperm region, and preprocessed hyperspectral data of each sample maize seed). The multi-level feature fusion attention module maps local features (through two-dimensional convolutional layers) and global features (linear layers) into feature maps of consistent dimensions (three feature maps for local features and three feature maps for global features). The activation function layer of the multi-level feature fusion attention module assigns fusion feature attention score weights to the six feature maps. Based on the assigned weights, the six feature maps are fused to obtain multi-level global-local fused features. The linear classification module sequentially performs global average pooling and linear layer operations on the multi-level global-local fused features to obtain the germplasm viability detection results. Specifically:
[0085] 1) The multi-scale CNN module contains one convolutional neural network with kernel sizes of 1×1, 1×3, 1×5, and 1×7. Each convolutional neural network contains one one-dimensional convolutional layer, one batch normalization layer (BN), and one Gaussian error linear unit (GELU). The Transformer module contains two layer normalization layers (LN), one multi-head self-attention mechanism layer (MHSA), and one multi-layer perceptron (MLP). The multi-level feature fusion attention module contains one two-dimensional convolutional layer, one layer normalization layer, and one normalized exponential function (Softmax).
[0086] The multi-scale CNN module is used to compute local features. By using convolution kernels of different sizes, the input maize seed hyperspectral image is processed in parallel. Larger convolution kernels can capture global features in the seed image, while smaller convolution kernels focus on local details of the image, enriching the dimension of feature information. This allows the model to learn more comprehensive and detailed seed features, more effectively mine the information related to vitality contained in the seed image, and finally obtain local feature maps.
[0087] 2) The Transformer module is used to compute global features. Through a self-attention mechanism, it can adapt to the diversity of corn seed data of different varieties, sizes and shapes. By computing the correlation between any two pixels in the image, it comprehensively analyzes the spectral features of different parts of the seed and discovers potential patterns related to viability. The MLP in the Transformer module can adjust the feature dimension according to the task characteristics, transforming the features output by the self-attention module into an expression form more suitable for the specific task, and finally obtaining the global feature map.
[0088] 3) The multi-level feature fusion attention module effectively integrates local and global features. It transforms the local feature maps into a first feature map Q1, a second feature map K1, and a third feature map V1 with consistent dimensions through two-dimensional convolution. It transforms the global feature maps into a fourth feature map Q2, a fifth feature map K2, and a sixth feature map V2 with consistent dimensions through layer normalization. Furthermore, it concatenates the first feature map Q1 and the fourth feature map Q2 to obtain the seventh feature map, concatenates the second feature map K1 and the fifth feature map K2 to obtain the eighth feature map, and concatenates the third feature map V1 and the sixth feature map V2 to obtain the ninth feature map. Then, it multiplies the eighth feature map and the ninth feature map element by element to obtain the representation fusion information matrix. The activation function calculates the feature attention score weight matrix, and the seventh feature map is linearly transformed to finally obtain the multi-level global-local fusion features.
[0089] 4) The linear classification module obtains the germplasm viability detection results through the global average pooling layer and the linear layer.
[0090] Optionally, the trained dual-branch spectral Transformer maize germplasm cross-germplasm viability detection model can be used to identify cross-germplasm maize samples and obtain the viability prediction results of cross-germplasm maize samples.
[0091] S7. Using the trained dual-branch spectral Transformer maize germplasm cross-germplasm viability detection model, the cross-germplasm maize to be identified is distinguished, and the viability prediction results of the cross-germplasm maize to be identified are obtained.
[0092] Optionally, in S1, a hyperspectral image of each sample maize seed in the sample maize germplasm resource is acquired, and viability tag data of each sample maize seed in the sample maize germplasm resource is obtained, including:
[0093] Hyperspectral imaging devices were used to acquire hyperspectral images of each maize seed in the sample maize germplasm resources, and viability tag data of each maize seed in the sample maize germplasm resources were obtained through germination experiments.
[0094] This invention constructs viability discrimination models for the endosperm region, embryo region, and the entire seed region based on a neural network model, namely, a trained bi-branch spectral Transformer maize germplasm cross-germplasm viability detection model. To facilitate user operation, this invention designs an interactive interface, such as... Figure 4 As shown in the image, this interface loads the trained viability discrimination model, specifically the trained dual-branch spectral Transformer maize germplasm cross-germplasm viability detection model. The user inputs hyperspectral image data of the maize seeds to be tested, and the interface automatically invokes data reading, image segmentation algorithms, spectral data preprocessing algorithms, and the viability discrimination model to determine seed viability, outputting the results and allowing the user to save the data. Simultaneously, the interface provides visualization capabilities, generating spectral curves for different parts of the seed to help users intuitively understand the seed's spectral characteristics and provide a reference for further analysis.
[0095] The seed segmentation algorithm of this invention, namely the moving inverted bottleneck UNet germplasm hyperspectral image segmentation model, is a significant improvement upon the U-Net network architecture. By introducing an attention mechanism, the model can focus more on the key features of different seed parts, enhancing the ability to identify subtle differences and significantly improving segmentation accuracy. Simultaneously, the cross-germplasm discrimination algorithm designed in this invention improves discrimination reliability through region association analysis, fully utilizing the feature information of different seed parts after segmentation to construct a more comprehensive and effective feature vector. Through training based on large datasets, this algorithm can accurately capture the feature patterns of different varieties of seeds under viability conditions, effectively solving the problems of low accuracy and poor stability in traditional cross-germplasm algorithms. In practical applications, by comparing the features of the segmented endosperm region and the entire seed region, this invention can more deeply explore the intrinsic information of maize germplasm resource viability, significantly improving the accuracy and reliability of cross-germplasm maize germplasm resource viability discrimination, and providing strong technical support for seed quality testing in agricultural production.
[0096] The specific implementation process of the hyperspectral viability detection software for cross-germplasm maize germplasm resources of the present invention is as follows: Upload hyperspectral data in the data upload window, selecting .hdr and .dat files sequentially according to the prompts; then, in the region division window, select one of the following: all seed region, embryo region, or endosperm region. The corresponding hyperspectral data of the selected region will be displayed in the middle graphic window. In the data analysis window, select one of the following: all seed region, embryo region, or endosperm region, and click "Start Analysis" below. The middle table window will display the seed number and the predicted viability, while the results display window will show the average viability of the current batch of seeds. Click "Save Results" in the results save window to save the results data in the table to the corresponding path as an Excel file.
[0097] The construction of the hyperspectral viability detection software for cross-germplasm maize germplasm resources of the present invention is as follows:
[0098] Define the `UI_windows` class to encapsulate user interface settings and layouts. Define the `UI_setup()` instance method to receive the `Main_windows` parameter. This method sets basic attributes such as the main window name and size. Then, it sets the icon file in the specified path as the main window icon and uses the `setStyleSheet` method to set the background color of the main window buttons in normal, mouse hover, and mouse press states, and sets the size of the main window icon. Under the central window, create five `QGroupBox` objects to set the size, position, layout, and style of the relevant button components and display them in groups. Create a `QGraphicsView` object to set its size and position for displaying two-dimensional spectral images, and create a `QTableWidget` object to set its size and position for displaying table data. The signals of multiple window controls are connected to slot functions through the `connectSlotsByName` function to execute response signals. Pressing button 1 triggers the file selection function, pressing buttons 2-4 triggers the data generation function, pressing buttons 5-7 selects the corresponding seed analysis area, pressing button 8 triggers the data analysis function, and pressing button 9 triggers the result saving function.
[0099] Define the `retranslateUi` function to update the content of the controls on the interface. Use the `setTitle` method to assign group box titles to the five `QGroupBox` objects respectively. The titles are "Upload Data", "Region Division", "Analysis Data", "Results Save", and "Results Display". Use the `setText` method to set the text of the button under the "Upload Data" group box (button 1) to "Hyperspectral Data". Set the text of the three buttons under the "Region Division" group box (buttons 2-4) to "All Seed Regions", "Embryo Regions", and "Endosperm Regions" respectively. Set the text of the three buttons under the "Analysis Data" group box (buttons 5-7) to "All Seed Regions", "Embryo Regions", and "Endosperm Regions" respectively. Set the text of the button below (button 8) to "Start Analysis". Set the text of the button under the "Results Save" group box (button 9) to "Results Save". Set the text of the label control under the "Results Display" group box to "Average Viability".
[0100] A custom `upload_check` function is used to detect whether the hyperspectral data button under the data upload group box has been selected by the user. If it is selected, the `open_filedialog()` function is executed to open a message dialog box to prompt the user to upload data and to store the uploaded hyperspectral image. Then, the `Data_make()` function is called to obtain three hyperspectral datasets: embryo region, endosperm region, and whole germplasm.
[0101] In the `upload_check` function, a custom `open_filedialog()` function is used to open two file selection dialog boxes, store the selected file path in an instance property of the class, and display a message box saying "Hyperspectral data submission complete". Specifically, first, a file selection dialog box is created using the `QFileDialog` class. Then, the `getOpenFileName` method is used to display the first file selection dialog box. Specifically, the dialog box title is set to "Submit .hdr file" to prompt the user to upload the file format, a file filter is set to restrict the user to files with the `.hdr` extension, and finally, the path of the selected `.hdr` file is stored in the first instance property of the class for later use. Next, the `getOpenFileName` method is used to display the second file selection dialog box. Specifically, the dialog box title is set to "Submit .dat file" to prompt the user to upload the file. The code first transmits the file format, sets a file filter to restrict the user's selection to files with the .dat extension, and stores the path of the selected .dat file in the class instance attribute 2 for easy later access. Then, it creates a QMessageBox instance msg_box to create a message box, sets the icon type and text content to "Data submission complete," and adds an "OK" button to the message box. Clicking this button closes the message box. Finally, the exec_ method is used to display the message box and enter a modal loop, allowing user interaction with the message box. The program will only execute subsequent code after the user clicks the "OK" button; otherwise, the program pauses.
[0102] In the `upload_check` function, a custom `Data_make()` function is used. This function utilizes the `sepctral` module to read the `.hdr` header file stored in the first instance attribute of the class and the `.dat` data file stored in the second instance attribute. It then opens the wavelength data in `.csv` format located in the data path, selects a specific band in the hyperspectral image to form a single-band image, and performs thresholding to remove the background and obtain seed region images. Specifically, a binarization threshold is manually set, retaining pixels with values greater than the threshold and setting pixels with values less than the threshold to 0, resulting in a binarized single-band image. A connected region component is used to segment the regions of pixels with values greater than 0 in the binarized single-band image. Since an image contains multiple seed regions, multiple segmented seed region masks are formed. These masks are grouped and sorted according to X and Y axis coordinates, with the sorting number matched with each seed region number. After sorting, multiple seed region lists are formed. A blank array with the same shape as the original hyperspectral image is created, and the hyperspectral data of the corresponding regions is extracted into this blank array to form the hyperspectral image of each seed region. The following steps involve image segmentation of the hyperspectral image of each seed region to obtain three hyperspectral datasets: embryo region, endosperm region, and whole seed germplasm. The whole seed germplasm hyperspectral dataset is obtained as follows: the Ref_read() function is called with the filename parameter whole_seed, and a loop is used to read the whole seed germplasm reflectance from the data processing path, naming it whole_seed.csv. The method for obtaining the endosperm region hyperspectral dataset is as follows: The trained MBUNet model is used to segment the embryo and endosperm regions from the hyperspectral image of the seed region. Based on the segmentation mask output by the model, the hyperspectral images of the embryo and endosperm regions are extracted from the original hyperspectral image. Specifically, a mask of the same size as the original hyperspectral image is created for each region. This mask has a value of 1 for pixels belonging to that category and a value of 0 for other pixels. Then, this mask is multiplied element-wise with the original hyperspectral image to obtain the hyperspectral image of that region. Finally, the Ref_read() function is called with filename parameters embryo_seed and endosperm_seed, respectively. A loop is used to read the reflectance of the embryo and endosperm regions from the data processing path, naming them embryo_seed.csv and endosperm_seed.csv, respectively.
[0103] Finally, the `Data_make()` function creates an instance of `QMessageBox`, `msg_box`, creates a message box, and sets the icon type and text content of the message box to "All seed region datasets have been created." An "OK" button is added to the message box; clicking this button closes the message box. Finally, the `exec_` method is used to display the message box and enter a modal loop, allowing user interaction with the message box. That is, the program will only execute subsequent code after the user clicks the "OK" button; otherwise, the program pauses.
[0104] In the custom `Data_make()` function of the `upload_check` function, the `Ref_read()` function accepts a filename parameter indicating the filename for storing reflectance data. It uses a loop to read the reflectance of each seed region. Specifically, it initializes an empty list `Ref_list` to store the average reflectance of each band in the seed region. An outer `for` loop iterates through the coordinate list of each seed region, then iterates through each channel of the hyperspectral image at those coordinates, creating an empty list `ref_sums`. An inner loop iterates through the coordinates of each seed region and calculates the pixel value, adding it to `ref_sums`. The average value of `ref_sums` is the average reflectance of the seed in that band. Each iteration of `ref_sums` adds the obtained `ref_sums` to the `Ref_list` list. Finally, the loop obtains the average reflectance data of each seed in all bands of the hyperspectral image. The wavelength data and average reflectance data are assigned the headers "wavelength" and "reflectance" respectively, and saved in the data processing path with a `.csv` filename.
[0105] A custom `region_check` function is used to check whether the three buttons for all seed regions, embryo regions, and endosperm regions under the region division grouping box are selected by the user. If selected, the `data_processing` function is executed accordingly.
[0106] The custom function `data_processing` is used to load data and plot hyperspectral images. Specifically, it loads the `seed.csv` file in the data processing path, reads the wavelength and reflectance columns, calls the matplotlib library to plot the reflectance curve, and sets the plot size, font, axes, lines, etc. to present an aesthetically pleasing plot. It also obtains the width and height of the `QGraphicsView` window to scale the image to the target width and height, adjusts the image to fit the size of the `QGraphicsView`, and displays it in the view.
[0107] The custom function `analysis_check` is used to detect whether the three buttons for all seed regions, embryo regions, and endosperm regions under the data grouping box are selected by the user. If one of the buttons is selected, the reflectance of the selected seed region is recorded as the current reflectance. When button 8 is pressed, the current reflectance data parameter is passed to the `data_analysis` function for execution.
[0108] The `data_analysis` function accepts the input reflectance data, preprocesses it, loads the model using the `torch.load` function, calls the model, and inputs the preprocessed reflectance column data to obtain the viability prediction result for the maize germplasm resource. Three columns are added to the QTableWidget control window: the first column is the detection sequence number, the second column is the seed number (starting from 1), and the third column is the result of viability determination. Simultaneously, the average viability of the current seed batch is calculated as the number of viable seeds divided by the total number of seeds. The result is printed below the result display group box.
[0109] The custom function `result_check` is used to detect whether the user has selected the "Save Results" button under the area division grouping box. If selected, the `result_save` function is executed accordingly.
[0110] The result_save function retrieves data from the QTableWidget window row by row and column by column into a DataFrame, and saves the DataFrame as an Excel file in the corresponding data result path.
[0111] The present invention will be further illustrated by the following embodiments:
[0112] like Figure 5 As shown, the cross-germplasm discrimination method for maize germplasm resource viability in this embodiment includes: data acquisition, image segmentation, data preprocessing, model training, and prediction. Specifically:
[0113] A hyperspectral dataset was acquired, including 600 hyperspectral images and their reflectance data. Germination tests were conducted on each corn kernel to obtain a corresponding viability tag set. Specifically, the acquisition of hyperspectral images involved: preparing a hyperspectral device equipped with a grooved sample plate for placing samples, with the groove size and shape designed to suit corn seeds; placing each corn seed with the embryo side facing up in the corresponding groove of the sample plate to facilitate subsequent batch segmentation of the embryo and endosperm regions in the images; starting the hyperspectral device to scan the samples, obtaining one hyperspectral image per scan, and finally obtaining a hyperspectral image set.
[0114] The optimal hyperspectral image segmentation model and model parameters are determined through the following steps:
[0115] S101. Manually label the germplasm and embryo regions of 50 hyperspectral images in the hyperspectral dataset to form an image segmentation label set. There are three types of labels: all germplasm regions, embryo regions, and endosperm regions. This forms three image segmentation hyperspectral datasets and their corresponding region labels for embryo regions, endosperm regions, and whole germplasm regions.
[0116] Training and test datasets were created using S102, image segmentation labels based on S101, and three image segmentation hyperspectral datasets.
[0117] S103. Based on the structure and features of the training dataset created in step S102, perform image segmentation operations on the hyperspectral image, including image thresholding to separate corn seeds from the background and constructing the Moving Inverted Bottleneck UNet (MBUNet) germplasm hyperspectral image segmentation model.
[0118] S104. Experiments and evaluations were conducted on MBUNet and commonly used image segmentation models such as Enet, UNet, UNet++, DeeplabV3+, and SegFormer to obtain the best model, MBUNet, and its optimal model parameters. This completed the embryo region segmentation of the remaining 550 hyperspectral images in the hyperspectral dataset obtained in S1, as follows: First, threshold segmentation was used to separate the maize seeds from the background. Then, the moving inverted bottleneck UNet (MBUNet) germplasm hyperspectral image segmentation model was constructed to segment the embryo and endosperm regions of the seed region hyperspectral images, resulting in three hyperspectral image datasets: embryo region, endosperm region, and whole germplasm region. The average spectrum of each of the three regions was calculated to form three hyperspectral datasets: embryo region, endosperm region, and whole germplasm region.
[0119] S105, based on the three hyperspectral datasets of embryo region, endosperm region and whole germplasm obtained from S104, preprocessed the hyperspectral data in the datasets respectively.
[0120] The data preprocessing is divided into four categories from four perspectives: noise reduction, baseline drift correction, light scattering correction, and data scaling. These categories address the noise present in the hyperspectral data, baseline drift, light scattering factors, and the risk of model overfitting due to different data scales. Each preprocessing category contains multiple corresponding preprocessing methods. For example, the noise reduction preprocessing category includes methods such as moving average smoothing, SG filtering, and wavelet transform. Single preprocessing and combined preprocessing methods are employed. The combined preprocessing method involves selecting two or more preprocessing categories, with only one preprocessing method selected within each category.
[0121] S106. Based on the dataset after preprocessing and band selection in step S105, and its corresponding vitality label set, create the training dataset and the test dataset.
[0122] S107. Based on the structure and features of the training dataset created in step S106, construct a dual-branch spectral Transformer maize germplasm cross-germplasm viability detection model.
[0123] S108. Experiments and evaluations were conducted on the dual-branch spectral Transformer maize germplasm cross-germplasm viability detection model.
[0124] In S101 above, the viability label set is the label assigned to each sample as either viable or non-viable.
[0125] In S107, the dual-branch spectral Transformer maize germplasm cross-germplasm viability detection model includes a multi-scale CNN module, a Transformer module, a multi-level feature fusion attention module, and a linear classification module. The multi-scale CNN module contains one convolutional neural network each with kernel sizes of 1×1, 1×3, 1×5, and 1×7. Each convolutional neural network contains a one-dimensional convolutional layer, a batch normalization layer (BN), and a Gaussian error linear unit (GELU). The Transformer module contains two layer normalization layers, a multi-head self-attention mechanism layer, and a multilayer perceptron. The multi-level feature fusion attention module contains a two-dimensional convolutional layer, a layer normalization layer, and a normalized exponential function (Softmax). The hyperspectral dataset X∈R is used. B×C Inputting these into convolutional neural networks of 1×3, 1×5, and 1×7 respectively yields three different feature maps: X l1 ∈R B×C X l2 ∈R B×C and X l3 ∈R B×C The three feature maps are fused with X and then input into a 1×1 convolutional neural network to obtain a local feature map X1∈R. B×C Where C is the feature map dimension; inputting X into the Transformer module yields the global feature map: Where C2 is the dimension of the global feature map; inputting {X1,X2} into the multi-level feature fusion attention module yields the multi-level global-local fusion feature F∈R. B×C ;F is input into the linear classification module to obtain the germplasm viability test result S∈R B×2 , where 2 are the corresponding labels for having and lacking vitality.
[0126] In S103, the Moving Inverted Bottleneck UNet (MBUNet) germplasm hyperspectral image segmentation model includes the UNet main architecture, bottleneck module, initial block, skip connections, and Moving Inverted Bottleneck Convolution (MBConv); the specific steps are as follows:
[0127] S1031. The bottleneck module first uses pointwise convolution to reduce the dimensionality of the input features, and then restores the original feature dimensionality, thereby significantly reducing the number of parameters.
[0128] S1032. The initial block performs dimensionality reduction and basic feature extraction on the input image, transforming high-resolution features into low-dimensional feature maps to reduce the computational complexity of the network.
[0129] S1033, skip connections pass the feature map of the encoder to the corresponding layer of the decoder, realizing the fusion of high-resolution spatial information and low-resolution semantic information, and enhancing the network's ability to capture local details and global information at the same time.
[0130] S1034 and MBConv are used to reduce the spatial information loss caused by skip connections, thereby improving overall performance.
[0131] Optionally, in the above technical solution, in S104, MBUNet is experimented with and evaluated to obtain the optimal model parameters, and the embryo region segmentation of the remaining 550 hyperspectral images in the hyperspectral dataset obtained in S101 is completed, forming two hyperspectral datasets: embryo region, endosperm region, and whole germplasm, as detailed below:
[0132] S1041. The mobile inverted bottleneck UNet (MBUNet) germplasm hyperspectral image segmentation model constructed in S103 was tested and the detection performance of the model was verified.
[0133] Furthermore, experiments and evaluations were conducted on the Mobile Inverted Bottleneck UNet (MBUNet) germplasm hyperspectral image segmentation model, as detailed below:
[0134] S1042. Experiments were conducted on the datasets in S101 to S102, using the mean intersection-to-union ratio (mIoU) and test accuracy to comprehensively evaluate the model's hyperspectral image segmentation performance.
[0135] In S1043, experiments and evaluations were conducted using MBUNet and commonly used image segmentation algorithms such as ENet, UNet, UNet++, DeeplabV3+, and SegFormer. Experiments were performed on datasets in S101 to S102. The mean intersection-to-union ratio (mIoU) and test accuracy from S1042 were used for comparative analysis to provide a basis for comprehensively evaluating the performance of the moving inverted bottleneck UNet (MBUNet) germplasm hyperspectral image segmentation model. The test results are shown in Table 1.
[0136] Table 1:
[0137] Model mIoU (%) Accuracy (%) ENet 93.93±0.08 99.53±0.01 UNet 94.25±0.02 99.56±0.01 UNet++ 94.14±0.07 99.55±0.01 DeeplabV3+ 94.11±0.02 99.55±0.02 SegFormer 94.08±0.05 99.54±0.01 MBUNet 94.31±0.05 99.57±0.01
[0138] Optionally, in S105, the hyperspectral data in the dataset undergoes preprocessing and feature selection, specifically as follows:
[0139] S1051. Perform multivariate scattering correction, SG filtering, normalization, and second derivative processing on each channel of the hyperspectral data to obtain preprocessed hyperspectral data.
[0140] S1052. Select all characteristic bands of the preprocessed hyperspectral data for modeling.
[0141] Optionally, the dual-branch spectral Transformer maize germplasm cross-germplasm viability detection model in S107 includes a multi-scale CNN module, a Transformer module, a multi-level feature fusion attention module, and a linear classification module. The multi-scale CNN module contains one convolutional neural network each with kernel sizes of 1×1, 1×3, 1×5, and 1×7. Each convolutional neural network contains a one-dimensional convolutional layer, a batch normalization layer (BN), and a Gaussian error linear unit (GELU). The Transformer module contains two layer normalization layers (LN), a multi-head self-attention mechanism layer (MHSA), and a multi-layer perceptron (MLP). The multi-level feature fusion attention module contains a two-dimensional convolutional layer, a layer normalization layer, and a normalized exponential function (Softmax). The specific steps are as follows:
[0142] S1071. The process of calculating local features using a multi-scale CNN module is represented by the following formula:
[0143] X1=GELU(BN(Conv1d(X+X l1 +X l2 +X l3 ))
[0144] X l1 =GELU(BN(Conv1d) 1×3 (X))
[0145] X l2 =GELU(BN(Conv1d) 1×5 (X))
[0146] X l3 =GELU(BN(Conv1d) 1×7 (X))
[0147]
[0148] Where x and θ are the input features of the BN layer and GELU activation function, respectively; μ and σ are the mean and variance of x; γ and β are learnable parameters during training; GELU performs linear calculation of Gaussian error; BN performs batch normalization; and Conv1d performs one-dimensional convolution with a kernel size of 1×1. 1×3 To perform a one-dimensional convolution operation with a kernel size of 1×3, Conv1d 1×5 To perform a one-dimensional convolution operation with a kernel size of 1×5, Conv1d 1×7 Tanh is used to perform a one-dimensional convolution operation with a kernel size of 1×7, and it is used to perform a hyperbolic tangent operation.
[0149] S1072. The process of calculating global features using the Transformer module is represented by the following formula:
[0150] X2=MLP(LN((y)))+y
[0151] y = X + MHSA(LN(X))
[0152] MHSA = Concat(SA) i (y)), i∈{1,2,...,h}
[0153]
[0154] MLP(y)=Linear(GELU(Linear(y)))
[0155] Linear(y) = W × y + B
[0156] Where y represents the intermediate output feature, h represents the number of heads in the multi-head self-attention mechanism, Q, K, and V are weight matrices, and d k Let K be the dimension of K, LN be the normalization operation of the execution layer, SA be the self-attention mechanism, Concat be the concatenation operation, Linear be the linear layer, and W and B be the weight matrix and parameters, respectively.
[0157] S1073. Process X1 and X2 using 2D convolution and LN respectively, converting them into feature maps Z1 and Z2 of the same dimension. The specific process is represented by the following formula:
[0158] Z1=Conv2d(X1)∈R B×K
[0159] Z2=Conv2d(X2)∈R B×K
[0160] Where K is the dimension of the feature map.
[0161] S1074. Map Z1 and Z2 to vectors Q1, K1, and V1 containing local information and vectors Q2, K2, and V2 containing global information, respectively. Then, obtain the weight matrix Q representing the fused information by concatenating (Q1, Q2), (K1, K2), and (V1, V2). Fus K Fus and V Fus The specific process is represented by the following formula:
[0162] Q i ,K i V i =Linear(Z) i ), i∈{1,2}
[0163] Q Fus =Concat(Q1,Q2)
[0164] K Fus =Concat(K1,K2)
[0165] V Fus =Concat(V1,V2)
[0166] Concat is a concatenation operation.
[0167] S1075, Q Fus With K Fus The fused feature attention score is obtained by multiplication. The score weights are assigned by the activation function layer and then multiplied by V. Fus Obtain multi-level global-local fusion features F∈R B×K The specific process is represented by the following formula:
[0168] F = Softmax(Q) Fus ,K Fus V Fus
[0169] Softmax is the activation function operation.
[0170] S1076. Input the multi-level global-local fusion feature F into the linear classification layer to obtain the germplasm vitality detection result S∈R. B×2 Specifically, this is achieved through the following formula:
[0171] S = GAP(Linear(F))
[0172] GAP stands for Global Average Pooling, and Linear stands for Linear Layer Operation.
[0173] Optionally, in S108, the dual-branch spectral Transformer maize germplasm cross-germplasm viability detection model is experimentally tested and evaluated; specifically as follows:
[0174] S1081. The constructed dual-branch spectral Transformer maize germplasm cross-germplasm viability detection model was tested and its detection performance was verified. In other words, the dual-branch spectral Transformer maize germplasm cross-germplasm viability detection model was experimentally tested and evaluated, as follows:
[0175] S1082. Experiments were conducted on the constructed dataset including the embryo region, endosperm region, and whole germplasm region. The performance of the model in detecting viability was comprehensively evaluated using accuracy, F1 score, and area under the ROC curve and the coordinate axis (AUC).
[0176] S1083. Experiments were conducted using the dual-branch spectral Transformer maize germplasm cross-germplasm viability detection model on datasets including the embryo region, endosperm region, and whole grain germplasm region. The accuracy, F1 score, and area under the ROC curve (AUC) were compared and analyzed using data from S1082, providing a basis for comprehensively evaluating the performance of the dual-branch spectral Transformer maize germplasm cross-germplasm viability detection model. The detection results are shown in Tables 2 to 4. Table 2 shows the accuracy comparison results, Table 3 shows the AUC comparison results, and Table 4 shows the F1-Score comparison results.
[0177] Table 2:
[0178]
[0179]
[0180] Table 3:
[0181]
[0182] Table 4:
[0183]
[0184]
[0185] In the above embodiments, although the steps are numbered S1, S2, etc., they are only specific embodiments given by the present invention. Those skilled in the art can adjust the execution order of S1, S2, etc. according to the actual situation, which is also within the protection scope of the present invention. It can be understood that in some embodiments, some or all of the above embodiments may be included.
[0186] like Figure 6As shown, an embodiment of the present invention provides a maize germplasm resource viability cross-germplasm discrimination system 200, which includes an acquisition module 201, a segmentation module 202, a hyperspectral data acquisition module 203, a preprocessing module 204, a model training module 205, and a discrimination module 206.
[0187] The acquisition module 201 is used to: acquire hyperspectral images of each sample maize seed in the sample maize germplasm resources, and obtain viability tag data of each sample maize seed in the sample maize germplasm resources;
[0188] The segmentation module 202 is used to: perform threshold segmentation on the hyperspectral image of each sample corn seed to obtain the hyperspectral image of each sample corn seed after removing the background, and perform region segmentation on the hyperspectral image of each sample corn seed after removing the background to determine the hyperspectral image of the embryo region and the hyperspectral image of the endosperm region.
[0189] The hyperspectral data acquisition module 203 is used to: obtain hyperspectral data of the embryo region and hyperspectral data of the endosperm region based on the hyperspectral images of the embryo region and the endosperm region;
[0190] The hyperspectral data acquisition module 204 is also used to: obtain hyperspectral data of each sample of corn seeds from the hyperspectral image after removing the background of each sample of corn seeds;
[0191] The preprocessing module 205 is used to: preprocess each hyperspectral data;
[0192] The model training module is used to: perform feature selection on each preprocessed hyperspectral data, and train the constructed dual-branch spectral Transformer maize germplasm cross-germplasm viability detection model by combining the viability label data of each sample maize seed;
[0193] The discrimination module 206 is used to: use the trained dual-branch spectral Transformer maize germplasm cross-germplasm viability detection model to discriminate cross-germplasm maize and obtain the viability prediction results of cross-germplasm maize maize.
[0194] Optionally, in the above technical solution, the segmentation module 202 is specifically used for:
[0195] By manually annotating, the boundaries of the embryo region and the endosperm region in the hyperspectral images of multiple maize seeds were annotated to obtain embryo annotation data and endosperm annotation data.
[0196] Using hyperspectral images of multiple maize seeds, combined with embryo and endosperm annotation data, the constructed mobile inverted bottleneck UNet germplasm hyperspectral image segmentation model was trained.
[0197] Using the trained mobile inverted bottleneck UNet germplasm hyperspectral image segmentation model, the hyperspectral image of each sample of maize seed after background removal is segmented to determine the hyperspectral image of the embryo region and the hyperspectral image of the endosperm region.
[0198] Optionally, in the above technical solution, the preprocessing module 204 is specifically used to: perform noise reduction processing, baseline drift correction processing, light scattering correction processing, and data scaling processing on each hyperspectral data.
[0199] Optionally, in the above technical solution, the dual-branch spectral Transformer maize germplasm cross-germplasm vitality detection model includes: a multi-scale CNN module, a Transformer module, a multi-level feature fusion attention module, and a linear classification module. The multi-scale CNN module is used to calculate the local features of each preprocessed hyperspectral data point, the Transformer module is used to calculate the global features of each preprocessed hyperspectral data point, the multi-level feature fusion attention module is used to: map the local and global features into multiple feature maps of the same dimension, and assign attention score weights to each feature map through activation function layers. Based on the assigned attention score weights, all feature maps are fused to obtain multi-level global-local fused features. The linear classification module is used to: sequentially perform global average pooling and linear layer operations on the multi-level global-local fused features to obtain the vitality prediction result.
[0200] Optionally, in the above technical solution, the acquisition module 201 is specifically used for:
[0201] Hyperspectral imaging devices were used to acquire hyperspectral images of each maize seed in the sample maize germplasm resources, and viability tag data of each maize seed in the sample maize germplasm resources were obtained through germination experiments.
[0202] It should be noted that the beneficial effects of the maize germplasm resource viability cross-germplasm discrimination system 200 provided in the above embodiments are the same as the beneficial effects of the maize germplasm resource viability cross-germplasm discrimination method described above, and will not be repeated here. Furthermore, the system provided in the above embodiments is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the system can be divided into different functional modules according to the actual situation to complete all or part of the functions described above. In addition, the system and method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process is detailed in the method embodiments, and will not be repeated here.
[0203] The maize germplasm resource viability cross-germplasm discrimination system of the present invention can be a computer program (including program code) running on a computer device. For example, the maize germplasm resource viability cross-germplasm discrimination system of the present invention is an application software that can be used to execute the corresponding steps in the maize germplasm resource viability cross-germplasm discrimination method of the present invention.
[0204] In some embodiments, the maize germplasm resource viability cross-germplasm discrimination system of the present invention can be implemented in a combination of hardware and software. As an example, the maize germplasm resource viability cross-germplasm discrimination system of the present invention can be a processor in the form of a hardware decoding processor, which is programmed to execute the maize germplasm resource viability cross-germplasm discrimination method of the present invention. For example, the processor in the form of a hardware decoding processor can be one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.
[0205] The modules described in the embodiments of this invention can be implemented in software or hardware. The names of the modules are not, in some cases, limiting the scope of the module itself.
[0206] An electronic device according to an embodiment of the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements any of the above-mentioned methods for cross-germplasm identification of maize germplasm resource viability. That is, an electronic device according to an embodiment of the present invention may include, but is not limited to: a processor and a memory; the memory is used to store the computer program; the processor is used to execute the method for cross-germplasm identification of maize germplasm resource viability shown in any embodiment of the present invention by calling the computer program.
[0207] In one alternative embodiment, an electronic device is provided, such as Figure 7 As shown, Figure 7The illustrated electronic device 4000 includes a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, for example, via a bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 4004 is not limited to one type, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present invention.
[0208] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this invention. Processor 4001 may also be a combination that implements computational functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0209] Bus 4002 may include a path for transmitting information between the aforementioned components. Bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 4002 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 7 The bus 4002 is represented by only one thick line, but this does not mean that there is only one bus or one type of bus.
[0210] The memory 4003 may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto.
[0211] The memory 4003 stores the application code (computer program) for executing the present invention, and its execution is controlled by the processor 4001. The processor 4001 executes the application code stored in the memory 4003 to implement the content shown in the foregoing method embodiments.
[0212] Among them, electronic devices can also be terminal devices, which can be any device that can install applications, including at least one of smartphones, tablets, laptops, desktop computers, smart speakers, smartwatches, smart TVs, and smart in-vehicle devices.
[0213] It should be noted that, Figure 7 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.
[0214] An embodiment of the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any of the above-mentioned methods for cross-germplasm identification of maize germplasm resource viability.
[0215] Alternatively, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, a floppy disk, and an optical data storage device, etc.
[0216] In an exemplary embodiment, a computer program product or computer program is also provided, which includes computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform any of the above-described methods for cross-germplasm determination of maize germplasm resource viability.
[0217] Computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof. These programming languages include object-oriented programming languages—such as Java, Smalltalk, and C++—and conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0218] It should be understood that the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0219] The computer-readable storage medium provided in this invention can be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EEPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0220] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the method shown in the above embodiments.
[0221] The above description is merely a preferred embodiment of the present invention and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of disclosure in this invention is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this invention.
[0222] It should be noted that the terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and represent a limitation on a specific order or sequence. Where appropriate, the order of use for similar objects can be interchanged so that the embodiments of this application described herein can be implemented in an order other than that shown or described.
[0223] Those skilled in the art will recognize that this invention can be implemented as a system, method, or computer program product. Therefore, this invention can be specifically implemented in the following forms: it can be entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software, generally referred to herein as a "circuit," "module," or "system." Furthermore, in some embodiments, this invention can also be implemented as a computer program product contained in one or more computer-readable media, which includes computer-readable program code.
[0224] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A method for determining the viability of maize germplasm resources across germplasm, characterized in that, include: Obtain hyperspectral images of each sample maize seed in the sample maize germplasm resource, and obtain viability tag data of each sample maize seed in the sample maize germplasm resource; Threshold segmentation was performed on the hyperspectral image of each sample of maize seed to obtain the hyperspectral image of each sample of maize seed after background removal. Then, region segmentation was performed on the hyperspectral image of each sample of maize seed after background removal to determine the hyperspectral image of the embryo region and the hyperspectral image of the endosperm region. Based on the hyperspectral images of the embryo region and the endosperm region, hyperspectral data of the embryo region and the endosperm region were obtained. The hyperspectral data of each sample of corn seeds were obtained from the background-removed hyperspectral image of each sample of corn seeds. Preprocess each hyperspectral data point; Feature selection was performed on each preprocessed hyperspectral data, and the constructed bi-branch spectral Transformer maize germplasm cross-germplasm viability detection model was trained by combining the viability label data of each sample maize seed. Using a trained dual-branch spectral Transformer maize germplasm cross-germplasm viability detection model, cross-germplasm maize samples were identified, and the viability prediction results of the cross-germplasm maize samples were obtained. For each sample of maize seeds, the hyperspectral image after background removal was used for region segmentation to determine the hyperspectral images of the embryo region and the endosperm region, including: By manually annotating, the boundaries of the embryo region and the endosperm region in the hyperspectral images of multiple maize seeds were annotated to obtain embryo annotation data and endosperm annotation data. Using hyperspectral images of multiple maize seeds, combined with embryo and endosperm annotation data, the constructed mobile inverted bottleneck UNet germplasm hyperspectral image segmentation model was trained. The data processing procedure of the UNet germplasm hyperspectral image segmentation model with a moving inverted bottleneck is as follows: The hyperspectral image of the sample maize seeds after background removal is processed through an initial block. The output of the initial block is used as the input to the first moving inverted bottleneck convolutional module, and a convolutional layer is used to downsample the output of the initial block to obtain the first downsampled result. This first downsampled result is then processed through four bottleneck modules to obtain the first processed result. This first processed result is then used as the input to the second moving inverted bottleneck convolutional module, and a convolutional layer is used to downsample the first processed result to obtain the second downsampled result. This second downsampled result is then processed through seven bottleneck modules to obtain the second processed result. This second processed result is then used as the input to the third moving inverted bottleneck convolutional module, and a convolutional layer is used to downsample the second processed result to obtain the third downsampled result. This third downsampled result is then processed through seven bottleneck modules to obtain the third processed result. After processing by 7 bottleneck modules, the fourth processing result is obtained. A convolutional layer is used to upsample the fourth processing result and the output of the third moving-flip bottleneck convolutional module to obtain the first upsampled result. The first upsampled result is then processed by 2 bottleneck modules to obtain the fifth processing result. A convolutional layer is then used to upsample the fifth processing result and the output of the second moving-flip bottleneck convolutional module to obtain the second upsampled result. The second upsampled result is then processed by 2 bottleneck modules to obtain the sixth processing result. A convolutional layer is then used to upsample the sixth processing result and the output of the first moving-flip bottleneck convolutional module to obtain the third upsampled result. The third upsampled result is then processed by 1 bottleneck module to obtain the seventh processing result. A transformation convolutional layer is used to process the seventh processing result to obtain the hyperspectral images of the embryo region and the endosperm region. The initial block performs convolution and max pooling operations on the input, and concatenates the results of the two operations to obtain the output of the initial block. The moving-flipping-bottom convolution module sequentially performs convolution, separable convolution, squeeze excitation module, and zero-layer operation on the input. Then, it adds the processing result to the input of the moving-flipping-bottom convolution module element by element to obtain the output of the moving-flipping-bottom convolution module. The bottleneck module performs convolution and asymmetric operations on the input, then divides the result into two paths for processing. In the first path, the result is processed through a 3×1 convolutional layer with ReLU activation and a 1×3 convolutional layer. In the second path, the result is max pooled. The outputs of the first and second paths are then processed sequentially through a ReLU activation and a 1×1 convolutional layer, a 1×1 convolutional layer, a ReLU activation and a zeroing layer. The processed result is then added element-wise to the input of the bottleneck module and processed through a BN+ReLU activation function to obtain the output of the bottleneck module. Using the trained mobile inverted bottleneck UNet germplasm hyperspectral image segmentation model, the hyperspectral image of each sample of maize seed after background removal was segmented to determine the hyperspectral image of the embryo region and the hyperspectral image of the endosperm region.
2. The method for cross-germplasm identification of maize germplasm resource viability according to claim 1, characterized in that, Preprocessing is performed on each hyperspectral data point, including: Each hyperspectral data point undergoes noise reduction, baseline drift correction, light scattering correction, and data scaling.
3. A method for cross-germplasm identification of maize germplasm resource viability according to any one of claims 1 to 2, characterized in that, The dual-branch spectral Transformer maize germplasm cross-germplasm viability detection model includes: a multi-scale CNN module, a Transformer module, a multi-level feature fusion attention module, and a linear classification module. The multi-scale CNN module calculates local features for each preprocessed hyperspectral data point, the Transformer module calculates global features for each preprocessed hyperspectral data point, and the multi-level feature fusion attention module maps the local and global features into multiple feature maps of the same dimension. It then assigns attention score weights to each feature map through activation function layers and fuses all feature maps based on these assigned attention score weights to obtain multi-level global-local fused features. The linear classification module sequentially performs global average pooling and linear layer operations on the multi-level global-local fused features to obtain the viability prediction result.
4. A method for cross-germplasm determination of maize germplasm viability according to any one of claims 1 to 2, characterized in that, Obtain hyperspectral images of each maize seed sample from the sample maize germplasm resource, and obtain viability tag data for each maize seed sample from the sample maize germplasm resource, including: Hyperspectral imaging devices were used to acquire hyperspectral images of each sample maize seed in the sample maize germplasm resources, and viability tag data of each sample maize seed in the sample maize germplasm resources were obtained through germination experiments.
5. A cross-germplasm discrimination system for maize germplasm resources, characterized in that, It includes an acquisition module, a segmentation module, a hyperspectral data acquisition module, a preprocessing module, a model training module, and a discrimination module; The acquisition module is used to: acquire hyperspectral images of each sample maize seed in the sample maize germplasm resource, and obtain viability tag data of each sample maize seed in the sample maize germplasm resource; The segmentation module is used to: perform threshold segmentation on the hyperspectral image of each sample corn seed to obtain a background-removed hyperspectral image of each sample corn seed, and perform region segmentation on the background-removed hyperspectral image of each sample corn seed to determine the hyperspectral image of the embryo region and the hyperspectral image of the endosperm region. The hyperspectral data acquisition module is used to: obtain hyperspectral data of the embryo region and hyperspectral data of the endosperm region based on the hyperspectral images of the embryo region and the endosperm region; The hyperspectral data acquisition module is also used to: obtain hyperspectral data of each sample corn seed from the hyperspectral image of each sample corn seed after removing the background; The preprocessing module is used to: preprocess each hyperspectral data; The model training module is used to: perform feature selection on each preprocessed hyperspectral data, and train the constructed dual-branch spectral Transformer maize germplasm cross-germplasm viability detection model in combination with the viability label data of each sample maize seed; The discrimination module is used to: use the trained dual-branch spectral Transformer maize germplasm cross-germplasm viability detection model to discriminate cross-germplasm maize, and obtain the viability prediction result of the cross-germplasm maize to be discriminated; The segmentation module is specifically used for: By manually annotating, the boundaries of the embryo region and the endosperm region in the hyperspectral images of multiple maize seeds were annotated to obtain embryo annotation data and endosperm annotation data. Using hyperspectral images of multiple maize seeds, combined with embryo and endosperm annotation data, the constructed mobile inverted bottleneck UNet germplasm hyperspectral image segmentation model was trained. The data processing procedure of the UNet germplasm hyperspectral image segmentation model with a moving inverted bottleneck is as follows: The hyperspectral image of the sample maize seeds after background removal is processed through an initial block. The output of the initial block is used as the input to the first moving inverted bottleneck convolutional module, and a convolutional layer is used to downsample the output of the initial block to obtain the first downsampled result. This first downsampled result is then processed through four bottleneck modules to obtain the first processed result. This first processed result is then used as the input to the second moving inverted bottleneck convolutional module, and a convolutional layer is used to downsample the first processed result to obtain the second downsampled result. This second downsampled result is then processed through seven bottleneck modules to obtain the second processed result. This second processed result is then used as the input to the third moving inverted bottleneck convolutional module, and a convolutional layer is used to downsample the second processed result to obtain the third downsampled result. This third downsampled result is then processed through seven bottleneck modules to obtain the third processed result. After processing by 7 bottleneck modules, the fourth processing result is obtained. A convolutional layer is used to upsample the fourth processing result and the output of the third moving-flip bottleneck convolutional module to obtain the first upsampled result. The first upsampled result is then processed by 2 bottleneck modules to obtain the fifth processing result. A convolutional layer is then used to upsample the fifth processing result and the output of the second moving-flip bottleneck convolutional module to obtain the second upsampled result. The second upsampled result is then processed by 2 bottleneck modules to obtain the sixth processing result. A convolutional layer is then used to upsample the sixth processing result and the output of the first moving-flip bottleneck convolutional module to obtain the third upsampled result. The third upsampled result is then processed by 1 bottleneck module to obtain the seventh processing result. A transformation convolutional layer is used to process the seventh processing result to obtain the hyperspectral images of the embryo region and the endosperm region. The initial block performs convolution and max pooling operations on the input, and concatenates the results of the two operations to obtain the output of the initial block. The moving-flipping-bottom convolution module sequentially performs convolution, separable convolution, squeeze excitation module, and zero-layer operation on the input. Then, it adds the processing result to the input of the moving-flipping-bottom convolution module element by element to obtain the output of the moving-flipping-bottom convolution module. The bottleneck module performs convolution and asymmetric operations on the input, then divides the result into two paths for processing. In the first path, the result is processed through a 3×1 convolutional layer with ReLU activation and a 1×3 convolutional layer. In the second path, the result is max pooled. The outputs of the first and second paths are then processed sequentially through a ReLU activation and a 1×1 convolutional layer, a 1×1 convolutional layer, a ReLU activation and a zeroing layer. The processed result is then added element-wise to the input of the bottleneck module and processed through a BN+ReLU activation function to obtain the output of the bottleneck module. Using the trained mobile inverted bottleneck UNet germplasm hyperspectral image segmentation model, the hyperspectral image of each sample of maize seed after background removal was segmented to determine the hyperspectral image of the embryo region and the hyperspectral image of the endosperm region.
6. The maize germplasm resource viability cross-germplasm discrimination system according to claim 5, characterized in that, Preprocessing is performed on each hyperspectral data point, including: Each hyperspectral data point undergoes noise reduction, baseline drift correction, light scattering correction, and data scaling.
7. An electronic device, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the cross-germplasm discrimination method for maize germplasm resource viability as described in any one of claims 1 to 4.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the cross-germplasm discrimination method for maize germplasm resource viability as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Hyperspectral image classification method and device based on double-branch multi-scale CNN (Convolutional Neural Network) and memory enhancement Transform
CN119625414A