Intelligent psychodepression identification method and system based on rPPG
Through the rPPG-based intelligent recognition method, facial video data and Gaussian process classification algorithm are used to solve the problem of delay in remote psychological depression diagnosis, achieve accurate identification and assessment of psychological depression status, and improve the timeliness and accuracy of diagnosis.
Patent Information
- Application Number
- CN202410715507.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-04
- Publication Date
- 2024-10-01
AI Technical Summary
Existing technology makes it difficult to accurately identify and assess psychological depression remotely and in a timely manner. Traditional diagnostic methods rely on offline psychologists for evaluation, leading to delays in diagnosis.
The rPPG-based intelligent identification method for psychological depression is used to build a depression identification model through facial video data collection, signal extraction, noise reduction processing and Gaussian process classification algorithm model to achieve remote identification and assessment of psychological depression levels and categories.
It implements facial video data collection and signal processing, extracts heart rate-related features, and builds a Gaussian process classification algorithm model to achieve accurate identification and evaluation of psychological depression states, meet the needs of remote data collection and identification, and improve the timeliness and accuracy of diagnosis. .
Smart Images

Figure CN118736640A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of abnormal psychological emotion detection, and specifically, to an rPPG-based intelligent recognition method and system for psychological depression. Background Art
[0002] At present, psychological depression is a common mental health problem that affects people of almost all ages around the world. Globally, psychological depression is a common mental health problem worldwide. It is estimated that hundreds of millions of people are affected by psychological depression. According to the World Health Organization (WHO), depression is one of the leading causes of disability in the world. From the perspective of different age groups, psychological depression can affect people of all ages, including children, adolescents, adults and the elderly, and is particularly common among adolescents and adults. In terms of gender differences, studies have shown that women are more susceptible to psychological depression than men. This may be related to a variety of factors, including biological factors, socio-cultural factors, and individual psychological and emotional factors. The diagnosis and evaluation of traditional psychological depression-related diseases are usually performed by psychologists in offline psychological clinics. For more and more patients, this method usually requires queuing to obtain treatment from psychologists, and there will be problems with the inability to diagnose psychological depression-related diseases in a timely manner. Therefore, in mental health management and psychological depression intervention, products that can easily and accurately identify the psychological depression of the subjects and give evaluation results can detect and curb mental illness earlier. Summary of the invention
[0003] The main purpose of this application is to provide a method and system for intelligent identification of psychological depression based on rPPG, so as to realize intelligent identification and evaluation of psychological depression of subjects.
[0004] In order to achieve the above objectives, the present application provides: a method for intelligently identifying psychological depression based on rPPG, the method comprising:
[0005] Collect facial video data;
[0006] Extract rPPG signals from facial video data;
[0007] De-noise the rPPG signal and extract multiple features to describe heart rate related indicators;
[0008] The subjects were assessed for depression symptom levels using a psychological depression assessment tool and the depression category was noted;
[0009] Constructing a depression recognition model based on the plurality of features, depression symptom levels and depression categories, wherein the depression recognition model uses a Gaussian process classification algorithm model;
[0010] Deploy and maintain the depression recognition model into the application system.
[0011] Further, the method for extracting rPPG signals from facial video data specifically includes:
[0012] Detecting each video frame of the facial video to obtain a facial rectangle and segment a facial interest region;
[0013] Identify color variations in the skin in each facial region of interest;
[0014] The color model is applied to calculate the color channels of the varying skin color pixels, and the rPPG signal is constructed by the average value of the color channels.
[0015] Furthermore, the method of performing noise reduction processing on the rPPG signal and extracting multiple features for describing heart rate related indicators specifically includes:
[0016] Applying a baseline elimination algorithm eliminates or suppresses the sharp drop or rise trend of the original rPPG signal pulse;
[0017] Apply the spike smoothing algorithm to eliminate the sharp drop spike noise;
[0018] A five-point cubic smoothing algorithm was applied to remove high-frequency random noise and obtain the denoised rPPG signal;
[0019] Extracting at least time domain features, frequency domain features and time-frequency domain features from the denoised rPPG signal;
[0020] A plurality of parameters related to heart rate variability are extracted from the time domain features, the frequency domain features and the time-frequency domain features as the plurality of the features.
[0021] Furthermore, the method of using the psychological depression assessment tool to assess the depression symptom level of the subject and label the depression category specifically includes:
[0022] Data on the subjects’ psychological depression levels were collected using a psychological depression assessment tool;
[0023] Processing missing values and outliers on the depression level data;
[0024] According to the content design of the psychological depression assessment tool and routine practice combined with the processed depression level data, the subjects' depressive symptom levels and depression categories were divided.
[0025] Furthermore, the depression recognition model is constructed based on the plurality of the features, depression symptom levels and depression categories, and the depression recognition model uses a Gaussian process classification algorithm model, specifically including:
[0026] Dividing the plurality of characteristics, depression symptom levels and depression category data into a training set and a test set;
[0027] The Gaussian process classification algorithm is used to train the training set data and output the depression recognition model;
[0028] Using the test set data to perform performance evaluation and parameter tuning on the depression recognition model;
[0029] Output the tuned depression recognition model.
[0030] Furthermore, the method of selecting the Gaussian process classification algorithm to train the training set data and output the depression recognition model specifically includes:
[0031] Given a partitioned fusion data training sample set D = {(x i ,y i )|i=1,2,…,n},y i ∈{0,1,2,3};
[0032] Let class conditional prior probability p(x i |w j )(j=0,1,2,3) and class prior probability p(w j )(j=0,1,2,3) is known, where the class conditional prior probability is estimated using the Parzen window method, and then the Bayesian formula is Solve for each sample x separately i The posterior probability p(y i |x i );
[0033] Using each sample x i The posterior probability p(y i |x i ) Perform data conversion to obtain the data set Among them, z i is the label after data conversion;
[0034] Calculate the covariance matrix K and implement eigendecomposition K = P T ∧P, where the covariance function is defined as Among them, α1 and α2 are fixed constants respectively;
[0035] Formula derivation and simplification And obtain the simulation parameter σ;
[0036] Calculate and solve (K+σ 2 I) -1 =P T (∧+σ 2 I) -1P, and output the data set Z and the inverse matrix (K+σ 2 I) -1 , to complete data training and output a depression recognition model.
[0037] Furthermore, the method for deploying and maintaining the depression recognition model in the application system specifically includes:
[0038] Create an API service to load the model and receive requests and return model recognition results;
[0039] Deploy API services to application systems;
[0040] Monitor the running status of the API service and update the model regularly.
[0041] This embodiment further discloses a rPPG-based intelligent recognition system for psychological depression, including:
[0042] A data acquisition module, used for collecting facial video data;
[0043] An rPPG signal extraction module, used to extract rPPG signals from facial video data;
[0044] A feature extraction module is used to perform noise reduction on the rPPG signal and extract multiple features for describing heart rate related indicators;
[0045] A data annotation module is used to assess the depression symptom level of the subjects using a psychological depression assessment tool and annotate the depression category;
[0046] A model training and evaluation module, for constructing a depression recognition model based on the plurality of features, depression symptom levels and depression categories, wherein the depression recognition model uses a Gaussian process classification algorithm model;
[0047] The model deployment module is used to deploy and maintain the depression recognition model into the application system.
[0048] This embodiment further discloses a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program implements the above method when executed by a processor.
[0049] This embodiment further discloses an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-described method when executing the program.
[0050] Compared with the prior art, the rPPG-based intelligent depression recognition method and system provided by the present invention have the following beneficial effects: using facial video data as basic data for psychological depression recognition can meet the needs of remote basic data collection, and data collection is more convenient and quick. At the same time, by training a Gaussian process classification algorithm model based on the psychological depression levels of multiple respondents and the corresponding multiple features collected, after the depression recognition model is remotely deployed, accurate psychological depression recognition of the subjects can be achieved through the remotely collected rPPG signals. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The drawings constituting a part of this application are used to provide a further understanding of this application, so that other features, purposes and advantages of this application become more obvious. The schematic embodiment drawings and their descriptions of this application are used to explain this application and do not constitute an improper limitation on this application. In the drawings:
[0052] Figure 1 Schematic diagram of the process of the rPPG-based intelligent recognition method for psychological depression in this embodiment;
[0053] Figure 2 Schematic diagram of the system structure of the rPPG-based intelligent recognition method for psychological depression in this embodiment;
[0054] Figure 3 Schematic diagram of the test results of the depression recognition model for each depression level in this embodiment;
[0055] Figure 4 Schematic diagram of working characteristics of subjects in multiple different models in this embodiment. DETAILED DESCRIPTION
[0056] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0057] It should be noted that the terms "first", "second", etc. in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0058] In the present application, the terms "upper", "lower", "left", "right", "front", "back", "top", "bottom", "inner", "outer", "middle", "vertical", "horizontal", "lateral", "longitudinal" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the drawings. These terms are mainly used to better describe the present application and its embodiments, and are not used to limit the indicated devices, elements or components to have a specific orientation, or to be constructed and operated in a specific orientation.
[0059] In addition, some of the above terms may be used to express other meanings in addition to indicating orientation or positional relationship. For example, the term "on" may also be used to express a certain dependency or connection relationship in some cases. For those of ordinary skill in the art, the specific meanings of these terms in this application can be understood according to specific circumstances.
[0060] In addition, the term "plurality" shall mean two or more.
[0061] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0062] As the proportion of contemporary people suffering from depression-related diseases is increasing, timely identification and response to depression is the key to protecting individual mental health. How to identify and discover as early as possible and accurately quantify and predict the level of depression has become an important prerequisite for effectively solving the above problems. In recent years, the research on heart rate variability analysis methods in the field of diagnosis of depression-related diseases has developed rapidly. When in a state of depression, the autonomic nervous system is different from that of ordinary people. More and more studies have shown that heart rate variability analysis can help determine the probability of depression. Therefore, based on the characteristic data of heart rate variability, an intelligent recognition method and system for depression based on rPPG is proposed.
[0063] Specifically, this method uses video analysis, signal extraction and other technologies, combined with the subject's own psychological depression category information and heart rate variability characteristic data, to build a machine learning prediction model, train and evaluate it, and deploy it to the terminal device or cloud platform.
[0064] refer to Figure 1 This embodiment discloses an intelligent recognition method for psychological depression based on rPPG, the method comprising:
[0065] S100: Collect facial video data.
[0066] The facial video data is the facial video of the subjects who have the basic knowledge of color recognition. The facial video is collected by camera, specifically RGB facial video. To ensure the availability of the video, when shooting the facial video, the light in the collection environment must be uniform and bright enough to ensure the good quality of light reflected from the skin surface. At the same time, the pixel resolution of the camera must be as high as possible to ensure that a clear facial image is obtained. The collection position and angle of the camera must be at an appropriate distance from the subject's face and remain perpendicular to the face. The subject must maintain a relatively static posture to improve the stability of video collection. In addition, the length of the collected video should be more than 15 seconds to obtain sufficient data for subsequent signal processing and analysis.
[0067] S200: extracting rPPG signals from facial video data.
[0068] The rPPG signal refers to remote photoelectric pulse wave recording, which reflects the changes in blood volume in tiny blood vessels on the surface of the skin during the heartbeat. It is extracted by analyzing facial video data and obtaining color changes of the facial skin.
[0069] For the extraction of rPPG signals, face detection and tracking in facial video data are crucial, while head motion and background noise can significantly affect the performance of rPPG signal pulse waves. Therefore, a face detector is used to assist in extraction.
[0070] Specific:
[0071] S210: Detect the video frame of each facial video to obtain a facial rectangle and segment the facial interest region;
[0072] S220: Identify skin color changes in each facial region of interest.
[0073] In this embodiment, the OpenCV Viola-Jones face detector is used to detect the face rectangle of each video frame and segment the facial interest region. Exemplarily, the interest region may be the forehead region, the nose region, the cheek region, etc., and then the skin color change of each interest region is identified.
[0074] S230: Apply the color model to calculate the color channels of the changed skin color pixels, and construct the rPPG signal through the average value of the color channels.
[0075] After obtaining the skin color change, the extraction of the rPPG signal pulse wave is mainly achieved by applying the color model. Commonly used color models include RGB, HSI, YCbCr, etc. For the HSI model, only the H channel can be used for signal pulse extraction, and the YCbCr model consists of brightness (Y) and two chrominance components (Cb, Cr). YCbCr produces better results in detecting heart rate than the motion-restricted HSI, and the color channel of the RGB color model can give the strongest signal-to-noise ratio SNR. Therefore, the RGB color model is selected in this embodiment, and the rPPG signal is constructed by calculating the average value of the color channel of the pixels in the detected facial interest area rectangle.
[0076] S300: performing noise reduction processing on the rPPG signal, and extracting a plurality of features for describing heart rate related indicators therefrom.
[0077] When constructing rPPG signals, even if the facial area is accurately tracked, the average intensity in the facial area may suddenly drop or rise due to subtle changes in facial expressions or movements of the subject during the acquisition process, resulting in more noise in the RPPG signal pulse wave. Therefore, the baseline elimination algorithm, spike smoothing algorithm and five-point cubic smoothing algorithm are used to optimize and adjust the original RPPG signal. Specifically:
[0078] S310: Applying a baseline elimination algorithm to eliminate or suppress the sharp drop or rise trend of the original rPPG signal pulse.
[0079] First, the original rPPG signal pulse is cut into multiple M-point non-overlapping segments and the average value of each segment is calculated. Then, the average value of each segment is set equal to the average value of the entire original pulse to eliminate the trend of the signal, and the signal sampling rate is used as the value of the segment length M.
[0080] S320: Apply a peak smoothing algorithm to eliminate the sharp drop peak noise.
[0081] The signal after baseline elimination is close to the ideal pulse signal, but the above-mentioned spike noise will exist. The processing process of the spike smoothing algorithm is to first cut the original rPPG signal pulse into multiple M-point non-overlapping segments and calculate the standard deviation of each segment. If the standard deviation of a segment exceeds twice the overall standard deviation, the corresponding segment is considered to be a high-noise segment and a compression method is used to smooth the segment. The algorithm formula is as follows:
[0082] where CR is the compression ratio for smoothing the noise segment, sd iis the standard deviation of the noise segment, and sd is the overall standard deviation of the pulse signal. Obviously, the calculated CR increases with sd i All pulse wave values in the noise segment are multiplied by (1-CR) to achieve spike smoothing.
[0083] S330: Apply a five-point cubic smoothing algorithm to remove high-frequency random noise and obtain a noise-reduced rPPG signal.
[0084] In order to keep the curve characteristics of the original rPPG signal pulse unchanged, a cubic polynomial is used to fit the experimental data through a five-point cubic smoothing algorithm:
[0085] Y(t)=a0+a1t+a2t 2 +a3t 3 (2)
[0086] Then calculate the unknown coefficients in the equation. By defining the least squares formula:
[0087]
[0088] Make φ(a0,a1,a2,a3) minimum and calculate a k Taking the partial derivative of (a0,a1,a2,a3) and setting it equal to zero, we get the equation
[0089]
[0090] Undetermined coefficient a k (a0, a1, a2, a3) is calculated by formula (4), and a k Substituting (a0, a1, a2, a3) into formula (2) yields the five-point cubic smoothing formula:
[0091]
[0092]
[0093]
[0094]
[0095]
[0096] S340: extracting at least time domain features, frequency domain features, and time-frequency domain features from the denoised rPPG signal.
[0097] Among them, time domain features are features extracted directly from the time series of the signal, which can describe the basic statistical characteristics and morphological characteristics of the signal, including the mean, variance, standard deviation, kurtosis, skewness, etc. of the signal. Frequency domain features are features obtained by performing spectrum analysis methods such as Fourier transform or wavelet transform on the signal, which can describe the frequency components and spectrum distribution characteristics of the signal, including the spectrum energy, spectrum mean, spectrum peak, etc. of the signal. Time-frequency domain features are features obtained by comprehensively considering the time domain and frequency domain information of the signal. For example, methods such as short-time Fourier transform (STFT) and wavelet transform can obtain time-frequency domain features, including time-spectrum spectrum, instantaneous frequency, etc.
[0098] S350: Extracting a plurality of parameters related to heart rate variability from the time domain features, the frequency domain features, and the time-frequency domain features as the plurality of features.
[0099] In this embodiment, 25 parameter features related to heart rate variability are finally extracted.
[0100] Specific:
[0101] SDNN: standard deviation of RR interval, standard deviation of heartbeat interval;
[0102] RMSSD: the root mean square of the sum of squares of the differences between adjacent normal heart beat intervals;
[0103] LF: The amplitude of the normal heartbeat interval in the low frequency range (0.04-0.15hz);
[0104] HF: The amplitude of normal heartbeat intervals in the high frequency range (0.15-40 Hz);
[0105] LF / HF: low-high frequency power ratio; sdsd: standard deviation of adjacent RR differences;
[0106] hf_nu: normalized high frequency power; lf_nu: normalized low frequency power;
[0107] nn: normal heartbeat interval, RR interval;
[0108] cvnni: coefficient of variation, standard deviation of the series data of heart beat-to-beat variability;
[0109] nn20: the number of adjacent RR interval differences > 20 ms;
[0110] nn50: the number of adjacent RR interval differences > 50 ms;
[0111] pnn20: the percentage of NN20 in the total heart rate;
[0112] pnn50: the percentage of NN50 in the total heart rate;
[0113] cvcd: coefficient of variation of consecutive differences;
[0114] sd1: standard deviation of the projection of the Poincare map onto the line perpendicular to the line of equation;
[0115] sd2: standard deviation of the Poincare projection;
[0116] SDNNindex: the average of the standard deviations of all RR intervals;
[0117] Hrvindex: the total number of RR intervals divided by the height of the RR interval;
[0118] Max_min: the difference between the maximum and minimum values of all RR intervals;
[0119] MEAN: mean value of RR interval;
[0120] totalpower: total power spectral density;
[0121] VLF: Very low frequency power, range 0.04~0.15Hz;
[0122] HFn: normalization of high frequency capability;
[0123] LFn: The proportion of low-frequency power in the total power spectrum.
[0124] S400: Use the psychological depression assessment tool to assess the level of depression symptoms of the subjects and label the depression category.
[0125] Specific:
[0126] S410: Collect the psychological depression level data of the subjects through the psychological depression assessment tool.
[0127] Exemplarily, using a standard psychological depression assessment tool, the self-rating scale for depression symptoms, the Hamilton Depression Rating Scale, etc. can be selected to assess the psychological depression level of the subject and mark the depression category. The self-rating scale for depression symptoms is a commonly used psychological assessment tool used to assess whether an individual has depressive symptoms and the severity of the symptoms. Data annotation is the process of marking the subject's self-rating scale score as the corresponding level of depression symptoms. First, collect the self-rating scale data for depression symptoms filled in by the subject. It usually includes the subject's personal information (such as age, gender, place of residence, occupation, income level, etc.) and the score of each question.
[0128] S420: Process missing values and outliers on the depression level data.
[0129] In the process of labeling depression status, missing values, outliers, etc. can be handled by filling missing values, removing outliers, etc. to ensure the quality of the data.
[0130] S430: Based on the content design of the psychological depression assessment tool and routine practice combined with the processed depression level data, the subjects' depressive symptom levels and depression categories are divided.
[0131] According to the design of the self-rating scale and routine practice, the scores are divided into different levels of depression symptoms, for example, subjects with a total score of 0-4 points are divided into no depression, mild depression, moderate depression and severe depression levels. Finally, the data of the self-rating scale are annotated. Finally, the score of each subject is marked as the corresponding level of depression symptoms, no depression (0 points), mild depression (5-9 points), moderate depression (10-14 points), severe depression (15 points and above).
[0132] S500: constructing a depression recognition model according to the plurality of features, depression symptom levels and depression categories, wherein the depression recognition model uses a Gaussian process classification algorithm model.
[0133] The machine learning model is trained and evaluated using a labeled dataset to learn the relationship between RPPG features and psychological depression levels. Specifically:
[0134] S510: Divide the plurality of features, depression symptom levels, and depression category data into a training set and a test set.
[0135] The training set and test set data include the multiple rPPG features extracted in step S350, the depression symptom level and depression category in step S430, and the sklearn algorithm package train_test_split method is used to divide the above data into training set and test set, and the test_size value is 0.2.
[0136] S520: Using a Gaussian process classification algorithm to train the training set data and output a depression recognition model;
[0137] S530: Using the test set data to perform performance evaluation and parameter tuning on the depression recognition model;
[0138] S540: Output the tuned depression recognition model.
[0139] In this embodiment, the Gaussian process classification algorithm is used to train the training set data samples and output the evaluation prediction model. Gaussian process classification (GPC) is a probabilistic modeling method based on the Gaussian process (GP) through the prior distribution of the potential function. This method is a non-parametric Bayesian method that can flexibly model and solve classification problems without pre-specifying the function form. The method of training the Gaussian process classification algorithm and outputting the depression recognition model is as follows:
[0140] Given a partitioned fusion data training sample set D = {(x i ,y i )|i=1,2,…,n},y i ∈{0,1,2,3};
[0141] Let class conditional prior probability p(x i |w j )(j=0,1,2,3) and class prior probability p(w j )(j=0,1,2,3) is known, where the class conditional prior probability is estimated using the Parzen window method, and then the Bayesian formula is Solve for each sample x separately i The posterior probability p(y i |x i );
[0142] Using each sample x i The posterior probability p(y i |x i ) Perform data conversion to obtain the data set Among them, z i is the label after data conversion;
[0143] Calculate the covariance matrix K and implement eigendecomposition K = P T ∧P, where the covariance function is defined as Among them, α1 and α2 are fixed constants respectively;
[0144] Formula derivation and simplification And obtain the simulation parameter σ;
[0145] Calculate and solve (K+σ 2 I) -1 =P T (∧+σ 2 I) -1 P, and output the data set Z and the inverse matrix (K+σ 2 I) -1, to complete data training and output a depression recognition model.
[0146] For the evaluation of the depression recognition model, the confusion matrix is used to display the prediction effect of the model for different categories. Furthermore, 200 test set data samples are randomly selected, and the sklearn.metrics module is used to generate a confusion matrix result chart for the predicted category and the actual category. The prediction level status (no depression "0", mild depression "1", moderate depression "2", severe depression "3") corresponds to the confusion matrix. The confusion matrix can clearly show the prediction effect of the model for different categories, which helps to better understand the weaknesses and advantages of the model. For details, refer to Figure 3 , where the row represents the actual test data volume of the label, and the corresponding value of each column in the row is the test data volume predicted to the label class of this column. It can be seen that the prediction accuracy of no depression, mild depression, moderate depression, and severe depression are 0.964 (55 / 57), 0.905 (48 / 53), 0.866 (39 / 45), and 0.955 (43 / 45), respectively, and the overall prediction accuracy of the model is 0.925 (185 / 200).
[0147] In this embodiment, by performing statistical analysis and correlation measurement on the above test data, it was found that when a depressive state occurs, the heart rate variability indicators such as SDNN, RMSSD, SD1, SD2, NN20, NN50, PNN20, PNN50, HF_nu, etc. are relatively low; while the LF_nu increases and the higher the LF / HF ratio, the more severe the depressive state. In addition, higher CVNNI and CVSD are associated with depressive symptoms.
[0148] refer to Figure 4 , is a schematic diagram of the working characteristics of the subjects when multiple different models are used in this embodiment. To further illustrate the rationality of model selection, Gaussian Process, Random Forest, Nearest Neighbors, and Decision Tree models are selected for experiments. For multi-category classification problems, a one-vs-rest strategy is used to calculate the multi-category AUC (Area Under the Curve), and the value range is [0,1]. The closer the value is to 1, the better the model's ability to distinguish different categories. The closer the value is to 0.5, the closer the model's classification performance is to random. The closer the value is to 0, the poorer the model's classification performance is. The initial settings of the above-mentioned multiple model parameters are as follows:
[0149] Gaussian Process(optimizer='fmin_l_bfgs_b',n_restarts_optimizer=0,
[0150] max_iter_predict=100, warm_start=False, copy_X_train=True, n_jobs=None);
[0151] Random Forest(n_estimators=100,criterion='gini',max_depth=None,
[0152] min_samples_split=2, min_samples_leaf=1, min_weight_fraction_leaf=0.0, oob_score=False, n_jobs=None, verbose=0, warm_start=False, monotonic_cst=None);
[0153] Nearest Neighbors(n_neighbors=5,weights='uniform',algorithm='ball_tree',
[0154] leaf_size=30,p=2,metric='minkowski');
[0155] Decision Tree(criterion='gini',splitter='random',max_depth=None,
[0156] min_samples_split=2, min_samples_leaf=1, min_weight_fraction_leaf=0.0).
[0157] In the figure, the true positive rate (TPR) is shown on the Y axis, and the false positive rate (FPR) is shown on the X axis. Therefore, the larger the area under the curve (AUC), the better. Maximizing TPR while minimizing FPR is the ideal state. It can be seen that the Gaussian process classification algorithm model selected in this embodiment has better performance.
[0158] S600: Deploy the depression recognition model to the application system and maintain it.
[0159] Model deployment refers to embedding the trained model into an actual application system, such as a smartphone application or an online platform, for real-time monitoring and identification of the user's psychological depression level, and persistently storing the depression identification model in step S500 to disk. For example, the model file is depression_model.pkl. In addition, data security and privacy protection are considered during the deployment process to ensure that sensitive information is not leaked. Specifically:
[0160] S610: Create an API service for loading a model, receiving requests, and returning model recognition results.
[0161] For example, taking the online access platform scenario as an example, use a web framework such as Flask or FastAPI to create an API service to receive requests and return model prediction results. The following is a simple example using Flask (Python code):
[0162]
[0163] S620: Deploy the API service to the application system.
[0164] To deploy API services to a production environment, you can use a cloud platform (such as Baidu Cloud, Tencent Cloud, Alibaba Cloud, and other cloud services) or build your own server.
[0165] S630: Monitor the running status of the API service and update the model regularly.
[0166] The specific manner of executing the operation of each unit in the above embodiment has been described in detail in the embodiment of the method, and will not be elaborated here.
[0167] refer to Figure 2 This embodiment further discloses a method and system for intelligently identifying psychological depression based on rPPG, which specifically includes:
[0168] A data acquisition module 21, used for acquiring facial video data;
[0169] The rPPG signal extraction module 22 is used to extract the rPPG signal from the facial video data; and is also used to:
[0170] Detecting each video frame of the facial video to obtain a facial rectangle and segment a facial interest region;
[0171] Identify color variations in the skin in each facial region of interest;
[0172] The color model is applied to calculate the color channels of the varying skin color pixels, and the rPPG signal is constructed by the average value of the color channels.
[0173] The feature extraction module 23 is used to perform noise reduction processing on the rPPG signal and extract multiple features for describing heart rate related indicators; and is also used to:
[0174] Applying a baseline elimination algorithm eliminates or suppresses the sharp drop or rise trend of the original rPPG signal pulse;
[0175] Apply the spike smoothing algorithm to eliminate the sharp drop spike noise;
[0176] A five-point cubic smoothing algorithm was applied to remove high-frequency random noise and obtain the denoised rPPG signal;
[0177] Extracting at least time domain features, frequency domain features and time-frequency domain features from the denoised rPPG signal;
[0178] A plurality of parameters related to heart rate variability are extracted from the time domain features, the frequency domain features and the time-frequency domain features as the plurality of the features.
[0179] The data annotation module 24 is used to evaluate the depression symptom level of the subject using a psychological depression assessment tool and to annotate the depression category; and is also used to:
[0180] Data on the subjects’ psychological depression levels were collected using a psychological depression assessment tool;
[0181] Processing missing values and outliers on the depression level data;
[0182] According to the content design of the psychological depression assessment tool and routine practice combined with the processed depression level data, the subjects' depressive symptom levels and depression categories were divided.
[0183] The model training and evaluation module 25 is used to construct a depression recognition model based on the plurality of features, depression symptom levels and depression categories, wherein the depression recognition model uses a Gaussian process classification algorithm model; and is also used to:
[0184] Dividing the plurality of characteristics, depression symptom levels and depression category data into a training set and a test set;
[0185] The Gaussian process classification algorithm is used to train the training set data and output the depression recognition model;
[0186] Using the test set data to perform performance evaluation and parameter tuning on the depression recognition model;
[0187] Output the tuned depression recognition model.
[0188] Among them, the method of using the Gaussian process classification algorithm to train the training set data and output the depression recognition model specifically includes:
[0189] Given a partitioned fusion data training sample set D = {(x i ,y i )|i=1,2,…,n},y i ∈{0,1,2,3};
[0190] Let class conditional prior probability p(x i |w j )(j=0,1,2,3) and class prior probability p(w j )(j=0,1,2,3) is known, where the class conditional prior probability is estimated using the Parzen window method, and then the Bayesian formula is Solve for each sample x separately i The posterior probability p(y i |x i );
[0191] Using each sample x i The posterior probability p(y i |x i ) Perform data conversion to obtain the data set Among them, z i is the label after data conversion;
[0192] Calculate the covariance matrix K and implement eigendecomposition K = P T ∧P, where the covariance function is defined as Among them, α1 and α2 are fixed constants respectively;
[0193] Formula derivation and simplification And obtain the simulation parameter σ;
[0194] Calculate and solve (K+σ 2 I) -1 =P T (∧+σ 2 I) -1 P, and output the data set Z and the inverse matrix (K+σ 2 I) -1 , to complete data training and output a depression recognition model.
[0195] The model deployment module 26 is used to deploy the depression recognition model to the application system and maintain it; it is also used to,
[0196] Create an API service to load the model and receive requests and return model recognition results;
[0197] Deploy API services to application systems;
[0198] Monitor the running status of the API service and update the model regularly.
[0199] This embodiment further provides an electronic device, the electronic device comprising: a processor, a memory, and a bus;
[0200] The processor and the memory communicate with each other via a bus; the processor is used to call program instructions in the memory to execute the methods provided by the above-mentioned method embodiments.
[0201] This embodiment provides a non-transitory computer-readable storage medium, which stores computer instructions. The computer instructions enable a computer to execute the methods provided by the above method embodiments.
[0202] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk, etc., various storage media that can store program codes.
[0203] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.
[0204] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.
[0205] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. An intelligent method for identifying psychological depression based on rPPG, characterized in that: The method comprises: Collect facial video data; Extract rPPG signals from facial video data; De-noise the rPPG signal and extract multiple features to describe heart rate related indicators; The subjects were assessed for depression symptom levels using a psychological depression assessment tool and the depression category was noted; Constructing a depression recognition model based on the plurality of features, depression symptom levels and depression categories, wherein the depression recognition model uses a Gaussian process classification algorithm model; Deploy the depression recognition model into the application system and maintain it.
2. The rPPG-based intelligent recognition method for psychological depression according to claim 1, characterized in that: The method for extracting rPPG signals from facial video data specifically includes: Detecting each video frame of the facial video to obtain a facial rectangle and segment a facial region of interest; Identify color variations in the skin in each facial region of interest; The color model is applied to calculate the color channels of the varying skin color pixels, and the rPPG signal is constructed by the average value of the color channels.
3. The rPPG-based intelligent recognition method for psychological depression as claimed in claim 2, characterized in that: The method of performing noise reduction processing on the rPPG signal and extracting multiple features for describing heart rate related indicators specifically includes: Applying a baseline elimination algorithm eliminates or suppresses the sharp drop or rise trend of the original rPPG signal pulse; Apply the spike smoothing algorithm to eliminate the sharp drop spike noise; A five-point cubic smoothing algorithm was applied to remove high-frequency random noise and obtain the denoised rPPG signal; Extracting at least time domain features, frequency domain features and time-frequency domain features from the denoised rPPG signal; A plurality of parameters related to heart rate variability are extracted from the time domain features, the frequency domain features and the time-frequency domain features as the plurality of the features.
4. The rPPG-based intelligent recognition method for psychological depression according to claim 1, characterized in that: The method of using the psychological depression assessment tool to assess the depression symptom level of the subjects and mark the depression category specifically includes: Data on the subjects’ psychological depression levels were collected using a psychological depression assessment tool; Processing missing values and outliers on the depression level data; According to the content design of the psychological depression assessment tool and routine practice combined with the processed depression level data, the subjects' depressive symptom levels and depression categories were divided.
5. The rPPG-based intelligent recognition method for psychological depression according to claim 1, characterized in that: The depression recognition model is constructed based on the multiple features, depression symptom levels and depression categories. The depression recognition model uses a Gaussian process classification algorithm model, which specifically includes: Dividing the plurality of characteristics, depression symptom levels and depression category data into a training set and a test set; The Gaussian process classification algorithm is used to train the training set data and output the depression recognition model; Using the test set data to perform performance evaluation and parameter tuning on the depression recognition model; Output the tuned depression recognition model.
6. The rPPG-based intelligent recognition method for psychological depression according to claim 5, characterized in that: The method of selecting the Gaussian process classification algorithm to train the training set data and output the depression recognition model specifically includes: Given a partitioned fusion data training sample set D = {(x i ,y i )|i=1,2,…,n},y i ∈{0,1,2,3}; Let class conditional prior probability p(x i |w j )(j=0,1,2,3) and class prior probability p(w j )(j=0,1,2,3) is known, where the class conditional prior probability is estimated using the Parzen window method, and then the Bayesian formula is Solve for each sample x separately i The posterior probability p(y i |x i ); Using each sample x i The posterior probability p(y i |x i ) Perform data conversion to obtain the data set Among them, z i is the label after data conversion; Calculate the covariance matrix K and implement eigendecomposition K = P T ∧P, where the covariance function is defined as Among them, α1 and α2 are fixed constants respectively; Formula derivation and simplification And obtain the simulation parameter σ; Calculate and solve (K+σ 2 I) -1 =P T (∧+σ 2 I) -1 P, and output the data set Z and the inverse matrix (K+σ 2 I) -1 , to complete data training and output a depression recognition model.
7. The rPPG-based intelligent recognition method for psychological depression according to claim 1, characterized in that: The method for deploying and maintaining the depression recognition model in the application system specifically includes: Create an API service to load the model and receive requests and return model recognition results; Deploy API services to application systems; Monitor the running status of the API service and update the model regularly.
8. An intelligent recognition system for psychological depression based on rPPG, characterized in that: include: A data acquisition module, used for collecting facial video data; An rPPG signal extraction module, used to extract rPPG signals from facial video data; A feature extraction module is used to perform noise reduction on the rPPG signal and extract multiple features for describing heart rate related indicators; A data annotation module is used to assess the depression symptom level of the subjects using a psychological depression assessment tool and annotate the depression category; A model training and evaluation module, for constructing a depression recognition model based on the plurality of features, depression symptom levels and depression categories, wherein the depression recognition model uses a Gaussian process classification algorithm model; The model deployment module is used to deploy and maintain the depression recognition model into the application system.
9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Depression recognition method and system based on voice representation
CN116570284A
EEG signal depression identification system and method based on XGBoost algorithm
CN117064389A
