Hyperspectral cerebrospinal fluid matter detection method and system fusing visual and spectral characteristics
Patent Information
- Application Number
- CN202510542750.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2026-10-20
- Estimated Expiration
- 2045-04-28
AI Technical Summary
然而,将高光谱成像技术应用于脑脊液物质检测仍面临诸多挑战
[0037](1)本发明通过采用SNV方法对脑脊液的高光谱图像数据进行预处理,能够单独处理每一条光谱,有效消除光谱中的散射问题,以及由样本颗粒大小不均匀、表面散射和光程变化带来的干扰,通过平均中心化、标准化和归一化步骤,进一步消除了光谱数据中的噪声和信号偏移,显著增强了光谱特征,使吸收峰和波峰变得更加明显,为后续分析提供了更为准确和可靠的数据基础。
Smart Images

Figure CN120404612B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of medical testing technology, specifically relating to a method and system for detecting hyperspectral cerebrospinal fluid substances that integrates visual and spectral characteristics. Background Technology
[0002] Cerebrospinal fluid (CSF), a crucial component of the human nervous system, is complex in composition and vital for its normal function. In the medical field, CSF analysis has always been a key step in the diagnosis, treatment, and monitoring of neurological diseases. However, existing CSF substance detection technologies have several shortcomings. First, traditional methods such as immunological and genetic testing are complex, requiring highly specialized equipment and operational skills, and are time-consuming, hindering rapid diagnosis. Second, these methods are susceptible to various factors such as sample quality and the testing environment, limiting the accuracy and reliability of the results. Furthermore, while biochemical analysis can provide some information about CSF composition, it often only detects a subset of substances and is ineffective at detecting trace amounts.
[0003] With the advancement of technology, hyperspectral imaging technology has gradually emerged. Hyperspectral imaging can simultaneously acquire spectral and spatial information of samples at different wavelengths, offering advantages such as high resolution and large information content. However, applying hyperspectral imaging technology to cerebrospinal fluid (CSF) material detection still faces many challenges. For example, how to effectively extract hyperspectral features of CSF, how to accurately identify the spectral characteristics of different substances, and how to construct an efficient detection model. Therefore, this paper proposes a hyperspectral CSF material detection method that integrates visual and spectral characteristics to address these issues. Summary of the Invention
[0004] The purpose of this invention is to provide a method and system for detecting hyperspectral cerebrospinal fluid substances that integrates visual and spectral characteristics, so as to solve the problems mentioned in the background art.
[0005] To achieve the above objectives, the present invention provides the following technical solution: a hyperspectral method for detecting cerebrospinal fluid substances that integrates visual and spectral characteristics, characterized by comprising the following steps:
[0006] S1: Use a hyperspectral imager to image the cerebrospinal fluid and obtain its hyperspectral image data;
[0007] S2: Preprocess the acquired hyperspectral images to obtain hyperspectral images of cerebrospinal fluid;
[0008] S3: Use a competitive adaptive reweighting algorithm to select feature bands in the preprocessed hyperspectral image and screen out key wavelengths that meet the preset correlation with the measurement index.
[0009] S4: Fusion of visual features and spectral features;
[0010] S5: Construct a dual-channel, three-layer Alex2-3Dnet prediction model based on the Alexnet convolutional neural network, and input the preprocessed and feature-selected and fused hyperspectral image data into the model for training;
[0011] S6: Using the trained model, perform substance classification and detection on the collected cerebrospinal fluid images.
[0012] Preferably, the step of preprocessing the acquired hyperspectral image to obtain a cerebrospinal fluid hyperspectral image specifically includes:
[0013] S21: Process the signal acquired by the hyperspectral imager to eliminate signal errors and obtain the corresponding image data;
[0014] S22: Process the obtained image signal to eliminate noise interference and errors, and obtain a hyperspectral image of cerebrospinal fluid that can be used for analysis.
[0015] Preferably, the step of classifying and detecting substances in the acquired cerebrospinal fluid images using the trained model includes:
[0016] S7: Validate and optimize the trained dual-channel, three-layer Alex2-3Dnet prediction model using the following formula:
[0017]
[0018] Calculate the verification error value and adjust the prediction accuracy;
[0019] Among them, S val P represents the validation error value, N represents the total number of validation data samples, and P represents the validation error value. i T represents the predicted value of the i-th sample. i W represents the actual value of the i-th sample. j represents the weight of the j-th level model, and M represents the total number of model levels. This represents the sum of the weights of all levels of the model. Represents the square root operation, |P i -T i | 2 This represents the squared error between the predicted and actual values.
[0020] Preferably, the step of validating and optimizing the trained dual-channel three-layer Alex2-3Dnet prediction model includes, after which:
[0021] S8: Perform substance analysis on new cerebrospinal fluid samples using the validated model, employing the following formula:
[0022]
[0023] Calculate the difference value and output the detection result;
[0024] Where R represents the difference between the concentration of a specific substance in the sample and the reference concentration, and C k V represents the concentration of the substance in the k-th sample. k The weighting coefficient representing the concentration of the sample influences the contribution of that sample's data to the final result. L represents the total number of samples detected, and C... ref The reference concentration of the representative substance is set based on historical experience or standard literature. This represents the sum of all sample concentrations after weighting, and |·| represents taking the absolute value, used to calculate the absolute magnitude of the difference.
[0025] Preferably, in step S7, the verification and tuning include employing cross-validation and grid search strategies to find the optimal combination of model parameters and features.
[0026] Preferably, the detection results include the types, concentrations or distributions of different substances in the cerebrospinal fluid, as well as the corresponding confidence or reliability indicators.
[0027] A hyperspectral cerebrospinal fluid material detection system integrating visual and spectral characteristics, used to perform the above-described detection method, characterized by comprising:
[0028] The cerebrospinal fluid material hyperspectral imaging image acquisition module is used to acquire hyperspectral images of cerebrospinal fluid using a hyperspectral imager.
[0029] The first processing module is used to process the signals acquired by the hyperspectral imager, eliminate signal errors, and obtain the corresponding image data.
[0030] The second processing module is used to process the obtained image signal, eliminate noise interference and errors, and obtain a hyperspectral image of cerebrospinal fluid that can be used for analysis.
[0031] The feature extraction and fusion module is used to screen and extract key wavelengths that are highly correlated with the measurement indicators, and to remove wavelengths with weak or no information, thereby achieving feature selection and dimensionality reduction.
[0032] The classification and detection module is used to train the collected cerebrospinal fluid dataset into the selected model to perform substance classification and detection on the acquired cerebrospinal fluid images.
[0033] Preferably, in the first or second processing module, the spectral information is preprocessed using a standard normal transformation.
[0034] Preferably, it also includes a result output module for outputting the detection results.
[0035] Preferably, in the feature extraction and fusion module, a competitive adaptive reweighting algorithm is used to select feature bands from the acquired cerebrospinal fluid hyperspectral images to screen out key wavelengths that are strongly correlated with the measurement indicators.
[0036] Compared with the prior art, the beneficial effects of the present invention are:
[0037] (1) This invention uses the SNV method to preprocess the hyperspectral image data of cerebrospinal fluid, which can process each spectrum separately, effectively eliminating scattering problems in the spectrum, as well as interference caused by uneven particle size, surface scattering and optical path changes. Through the steps of average centering, standardization and normalization, noise and signal shift in the spectral data are further eliminated, the spectral characteristics are significantly enhanced, and the absorption peaks and wave peaks become more obvious, providing a more accurate and reliable data basis for subsequent analysis.
[0038] (2) This invention improves the AlexNet model by reducing the number of convolutional layers, reducing computational complexity, and improving the model's generalization ability. After the first convolutional layer, a 2D dual-channel convolutional layer is added, which can simultaneously extract global and local features of the image, providing the model with richer feature information. The introduction of a 3D convolutional layer further extracts the spectral features, channel features, and spatial features of the image, making full use of the spectral information in the hyperspectral image and significantly improving the model's ability to fit hyperspectral data. After the fusion processing of the last two convolutional layers, the model's ability to analyze features is enhanced, enabling it to more accurately identify tissue spectral differences under different pathological conditions.
[0039] (3) Compared with multispectral imaging, hyperspectral imaging has more spectral bands and higher spectral resolution, which can capture subtle spectral differences in tissues under different pathological conditions. The improved Alexnet model can simultaneously utilize shape and spectral information to classify MHSI data more accurately and reliably, which provides a more precise and reliable basis for medical diagnosis and helps doctors make more accurate diagnostic and treatment decisions. Attached Figure Description
[0040] Figure 1 This is a system block diagram of the present invention;
[0041] Figure 2 This is a schematic diagram of the hyperspectral image acquisition device of the present invention. Detailed Implementation
[0042] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0043] Please see Figures 1-2 As shown, the present invention provides the following technical solution:
[0044] Example 1
[0045] like Figure 1 As shown, Embodiment 1 of the present invention provides a method for detecting hyperspectral cerebrospinal fluid substances by integrating visual and spectral characteristics, including a hyperspectral image acquisition module for cerebrospinal fluid, a spectral image preprocessing module, a spectral image feature selection and fusion module, and a cerebrospinal fluid substance classification and detection module.
[0046] In this embodiment 1, the cerebrospinal fluid hyperspectral image acquisition module is used to perform hyperspectral imaging on the acquired cerebrospinal fluid based on the hyperspectral imaging platform, laying the foundation for spectral processing.
[0047] The spectral image preprocessing module is used to transmit hyperspectral images obtained by the spectral acquisition module of the hyperspectral imaging platform to the computer. Using SNV spectral preprocessing software, the obtained data is preprocessed mainly through methods such as average centering, standardization, and normalization, laying the foundation for feature selection and feature fusion.
[0048] The spectral image feature selection and fusion module, based on the image processed by the spectral image preprocessing module, uses CARS-based spectral feature selection and fusion software to perform visual and spectral feature fusion on the hyperspectral image of cerebrospinal fluid.
[0049] The cerebrospinal fluid (CSF) substance classification and detection module transmits the data obtained through computer processing to a dual-channel, three-layer Alex2-3Dnet prediction model based on the Alexnet convolutional neural network. This enhances the ability to extract and analyze CSF substance characteristics, and is used for CSF substance detection research.
[0050] like Figure 2As shown, the HSI used in this embodiment 1 mainly includes a CCD camera (DL-604M, Andor Technology Ltd., Ireland), a line-scan spectrometer (V10E, Spectrum Imaging Ltd., Finland) with a spectral acquisition range of 200-1000nm, an illumination system consisting of an adjustable halogen light source box (3900E, Illumination Technologies Ltd., USA) that illuminates the sample via fiber optic extension, an electrically controlled displacement platform driven by a stepper motor, a sample holder for fixing the sample, and a computer equipped with HSI system control software (Spectral Image-VNIR software, Isuzu Optics Corp., China), which allows for setting of camera exposure time, electrically controlled displacement platform movement speed, spectrometer spectral scanning range, image resolution, and light source intensity. To avoid interference from ambient light, all instruments except the computer are installed in a dark box.
[0051] SNV preprocessing is a common method in spectral preprocessing. First, spectral correction is performed: due to equipment and environmental factors, cerebrospinal fluid (CSF) spectral data may have biases. Wavelength correction, energy correction, and baseline correction (removing non-characteristic signals from the spectral data, such as solvent absorption and scattered light, to more clearly observe the characteristic absorption peaks of the CSF sample) are performed to eliminate these influences. Spectral denoising is then performed: hyperspectral data often contains noise, such as instrument noise and reading errors. Mean filtering, median filtering, wavelet denoising, and principal component analysis (PCA) are used to denoise the spectral images multiple times. Spectral endpoint detection identifies the start and end points of the spectral curve, which helps distinguish different substances in the CSF. SNV preprocessing methods can standardize the spectral data at each wavelength or wavenumber point to a standard normal distribution with a mean of 0 and a variance of 1. After standardization, noise and signal shifts in the spectral data are eliminated, enhancing spectral characteristics and making absorption peaks and wave peaks more prominent. CARS is selected as the band selection method for CSF hyperspectral data. The specific process includes: determining the laser wavelength. CARS technology typically uses two consecutive laser wavelengths as excitation wavelengths. These wavelengths need to be carefully selected so that they resonate with the vibrational modes of molecules in the sample. Selecting the resonance wavelength: To enhance the CARS signal, one of the excitation laser wavelengths should match the resonant vibrational modes of the molecules. This matching can be done by referencing known molecular spectral properties or using predictive models. Ensuring that the excitation light matches the specific vibrational frequencies of the molecules will significantly enhance the CARS signal intensity. Considering non-resonant contributions: In addition to resonance contributions, the influence of non-resonant CARS signals also needs to be considered. Non-resonant signals are usually due to electronic polarization in the molecules and are generally weaker than resonance signals. Therefore, the laser wavelength needs to be appropriately adjusted during band selection to minimize interference from non-resonant signals. Adjusting the spectral range and resolution: Based on the molecular vibrational modes of interest in the sample, an appropriate spectral range and resolution are selected. The spectral range should cover all molecular vibrational frequencies of interest, while the resolution should be high enough to clearly distinguish different vibrational modes. Feature stitching: The spectral features of cerebrospinal fluid and visual features are sequentially concatenated into a longer feature vector. If spectral features have n dimensions and visual features have m dimensions, then the concatenated feature vector will have n+m dimensions. Weighted averaging: After extracting spectral features related to cerebrospinal fluid and visual data from the hyperspectral image, weights are assigned to the spectral and visual features respectively according to specific needs or the results obtained through training. The spectral and visual features are then multiplied by their corresponding weights, and the results are summed to obtain the final feature fusion vector.
[0052] In summary, in this embodiment 1, the system utilizes a cerebrospinal fluid (CSF) hyperspectral image acquisition module to acquire CSF hyperspectral images. These images are then processed by a spectral image preprocessing module and converted into electrical signals, which are then fed into a computer data processing module. Computer software is used to jointly perform spectral data preprocessing, reducing the impact of interference signals on the hyperspectral signals. The data is then transmitted to a feature selection and fusion module, preparing for CSF substance classification and detection. This overcomes the limitations of existing CSF substance detection technologies, and the use of hyperspectral imaging technology can improve the efficiency of CSF substance detection.
[0053] Its advantages include:
[0054] It can acquire spectral information for each pixel across a wide wavelength range. This high-precision spectral data can not only be used to identify the characteristics of cerebrospinal fluid (CSF) substances, but also provide detailed information about the composition, structure, and state of CSF substances; it enables non-contact detection, allowing samples to be reused multiple times; and it achieves real-time and rapid detection. After acquiring spectral data, hyperspectral imaging technology can quickly generate high-resolution images, and the analysis results are almost real-time.
[0055] Example 2
[0056] Embodiment 2 of the present invention provides a system for detecting the composition of cerebrospinal fluid, comprising:
[0057] The cerebrospinal fluid hyperspectral acquisition module is used to acquire hyperspectral images of cerebrospinal fluid and obtain the most raw spectral data.
[0058] The spectral image preprocessing module is used to average, center, standardize, and normalize the acquired cerebrospinal fluid hyperspectral images to eliminate signal errors and obtain the corresponding electrical signals.
[0059] Spectral Image Feature Selection and Fusion Module: This module performs feature selection and fusion on the hyperspectral images of cerebrospinal fluid in the corresponding computer module, laying the foundation for the detection and classification of substances in cerebrospinal fluid.
[0060] Cerebrospinal fluid substance classification and detection module
[0061] The steps for classifying and detecting substances in hyperspectral images of cerebrospinal fluid using the Alex2-3Dnet model are as follows:
[0062] Model training
[0063] The selected Alex2-3Dnet model was trained using the collected cerebrospinal fluid dataset. The training process included:
[0064] Data loading: Load the preprocessed image data into the training environment.
[0065] Dataset parameter settings: Build the Alex2-3Dnet model in a deep learning framework such as PyTorch or TensorFlow.
[0066] Set the proportion of the training set, the learning rate, and the batch size for the neural network used in classification and detection.
[0067] Predictive training.
[0068] Loss function selection: Choose an appropriate loss function, such as the cross-entropy loss function.
[0069] Optimizer selection: Select the Adam optimizer to optimize the model parameters.
[0070] Training and Validation: Divide the model into training and validation sets, and use the validation set to monitor the model's generalization ability.
[0071] Model evaluation and tuning
[0072] After training, the model's performance is evaluated using a test set. The model is assessed using metrics such as accuracy, precision, recall, and F1 score. Based on the evaluation results, the model structure, hyperparameters, or data processing strategies are adjusted to improve the model's accuracy and generalization ability.
[0073] Model Deployment and Application
[0074] After training and evaluation, the model can be deployed in real-world applications for the classification and detection of substances in cerebrospinal fluid.
[0075] Example 3:
[0076] In Example 3, we further refined the processing flow of the spectral image preprocessing module and introduced a new feature selection and fusion strategy.
[0077] Spectral image preprocessing module:
[0078] The steps are detailed as follows: First, dark current correction and bad pixel correction are performed on the acquired hyperspectral images to eliminate image errors caused by the instrument itself or environmental factors. Next, average centering is performed, i.e., the average value for each wavelength point is calculated and subtracted from the original spectrum to ensure that the average value of the spectral data is 0. Then, standardization is performed, calculating the standard deviation for each wavelength point and dividing by this standard deviation to ensure that the data for each band have the same variance. Finally, normalization is performed, considering the overall intensity of each sample, and eliminating differences in intensity between samples by dividing by the square root of the total variance of the sample itself.
[0079] Feature selection and fusion module:
[0080] A novel feature selection strategy: In addition to using the Competitive Adaptive Reweighting (CARS) algorithm for feature band selection, we also introduce a feature selection method based on Principal Component Analysis (PCA). The PCA method transforms high-dimensional spectral data into a low-dimensional principal component space through dimensionality reduction techniques, while preserving the main features of the data. By comparing the contributions of different principal components to the measurement index, the key wavelengths most strongly correlated with the measurement index are selected.
[0081] Feature fusion strategy optimization: In the feature fusion stage, we adopted a deep learning-based method, such as an autoencoder, to fuse spectral and visual features. The autoencoder, through the encoder and decoder structure, can learn a low-dimensional representation of the data while preserving its main features. By training the autoencoder, we can fuse spectral and visual features into a single low-dimensional feature vector for subsequent classification and detection tasks.
[0082] Example 4:
[0083] In Example 4, we focused on optimizing the training process of the Alex2-3Dnet prediction model and introduced a transfer learning strategy.
[0084] Model training optimization:
[0085] Transfer Learning: Since training the AlexNet model from scratch requires substantial data and computational resources, we employed a transfer learning strategy. First, we pre-trained the AlexNet model on a large dataset (such as ImageNet), then transferred its weights to our AlexNet model, fine-tuning only the last few layers to adapt to our hyperspectral data. This approach significantly reduces training time and the amount of data required.
[0086] Learning rate adjustment: During training, we adopted a learning rate decay strategy, that is, as training progresses, we gradually reduce the learning rate to improve the convergence and stability of the model.
[0087] Early stopping: To avoid overfitting, we introduce early stopping. During training, if the loss on the validation set no longer decreases, training is stopped and the current model is saved as the best model.
[0088] Model evaluation and tuning:
[0089] Cross-validation: To more accurately evaluate model performance, we employed k-fold cross-validation. The dataset is divided into k subsets. Each time, k-1 subsets are used for training, and the remaining subset is used for validation. This process is repeated k times, selecting a different subset as the validation set each time. The average of the k validation results is then used as the model's performance evaluation metric.
[0090] Hyperparameter tuning: The hyperparameters of the model (such as learning rate, batch size, convolutional kernel size, etc.) are tuned through methods such as grid search or random search to find the optimal model configuration.
[0091] Example 5:
[0092] In Example 5, we introduced a real-time detection module and optimized the user interface.
[0093] Real-time detection module:
[0094] Hardware acceleration: To achieve real-time detection, we employed high-performance GPUs and dedicated hyperspectral data processing hardware accelerators to improve data processing speed.
[0095] Parallel processing: By using parallel processing technology, hyperspectral image data of multiple cerebrospinal fluid samples can be processed simultaneously, further improving detection efficiency.
[0096] User interface optimization:
[0097] Visualization: It provides a wealth of visualization functions, such as two-dimensional images, three-dimensional stereoscopic images, and heat maps, to intuitively display the detection results of different substances in cerebrospinal fluid.
[0098] Interactive operation: Users can adjust the detection parameters in real time using buttons, sliders and other controls on the interface, and view the adjusted detection results in real time.
[0099] Report generation: Automatically generates test reports, including detailed information on test results, confidence levels or reliability indicators, etc., to facilitate users' subsequent analysis and processing.
[0100] Example 6:
[0101] In Example 6, we further explored a new application of hyperspectral imaging technology in the detection of cerebrospinal fluid substances.
[0102] Multimodal data fusion:
[0103] In addition to hyperspectral data, we also incorporated data from other modalities, such as magnetic resonance imaging (MRI) and computed tomography (CT), to provide more comprehensive cerebrospinal fluid information. Through multimodal data fusion technology, data from different modalities were integrated and analyzed to improve the accuracy and reliability of the detection.
[0104] Deep learning model extension:
[0105] In addition to the Alex2-3Dnet model, we also tried other deep learning models, such as Convolutional Long Short-Term Memory (ConvLSTM) and Graph Convolutional Networks (GCN), to explore the performance differences of different models in cerebrospinal fluid material detection. Through comparative experiments and performance evaluations, the optimal model was selected for practical application.
[0106] Example 7: Optimization of Hyperspectral Image Enhancement and Denoising Module
[0107] In Example 7, we focus on optimizing the hyperspectral image enhancement and denoising module to improve image quality and detection accuracy.
[0108] Image enhancement:
[0109] Contrast stretching: By stretching the contrast of a hyperspectral image, the detail information in the image is enhanced, making the spectral differences between different substances more obvious.
[0110] Histogram equalization: Adjusts the histogram distribution of an image to make the gray values in the image more evenly distributed, thereby improving the visual effect and detection performance of the image.
[0111] Noise reduction processing:
[0112] Nonlocal mean denoising: It uses a weighted average of similar pixels in an image to remove noise while preserving the image's edge and texture information.
[0113] Wavelet transform denoising: The image is decomposed into wavelet coefficients of different scales and directions, noise coefficients are removed by thresholding, and then the image is reconstructed to achieve the denoising effect.
[0114] Example 8: Classifier Design and Optimization Based on Ensemble Learning
[0115] In Example 8, we explored an ensemble learning-based classifier design to improve the accuracy and robustness of cerebrospinal fluid material detection.
[0116] Classifier ensemble:
[0117] Bagging: Multiple training subsets are constructed through multiple random samplings, and a classifier is trained on each subset. Finally, the classification result is obtained by voting or averaging.
[0118] Boosting: It builds multiple weak classifiers step by step. Each classifier classifies the errors of the previous classifier. Finally, the results of all classifiers are weighted and combined to obtain the final strong classifier.
[0119] Classifier optimization:
[0120] Feature weight adjustment: Assign different weights to different features based on their importance to improve the performance of the classifier.
[0121] Parameter tuning: The parameters of the classifier are tuned using methods such as cross-validation and grid search to find the optimal parameter combination.
[0122] Example 9: Cloud Deployment and Remote Monitoring of Cerebrospinal Fluid Material Detection System
[0123] In Example 9, we considered the cloud deployment and remote monitoring of the cerebrospinal fluid substance detection system to enable the sharing of detection resources and the application of telemedicine.
[0124] Cloud deployment:
[0125] Data Upload and Storage: Upload the collected hyperspectral images and other relevant data to the cloud server for storage and management.
[0126] Model deployment: The trained deep learning model is deployed to the cloud, and real-time cerebrospinal fluid material detection is performed through cloud computing resources.
[0127] Remote monitoring:
[0128] Real-time data transmission: The real-time data during the detection process is transmitted to a remote monitoring terminal via the network so that doctors or experts can provide remote guidance and monitoring.
[0129] Abnormal alarm: When an abnormality or suspected lesion is detected, the system automatically triggers an alarm mechanism, sending relevant information to the mobile phones of doctors and patients so that timely measures can be taken.
[0130] Example 10: Multi-platform compatibility and scalability of a cerebrospinal fluid material detection system
[0131] In Example 10, we focus on the multi-platform compatibility and scalability of the cerebrospinal fluid material detection system to adapt to the needs of different devices and scenarios.
[0132] Multi-platform compatibility:
[0133] Cross-platform development: Employing cross-platform development frameworks and technologies enables the system to run on different operating systems and hardware devices.
[0134] Data format conversion: Supports importing and exporting various data formats, facilitating data exchange and sharing with other systems.
[0135] Scalability:
[0136] Modular design: The system is divided into multiple independent modules, each of which can be developed and upgraded independently to improve the system's scalability and flexibility.
[0137] Plug-in mechanism: Provides a plug-in mechanism that allows users to add new functional modules or algorithms as needed to extend the system's functionality and performance.
[0138] Example 11: Real-time feedback and interactive guidance of a cerebrospinal fluid substance detection system
[0139] In Example 11, we focus on the real-time feedback and interactive guidance functions of the cerebrospinal fluid substance detection system to improve the immediacy of detection and user engagement.
[0140] Real-time feedback:
[0141] Real-time display of test results: The system can instantly display the processing results of hyperspectral images and the detection results of cerebrospinal fluid substances, enabling users to quickly understand the test results.
[0142] Abnormal results are highlighted: For detected abnormal or suspected lesion areas, the system will mark them with highlights or specific colors to help users quickly locate them.
[0143] Interactive guidance:
[0144] User Interface: The user interface is designed to be intuitive and easy to use, providing detailed operation guides and interpretations of test results to help users better understand the testing process and results.
[0145] Remote expert guidance: The system supports experts to provide real-time guidance and suggestions through remote monitoring terminals, offering users professional interpretations and consultations.
[0146] Example 12: Automated Calibration and Validation of Cerebrospinal Fluid Material Detection System
[0147] In Example 12, we explored the automated calibration and verification functions of the cerebrospinal fluid material detection system to ensure the accuracy and reliability of the detection results.
[0148] Automated calibration:
[0149] Regular calibration: The system can automatically perform regular calibrations to ensure the accuracy and stability of the testing equipment.
[0150] Calibration data recording: The system can record the data and results of each calibration for subsequent analysis and verification.
[0151] Verification and Testing:
[0152] Cross-validation: The accuracy and reliability of a system are evaluated by cross-validating it with other detection methods.
[0153] Blind testing: Blind testing is a process of performing tests without informing the system of the actual results in order to verify the system's independent testing capabilities.
[0154] Example 13: Data Visualization and Analysis of Cerebrospinal Fluid Material Detection System
[0155] In Example 13, we focus on the data visualization and analysis capabilities of the cerebrospinal fluid material detection system to provide more intuitive and in-depth data interpretation and decision support.
[0156] Data visualization:
[0157] Image visualization: Presenting hyperspectral images and detection results in an intuitive way, such as using color coding to represent the distribution and concentration of different substances.
[0158] Dynamic charts: Generate dynamic charts and reports to show the trends and anomalies in the test results.
[0159] Data Analysis:
[0160] Data mining: Using data mining techniques to extract useful information and patterns from large amounts of detection data.
[0161] Trend prediction: Based on historical detection data, machine learning algorithms are used to predict trends and provide guidance for future detection.
[0162] Example 14:
[0163] The trained dual-channel, three-layer Alex2-3Dnet prediction model was validated and optimized using the following formula:
[0164]
[0165] Calculate the verification error value and adjust the prediction accuracy;
[0166] Among them, S val P represents the validation error value, N represents the total number of validation data samples, and P represents the validation error value. i T represents the predicted value of the i-th sample. i W represents the actual value of the i-th sample. j represents the weight of the j-th level model, and M represents the total number of model levels. The sum of the weights of all levels of the model is represented by √, which indicates the square root operation. |P i -T i | 2 This represents the squared error between the predicted and actual values.
[0167] Detailed explanation of the formula and its calculation derivation:
[0168] This formula is used to calculate the verification error value S.val This consists of two main parts: the root mean square error (RMSE) and the average weights of the model levels. First, the root mean square error between the predicted and actual values is calculated, and then multiplied by the average weights of each level of the model to obtain the final validation error value.
[0169] The specific calculation methods for each parameter are as follows:
[0170] Total number of validation data samples N: The number of samples obtained through the data acquisition process, such as recording data using sensors or a database. Assuming 100 validation samples are collected from the experiment, then N = 100.
[0171] The predicted value P of the i-th sample i P1 is derived from the model's prediction of the i-th validation sample. For example, if the model predicts a value of 0.8 for the first sample, then P1 = 0.8.
[0172] The actual value T of the i-th sample i The true value of the i-th verification sample is obtained through actual measurement or labeling. For example, if the actual measured value of the first sample is 1.0, then T1 = 1.0.
[0173] Total number of model levels M: The number of levels in the model. Assuming the model contains 3 levels, then M = 3.
[0174] The weights W of the j-th level model j The weights are set based on performance metrics or expert experience during model training. For example, assuming the weights for level 1 are 0.9, level 2 are 0.8, and level 3 are 0.85, then W1 = 0.9, W2 = 0.8, and W3 = 0.85. These weights can be adjusted according to the degree of influence of each level on the final prediction result, usually determined through methods such as cross-validation.
[0175] Substituting the specific values above into the formula, the calculation process is as follows:
[0176] Calculate the root mean square error (RMSE):
[0177] Calculate the squared error for each sample and sum them:
[0178]
[0179] For example, suppose the predicted and actual values for the first five samples are as follows:
[0180] Sample 1: P1 = 0.8, T1 = 1.0;
[0181] Sample 2: P2 = 0.6, T2 = 0.5;
[0182] Sample 3: P3 = 0.9, T3 = 1.0;
[0183] Sample 4: P4 = 0.4, T4 = 0.3;
[0184] Sample 5: P5 = 0.7, T5 = 0.8;
[0185] The squared errors are as follows:
[0186] Sample 1: (0.8-1.0) 2 =0.04;
[0187] Sample 2: (0.6-0.5) 2 =0.01;
[0188] Sample 3: (0.9-1.0) 2 =0.01;
[0189] Sample 4: (0.4-0.3) 2 =0.01;
[0190] Sample 5: (0.7-0.8) 2 =0.01;
[0191] Sum the squared errors of all 100 samples, assuming the total sum is 5.0.
[0192] Calculate the mean squared error (MSE):
[0193] Calculate the root mean square error (RMSE):
[0194] Calculate the average weight of each model level:
[0195] Calculate the total weights:
[0196] Calculate the average:
[0197] Calculate the verification error value S val :S val =0.224 × 0.85 ≈ 0.1904;
[0198] The results show that the weighted root mean square error of the model on the validation dataset is approximately 0.1904. This value is used to evaluate the model's predictive performance; the smaller the value, the smaller the prediction error on the validation set, and the better the performance.
[0199] Example 15:
[0200] The validated model was used to perform material analysis on new cerebrospinal fluid samples, employing the following formula:
[0201]
[0202] Calculate the difference value and output the detection result;
[0203] Where R represents the difference between the concentration of a specific substance in the sample and the reference concentration, and C k V represents the concentration of the substance in the k-th sample. k The weighting coefficient representing the concentration of the sample influences the contribution of that sample's data to the final result. L represents the total number of samples detected, and C... ref The reference concentration of the representative substance is set based on historical experience or standard literature. This represents the sum of all sample concentrations after weighting, and |·| represents taking the absolute value, used to calculate the absolute magnitude of the difference.
[0204] formula:
[0205]
[0206] Detailed explanation of the formula and its calculation derivation:
[0207] This formula is used to calculate the difference between the concentration of a substance in a test sample and a reference concentration. The specific steps are as follows:
[0208] Parameter description and value source:
[0209] L represents the total number of samples tested, which is determined by the experimental design and sampling plan. For example, if a total of 6 samples were collected, then L = 6.
[0210] C k This represents the concentration of the substance in the k-th sample, obtained using high-performance liquid chromatography (HPLC). For example, suppose the concentrations of the substance in the six samples are 1.2, 1.5, 1.3, 1.4, 1.6, and 1.7 mg / L, respectively.
[0211] V k This is the weight coefficient of the k-th sample, calculated based on the sample sampling conditions and detection accuracy. Assume the weights are set to 0.95, 1.0, 0.98, 1.02, 1.05, and 1.1 according to the sample sampling conditions (such as dilution factor and device sensitivity).
[0212] C ref This is a reference concentration, set based on historical data or standard literature. For example, the reference concentration is set at 1.4 mg / L.
[0213] Calculation process:
[0214] Calculate the weighted concentration value for each sample:
[0215] First sample: C1·V1=1.2·0.95=1.14;
[0216] The second sample: C²·V² = 1.5·1.0 = 1.5;
[0217] The third sample: C3·V3=1.3·0.98=1.274;
[0218] The fourth sample: C4·V4 = 1.4·1.02 = 1.428;
[0219] The fifth sample: C5·V5 = 1.6·1.05 = 1.68;
[0220] The sixth sample: C6·V6 = 1.7·1.1 = 1.87;
[0221] Find the weighted sum of concentrations:
[0222] Calculate the average weighted concentration of the sample:
[0223] Calculate the absolute difference between the weighted average concentration and the reference concentration: R = |1.482 - 1.4| = 0.082;
[0224] The results indicate that the weighted average concentration of the substance in the test sample differs from the reference concentration by 0.082 mg / L. This value is used to determine whether there is a significant deviation in the substance concentration. The smaller the difference, the closer the sample concentration is to the reference standard.
[0225] The innovation of this invention lies in the use of hyperspectral analysis technology that integrates visual and spectral characteristics to detect and classify substances in cerebrospinal fluid. This effectively achieves non-destructive sampling, acquiring spectral information of the sample at different wavelengths, effectively distinguishing and analyzing different components, and exhibiting high sensitivity, enabling the detection of trace substances. The invention also innovatively uses the SNV preprocessing method to preprocess the acquired hyperspectral images of cerebrospinal fluid, making it easier to build accurate models and improving the accuracy and stability of spectral analysis, thus enhancing prediction performance. Furthermore, the invention innovatively uses the Alex2-3Dnet model for substance classification and detection in hyperspectral images of cerebrospinal fluid, improving the efficiency of classification and detection.
[0226] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0227] Furthermore, to achieve the above objectives, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the hyperspectral cerebrospinal fluid material detection method and system that integrates visual and spectral characteristics according to embodiments of the present invention.
[0228] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable vehicles (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0229] The embodiments of the present invention are described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A system that specifies functions in one or more boxes.
[0230] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including an instruction set implemented in a process. Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0231] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0232] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. "" and / or "" indicate that either one or both can be selected. Furthermore, the terms "includes," "contains," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that includes a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the statement "includes a..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes the element.
[0233] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention, and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the protection scope of the present invention.
[0234] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A hyperspectral method for detecting cerebrospinal fluid substances that integrates visual and spectral characteristics, characterized in that: Includes the following steps: S1: Use a hyperspectral imager to image the cerebrospinal fluid and obtain its hyperspectral image data; S2: Preprocess the acquired hyperspectral images to obtain hyperspectral images of cerebrospinal fluid; The steps of preprocessing the acquired hyperspectral images to obtain cerebrospinal fluid hyperspectral images specifically include: S21: Process the signal acquired by the hyperspectral imager to eliminate signal errors and obtain the corresponding image data; S22: Process the obtained image signal to eliminate noise interference and errors, and obtain a hyperspectral image of cerebrospinal fluid that can be used for analysis; S3: Use a competitive adaptive reweighting algorithm to select feature bands in the preprocessed hyperspectral image and screen out key wavelengths that meet the preset correlation with the measurement index; S4: Fusion of visual features and spectral features; S5: Construct a dual-channel, three-layer Alex2-3Dnet prediction model based on the Alexnet convolutional neural network, and input the preprocessed and feature-selected and fused hyperspectral image data into the model for training; S6: Using the trained model, perform substance classification and detection on the collected cerebrospinal fluid images; S7: Validate and optimize the trained dual-channel, three-layer Alex2-3Dnet prediction model using the following formula: ; Calculate the verification error value and adjust the prediction accuracy; in, This represents the verification error value. Represents the total number of validation data samples. Representing the The predicted value for each sample, Representing the The actual value of each sample Representing the Weights in a hierarchical model Represents the total number of model levels. This represents the sum of the weights of all levels of the model. To represent the square root operation, This represents the squared error between the predicted and actual values; The step of validating and optimizing the trained dual-channel three-layer Alex2-3Dnet prediction model includes: S8: Perform substance analysis on new cerebrospinal fluid samples using the validated model, employing the following formula: ; Calculate the difference value and output the detection result; in, This represents the difference between the concentration of a specific substance in the sample and a reference concentration. Representing the The concentration of substances in each sample The weighting coefficient representing the concentration of the sample affects the contribution of the sample data to the final result. Represents the total number of samples tested. The reference concentration of the representative substance is set based on historical experience or standard literature. This represents the sum of the weighted concentrations of all samples. This indicates taking the absolute value, used to calculate the absolute magnitude of the difference; In S7, the verification and optimization include using cross-validation and grid search strategies to find the optimal combination of model parameters and features; The test results include the types, concentrations, or distributions of different substances in the cerebrospinal fluid, as well as the corresponding confidence or reliability indicators.
2. A hyperspectral cerebrospinal fluid substance detection system integrating visual and spectral characteristics, used to perform the detection method of claim 1, characterized in that, include: A hyperspectral imaging module for cerebrospinal fluid material acquisition is used to acquire hyperspectral images of cerebrospinal fluid using a hyperspectral imager. The first processing module is used to process the signals acquired by the hyperspectral imager, eliminate signal errors, and obtain the corresponding image data. The second processing module is used to process the obtained image signal, eliminate noise interference and errors, and obtain a hyperspectral image of cerebrospinal fluid that can be used for analysis. The feature extraction and fusion module is used to screen and extract key wavelengths that are highly correlated with the measurement indicators, and to remove wavelengths with weak or no information, thereby achieving feature selection and dimensionality reduction. The classification and detection module is used to train the collected cerebrospinal fluid dataset into the selected model to perform substance classification and detection on the collected cerebrospinal fluid images.
3. The hyperspectral cerebrospinal fluid material detection system integrating visual and spectral characteristics according to claim 2, characterized in that: In the first or second processing module, the spectral information is preprocessed using a standard normal transformation.
4. The hyperspectral cerebrospinal fluid material detection system integrating visual and spectral characteristics according to claim 2 or 3, characterized in that: It also includes a results output module for outputting the detection results.
5. The hyperspectral cerebrospinal fluid material detection system integrating visual and spectral characteristics according to claim 2 or 3, characterized in that: In the feature extraction and fusion module, a competitive adaptive reweighting algorithm is used to select feature bands from the acquired cerebrospinal fluid hyperspectral images in order to screen out key wavelengths that are strongly correlated with the measurement indicators.
Citation Information
Patent Citations
Hyperspectral image classification method based on dual-channel sparse network
CN115471677A
Plant leaf nitrogen content hyperspectral modeling method based on map fusion
CN116310788A