Special crystal micro-impurity hyperspectral detection method

CN122929407APending Publication Date: 2026-10-16HEFEI INSTITUTE OF PHYSICAL SCIENCE CHINESE ACADEMY OF SCIENCES
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611417116.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-14
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

但是,对于晶体主体与微小杂质整体光谱趋势接近、有效类别差异仅表现为局部弱变化的情况,仍存在进一步改进空间

Benefits of technology

本发明将预处理后的有效波段直接响应与一维卷积神经网络提取的相邻谱段局部组合特征进行连接,使各有效波段自身的光谱响应和经过局部组合形成的网络学习特征能够共同参与后续判别,有利于保留特种晶体主体与微小杂质之间分散于不同波段和局部谱段中的弱差异信息。在融合特征形成后,先利用各维特征与类别标签之间的互信息进行候选特征预筛,可以缩小后续特征组合搜索范围;再利用二值粒子群优化按照特征子集的分类评价结果及特征数量进行组合搜索,可以进一步从候选特征中确定具有较好联合判别能力的特征子集,从而减少冗余、相关及分类贡献有限的信息对分类过程的干扰。训练完成后固定预处理方式、特征提取器、最终优选特征索引及支持向量机分类模型,并在检测阶段按照相同的数据处理关系进行逐像元分类,有利于保持训练数据与待检测数据之间的特征位置及排列关系一致,从而提高特种晶体微小杂质分类识别的准确性和稳定性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122929407A_ABST
    Figure CN122929407A_ABST
Patent Text Reader

Abstract

The application discloses a special crystal micro-impurity hyperspectral detection method, and relates to the technical field of hyperspectral image processing and material detection. After the hyperspectral image of the special crystal is preprocessed, the effective waveband direct response is connected with the adjacent spectral segment local combination features extracted by the one-dimensional convolutional neural network to form fusion spectral features; the mutual information is used for candidate feature pre-screening, the final optimal feature index is determined through binary particle swarm optimization, and a support vector machine classification model is trained according to the feature index; during detection, the features are extracted according to the same processing mode, and the classification is performed pixel by pixel, and the distribution of the crystal main body, the micro-impurities and the background is obtained by restoring the spatial positions of the pixels. The method can take into account the direct waveband information and the local spectral segment combination information, and reduce the redundancy and interference in the fusion features, and is suitable for the hyperspectral classification and detection of the micro-impurities of the special crystal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of hyperspectral image processing and material detection technology, and in particular to a hyperspectral method for detecting minute impurities in special crystals. Background Technology

[0002] Hyperspectral imaging can acquire spatial information about a target while obtaining spectral responses across continuous bands. Different materials, due to differences in composition and physical properties, can exhibit different spectral characteristics in certain bands or local spectral segments. Therefore, hyperspectral imaging is applied to tasks such as mineral identification, material classification, and anomaly target detection.

[0003] The purity of specialty crystal materials has a significant impact on the stability of their properties. During production, packaging, and transportation, minute impurities may be introduced onto or around the surface of the crystal material. Some of these minute impurities are visually similar to the main crystal and occupy few spatial pixels in hyperspectral images. For these targets, the overall spectral variation trends of the main crystal and the minute impurities may also be quite similar, and the differences that can be used for classification often lie in subtle changes in certain spectral band responses or local spectral band combinations.

[0004] Chinese invention patent document CN118941879A (publication date: November 12, 2024) discloses a method and system for classifying ores. This scheme first determines the location and mask of the ores to be classified, reducing the influence of background and non-target particles. Then, it uses three-dimensional convolutional kernels of different sizes to extract spectral and texture information respectively, and adaptively fuses different features through an attention mechanism. Finally, it uses a hyperspectral image classification model to obtain the ore category. This scheme can simultaneously utilize spectral and spatial texture information from hyperspectral images and dynamically adjust based on the importance of features.

[0005] Chinese invention patent application CN120976738A (publication date: November 18, 2025) discloses a hyperspectral anomaly detection method based on self-learning and multi-level spectral feature selection. This method selects representative bands based on the statistical and structural characteristics of hyperspectral data through autoencoding, probability mapping, and sampling, and then feeds the selected hyperspectral data into a network with a hierarchical feature fusion structure. Through different levels of spectral feature processing and reconstruction error evaluation, hyperspectral anomaly target detection in complex backgrounds can be achieved.

[0006] The aforementioned techniques demonstrate that convolutional feature learning, attention mechanisms, band selection, or hierarchical feature fusion can reduce redundant information and enhance discriminative information during hyperspectral classification and anomaly detection. However, for cases where the overall spectral trends of the crystal body and minute impurities are similar, and the effective category differences only manifest as weak local variations, further improvement is still possible. When using only the features transformed by the network, the direct responses of each effective band cannot participate in subsequent discrimination in their original form; while simultaneously introducing multiple spectral features increases the dimensionality of the fused features and may retain features with high correlation, information redundancy, or limited classification contribution.

[0007] Furthermore, ranking features based on their correlation with categories primarily reflects the discriminative relationships when features are used independently, failing to directly reflect the complementary effects of multiple weakly disparate features used together. Directly searching for feature combinations within a higher-dimensional fusion feature space would broaden the range of candidate feature combinations, making the determination of effective feature combinations even more challenging.

[0008] Therefore, how to fully utilize the direct response information of each effective band and the local combination information of adjacent spectral bands when the spectral differences between the crystal body and the micro-impurities are weak, and reduce the redundancy and interference in the fused features, and further determine the effective feature combination with joint discrimination capability, has become an urgent technical problem to be solved. Summary of the Invention

[0009] The technical problem to be solved by this invention is: when the spectral differences between the crystal body and the micro-impurities are weak, how to make full use of the direct response information of each effective band and the local combination information of adjacent spectral bands, and reduce the redundancy and interference in the fusion features, so as to further determine the effective feature combination with joint discrimination ability.

