Lymphocyte percentage detection method and device
By obtaining and analyzing the absorption spectrum samples of the user's face blood, a lymphocyte percentage detection model was established, which solved the problem that the synthetic lymphocyte pseudo-color map could not effectively reflect the user's real situation, and improved the detection accuracy.
Patent Information
- Application Number
- CN202510228816.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-06-20
AI Technical Summary
The pseudo-color pictures of lymphocytes synthesized in the prior art cannot effectively reflect the user's real situation, resulting in low accuracy in lymphocyte percentage detection.
By obtaining absorption spectral samples of different components of the user's face blood, normalization and principal component analysis are performed to extract features, spectral training samples are generated, and a lymphocyte percentage detection model is established through support vector regression and gradient enhancement regression.
The absorption spectrum is determined based on the face to effectively respond to the user's real situation, and the accuracy of lymphocyte percentage detection is improved.
Smart Images

Figure CN120180381A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent lymphocyte detection. Specifically, it relates to a method and device for detecting lymphocyte percentage. Background Art
[0002] Lymphocytes are a type of white blood cell and are the smallest white blood cells. They are produced by lymphoid organs and mainly exist in the lymph fluid circulating in lymphatic vessels. They are important cellular components of the body's immune response function, the main executors of almost all immune functions of the lymphatic system, and the front-line "soldiers" against external infections and monitoring of cell mutations in the body. The lymphocyte percentage is the ratio of the number of lymphocytes to the total number of white blood cells. The normal value is 20.0%-40.0%. An increase in the lymphocyte percentage is mainly seen in infectious diseases, and a decrease is mainly in immune deficiency diseases, etc. Currently, for the clinical laboratory test of lymphocyte percentage in routine blood tests, this method will cause certain pain to patients, resulting in the inability to monitor the changes of lymphocytes at any time, and at the same time increasing the risk of infection. Therefore, there is an urgent need for a fast, convenient, sensitive, highly accurate, non-destructive, and relatively inexpensive detection method and instrument to complete daily detections in order to observe the changes of lymphocytes at any time.
[0003] In the prior art, the patent with the application number CN202111404964.9 discloses a method for classifying abnormal lymphocytes based on YOLOv5 and microscopic hyperspectral images, which is improved on the basis of the standard YOLOv5 network structure; uses the grayscale images corresponding to 461, 548, and 698 nm to synthesize lymphocyte pseudo-color images, and through the improved YOLOv5 network, faces the synthetic image information to complete the automatic positioning of lymphocytes; then uses the relative position information of the lymphocyte prediction boxes in the recognition results of the improved YOLOv5 network to obtain their average spectral values, takes the average spectral values as input, and uses a one-dimensional convolutional neural network to realize the classification recognition of abnormal lymphocytes; constructs an abnormal lymphocyte classification model.
[0004] This patent uses the improved YOLOv5 network to automatically locate the synthesized lymphocyte pseudo-color images and obtain the average spectrum, and then uses a convolutional neural network to realize the classification recognition of abnormal lymphocytes; however, the synthesized lymphocyte pseudo-color images cannot effectively reflect the real situation of users, resulting in low detection accuracy.
[0005] Regarding the problem that the synthesized lymphocyte pseudo-color images in the related technology cannot effectively reflect the real situation of users, resulting in low accuracy in detecting lymphocyte percentage, no effective solution has been proposed yet. Summary of the Invention
[0006] The main purpose of this application is to provide a method and device for detecting the percentage of lymphocytes, so as to solve the problem that the synthesized lymphocyte pseudo-color map cannot effectively reflect the real situation of the user, resulting in low accuracy of lymphocyte percentage detection.
[0007] To achieve the above object, according to one aspect of the present application, a method for detecting the percentage of lymphocytes is provided.
[0008] The method for detecting the percentage of lymphocytes according to the present application includes: obtaining absorption spectrum samples of different components of the user's facial blood; after normalizing the absorption spectrum samples, using the principal component analysis method for data dimensionality reduction and feature extraction to obtain an absorption spectrum curve; classifying and format-converting the absorption spectrum curve according to a preset standard lymphocyte percentage to generate a spectral training sample; performing deep learning and training on a machine learning model through the spectral training sample to establish a lymphocyte percentage detection matching model; obtaining a to-be-detected absorption spectrum of the to-be-detected user's face and inputting it into the lymphocyte percentage detection matching model for prediction to obtain a target lymphocyte percentage.
[0009] Further, obtaining absorption spectrum samples of different components of the user's facial blood includes: irradiating the user's face with an ultraviolet-visible light camera, and a spectroscope receiving the photoelectric pulse wave corresponding to the outgoing light of each wavelength; a photoelectric converter and an analog-to-digital converter performing signal conversion on the photoelectric pulse wave to obtain data of the changing outgoing light intensity; calculating the absorbance data of each component in the blood according to the data of the changing outgoing light intensity, wherein the absorbance data includes the absorbance data of lymphocytes; obtaining absorption spectrum samples of different components of the blood according to the absorbance data.
[0010] Further, calculating the absorbance data of each component in the blood according to the data of the changing outgoing light intensity includes: using the Lambert-Beer law to calculate the absorbance data of each component in the blood according to the data of the changing outgoing light intensity.
[0011] Further, after obtaining the absorption spectrum samples of different components of the user's facial blood and before normalizing the absorption spectrum samples, it further includes: using the Euclidean distance to judge discrete points and removing invalid spectra in the absorption spectrum samples, using the wavelet transform denoising method to remove the interference noise of the absorption spectrum samples, and using methods such as peak-valley point flattening, offset subtraction, differential processing, and baseline tilt to remove the baseline of the absorption spectrum samples.
[0012] Further, the machine learning model is deeply learned and trained with spectral training samples to establish a lymphocyte percentage detection and matching model, including: using support vector regression and gradient boosting regression to perform regression on the spectral features and lymphocyte percentage in the spectral training samples; evaluating the regression model using the mean absolute error, mean square error, root mean square error, and correlation coefficient R 2 to obtain the lymphocyte percentage detection and matching model.
[0013] To achieve the above object, according to another aspect of the present application, a lymphocyte percentage detection device is provided.
[0014] The lymphocyte percentage detection device according to the present application includes: an acquisition module for acquiring absorption spectral samples of different components of the user's facial blood; an analysis module for normalizing the absorption spectral samples and then using the principal component analysis method for data dimensionality reduction and feature extraction to obtain an absorption spectral curve; a classification module for classifying and format-converting the absorption spectral curve according to a preset standard lymphocyte percentage to generate spectral training samples; a training module for deeply learning and training the machine learning model with the spectral training samples to establish a lymphocyte percentage detection and matching model; and a prediction module for acquiring the absorption spectrum to be measured of the user's face to be measured and inputting it into the lymphocyte percentage detection and matching model for prediction to obtain the target lymphocyte percentage.
[0015] Further, the acquisition module includes: irradiating the user's face with an ultraviolet-visible light camera, and a spectroscope receiving the photoelectric pulse wave corresponding to the outgoing light of each wavelength; a photoelectric converter and an analog-to-digital converter performing signal conversion on the photoelectric pulse wave to obtain data of the changing outgoing light intensity; calculating the absorbance data of each component in the blood according to the data of the changing outgoing light intensity, where the absorbance data includes the absorbance data of lymphocytes; and obtaining the absorption spectral samples of different components of the blood according to the absorbance data.
[0016] Further, calculating the absorbance data of each component in the blood according to the data of the changing outgoing light intensity includes: using the Lambert-Beer law to calculate the absorbance data of each component in the blood according to the data of the changing outgoing light intensity.
[0017] Further, it further includes: a preprocessing module for judging discrete points using the Euclidean distance and removing invalid spectra in the absorption spectral samples, removing the interference noise of the absorption spectral samples using the wavelet transform denoising method, and removing the baseline of the absorption spectral samples using methods such as peak-valley point leveling, offset subtraction, differential processing, and baseline tilt.
[0018] Further, the training module includes: performing regression on the spectral features and lymphocyte percentage in the spectral training samples using support vector regression and gradient boosting regression; evaluating the regression model using the mean absolute error, mean squared error, root mean squared error, and correlation coefficient R 2 to obtain a lymphocyte percentage detection model.
[0019] In the embodiments of the present application, a method for detecting lymphocyte percentage is adopted. By obtaining absorption spectral samples of different components of the user's facial blood; after normalizing the absorption spectral samples, using the principal component analysis method for data dimensionality reduction and feature extraction to obtain an absorption spectral curve; classifying and format-converting the absorption spectral curve according to a preset standard lymphocyte percentage to generate spectral training samples; performing deep learning and training on a machine learning model through the spectral training samples to establish a lymphocyte percentage detection model; obtaining the absorption spectrum to be measured of the user's face to be measured and inputting it into the lymphocyte percentage detection model for prediction to obtain the target lymphocyte percentage; the purpose of effectively reflecting the true situation of the user based on the face to determine the absorption spectrum is achieved, thereby realizing the technical effect of improving the detection accuracy, and further solving the technical problem of low detection accuracy of lymphocyte percentage caused by the fact that the synthesized lymphocyte pseudo-color map cannot effectively reflect the true situation of the user. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The drawings constituting a part of this application are used to provide a further understanding of this application, making other features, objectives, and advantages of this application more obvious. The schematic embodiments and descriptions thereof of this application are used to explain this application and do not constitute an improper limitation of this application. In the drawings:
[0021] Figure 1 is a flowchart of a method for detecting lymphocyte percentage according to an embodiment of this application;
[0022] Figure 2 is a schematic structural diagram of a device for detecting lymphocyte percentage according to an embodiment of this application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0023] In order to enable those skilled in the art to better understand the solution of this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts should belong to the scope of protection of this application.
[0024] It should be noted that in the description of the present application, the claims, and the above-mentioned drawings, the terms "first", "second", etc. are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances for the embodiments of the present application described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.
[0025] In the present application, the orientation or positional relationship indicated by the terms "upper", "lower", "left", "right", "front", "rear", "top", "bottom", "inner", "outer", "middle", "vertical", "horizontal", "lateral", "longitudinal", etc. is based on the orientation or positional relationship shown in the drawings. These terms are mainly used to better describe the present invention and its embodiments, and are not used to limit that the indicated devices, elements, or components must have a specific orientation or be constructed and operated in a specific orientation.
[0026] Moreover, in addition to being able to represent an orientation or positional relationship, some of the above terms may also be used to represent other meanings. For example, the term "upper" may also be used to represent a certain attachment relationship or connection relationship in some cases. For those of ordinary skill in the art, the specific meanings of these terms in the present invention can be understood according to specific circumstances.
[0027] In addition, the terms "installed", "set up", "provided with", "connected", "connected to", "socketed" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral structure; it can be a mechanical connection or an electrical connection; it can be directly connected, or indirectly connected through an intermediate medium, or there can be internal communication between two devices, elements, or components. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0028] It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. The present application will be described in detail below with reference to the drawings and in combination with the embodiments.
[0029] According to an embodiment of the present invention, a method for detecting the lymphocyte percentage is provided. As Figure 1 shown, the method includes the following steps S101 to step S105:
[0030] Step S101, obtaining an absorption spectrum sample of different components of the user's facial blood;
[0031] Specifically, under darkroom conditions, an ultraviolet-visible light imaging device is used to collect a face video sample of the user, and absorption spectrum samples of different components of the user's human blood are obtained.
[0032] Preferably, obtaining absorption spectrum samples of different components of the user's facial blood includes: irradiating the user's face with an ultraviolet-visible light camera, and a spectroscope receiving the photoelectric pulse waves corresponding to the outgoing light of each wavelength; a photoelectric converter and an analog-to-digital converter performing signal conversion on the photoelectric pulse waves to obtain data of the changing outgoing light intensity; calculating the absorbance data of each component in the blood according to the data of the changing outgoing light intensity, wherein the absorbance data includes the absorbance data of lymphocytes; and obtaining absorption spectrum samples of different components of the blood according to the absorbance data.
[0033] Further, calculating the absorbance data of each component in the blood according to the data of the changing outgoing light intensity includes:
[0034] Using the Lambert-Beer law, calculating the absorbance data of each component in the blood according to the data of the changing outgoing light intensity.
[0035] Specifically, the Lambert-Beer law - the basic law of absorption spectrometry, which describes the relationship between the absorption intensity of a substance to monochromatic light, the thickness of the liquid layer, and the concentration of the analyte.
[0036] Assume a beam of parallel monochromatic light passes through a uniform, non-scattering light-absorbing object. Take an extremely thin layer in the object, then
[0037] Absorbance A = -lgT = kbc, where k is the absorption coefficient, represented by a when c is expressed in g / L; and represented by the molar absorption coefficient ε when c is expressed in mol / L.
[0038] Applicable conditions of the Lambert-Beer law: The incident light is monochromatic light, and it is a uniform, non-scattering dilute solution.
[0039] Measurement conditions of the Lambert-Beer law: The measurement wavelength is selected as the maximum absorption wavelength; the absorbance reading range is selected as A = 0.15 - 1.00.
[0040] Step S102: After normalizing the absorption spectrum samples, use the principal component analysis method for data dimensionality reduction and feature extraction to obtain an absorption spectrum curve;
[0041] Specifically, each spectral data is normalized to a value between 0 and 1, and then the principal component analysis method is used for data dimensionality reduction and feature extraction to obtain seven absorption spectral curves of user serum, plasma, hemoglobin, albumin, red blood cells, lymphocytes, platelets, etc., corresponding to the absorption spectra of serum, plasma, hemoglobin, albumin, red blood cells, lymphocytes, and platelets respectively. Among them, the absorption spectra of serum, plasma, hemoglobin, albumin, red blood cells, lymphocytes, and platelets are different from each other, and the positions of the absorption peaks are also inconsistent.
[0042] Specifically, principal component analysis is a statistical analysis method that divides a number of original variables into a few comprehensive indicators, and it is a dimensionality reduction processing technology.
[0043] Denote the original variable indicators as x1, x2, …, xP, and their comprehensive indicators - the new variable indicators as z1, z2, …, zm (m ≤ p), then
[0044]
[0045] z1, z2, …, zm are respectively called the first, second, …, mth principal components of the original variable indicators x1, x2, …, xP. In the analysis of practical problems, usually the first few largest principal components are selected.
[0046] ① zi i and zj j (i ≠ j; i, j = 1, 2,..., m) are independent of each other;
[0047] ② z1 is the one with the largest variance among all linear combinations of x1, x2,..., x p , z2 is the one with the largest variance among all linear combinations of x1, x2,..., x that is uncorrelated with z1 p ;......; zm m is the one with the largest variance among all linear combinations of x1, x2,..., x that is uncorrelated with z1, z2,......, zm m-1 ; p
[0048] ① zi and zj (i ≠ j; i, j = 1, 2, …, m) are independent of each other;
[0049] ② z1 is the one with the largest variance among all linear combinations of x1, x2, …, xP, z2 is the one with the largest variance among all linear combinations of x1, x2, …, xP that is uncorrelated with z1; ……; zm is the one with the largest variance among all linear combinations of x1, x2, …, xP that is uncorrelated with z1, z2, ……, zm - 1.
[0050] The calculation steps of principal component analysis are as follows:
[0051] Calculate the correlation coefficient matrix
[0052]
[0053] where
[0054] Calculate the eigenvalues and eigenvectors;
[0055] I Solve the characteristic equation |λI - R| = 0. Usually, the Jacobi method is used to find the eigenvalues λ i (i = 1, 2, Λ, p), and arrange them in descending order, i.e., λ1 ≥ λ2 ≥ Λ ≥ λ p ≥ 0;
[0056] II Find the eigenvectors e i corresponding to the eigenvalues λ i (i = 1, 2, Λ, p). Here, it is required that ||e i || = 1, that is where e ij represents the j-th component of the vector e i .
[0057] Calculate the contribution rate and cumulative contribution rate of the principal components;
[0058] The contribution rate of the principal component z i is
[0059]
[0060] The cumulative contribution rate is
[0061]
[0062] Generally, the eigenvalues λ1, λ2, Λ, λ m corresponding to the first, second,..., m-th (m ≤ p) principal components with a cumulative contribution rate of 85 - 95% are taken.
[0063] Calculate the principal component loadings
[0064]
[0065] Calculate the scores of each principal component
[0066] Furthermore, after obtaining the absorption spectrum samples of different components of the user's facial blood and before normalizing the absorption spectrum samples, it also includes:
[0067] The Euclidean distance is used to judge discrete points and invalid spectra in the absorption spectrum samples are eliminated. The wavelet transform denoising method is used to remove the interference noise of the absorption spectrum samples. The peak-valley point leveling, offset subtraction, differential processing and baseline tilt methods are used to remove the baseline of the absorption spectrum samples.
[0068] Step S103, classifying and formatting the absorption spectrum curve according to a preset standard lymphocyte percentage to generate a spectrum training sample;
[0069] The subjects were tested for lymphocyte percentage, the values were recorded, and the infrared spectra of the database were classified. Specifically, the database spectra were classified according to the lymphocyte percentage values and divided into three sub-databases: the lymphocyte percentage of normal adults is 20%-40%; below 20% means the lymphocyte percentage is reduced; above 40% means the lymphocyte percentage is increased.
[0070] The classified absorption spectrum curve is converted into a format, and finally a spectrum training sample having a corresponding absorption spectrum curve and lymphocyte percentage is generated.
[0071] Step S104, deep learning and training the machine learning model through spectral training samples to establish a lymphocyte percentage detection model;
[0072] Specifically, the machine learning model is deeply learned and trained through spectral training samples to establish a lymphocyte percentage detection matching model, including: using support vector regression and gradient enhancement regression to regress the spectral features in the spectral training samples and the lymphocyte percentage; using mean absolute error, mean square error, root mean square error and correlation coefficient R2 to evaluate the regressed model to obtain the lymphocyte percentage detection matching model.
[0073] The calculation method of the four evaluation indicators can be expressed as:
[0074]
[0075] Where N represents the number of samples in the data set; yi represents the concentration reference value, and yi represents the model prediction value. MAE, RMSE, and MSE are metrics used to measure the degree of difference between the predicted value and the reference value. The smaller the value, the better the performance. The value range of R2 is between 0 and 1. The closer R2 is to 1, the better the fit of the model.
[0076] Step S105: Obtain the absorption spectrum of the user's face to be tested, and input it into the lymphocyte percentage detection model for prediction to obtain the target lymphocyte percentage.
[0077] Specifically, an ultraviolet-visible light camera is used to irradiate the face of the user to be measured, and a spectroscope receives the photoelectric pulse waves corresponding to the outgoing light of each wavelength; a photoelectric converter and an analog-to-digital converter perform signal conversion on the photoelectric pulse waves to obtain data of the changing outgoing light intensity; absorbance data of each component in the blood is calculated based on the data of the changing outgoing light intensity, where the absorbance data includes the absorbance data of lymphocytes; and a to-be-measured absorption spectrum of different blood components is obtained based on the absorbance data.
[0078] The obtained to-be-measured absorption spectrum is input into a lymphocyte percentage detection and matching model for prediction, and the target lymphocyte percentage of the user to be measured can be obtained. Thus, rapid, accurate, non-destructive, low-cost, and real-time detection of the lymphocyte percentage is achieved.
[0079] From the above description, it can be seen that the present invention achieves the following technical effects:
[0080] In the embodiment of the present application, a method for detecting the lymphocyte percentage is adopted. By obtaining absorption spectrum samples of different components of the blood on the face of the user; after normalizing the absorption spectrum samples, the principal component analysis method is used for data dimensionality reduction and feature extraction to obtain an absorption spectrum curve; the absorption spectrum curve is classified and format-converted according to a preset standard lymphocyte percentage to generate a spectral training sample; the machine learning model is subjected to deep learning and training through the spectral training sample to establish a lymphocyte percentage detection and matching model; the to-be-measured absorption spectrum of the face of the user to be measured is obtained and input into the lymphocyte percentage detection and matching model for prediction to obtain the target lymphocyte percentage; the purpose of determining the absorption spectrum based on the face to effectively reflect the real situation of the user is achieved, thereby achieving the technical effect of improving the detection accuracy, and further solving the technical problem that the detection accuracy of the lymphocyte percentage is not high due to the fact that the synthesized lymphocyte pseudo-color map cannot effectively reflect the real situation of the user.
[0081] It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0082] According to an embodiment of the present invention, there is also provided a device for implementing the above-mentioned lymphocyte percentage detection method, as Figure 2 shown, the device includes:
[0083] An acquisition module 10, configured to acquire absorption spectrum samples of different components of the blood on the face of the user;
[0084] Specifically, under darkroom conditions, an ultraviolet-visible light imaging device is used to collect video samples of the user's face and obtain absorption spectrum samples of different components of the user's human blood.
[0085] Preferably, obtaining absorption spectrum samples of different components of the user's facial blood includes: irradiating the user's face with an ultraviolet-visible light camera, and a spectroscope receiving the photoelectric pulse waves corresponding to the outgoing light of each wavelength; a photoelectric converter and an analog-to-digital converter performing signal conversion on the photoelectric pulse waves to obtain data of the changing outgoing light intensity; calculating the absorbance data of each component in the blood according to the data of the changing outgoing light intensity, wherein the absorbance data includes the absorbance data of lymphocytes; and obtaining absorption spectrum samples of different components of the blood according to the absorbance data.
[0086] Further, calculating the absorbance data of each component in the blood according to the data of the changing outgoing light intensity includes:
[0087] Using the Lambert-Beer law, calculating the absorbance data of each component in the blood according to the data of the changing outgoing light intensity.
[0088] Specifically, the Lambert-Beer law - the basic law of absorption spectrometry, which describes the relationship between the absorption strength of a substance for monochromatic light and the liquid layer thickness and the concentration of the analyte.
[0089] Assume a beam of parallel monochromatic light passes through a uniform, non-scattering light-absorbing object, and take an extremely thin layer in the object, then
[0090] Absorbance A = -lgT = kbc, where k: absorption coefficient, when c is expressed in g / L, it is represented by a; when c is expressed in mol / L, it is represented by the molar absorption coefficient ε.
[0091] Applicable conditions of the Lambert-Beer law: The incident light is monochromatic light, and it is a uniform, non-scattering dilute solution.
[0092] Measurement conditions of the Lambert-Beer law: The measurement wavelength is selected as the maximum absorption wavelength; the absorbance reading range is selected as A = 0.15 - 1.00.
[0093] The analysis module 20 is used to normalize the absorption spectrum samples and then perform data dimensionality reduction and feature extraction using the principal component analysis method to obtain an absorption spectrum curve;
[0094] Specifically, each spectral data is normalized to a value between 0 and 1, and then the principal component analysis method is used for data dimensionality reduction and feature extraction to obtain seven absorption spectral curves of user serum, plasma, hemoglobin, albumin, red blood cells, lymphocytes, platelets, etc., corresponding to the absorption spectra of serum, plasma, hemoglobin, albumin, red blood cells, lymphocytes, and platelets respectively. Among them, the absorption spectra of serum, plasma, hemoglobin, albumin, red blood cells, lymphocytes, and platelets are different from each other, and the positions of the absorption peaks are also inconsistent.
[0095] Specifically, principal component analysis is a statistical analysis method that divides a number of original variables into a few comprehensive indicators, and it is a dimensionality reduction processing technology.
[0096] Denote the original variable indicators as x1, x2, …, xP, and their comprehensive indicators - the new variable indicators as z1, z2, …, zm (m ≤ p), then
[0097]
[0098] z1, z2, …, zm are respectively called the first, second, …, m-th principal components of the original variable indicators x1, x2, …, xP. In the analysis of practical problems, usually the first few largest principal components are selected.
[0099] ① z i and z j (i ≠ j; i, j = 1, 2,..., m) are independent of each other;
[0100] ② z1 is the one with the largest variance among all linear combinations of x1, x2,..., x p , z2 is the one with the largest variance among all linear combinations of x1, x2,... x p that is uncorrelated with z1;......; z m is the one with the largest variance among all linear combinations of x1, x2,... x m-1 that is uncorrelated with z1, z2,......, z p .
[0101] ③ zi and zj (i ≠ j; i, j = 1, 2, …, m) are independent of each other;
[0102] ④ z1 is the one with the largest variance among all linear combinations of x1, x2, …, xP, z2 is the one with the largest variance among all linear combinations of x1, x2, …, xP that is uncorrelated with z1; ……; zm is the one with the largest variance among all linear combinations of x1, x2, …, xP that is uncorrelated with z1, z2, ……, zm - 1.
[0103] The calculation steps of principal component analysis are as follows:
[0104] Calculate the correlation coefficient matrix
[0105]
[0106] where Calculate the eigenvalues and eigenvectors;
[0107] I Solve the characteristic equation |λI - R| = 0. Usually, the Jacobi method is used to find the eigenvalues λ i (i = 1, 2, Λ, p), and arrange them in descending order, i.e., λ1 ≥ λ2 ≥ Λ, ≥ λ p ≥ 0;
[0108] II Find the eigenvectors e i corresponding to the eigenvalues λ i (i = 1, 2, Λ, p). Here, it is required that ||e i || = 1, that is where e ij represents the i-th component of the vector e i .
[0109] Calculate the contribution rate and cumulative contribution rate of the principal components;
[0110] The contribution rate of the principal component z i is
[0111]
[0112] The cumulative contribution rate is
[0113]
[0114] Generally, take the eigenvalues λ1, λ2, Λ, λ m corresponding to the first, second,..., m-th (m ≤ p) principal components with a cumulative contribution rate of 85 - 95%.
[0115] Calculate the principal component loadings
[0116]
[0117] Calculate the scores of each principal component
[0118] Furthermore, after obtaining the absorption spectrum samples of different components of the user's facial blood and before normalizing the absorption spectrum samples, it also includes:
[0119] Use the Euclidean distance to judge discrete points, remove the invalid spectra in the absorption spectrum samples, use the wavelet transform denoising method to remove the interference noise of the absorption spectrum samples, and use the methods of leveling peak-valley points, offset subtraction, differential processing, and baseline tilt to remove the baseline of the absorption spectrum samples.
[0120] A classification module 30, configured to classify and perform format conversion on the absorption spectral curve according to a preset standard lymphocyte percentage, and generate a spectral training sample;
[0121] Detect the lymphocyte percentage of the subject, record the value, and classify the infrared spectra in the database. Specifically, classify the spectra in the database according to the lymphocyte percentage value, which is divided into three sub-databases in total: the lymphocyte percentage of normal adults is 20%-40%; less than 20% means a decrease in the lymphocyte ratio; higher than 40% means an increase in the lymphocyte ratio.
[0122] Perform format conversion on the classified absorption spectral curve, and finally generate a spectral training sample with a corresponding relationship between the absorption spectral curve and the lymphocyte percentage.
[0123] A training module 40, configured to perform deep learning and training on a machine learning model through the spectral training sample, and establish a lymphocyte percentage detection matching model;
[0124] Specifically, perform deep learning and training on a machine learning model through the spectral training sample, and establish a lymphocyte percentage detection matching model, including: using support vector regression and gradient boosting regression to perform regression on the spectral features and lymphocyte percentage in the spectral training sample; using the mean absolute error, mean square error, root mean square error, and correlation coefficient R2 to evaluate the regression model, and obtaining a lymphocyte percentage detection matching model.
[0125] The calculation methods of the four evaluation indicators can be expressed as:
[0126]
[0127] In the formula, N represents the number of samples in the dataset; yi represents the concentration reference value, and represents the model prediction value. MAE, RMSE, and MSE are measurement methods used to reflect the degree of difference between the prediction value and the reference value, and the smaller the value, the better the performance. The value range of R2 is between 0 and 1, and the closer R2 is to 1, the better the fitting degree of the model.
[0128] A prediction module 50, configured to obtain the absorption spectrum to be measured of the face of the user to be measured, and input it into the lymphocyte percentage detection matching model for prediction to obtain the target lymphocyte percentage.
[0129] Specifically, an ultraviolet-visible light camera is used to irradiate the face of the user to be tested, and a spectroscope receives the photoelectric pulse waves corresponding to the outgoing light of each wavelength; a photoelectric converter and an analog-to-digital converter perform signal conversion on the photoelectric pulse waves to obtain data of the changing outgoing light intensity; absorbance data of each component in the blood is calculated based on the data of the changing outgoing light intensity, wherein the absorbance data includes the absorbance data of lymphocytes; and a to-be-detected absorption spectrum of different blood components is obtained according to the absorbance data.
[0130] The obtained to-be-detected absorption spectrum is input into a lymphocyte percentage detection matching model for prediction, and the target lymphocyte percentage of the user to be tested can be obtained. Thus, rapid, accurate, non-destructive, low-cost, and real-time detection of the lymphocyte percentage is achieved.
[0131] From the above description, it can be seen that the present invention achieves the following technical effects:
[0132] In the embodiment of the present application, a method for detecting the lymphocyte percentage is adopted. By obtaining absorption spectrum samples of different components of the blood on the face of the user; after normalizing the absorption spectrum samples, the principal component analysis method is used for data dimensionality reduction and feature extraction to obtain an absorption spectrum curve; the absorption spectrum curve is classified and format-converted according to a preset standard lymphocyte percentage to generate a spectral training sample; the machine learning model is deeply learned and trained through the spectral training sample to establish a lymphocyte percentage detection matching model; the to-be-detected absorption spectrum of the face of the user to be tested is obtained and input into the lymphocyte percentage detection matching model for prediction to obtain the target lymphocyte percentage; the purpose of determining the absorption spectrum based on the face to effectively reflect the real situation of the user is achieved, thereby achieving the technical effect of improving the detection accuracy, and further solving the technical problem that the detection accuracy of the lymphocyte percentage is not high due to the fact that the synthesized lymphocyte pseudocolor map cannot effectively reflect the real situation of the user.
[0133] Obviously, those skilled in the art should understand that the above-mentioned modules or steps of the present invention can be implemented by a general-purpose computing device. They can be concentrated on a single computing device or distributed on a network composed of multiple computing devices. Optionally, they can be implemented by program codes executable by the computing device, so that they can be stored in a storage device and executed by the computing device, or they can be separately fabricated into individual integrated circuit modules, or multiple modules or steps among them can be fabricated into a single integrated circuit module for implementation. In this way, the present invention is not limited to any specific combination of hardware and software.
[0134] The above are only the preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, various modifications and variations can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the protection scope of the present application.
Claims
1. A method for detecting lymphocyte percentage, characterized in that: include: Obtain absorption spectrum samples of different components of the user's facial blood; After normalizing the absorption spectrum samples, principal component analysis was used to perform data dimension reduction and feature extraction to obtain the absorption spectrum curve; The absorption spectrum curve is classified and formatted according to the preset standard lymphocyte percentage to generate spectrum training samples; Deep learning and training of machine learning models were performed through spectral training samples to establish a lymphocyte percentage detection model; The absorption spectrum of the user's face to be tested is obtained and input into the lymphocyte percentage detection matching model for prediction to obtain the target lymphocyte percentage.
2. The method for detecting lymphocyte percentage according to claim 1, characterized in that: Obtain absorption spectrum samples of different components of the user's facial blood, including: The ultraviolet visible light camera is used to illuminate the user's face, and the spectrometer receives the photoelectric pulse waves corresponding to the emitted light of each wavelength; The photoelectric converter and the analog-to-digital converter perform signal conversion on the photoelectric pulse wave to obtain data of the changing output light intensity; Calculating absorbance data of each component in the blood according to the data of the changing output light intensity, wherein the absorbance data includes the absorbance data of lymphocytes; The absorption spectrum samples of different blood components are obtained according to the absorbance data.
3. The method for detecting lymphocyte percentage according to claim 2, characterized in that: The absorbance data of each component in the blood is calculated based on the data of the changing output light intensity, including: The Lambert-Beer law is used to calculate the absorbance data of each component in the blood based on the data of the changing output light intensity.
4. The method for detecting lymphocyte percentage according to claim 1, characterized in that: After obtaining the absorption spectrum samples of different components of the user's facial blood, before normalizing the absorption spectrum samples, the following steps are also included: The Euclidean distance is used to judge discrete points and invalid spectra in the absorption spectrum samples are eliminated. The wavelet transform denoising method is used to remove the interference noise of the absorption spectrum samples. The peak-valley point leveling, offset subtraction, differential processing and baseline tilt methods are used to remove the baseline of the absorption spectrum samples.
5. The method for detecting lymphocyte percentage according to claim 1, characterized in that: The machine learning model is deeply learned and trained through spectral training samples to establish a lymphocyte percentage detection model, including: Support vector regression and gradient boosting regression were used to regress the spectral features and lymphocyte percentage in the spectral training samples; The mean absolute error, mean square error, root mean square error and correlation coefficient R2 were used to evaluate the regression model and obtain the lymphocyte percentage detection model.
6. A lymphocyte percentage detection device, characterized in that: include: An acquisition module, used to obtain absorption spectrum samples of different components of the user's facial blood; The analysis module is used to normalize the absorption spectrum samples, and then use the principal component analysis method to perform data dimension reduction and feature extraction to obtain the absorption spectrum curve; A classification module is used to classify and convert the absorption spectrum curve according to a preset standard lymphocyte percentage to generate a spectrum training sample; The training module is used to perform deep learning and training on the machine learning model through spectral training samples to establish a lymphocyte percentage detection model; The prediction module is used to obtain the absorption spectrum of the user's face to be tested, and input it into the lymphocyte percentage detection model for prediction to obtain the target lymphocyte percentage.
7. The lymphocyte percentage detection device according to claim 1, characterized in that: The acquisition module comprises: The ultraviolet visible light camera is used to illuminate the user's face, and the spectrometer receives the photoelectric pulse waves corresponding to the emitted light of each wavelength; The photoelectric converter and the analog-to-digital converter perform signal conversion on the photoelectric pulse wave to obtain data of the changing output light intensity; Calculating absorbance data of each component in the blood according to the data of the changing output light intensity, wherein the absorbance data includes the absorbance data of lymphocytes; The absorption spectrum samples of different blood components are obtained according to the absorbance data.
8. The lymphocyte percentage detection device according to claim 7, characterized in that: The absorbance data of each component in the blood is calculated based on the data of the changing output light intensity, including: The Lambert-Beer law is used to calculate the absorbance data of each component in the blood based on the data of the changing output light intensity.
9. The lymphocyte percentage detection device according to claim 1, characterized in that: Also includes: Preprocessing module for The Euclidean distance is used to judge discrete points and invalid spectra in the absorption spectrum samples are eliminated. The wavelet transform denoising method is used to remove the interference noise of the absorption spectrum samples. The peak-valley point leveling, offset subtraction, differential processing and baseline tilt methods are used to remove the baseline of the absorption spectrum samples.
10. The lymphocyte percentage detection device according to claim 1, characterized in that: The training module comprises: Support vector regression and gradient boosting regression were used to regress the spectral features and lymphocyte percentage in the spectral training samples; The mean absolute error, mean square error, root mean square error and correlation coefficient R2 were used to evaluate the regression model and obtain the lymphocyte percentage detection model.
Citation Information
Patent Citations
Heterotypic lymphocyte typing method based on YOLOv5 and microscopic hyperspectral image
CN114300099A