[0010] To address the aforementioned technical problems, this invention proposes a hyperspectral detection method for minute impurities in special crystals, comprising: preprocessing a hyperspectral image of the special crystal to obtain a preprocessed pixel spectral vector composed of effective band responses; inputting the preprocessed spectral vector into a direct spectral feature branch and a one-dimensional convolutional neural network feature branch, the former retaining the spectral responses of each effective band, and the latter extracting local combined features of adjacent bands along the spectral dimension; concatenating the outputs of the two branches along the feature dimension to obtain a fused spectral feature; calculating the mutual information score between each dimension of the fused spectral feature and the training sample category label, sorting the mutual information scores from high to low, and selecting the top... These features form a candidate feature set, where... The number of candidate features is used as the search space for binary particle swarm optimization. The particle fitness is determined based on the classification evaluation results and feature count of each particle's corresponding feature subset. The final preferred feature index is determined through iterative search. The preferred features of the training samples are extracted based on the final preferred feature index, and a support vector machine classification model is trained in combination with the category labels. The hyperspectral image to be detected is processed in the same preprocessing and feature construction manner. The corresponding features are extracted based on the final preferred feature index and input into the support vector machine classification model to obtain the pixel prediction category. The prediction category is restored to the corresponding spatial position of the original hyperspectral image to obtain the spatial distribution of the special crystal body, micro-impurities, and background area.

[0011] Preferably, the preprocessing includes: performing response correction on the original hyperspectral data according to the calibration information of the hyperspectral imaging system, and correcting abnormal responses distributed along the spatial direction; removing low-response or noisy bands according to the response intensity and signal-to-noise characteristics of each band, and performing Savitzky-Golay smoothing on the spectrum after the effective bands are selected, to obtain the pixel preprocessed spectral vector arranged in the order of the effective bands.

[0012] Preferably, the training data and the hyperspectral image to be detected use the same preprocessing method and effective band range.

[0013] Preferably, the feature branch of the one-dimensional convolutional neural network processes the preprocessed spectral vector of the pixel sequentially along the spectral dimension through convolution, nonlinear mapping, pooling, and global feature aggregation to obtain network-learned features of a fixed length. ,in, Indicates the first Preprocessed spectral vectors of pixels, The parameter is The feature extraction process of a one-dimensional convolutional neural network. This indicates the dimension of the network's learned features. The one-dimensional convolutional neural network is trained using training samples with class labels. After training, the network parameters are fixed and the feature extraction part is retained to obtain the network-learned features of the training samples and the pixels to be detected.

[0014] Preferably, the first The preprocessed spectral vector of each pixel is represented as follows: ,in, This indicates the number of effective bands; the preprocessed spectral vector of the pixel and the network-learned features are concatenated along the feature dimension to obtain the fused spectral features. ,in, .

[0015] Preferably, the number of training samples is set to be... For the first of the fused spectral features 3D features, representing the feature values ​​of all training samples in this dimension as Calculate the first Dimensional features and category labels Mutual information score between Sort the results according to the mutual information scores from highest to lowest, and select the top... These features form a candidate feature set. ,in, , This indicates the feature indexes that are retained after sorting.

[0016] Preferably, the candidate feature index is determined by the training samples and the correspondence between the candidate features and the binary positions of the particles is maintained during the binary particle swarm feature subset search process; after the binary particle swarm optimization is completed, the final preferred feature index relative to the fused spectral features is mapped according to the candidate feature index corresponding to the finally selected candidate feature.

[0017] Preferably, the first in binary particle swarm optimization Each particle uses a length of binary position vector This represents the feature selection state, where, , This indicates selecting the first feature from the candidate feature set. One characteristic, Indicates not to select the first one. One feature; obtain the feature subset corresponding to the particle based on the binary position vector. .

[0018] Preferably, the individual optimal position of each particle and the global optimal position of the particle swarm are updated according to the fitness evaluation results of each particle, and the velocity and binary position of the particles are iteratively updated according to the binary particle swarm optimization rule; after reaching the preset stopping condition, the binary position corresponding to the global optimal position is determined as the final feature selection result, and the final preferred feature index relative to the fused spectral features is obtained by mapping the positions with a value of 1 in the global optimal particles and the corresponding candidate feature indices, forming a feature index containing... The final preferred features of the features, wherein, .

[0019] Preferably, after training, the hyperspectral data preprocessing method, one-dimensional convolutional neural network feature extractor, final optimized feature index, and trained support vector machine classification model are fixed. When detecting the hyperspectral image to be detected, the fixed hyperspectral data preprocessing method, one-dimensional convolutional neural network feature extractor, final optimized feature index, and support vector machine classification model are called to perform pixel-by-pixel classification, without retraining the one-dimensional convolutional neural network, mutual information sorting, and binary particle swarm feature subset search.

[0020] Compared with the prior art, the present invention has the following beneficial effects: This invention connects the preprocessed effective band direct response with the local combined features of adjacent spectral bands extracted by a one-dimensional convolutional neural network. This allows the spectral response of each effective band and the network-learned features formed through local combination to jointly participate in subsequent discrimination, which helps preserve the weak differences between the main body of the special crystal and the micro-impurities dispersed in different bands and local spectral bands. After the fused features are formed, candidate features are pre-screened using the mutual information between each feature and the category label, which can narrow the search range for subsequent feature combinations. Then, binary particle swarm optimization is used to perform combination search according to the classification evaluation results and the number of features of the feature subset, which can further determine the feature subset with better joint discrimination ability from the candidate features, thereby reducing the interference of redundant, correlated, and classification-limited information on the classification process. After training, the preprocessing method, feature extractor, final optimized feature index, and support vector machine classification model are fixed, and pixel-by-pixel classification is performed according to the same data processing relationship during the detection stage. This helps maintain the consistency of feature positions and arrangement relationships between the training data and the data to be detected, thereby improving the accuracy and stability of the classification and identification of micro-impurities in special crystals. Attached Figure Description

[0021] The accompanying drawings in this application are described below: Figure 1 This is a schematic diagram of the overall process of the hyperspectral detection method for minute impurities in special crystals provided in the embodiments of this application. Detailed Implementation

[0022] The technical solution of the present invention will be further described below with reference to the accompanying drawings and specific embodiments. This embodiment is used to illustrate the specific implementation process of the technical solution of the present invention and is not intended to limit the scope of protection of the present invention. For conventional implementation conditions in hyperspectral data processing, machine learning model training, and data storage and retrieval that are not specifically limited in this embodiment, those skilled in the art can use conventional technical means adapted to the corresponding processing functions to complete them.

[0023] Example 1 This embodiment provides a hyperspectral detection method for minute impurities in special crystals. This method addresses situations where the main body of the special crystal and the minute impurities have similar appearances and overall spectral trends, but the differences in effective categories are mainly dispersed in the responses of some effective bands and the local combination relationships of adjacent spectral bands. It employs a joint representation of direct spectral features and features learned by a one-dimensional convolutional neural network, and further utilizes mutual information pre-screening and binary particle swarm feature subset search for two-level feature optimization.

[0024] The method in this embodiment includes a model training phase and a hyperspectral image detection phase. The model training phase is used to determine the hyperspectral data preprocessing method, the one-dimensional convolutional neural network feature extractor, the final optimized feature index, and the support vector machine classification model. The hyperspectral image detection phase calls the results determined in the model training phase to perform pixel-by-pixel classification on the hyperspectral image of the special crystal to be detected, and restores the classification results to the original spatial position.

[0025] like Figure 1 As shown, both the model training and hyperspectral image detection stages require hyperspectral data preprocessing and bi-branch spectral feature construction. Mutual information pre-screening, binary particle swarm optimization feature subset search, and support vector machine classification model training are completed during the model training stage. The detection stage directly calls the already determined feature extraction method, the final optimized feature index, and the trained support vector machine classification model, without re-performing mutual information sorting and binary particle swarm optimization.

[0026] This embodiment can be executed by a computing device with hyperspectral data processing capabilities. The input for the model training phase includes hyperspectral training samples with category labels. The training samples can be formed from spectral data of regions of interest with category labels. The input for the hyperspectral image detection phase is a hyperspectral image of the special crystal to be detected. The computing device reads the corresponding hyperspectral data and training sample category labels, and performs data processing according to the following steps.

[0027] Step 1: Preprocess the hyperspectral data.

[0028] First, the original hyperspectral data of the special crystals are corrected based on the calibration information of the hyperspectral imaging system to reduce the impact of imaging system response differences on the spectral responses of different pixels and different bands.

[0029] Subsequently, anomalous responses distributed along the spatial direction are corrected to suppress stripe-like anomalous responses in the hyperspectral image. The validity of the original bands is determined based on the response intensity and signal-to-noise characteristics of each spectral band. Bands with low response or high noise are removed, retaining only the effective bands that can stably characterize the spectral responses of the special crystal matrix and minute impurities.

[0030] For the For each pixel, after effective band selection, its effective band spectral vector is represented as: .in, Indicates the number of effective bands. Indicates the first The pixel in the first Spectral response values ​​at each effective band.

[0031] The spectra after effective band selection are further smoothed using Savitzky-Golay processing to reduce the interference of spectral noise on the local spectral band response relationships. After smoothing, the spectral responses are arranged in the original order of the effective bands, forming the preprocessed spectral vector used for subsequent bi-branch feature construction.

[0032] The same response correction method, abnormal response correction method, effective band range, and spectral smoothing method are used in the model training stage and the hyperspectral image detection stage, so that the training samples and the pixels to be detected have corresponding band positions and data processing relationships when entering the subsequent feature extraction process.

[0033] Step 2: Construct fused spectral features using a dual-branch structure.

[0034] The preprocessed spectral vector of each pixel obtained in step 1 is simultaneously fed into the direct spectral feature branch and the one-dimensional convolutional neural network feature branch, and the two branches process the same preprocessed spectral vector in parallel.

[0035] The direct spectral feature branch does not perform network feature transformation on the original arrangement relationship between the effective bands. Instead, it preserves the preprocessed spectral responses of each effective band as direct spectral features. Therefore, the weak differential responses contained within each effective band can still be directly incorporated into the subsequent feature selection process.

[0036] The feature branch of a one-dimensional convolutional neural network extracts features along the spectral dimension to assess the response relationships between adjacent bands. This branch establishes local response combinations of adjacent spectral bands through convolution, forms nonlinear feature representations of local spectral changes through nonlinear mapping, and generates fixed-length network-learned features through pooling and global feature aggregation.

[0037] In one specific implementation, the one-dimensional convolutional neural network includes three levels of one-dimensional convolutional feature extraction units. The number of output channels in each convolutional layer is 32, 64, and 128, respectively, and the kernel sizes are 7, 5, and 5, respectively. After batch normalization, Rectified Linear Unit (ReLU) activation, and pooling, the convolutional features are aggregated through global average pooling and then feature-mapped to obtain 128-dimensional network learning features.

[0038] The aforementioned one-dimensional convolutional neural network was trained under supervised supervision using training samples with class labels. In one specific training method, the Adam optimization method was employed, with an initial learning rate of 0.001, a batch size of 128 samples, a maximum number of training epochs of 60, and Dropout (random deactivation) regularization applied after fully connected feature mapping, with a dropout ratio of 0.3. After network training, the network parameters were fixed, and the feature extraction portion from the input layer to the 128-dimensional feature output position was retained to generate training samples and the network-learned features corresponding to the pixels to be detected.

[0039] No. The network-learned features obtained after passing through the feature branches of a one-dimensional convolutional neural network for each pixel are represented as follows: .in, Indicates by parameters The defined feature extraction process of a one-dimensional convolutional neural network Dimensions representing the learning characteristics of a network.

[0040] Subsequently, the preprocessed spectral vector output from the direct spectral feature branch is... The network learns features from the feature branches of a one-dimensional convolutional neural network. Connect along the feature dimension to obtain the first The fused spectral features corresponding to each pixel ,in .

[0041] The dual-branch feature construction method described above preserves the direct spectral response of each effective band while utilizing a one-dimensional convolutional neural network to form network learning features that reflect the local combination relationships between adjacent spectral bands. These two types of features are then connected and entered into the same fusion feature space, enabling single-band direct response information and local spectral band combination information to jointly participate in subsequent category discrimination.

[0042] Step 3: Use mutual information to perform first-level candidate feature pre-screening.

[0043] The fused spectral features obtained after dual-branch connections simultaneously contain both direct spectral features and network-learned features, resulting in an increased feature dimension compared to using either branch alone. Therefore, before performing feature combination search, the mutual information of the fused spectral features is evaluated using the training sample class labels.

[0044] Let the number of training samples be , No. The fusion spectral features of each training sample are represented as follows: .in, Indicates the first The training sample of the th training sample Dimensional fusion features.

[0045] For the first in the fusion spectral features Dimensional features, all The feature values ​​of the training samples on this feature dimension are organized as follows: .

[0046] The class labels of the training samples are denoted as Calculate the first... Dimensional fusion features and category labels Mutual information score between Mutual information score reflects the statistical dependence between a corresponding feature dimension and the category label. The higher the mutual information score, the stronger the statistical association between that feature dimension and the category label when observed independently.

[0047] Following the above method, for all The mutual information scores of the 3D fused spectral features are calculated separately and then sorted from highest to lowest mutual information scores. Based on a preset number of candidate features or a candidate feature retention ratio, the top-ranked fused features are selected from the sorted features. Each feature forms a candidate feature set. and satisfy .

[0048] in, This represents the index of the feature retained after mutual information sorting within the original fused spectral features. The first [value] in the candidate feature set. Each candidate feature is denoted as .

[0049] After pre-screening candidate features, the feature index corresponding to the selected candidate features is saved. This candidate feature index remains unchanged in the subsequent binary particle swarm feature combination search to ensure a definite correspondence between the binary positions of particles and candidate features.

[0050] Mutual information pre-screening does not directly serve as the final feature selection result. Instead, it first narrows down the candidate range for subsequent combination searches from all fused spectral features. Therefore, based on retaining features statistically correlated with the category label, a second-level feature subset search can be used to further evaluate the classification and discriminative ability when multiple candidate features are used together.

[0051] Step 4: Use binary particle swarm optimization to perform a second-level feature subset search.

[0052] The result obtained in step 3 Each candidate feature serves as the search space for binary particle swarm optimization. Each particle corresponds to a feature selection combination from the candidate feature set.

[0053] For the particles, using a length of binary position vector This represents the characteristic selection state of the particle, where .

[0054] when When, it indicates the first The th particle in the candidate feature set Candidate features. When When the condition is met, it indicates that the candidate feature will not be included in the feature subset corresponding to the current particle.

[0055] Based on the particle's binary position vector, candidate features corresponding to positions with a value of 1 are extracted from the candidate feature set. The characteristic subset formed by the particles is represented as .

[0056] For each particle's corresponding feature subset, an internal classification model is used to perform classification evaluation on the training data. After obtaining the corresponding classification evaluation results, the number of features selected by the particle is also counted. The particle's fitness is determined based on the classification evaluation results and the number of selected features, so that the fitness evaluation reflects not only the classification discrimination ability of the feature subset, but also the size of the corresponding feature subset.

[0057] Following the processing rules of binary particle swarm optimization, the individual optimal position of each particle is updated based on its fitness evaluation results, and the global optimal position is updated within the particle swarm. Further iterative updates are made to the velocity and binary position of each particle, ensuring the particles... The selection state of each candidate feature is continuously adjusted in the candidate feature combination space.

[0058] After each update, the new particle positions are evaluated. While the preset stopping condition is not yet met, particle fitness evaluation and iterative updates of individual optimal positions, global optimal positions, particle velocities, and binary positions continue. When the preset stopping condition is reached, the search stops, and the binary position corresponding to the current global optimal particle is used as the final feature selection result.

[0059] Based on the positions of particles with a value of 1 in the globally optimal particle and their corresponding candidate feature indices, the final preferred feature index relative to the fused spectral features is obtained through mapping. Let the number of ultimately selected features be... Then it satisfies .

[0060] For the Each training sample is selected based on its fused spectral features according to the final preferred feature index. Extract the corresponding features to form the final optimized feature vector. .

[0061] In this two-level feature optimization process, mutual information pre-screening is mainly used to compress the candidate range of high-dimensional fused spectral features, while binary particle swarm optimization evaluates feature subsets composed of multiple features within the candidate range. The two work in sequence, forming a continuous data processing relationship between the first-level single-feature statistical correlation evaluation and the second-level multi-feature combination evaluation.

[0062] Step 5: Train the support vector machine classification model and save the model training results.

[0063] After completing the two-level feature optimization, the corresponding final optimized feature vector is extracted from the fused spectral features of each training sample according to the final optimized feature index, and the final optimized feature vector and the corresponding training sample category label are used together for training the support vector machine classification model.

[0064] The model parameters of the support vector machine (SVM) classification model are determined by the training data. For model training operations in the SVM classification model that are not particularly limited, the corresponding conventional training methods in supervised SVM classification in this field can be adopted without changing the data processing relationship of two-level feature optimization before training the classification model in this embodiment.

[0065] After training, the processing results generated during the training phase are fixed. This fixed content includes the hyperspectral data preprocessing method, the one-dimensional convolutional neural network feature extractor, the final optimized feature index, and the trained support vector machine classification model.

[0066] The hyperspectral data preprocessing method ensures that the detection stage produces the same effective band spectral representation as the training stage. A one-dimensional convolutional neural network feature extractor ensures that the same preprocessed spectrum yields the network-learned features corresponding to those obtained in the training stage. The final optimized feature index extracts features from the fused spectral features of the detected pixels that correspond to the input dimension of the classification model. The support vector machine classification model then obtains the predicted pixel category based on the final optimized features.

[0067] Step 6: Perform pixel-by-pixel inference on the hyperspectral image of the special crystal to be detected.

[0068] Input a complete hyperspectral image of the special crystal to be detected. First, apply the preprocessing methods determined during the model training phase to perform the same response correction, abnormal response correction, effective band filtering, and Savitzky-Golay smoothing on the hyperspectral image to be detected as on the training data.

[0069] For each pixel to be classified in the hyperspectral image to be detected, a preprocessed spectral vector is formed that is consistent with the arrangement of effective bands in the training phase.

[0070] The preprocessed spectral vector of each pixel to be classified is fed into the direct spectral feature branch and the pre-trained one-dimensional convolutional neural network feature extractor, respectively. The direct spectral feature branch retains the responses of each effective band in the preprocessed spectrum. The one-dimensional convolutional neural network feature extractor extracts local combined features of adjacent spectral bands according to the fixed network parameters after training.

[0071] The two types of features are connected along the feature dimension to generate the fused spectral features of the detected pixels in the same way as in the model training phase.

[0072] Subsequently, the final optimized feature index determined during the model training phase is invoked to extract the corresponding features from the fused spectral features of the detected pixels. The final selected features are determined. The feature extraction process maintains the same feature position and arrangement order as the training phase.

[0073] The extracted final preferred features are input into the trained support vector machine classification model, which then outputs the predicted category of the corresponding pixel.

[0074] Each pixel in the hyperspectral image to be classified is processed sequentially in the manner described above. After classification, each pixel retains its correspondence with the spatial coordinates of the original hyperspectral image.

[0075] The predicted category of each pixel is restored to its corresponding position according to its original spatial coordinates, thus forming a classification result map corresponding to the spatial position of the hyperspectral image to be detected. Based on the predicted category corresponding to each spatial position, the spatial distribution of the special crystal main body region, the micro-impurity region, and the background region can be obtained, and the different micro-impurity categories defined by the training category labels can be further distinguished.

[0076] During the detection process, the preprocessing methods, one-dimensional convolutional neural network feature extractor, final optimized feature index, and support vector machine classification model that have been fixed in the training phase are directly called. The one-dimensional convolutional neural network is not retrained, the mutual information ranking used to determine candidate features is not recalculated, and the binary particle swarm feature subset search is not performed again.

[0077] Through the above processing method, the direct response information of each effective band can always participate in feature construction in its original form before entering the classification model. Simultaneously, the one-dimensional convolutional neural network can nonlinearly model the local response relationships between adjacent bands, thus forming local spectral band combination features different from the direct spectral response. These two types of features together constitute fused spectral features, enabling the weak difference information dispersed in individual bands and adjacent spectral band combinations to be utilized in a unified feature space.

[0078] The added feature dimensions after fusion are processed through a two-stage feature optimization process. Mutual information pre-screening first narrows down the candidate range based on the statistical dependencies between each feature dimension and the category label. Binary particle swarm optimization then uses a subset of multiple candidate features as the evaluation object, taking into account both the classification evaluation results and the number of selected features to determine the final feature subset. Thus, based on the dual-branch enhancement of weak spectral difference information, redundant, correlated, or limited-classification-contribution information in the fused features is further filtered out, enabling the final classification model to use the features optimized through the two stages to identify minute impurities in special crystals.

[0079] Example 2 This embodiment further explains the hyperspectral data preprocessing and bibranch spectral feature construction process based on Embodiment 1. Unless otherwise specified, the content is the same as in Embodiment 1.

[0080] The model training phase begins by acquiring special crystal hyperspectral data for training. Each spatial pixel in the hyperspectral data corresponds to multiple band responses arranged along the spectral dimension. Due to differences in imaging responses, noise levels, and spatial orientation anomalies across different bands, uniform preprocessing is performed on the training data before feature extraction.

[0081] The original hyperspectral data is calibrated based on the calibration information of the hyperspectral imaging system to ensure that the calibrated data for each band reflects the spectral response of the corresponding pixel. Subsequently, anomalous responses distributed along the spatial direction of the hyperspectral image are corrected to reduce the impact of spatially oriented anomalous responses on the pixel spectrum.

[0082] After completing the above corrections, the bands are screened based on their response intensity and signal-to-noise characteristics. Bands with low response or high noise, or those that are difficult to stably reflect the spectral differences of the special crystal matrix and minute impurities, are eliminated, while valid bands that meet the requirements of subsequent feature analysis are retained.

[0083] After effective band selection, the first The effective band spectrum of each pixel is represented as follows: .in, Indicates the number of valid bands retained. Indicates the first The pixel in the first Spectral response values ​​at each effective band.

[0084] Following the order of the effective bands, the effective band spectrum of each pixel is smoothed using Savitzky-Golay smoothing. This smoothing operates on the spectral dimension to reduce noise fluctuations in the spectral response while preserving the original spectral arrangement between different bands. The processed spectral vector serves as the common input to both the direct spectral feature branch and the one-dimensional convolutional neural network feature branch.

[0085] After determining the preprocessing method during the model training phase, the response correction method, spatial anomaly response correction method, effective band range, and Savitzky-Golay smoothing method are fixed. When processing the hyperspectral image to be detected, the same preprocessing method and the same effective band range as in the training phase are used to ensure that the training samples and the samples to be detected have a consistent correspondence of spectral feature positions.

[0086] For each preprocessed pixel spectral vector, the direct spectral feature branch directly retains the response of each effective band in its band order, so that the spectral differences in a single effective band can continue to participate in subsequent feature selection and classification.

[0087] Simultaneously, the same preprocessed spectral vector is input into the feature branch of a one-dimensional convolutional neural network. The one-dimensional convolutional neural network performs convolution processing along the spectral dimension, extracting the local response relationship between adjacent bands through the convolution operation.

[0088] The convolution result is then subjected to nonlinear mapping to form local spectral combination features. Subsequently, pooling is used to reduce redundancy in the intermediate features, and further convolution and nonlinear mapping are used to extract the combination variation features of adjacent spectral bands.

[0089] In the network structure corresponding to this embodiment, the convolution results can be processed by batch normalization and ReLU activation, and then enter the max pooling layer. After the subsequent convolutional features are extracted, the features obtained along the spectral dimension are aggregated by global average pooling, and a fixed-length network learning feature is obtained through fully connected processing.

[0090] For the The features of pixels, obtained by a one-dimensional convolutional neural network, are represented as follows: .in, This represents the parameters of the one-dimensional convolutional neural network determined after training. Dimensions representing the learning characteristics of a network.

[0091] Characteristics of online learning It does not replace direct spectral features Connecting the two along the feature dimension forms a fused spectral feature. ,in .

[0092] The former thus formed The dimensional features correspond to the direct responses of each effective band after preprocessing, and the rest... The 3D features correspond to the combined features of local spectral segments extracted by a 1D convolutional neural network. The direct response and network-learned features have a definite positional correspondence in the fused spectral features.

[0093] During model training, the same dual-branch structure is used to generate fused spectral features for all training samples. After network training is complete, a fixed one-dimensional convolutional neural network feature extractor is applied. During the detection phase, the same one-dimensional convolutional neural network feature extractor is used for the pixels to be detected, ensuring that the network-learned features for the pixels to be detected have the same feature dimensions and arrangement as the network-learned features used in the training phase.

[0094] Through the above processing, direct spectral features retain the response variations of the effective bands themselves, while one-dimensional convolutional neural network features describe the response relationships formed after local combination between adjacent spectral bands. After fusion, both types of features can simultaneously serve as candidate sources for the optimal selection of features at both levels.

[0095] Example 3 This embodiment further explains the first-level candidate feature pre-screening process of mutual information based on Embodiment 1 and Embodiment 2.

[0096] After completing the dual-branch feature construction, each sample in the training data has 3D fusion spectral characteristics. Assume a total of The training sample, the first Each training sample is represented as .

[0097] For the Dimensional feature fusion constructs a feature vector by merging the feature values ​​of all training samples in that dimension according to the order of the training samples. .

[0098] Training sample class labels are represented as For each feature dimension, the mutual information score between that feature and the training sample category label is calculated to obtain... .

[0099] Calculate all in the same manner. The mutual information score of the fusion features. Direct spectral features and features learned by one-dimensional convolutional neural networks both participate in the mutual information evaluation in the same fusion feature space. Therefore, the mutual information ranking does not pre-distinguish the feature sources, but is uniformly evaluated according to the statistical dependence between each feature and the class label.

[0100] After calculating all mutual information scores, the corresponding feature indices are sorted from highest to lowest mutual information score. The sorting results are used to determine the range of candidate features for the second-level binary particle swarm optimization.

[0101] In one implementation, the number of candidate features can be predetermined. And select the top-ranked results from the mutual information ranking. One characteristic.

[0102] In another implementation, a candidate feature retention ratio can be predetermined, and a corresponding number of candidate features can be determined from the sorting results according to this retention ratio. The final number of candidate features is still denoted as [missing information]. and satisfy .

[0103] The original fused spectral feature indices retained after sorting according to mutual information scores are denoted as follows: This forms a candidate feature set. .

[0104] To facilitate subsequent binary particle swarm optimization, the features within the candidate feature set are sequentially denoted according to their determined arrangement as follows: Each candidate feature corresponds to a specific index in the fused spectral features.

[0105] After constructing the candidate feature set, the original fused spectral feature indexes corresponding to the candidate features are saved. During subsequent binary particle swarm optimization, each binary position corresponds one-to-one with the corresponding feature in the candidate feature set.

[0106] During the training phase of the support vector machine classification model, the final feature selection results are remapped to the corresponding positions of the original fused spectral features, and the corresponding features are extracted from the training samples.

[0107] For the hyperspectral image to be detected, the mutual information is not recalculated using the detection data, nor is the mutual information reordered. The detection phase calls upon the final preferred feature index determined during the training phase to extract features at the corresponding positions from the fused spectral features obtained using the same dual-branch approach.

[0108] The above processing enables mutual information evaluation to be completed only during the model training phase based on training data with class labels, thus allowing the feature selection relationships determined during the training phase to be directly used in the data to be detected.

[0109] The role of mutual information first-level pre-screening is to... A relatively small set of candidate features is formed from the dimensional fusion spectral features. This set of candidates is not the input to the final classification model, but rather serves as the search space for the second-level feature combination search.

[0110] Example 4 This embodiment further explains the binary particle swarm feature subset search process based on the aforementioned embodiments.

[0111] After the mutual information pre-screening is completed, the following are obtained: Candidate feature set of candidate features The candidate feature set is used as the search space for binary particle swarm optimization.

[0112] Each particle in the particle swarm corresponds to a candidate feature combination. For the th particles, using a length of binary position vector This represents the current feature selection state of the particle and satisfies... .

[0113] The first in the candidate feature set The candidate feature and the particle position vector of the th candidate feature. Each binary position corresponds to one of them.

[0114] when At that time, candidate features Selected as the The feature subset corresponding to each particle. When When, do not select candidate features .

[0115] No. The feature subset corresponding to each particle is represented as follows: .

[0116] In a single particle evaluation process, based on the current binary position of the particle, selected features are extracted from the candidate features of each training sample, and the resulting feature subset is used as the input for classification evaluation. The classification result of this feature subset is evaluated on the training data using an internal classification model.

[0117] In one specific implementation, the candidate feature subsets corresponding to particles are internally evaluated using a classification pipeline consisting of feature standardization and a linear support vector classifier. First, a feature standardization processor (StandardScaler) is used to standardize the scale of the candidate features. Then, a linear support vector classifier (LinearSVC) is used to obtain the classification performance evaluation results for the corresponding feature subsets. The penalty parameter of the LinearSVC... The value is set to 1, and the category weight is set to balanced. This classification pipeline is only used to evaluate the classification and discrimination ability of different candidate feature subsets during the binary particle swarm optimization process, and is not used as the final classification model for the hyperspectral image to be detected.

[0118] Simultaneously, the number of features selected by the current particle is counted based on its binary position. The fitness of the particle is determined by combining the classification evaluation results of the corresponding feature subset with the number of features it contains.

[0119] After evaluating each particle in the swarm as described above, the optimal position of each particle is updated based on its fitness.

[0120] Based on the optimal positions of each individual particle, the global optimal position corresponding to the current particle swarm is further determined.

[0121] Subsequently, the velocity of each particle is updated according to the binary particle swarm optimization rules, and its binary position is adjusted based on the updated particle state. After the binary position changes, the candidate feature combination corresponding to the particle also changes.

[0122] The corresponding feature subsets of the training samples are re-extracted from the updated particle positions, and the classification evaluation and fitness calculation are re-performed.

[0123] By repeatedly performing particle fitness evaluation, individual optimal position update, global optimal position update, particle velocity update, and binary position update in the above manner, different particles iteratively search in the candidate feature combination space.

[0124] If the preset stopping condition has not been met, continue to the next iteration. Once the preset stopping condition is met, end the binary particle swarm search and read the binary position of the current global best particle.

[0125] In the binary positions of the globally optimal particle, the candidate features corresponding to the positions with a value of 1 are determined as the final selected features.

[0126] Based on the established correspondence between the candidate feature index and the fusion spectral feature index, the positions with a value of 1 are mapped to specific feature positions in the fusion spectral features to form the final preferred feature index.

[0127] Let the number of features selected in the end be... Then the final number of features satisfies .

[0128] For the Based on the training samples, the corresponding features are extracted from the fused spectral features according to the final optimized feature index. Based on these features, the final optimized feature vector is obtained. .

[0129] All training samples are extracted using the same final preferred feature index, so that the final preferred features of different training samples have the same dimension and the same arrangement relationship.

[0130] In this process, the first-level mutual information screening forms a candidate range based on the statistical dependence between individual features and class labels. The second-level binary particle swarm optimization uses a subset of features composed of multiple candidate features as the classification evaluation object. Therefore, the two screening levels correspond to different feature evaluation levels.

[0131] Example 5 This embodiment, based on the above embodiments, further explains the process of fixing the model training results and calling the hyperspectral image to be detected.

[0132] After completing the binary particle swarm feature subset search, the corresponding final preferred features are extracted from the fused spectral features of all training samples with class labels according to the final preferred feature index.

[0133] The final selected features are combined with the corresponding training sample category labels to form the data used for training the support vector machine (SVM) classification model. The SVM classification model is trained using this training data, and the corresponding model parameters are determined through the training process.

[0134] After the support vector machine classification model is trained, the hyperspectral data preprocessing method, one-dimensional convolutional neural network feature extractor, final optimized feature index, and support vector machine classification model determined in the model training stage are used as the data processing results directly called in the subsequent detection stage.

[0135] Among them, the hyperspectral data preprocessing methods include at least the response correction relationship, spatial anomaly response correction relationship, effective band range, and spectral smoothing relationship determined during the model training phase.

[0136] The one-dimensional convolutional neural network feature extractor uses network parameters determined after training during the model training phase. When inputting new pixel preprocessed spectral vectors during the detection phase, the one-dimensional convolutional neural network is no longer retrained for the hyperspectral image to be detected.

[0137] The final preferred feature index corresponds to the fused spectral features. A fixed feature location. During the detection phase, the final preferred features of each pixel to be detected are extracted based on the same index, so that the input features of the support vector machine classification model in the detection phase are consistent with the feature locations and arrangements used in the model training phase.

[0138] During the detection phase, a complete hyperspectral image of the special crystal is used as input.

[0139] First, response correction and spatial anomaly response correction are performed according to the preprocessing method determined in the training phase. Then, the same effective bands are retained according to the effective band range determined in the training phase, and the same Savitzky-Golay smoothing process as in the training phase is performed.

[0140] After preprocessing, preprocessed spectral vectors are generated for each pixel to be classified in the hyperspectral image to be detected.

[0141] The preprocessed spectral vector of each pixel is directly used as the direct spectral feature, and simultaneously input into a fixed one-dimensional convolutional neural network feature extractor to obtain the corresponding network-learned features.

[0142] The two types of features are connected along the feature dimension to form a fused spectral feature with the same data composition relationship as the model training stage.

[0143] Read the final preferred feature index corresponding to this fused spectral feature. Each feature is used to form the final preferred feature vector of the pixel to be detected, arranged in the order determined during the model training phase.

[0144] The final optimized feature vector is input into the trained support vector machine classification model to obtain the predicted category of the corresponding pixel.

[0145] For other pixels to be classified in the hyperspectral image to be detected, repeat the above preprocessing, bi-branch feature construction, fusion feature generation, final optimized feature extraction and support vector machine classification process until the classification of the corresponding pixels is completed.

[0146] During data processing, each pixel retains its spatial coordinates in the original hyperspectral image. After classification, the predicted category of each pixel is written back to the position corresponding to its spatial coordinates, thus reconstructing the classification result image.

[0147] Based on the categories of each spatial location in the classification result image, the spatial distribution of the special crystal body, minute impurities, and background can be determined. For training data containing multiple categories of minute impurities, the support vector machine classification model outputs the corresponding category results and reconstructs the positional distribution of different categories of minute impurities in the hyperspectral image according to pixel spatial coordinates.

[0148] During the processing of the hyperspectral image to be detected, the network training process used to train the one-dimensional convolutional neural network is not re-executed, the candidate feature mutual information ranking is not recalculated based on the data to be detected, and the binary particle swarm feature subset search is not performed again.

[0149] By pre-determining the feature extraction and selection results during the training phase, the detection phase only needs to extract the corresponding features and complete the pixel classification based on the fixed data processing relationships, thereby ensuring that the fused feature structure obtained during the training phase, the final optimized feature position, and the input of the classification model remain consistent.

[0150] The technical solution of the present invention has been described above with reference to specific embodiments. The above embodiments are mainly used to illustrate the technical concept and specific implementation process of the present invention, and are not intended to limit the scope of protection of the present invention.

[0151] This invention performs unified preprocessing on hyperspectral data from special crystals, combining the direct spectral responses of each effective band with local combined features of adjacent spectral bands extracted by a one-dimensional convolutional neural network to form fused spectral features. Based on this, mutual information is first used to pre-screen candidate features from the fused spectral features, followed by binary particle swarm optimization to perform feature subset search on the candidate features. Finally, the candidate feature index corresponding to the selected feature is mapped to form a final preferred feature index relative to the fused spectral features. After model training, the hyperspectral data preprocessing method, the one-dimensional convolutional neural network feature extractor, the final preferred feature index, and the support vector machine classification model are fixed. The fixed results are then used to perform pixel-by-pixel classification and spatial location recovery on the hyperspectral image to be detected.

[0152] Without altering the above-described technical concept, those skilled in the art can make corresponding adjustments to the implementation process disclosed in this specification based on the actual hyperspectral imaging system, training data, and the object to be detected. As long as the relevant adjustments still employ the cooperative relationship between the technical means described in this invention and do not depart from the technical concept of this invention, their scope of protection should be determined in accordance with applicable laws.

Claims

1. A hyperspectral method for detecting minute impurities in special crystals, characterized in that, include: Preprocessing is performed on the hyperspectral image of the special crystal to obtain the pixel preprocessed spectral vector composed of the effective band response; The preprocessed spectral vector is input into the direct spectral feature branch and the one-dimensional convolutional neural network feature branch, respectively. The former retains the spectral response of each effective band, while the latter extracts the local combination features of adjacent bands along the spectral dimension. The outputs of the two branches are connected along the feature dimension to obtain the fused spectral features. Calculate the mutual information score between each dimension of the fused spectral features and the class labels of the training samples, sort them from high to low according to the mutual information score, and select the top ones. These features form a candidate feature set, where... The number of candidate features is used as the search space for binary particle swarm optimization. The particle fitness is determined based on the classification evaluation results and feature count of each particle's corresponding feature subset. The final preferred feature index is determined through iterative search. The preferred features of the training samples are extracted based on the final preferred feature index, and a support vector machine classification model is trained in combination with the category labels. The hyperspectral image to be detected is processed in the same preprocessing and feature construction manner. The corresponding features are extracted based on the final preferred feature index and input into the support vector machine classification model to obtain the pixel prediction category. The prediction category is restored to the corresponding spatial position of the original hyperspectral image to obtain the spatial distribution of the special crystal body, micro-impurities, and background area.

2. The method for hyperspectral detection of minute impurities in special crystals according to claim 1, characterized in that, The preprocessing includes: performing response correction on the original hyperspectral data according to the calibration information of the hyperspectral imaging system, correcting abnormal responses distributed along the spatial direction; removing low-response or noisy bands according to the response intensity and signal-to-noise characteristics of each band, and performing Savitzky-Golay smoothing on the spectrum after the effective bands are selected to obtain the pixel preprocessed spectral vector arranged in the order of the effective bands.

3. The method for hyperspectral detection of minute impurities in special crystals according to claim 2, characterized in that, The training data and the hyperspectral images to be detected use the same preprocessing method and effective band range.

4. The method for hyperspectral detection of minute impurities in special crystals according to claim 1, characterized in that, The feature branch of the one-dimensional convolutional neural network processes the preprocessed spectral vector of the pixel sequentially along the spectral dimension through convolution, nonlinear mapping, pooling, and global feature aggregation to obtain network-learned features of fixed length. ,in, Indicates the first Preprocessed spectral vectors of pixels, The parameter is The feature extraction process of a one-dimensional convolutional neural network. The dimension of the network learning features is indicated; the one-dimensional convolutional neural network is trained using training samples with class labels, and after training, the network parameters are fixed and the feature extraction part is retained to obtain the network learning features of the training samples and the pixels to be detected.

5. The method for hyperspectral detection of minute impurities in special crystals according to claim 4, characterized in that, No. The preprocessed spectral vector of each pixel is represented as follows: ,in, This indicates the number of effective bands; the preprocessed spectral vector of the pixel and the network-learned features are concatenated along the feature dimension to obtain the fused spectral features. ,in, .

6. The method for hyperspectral detection of minute impurities in special crystals according to claim 5, characterized in that, ... The number of training samples is For the first of the fused spectral features 3D features, representing the feature values ​​of all training samples in this dimension as Calculate the first Dimensional features and category labels Mutual information score between ; Sort the results according to their mutual information scores from highest to lowest, and select the top... These features form a candidate feature set. ,in, , This indicates the feature indexes that are retained after sorting.

7. The method for hyperspectral detection of minute impurities in special crystals according to claim 6, characterized in that, The candidate feature index is determined by the training samples and maintains the correspondence between the candidate features and the binary positions of the particles during the binary particle swarm feature subset search process. After the binary particle swarm optimization is completed, the final preferred feature index relative to the fused spectral features is mapped according to the candidate feature index corresponding to the finally selected candidate feature.

8. The method for hyperspectral detection of minute impurities in special crystals according to claim 6, characterized in that, The first in binary particle swarm optimization Each particle uses a length of binary position vector This represents the feature selection state, where, , This indicates selecting the first feature from the candidate feature set. One characteristic, Indicates not to select the first one. One feature; obtain the feature subset corresponding to the particle based on the binary position vector. .

9. The method for hyperspectral detection of minute impurities in special crystals according to claim 8, characterized in that, The individual optimal position of each particle and the global optimal position of the particle swarm are updated according to the fitness evaluation results of each particle, and the velocity and binary position of the particles are iteratively updated according to the binary particle swarm optimization rules. After reaching the preset stopping condition, the binary position corresponding to the global optimal position is determined as the final feature selection result. Based on the positions of 1 in the global optimal particles and their corresponding candidate feature indices, a final preferred feature index relative to the fused spectral features is mapped to form a feature index containing... The final preferred features of the features, wherein, .

10. The method for hyperspectral detection of minute impurities in special crystals according to claim 9, characterized in that, After training, the hyperspectral data preprocessing method, one-dimensional convolutional neural network feature extractor, final optimized feature index, and trained support vector machine classification model are fixed. When detecting the hyperspectral image to be detected, the fixed hyperspectral data preprocessing method, one-dimensional convolutional neural network feature extractor, final optimized feature index, and support vector machine classification model are called to perform pixel-by-pixel classification, without retraining the one-dimensional convolutional neural network, mutual information sorting, and binary particle swarm feature subset search.

Citation Information

Patent Citations

  • Ore classification method and system

    CN118941879A

  • Hyperspectral anomaly detection method for screening multi-level spectral features based on self-learning

    CN120976738A