Method and system for detecting anxiety and depression based on gaze distribution
By employing a gaze distribution-based anxiety and depression detection method, which utilizes graph convolutional neural networks and support vector regression models, combined with gaze distribution and gaze trajectory data, the method addresses the issue of low accuracy in existing anxiety and depression detection methods, achieving efficient and accurate diagnosis of anxiety and depression.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-08
- Publication Date
- 2026-03-03
AI Technical Summary
Existing methods for detecting anxiety and depression have low accuracy, scale testing relies on experience and is prone to error, and electrooculography (EOG) and electroencephalography (EEG) signal acquisition are affected by subjective factors and the test subject's resistance.
By acquiring facial videos of test subjects, we use graph convolutional neural networks to extract gaze distribution data and gaze trajectories, and combine them with support vector regression models to predict anxiety and depression. The predicted values are then fused to improve diagnostic accuracy.
It improves the efficiency and accuracy of anxiety and depression diagnosis, reduces testing costs, simplifies follow-up procedures, and is suitable for low-cost anxiety and depression testing.
Smart Images

Figure CN115331281B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and specifically to an anxiety and depression detection method and system based on gaze distribution. Background Technology
[0002] Methods for detecting anxiety and depression mainly include scales and electrooculography (EOG)-based EEG signal acquisition. Among scales, the Hamilton Anxiety Rating Scale and Hamilton Depression Rating Scale have high reliability; other commonly used methods include the Self-Rating Anxiety Scale and the Self-Rating Depression Scale. The EOG-based EEG signal acquisition method assesses an individual's anxiety and depression levels by combining EEG data with machine learning. Four EOG signals are collected, processed, and then trained using a convolutional neural network. During acquisition, the left mastoid process is used as the reference electrode. Horizontal EOG signals are placed at the outer eyelids of both eyes, and vertical EOG signals are placed 2.5 cm above and below the left eye. The acquired signals are processed and fed into the convolutional neural network model for training.
[0003] However, the Hamilton Anxiety and Depression Rating Scale (HERRS) requires assessment and diagnosis by two professionally trained physicians, making it overly reliant on experience; different physicians may provide assessments with potential errors. Furthermore, the Self-Rating Anxiety and Depression Scale (SRS) is easily influenced by subjective attitudes and social desirability, exhibiting a strong subjective element. The electrooculography (EOG) method for collecting EEG data requires electrodes to be inserted into the subject's facial skin; some test subjects may resist or even fear this method, potentially affecting the anxiety and depression test results.
[0004] The above analysis shows that the accuracy of existing anxiety and depression detection methods is low. Summary of the Invention
[0005] (a) Technical problems to be solved
[0006] To address the shortcomings of existing technologies, this invention provides an anxiety and depression detection method and system based on gaze distribution, which solves the technical problem of low accuracy in existing anxiety and depression detection methods.
[0007] (II) Technical Solution
[0008] To achieve the above objectives, the present invention provides the following technical solution:
[0009] In a first aspect, the present invention provides an anxiety and depression detection method based on gaze distribution, comprising:
[0010] S1. Obtain facial video of the test subject under the test conditions;
[0011] S2. Obtain real-time gaze distribution data and eye trajectory of the test subject based on facial video;
[0012] S3. The gaze distribution data is subjected to feature extraction by graph convolutional neural network to obtain feature data. The feature data is input into the first support vector regression model to obtain the anxiety and depression prediction value based on the gaze distribution. The gaze trajectory is input into the second support vector regression model to obtain the anxiety and depression prediction value based on the gaze trajectory.
[0013] S4. The anxiety and depression predictive values based on eye gaze distribution and those based on eye gaze trajectory are fused to obtain the psychological assessment results of the test subject.
[0014] Preferably, the test conditions include:
[0015] Maintain uniform facial illumination, an ambient brightness of 400-500 lux, and conduct the test in a flicker-free environment, with the subject positioned N centimeters away from the screen.
[0016] At the beginning of the facial video capture phase, a white cross appears in the center of the black screen. When the test subject is detected to be looking at the center of the screen for more than 3 seconds, the cross disappears and the next phase begins.
[0017] After the test subject's gaze was detected to be in the center of the screen for more than 3 seconds, the cross disappeared, and three pictures with different emotions—positive, neutral, and negative—appeared on the screen for 10 seconds.
[0018] Preferably, step S2 includes:
[0019] S201. Obtain the original data of the face frame in the facial video through OpenFace;
[0020] S202. Obtain the gaze distribution data of the test subject based on the original face frame data;
[0021] S203. Obtain the gaze trajectory based on the original data of the face frame.
[0022] Preferably, S201 includes:
[0023] The subject is N centimeters away from the screen. Four vectors are defined to determine the screen area. When N = 75, the bounding vectors are as follows:
[0024]
[0025]
[0026]
[0027]
[0028] All are bounded vectors;
[0029] A face frame was used to obtain real-time facial information of the test subject using the open-source tool OpenFace. The rotation angles of the head on the X, Y, and Z axes in the video were obtained and labeled as α, β, and γ.
[0030]
[0031]
[0032]
[0033] The bounding vector after rotation:
[0034]
[0035] in, These are the four bounding vectors after rotation.
[0036] Preferably, S202 includes:
[0037] The subject is N centimeters away from the screen, meaning Y is a fixed value. The three-dimensional coordinates (X, Y, Z) are transformed into (X, Z) to obtain the subject's gaze coordinates on the screen. (X, Y) is used to replace (X, Z) to describe the coordinates of a point on the target plane.
[0038]
[0039] in, This represents the boundary of the gaze distribution.
[0040] The screen is divided into 3x3 square blocks, labeled 0-8 from left to right and top to bottom. The areas where the gaze falls are summarized. The nine blocks are regarded as nine nodes of the graph. When the gaze falls on a certain area, it is equivalent to being on a certain node. Sampling is performed every ten frames to obtain a directed graph, which is the gaze distribution data.
[0041] Preferably, S203 includes:
[0042] Using OpenFace, we obtain the six coordinates e1 to e6 of the human eye, and then use the Hough transform to find the pupil position (X). pupil ,Y pupil The vertical line perpendicular to the pupil's x-coordinate intersects the hexagon at the top and bottom; the intersection point Y is calculated using the following formula. top Y bottom :
[0043]
[0044]
[0045] The x-coordinate (X) of the intersection point of the horizontal line and the hexagon with the pupil's vertical coordinate is calculated using the same method described above. left X right According to Y top Y bottom X pupil Y pupil X left and X right Calculate the relative position coefficient:
[0046]
[0047]
[0048] Where, d level d vertical These are the relative position coefficients for the absolute focal coordinates in the horizontal and vertical directions, respectively;
[0049] (X r ,Y r )=(d level ×(max(X p2 ,X p3 )-min(X p1 ,X p4 )),d vertical ×(Y top -Y bottom ))
[0050] Among them, (X) r ,Y r () represents the relative coordinates of the focus;
[0051] By combining the relative position of the pupil with the coordinates of the attention area, the absolute coordinates of the focal point can be obtained:
[0052]
[0053] Among them, (X) ab ,Y ab () represents the absolute coordinates of the focus;
[0054] By smoothly connecting the absolute coordinates of the focus frame by frame, the gaze trajectory is obtained.
[0055] Preferably, before smoothly connecting the absolute focus coordinates frame by frame, the method further includes:
[0056] The missing frame data when the test subject's eyes are closed is completed based on the coordinates before and after the missing values.
[0057] Secondly, the present invention provides an anxiety and depression detection system based on gaze distribution, comprising:
[0058] The video acquisition module is used to acquire facial videos of the test subject under the test conditions;
[0059] The video processing module is used to acquire real-time gaze distribution data and gaze trajectory of the test subject based on facial video.
[0060] The prediction module extracts features from the gaze distribution data using a graph convolutional neural network to obtain feature data. The feature data is then input into a first support vector regression model to obtain a predicted value for anxiety and depression based on the gaze distribution. The gaze trajectory is then input into a second support vector regression model to obtain a predicted value for anxiety and depression based on the gaze trajectory.
[0061] The fusion module is used to combine anxiety and depression predictive values based on gaze distribution and anxiety and depression predictive values based on gaze trajectory to obtain the test subject's psychological assessment results.
[0062] Thirdly, the present invention provides a computer-readable storage medium storing a computer program for detecting anxiety and depression based on eye gaze distribution, wherein the computer program causes a computer to perform the eye gaze distribution-based anxiety and depression detection method as described above.
[0063] Fourthly, the present invention provides an electronic device, comprising:
[0064] One or more processors;
[0065] Memory; and
[0066] One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the programs including methods for performing the gaze distribution-based anxiety and depression detection method as described above.
[0067] (III) Beneficial Effects
[0068] This invention provides a method and system for detecting anxiety and depression based on gaze distribution. Compared with existing technologies, it has the following advantages:
[0069] This invention provides a method for detecting anxiety and depression based on gaze distribution. The method involves acquiring a facial video of the test subject under testing conditions; extracting features from the gaze distribution data using a graph convolutional neural network to obtain feature data; inputting the feature data into a first support vector regression model to obtain a predicted value for anxiety and depression based on gaze distribution; inputting the gaze trajectory into a second support vector regression model to obtain a predicted value for anxiety and depression based on the gaze trajectory; and fusing the predicted values based on gaze distribution and gaze trajectory to obtain the test subject's psychological assessment result. This invention improves the efficiency and accuracy of anxiety and depression diagnosis by obtaining psychological assessment results from gaze distribution data and gaze trajectory during anxiety detection. Attached Figure Description
[0070] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0071] Figure 1 This is a block diagram of an anxiety and depression detection method based on gaze distribution according to an embodiment of the present invention. Detailed Implementation
[0072] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention are described clearly and completely. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0073] This application provides an anxiety and depression detection method and system based on gaze distribution, which solves the technical problem of low accuracy in existing anxiety and depression detection methods, thereby improving the efficiency and accuracy of anxiety and depression diagnosis.
[0074] The technical solution in this application is to solve the above-mentioned technical problems, and the general idea is as follows:
[0075] Anxiety and depression patients exhibit certain differences in gaze distribution compared to normal individuals. Patients tend to interpret information negatively and find it more difficult to detach their attention from negative information. Therefore, this invention collects the gaze distribution map and gaze trajectory of test subjects and inputs them into a constructed model to estimate the degree of anxiety and depression, thereby providing diagnostic assistance to physicians.
[0076] To better understand the above technical solutions, the following will provide a detailed explanation of the technical solutions in conjunction with the accompanying drawings and specific implementation methods.
[0077] This invention provides a method for detecting anxiety and depression based on gaze distribution, such as... Figure 1 As shown, it includes:
[0078] S1. Obtain facial video of the test subject under the test conditions;
[0079] S2. Obtain real-time gaze distribution data and eye trajectory of the test subject based on facial video;
[0080] S3. The gaze distribution data is subjected to feature extraction by graph convolutional neural network to obtain feature data. The feature data is input into the first support vector regression model to obtain the anxiety and depression prediction value based on the gaze distribution. The gaze trajectory is input into the second support vector regression model to obtain the anxiety and depression prediction value based on the gaze trajectory.
[0081] S4. The anxiety and depression predictive values based on eye gaze distribution and those based on eye gaze trajectory are fused to obtain the psychological assessment results of the test subject.
[0082] In this embodiment of the invention, when testing a test subject for anxiety, the psychological assessment results of the test subject are obtained through gaze distribution data and eye trajectory, thereby improving the efficiency and accuracy of anxiety and depression diagnosis.
[0083] The following is a detailed description of each step:
[0084] In step S1, a facial video of the test subject under the test conditions is acquired. The specific implementation process is as follows:
[0085] In this embodiment of the invention, the purpose of acquiring the facial video is to collect the test subject's eye movement data. Based on this, this embodiment of the invention designs a data acquisition scheme, as follows:
[0086] Maintain uniform facial illumination, with an ambient brightness of 400-500 lux, and conduct the test in a flicker-free environment, with the subject 75 cm away from the screen.
[0087] The participants' facial videos were captured by a camera during the test.
[0088] At the beginning of the facial video capture phase, a white cross appears in the center of the black screen (to focus the test subject's attention and ensure that the attention is always on the center of the screen). When it is detected that the test subject is looking at the center of the screen for more than 3 seconds, the cross disappears and the next phase begins.
[0089] Free viewing phase: After the test subject's gaze is detected to be in the center of the screen for more than 3 seconds, the crosshair disappears, and three images with different emotions (positive, neutral, and negative) appear on the screen for 10 seconds. During this period, the test subject randomly browses these three images, and features such as gaze distribution, gaze duration, and eye trajectory are extracted. This is repeated 9 times, ensuring that each type of image appears an equal number of times in the three positions.
[0090] In step S2, the test subject's gaze distribution data and gaze trajectory are acquired based on the facial video. The specific implementation process is as follows:
[0091] S201. Obtain the raw facial frame data from the facial video using OpenFace. Specifically, this includes:
[0092] The subject was 75 cm from the screen. Four vectors were defined to determine the screen area:
[0093]
[0094]
[0095]
[0096]
[0097] All are bounding vectors.
[0098] A face frame is used to obtain real-time facial information of test subjects using the open-source tool OpenFace. In practice, the OpenFace framework can be deployed on the client side to analyze the video stream in real time, obtaining the rotation angles of the head along the X, Y, and Z axes, labeled α, β, and γ.
[0099]
[0100]
[0101]
[0102] The bounding vector after rotation:
[0103]
[0104] in, These are the four bounding vectors after rotation;
[0105] S202. Obtain the test subject's gaze distribution data based on the original face frame data. Specifically, this includes:
[0106] With the subject 75 cm from the screen (Y being a fixed value), transforming the three-dimensional coordinates (X, Y, Z) to (X, Z) yields the subject's gaze coordinates on the screen. Therefore, the area of a person's focused attention can be defined by the four points in the following formula. In this embodiment of the invention, (X, Y) replaces (X, Z) to describe the coordinates of points on the target plane.
[0107]
[0108] in, This represents the boundary of the gaze distribution.
[0109] The screen is divided into 3x3 square regions, labeled 0-8 from left to right and top to bottom, and the areas where the gaze falls are summarized. These 9 regions can be regarded as 9 nodes in a graph. When the gaze falls on a certain region, it is equivalent to being on a certain node. Sampling is performed every 10 frames. After sampling, a directed graph is obtained. This directed graph is the gaze distribution data. The nodes and edges of the directed graph can represent information such as gaze time, gaze area, and gaze transfer speed.
[0110] S203. Obtain the gaze trajectory based on the original face frame data. Specifically, this includes:
[0111] Using OpenFace, we obtain the six coordinates of the human eye, e1 to e6. The pupil position (X) can then be found using the Hough transform. pupil ,Y pupil The vertical line perpendicular to the pupil's x-coordinate intersects the hexagon at the top and bottom. The intersection point Y is calculated using the following formula. top Y bottom :
[0112]
[0113]
[0114] Similarly, the x-coordinate of the intersection point of the pupil's vertical axis and the hexagon can be calculated. left X right ,
[0115]
[0116]
[0117] Where, d level d vertical These are the relative position coefficients for the absolute focal coordinates in the horizontal and vertical directions, respectively;
[0118] (X r ,Y r )=(d level ×(max(Xp2 ,X p3 )-min(X p1 ,X p4 )),d vertical ×(Y top -Y bottom ))
[0119] Among them, (X) r ,Y r () represents the relative coordinates of the focus;
[0120] By combining the relative position of the pupil with the coordinates of the attention area, the absolute coordinates of the focal point can be obtained:
[0121]
[0122] Among them, (X) ab ,Y ab () represents the absolute coordinates of the focus;
[0123] It should be noted that when the tester closes their eyes, some frames of data may be missing. We fill in the missing coordinates based on the values before and after the missing values. When significant jumps are observed in certain consecutive coordinate points, we perform smoothing processing.
[0124] The gaze trajectory can be obtained by smoothly connecting the absolute coordinates of the focus frame by frame (the input to the subsequent model is a coordinate sequence).
[0125] In step S3, feature extraction is performed on the gaze distribution data using a graph convolutional neural network to obtain feature data. This feature data is then input into a first support vector regression model to obtain a predicted anxiety and depression value based on the gaze distribution. The gaze trajectory is then input into a second support vector regression model to obtain a predicted anxiety and depression value based on the gaze trajectory. The specific implementation process is as follows:
[0126] It should be noted that the graph convolutional neural network, the first support vector regression model, and the second support vector regression model in this embodiment of the invention are pre-trained. In the early stages, volunteers were recruited in cooperation with hospitals to collect data from patients with varying degrees of anxiety and depression, as well as from healthy individuals, for model training. The data collection and processing procedures during training are the same as steps S1-S2, and will not be repeated here. The pre-training process mainly includes: considering the pre-collected sample size, 10-fold cross-validation is used, and 10 experiments are conducted sequentially. Each time, one set of data is used as the validation set, and the remaining 9 sets are used to train the model from scratch, obtaining 10 evaluation values for the model. The average of these values yields a more objective evaluation of the model algorithm performance.
[0127] The gaze distribution data is input into a trained graph convolutional neural network model for feature extraction. The feature data is then input into a trained first support vector regression model to obtain the anxiety and depression prediction value based on the gaze distribution. The gaze trajectory is input into a trained second support vector regression model to obtain the anxiety and depression prediction value based on the gaze trajectory.
[0128] In step S4, the anxiety and depression predictive values based on gaze distribution and those based on eye trajectory are fused to obtain the test subject's psychological assessment results. The specific implementation process is as follows:
[0129] The average of the anxiety and depression prediction values based on the gaze distribution modality and the anxiety and depression prediction values based on the eye trajectory modality was taken as the final anxiety and depression prediction result for the test subject.
[0130] It should be noted that, in the specific process, the physician will comprehensively analyze the psychological assessment results and the scale diagnostic results to give a final diagnosis. Subsequent follow-up visits for patients only require the collection of eye-tracking data according to the procedure; there is no need to retrain the model or use the scale for assessment. Furthermore, the remote servers for video acquisition and processing can be separate. In practice, simply connecting the local video acquisition client to the remote server with the deployed deep learning model and uploading the video stream to the server in real time will yield the anxiety and depression assessment results.
[0131] This invention also provides an anxiety and depression detection system based on gaze distribution, comprising:
[0132] The video acquisition module is used to acquire facial videos of the test subject under the test conditions;
[0133] The video processing module is used to acquire real-time gaze distribution data and gaze trajectory of the test subject based on facial video.
[0134] The prediction module extracts features from the gaze distribution data using a graph convolutional neural network to obtain feature data. The feature data is then input into a first support vector regression model to obtain a predicted value for anxiety and depression based on the gaze distribution. The gaze trajectory is then input into a second support vector regression model to obtain a predicted value for anxiety and depression based on the gaze trajectory.
[0135] The fusion module is used to combine anxiety and depression predictive values based on gaze distribution and anxiety and depression predictive values based on gaze trajectory to obtain the test subject's psychological assessment results.
[0136] It is understood that the anxiety and depression detection system based on eye gaze distribution provided in this embodiment of the invention corresponds to the above-mentioned anxiety and depression detection method based on eye gaze distribution. The explanation, examples, and beneficial effects of the relevant content can be referred to the corresponding content in the anxiety and depression detection method based on eye gaze distribution, and will not be repeated here.
[0137] This invention also provides a computer-readable storage medium storing a computer program for detecting anxiety and depression based on eye gaze distribution, wherein the computer program causes a computer to perform the eye gaze distribution-based anxiety and depression detection method as described above.
[0138] This invention also provides an electronic device, comprising:
[0139] One or more processors;
[0140] Memory; and
[0141] One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the programs including methods for performing the gaze distribution-based anxiety and depression detection method as described above.
[0142] In summary, compared with existing technologies, it has the following beneficial effects:
[0143] 1. In the embodiments of the present invention, when conducting anxiety testing on test subjects, the psychological assessment results of test subjects are obtained through gaze distribution data and eye trajectory, thereby improving the efficiency and accuracy of anxiety and depression diagnosis.
[0144] 2. Compared with the disadvantages of traditional eye trackers being expensive and having limited eye movement data, the embodiments of the present invention use a relatively inexpensive method to collect the distribution of human eye gaze and movement trajectory for training and analysis, which is low in cost.
[0145] 3. This invention can be divided into a local video capture client and a remote server with a pre-deployed deep learning model. This facilitates future promotion.
[0146] 4. Follow-up visits for patients with anxiety and depression only require relatively simple visual observation, greatly improving the efficiency of follow-up visits.
[0147] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0148] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A gaze distribution based anxiety depression detection method, characterized in that, The method comprises the following steps: S1, acquiring a facial video of a tester under a test condition; S2, acquiring real-time gaze distribution data and a line-of-sight trajectory of the tester based on the facial video; comprising: S201, acquiring original data of a face frame of a person in the facial video by using OpenFace, comprising: The subject is N centimeters away from the screen, and four vectors are defined to determine the screen area, when N = 75, the delimiting vectors are as follows: , , , are delimiting vectors; The face frame of the tester is acquired by using the open source tool OpenFace, the rotation angles of the head X axis, Y axis and Z axis in the video are acquired, and are marked as α, β and γ, The delimiting vectors after rotation are as follows: wherein , i =1,2,3,4 are the four delimited vectors after rotation; S202, acquiring gaze distribution data of the tester based on the original data of the face frame, comprising: The subject is N centimeters away from the screen, that is, Y is a fixed value, and the three-dimensional coordinates (X, Y, Z) are transformed into (X, Z) to obtain a gaze coordinate of the tester on the screen, and (X, Y) is used to replace (X, Z) to describe the coordinates of a point on a target plane: , wherein is the gaze distribution boundary; The screen is evenly divided into 3x3 square block regions marked as 0-8 from left to right and from top to bottom, and the regions where the lines of sight fall are summarized; the 9 block regions are regarded as 9 nodes of a graph, and the line-of-sight falling on a certain region is equivalent to being on a certain node, and sampling is performed every ten frames to obtain a directed graph, and the directed graph is the gaze distribution data; S203, acquiring a line-of-sight trajectory based on the original data of the face frame, comprising: Through OpenFace, get the 6 coordinates of the eye e1 to e6, find the pupil position (X pupil ,Y pupil ) using Hough transform, the pupil horizontal coordinate is perpendicular to the intersection of the hexagon at top and bottom; calculate the intersection Y top ,Y bottom by the following formula: By calculating the intersection point Y top Y bottom The method for calculating the x-coordinate (X) of the intersection point of the horizontal line and the hexagon with the pupil's vertical coordinate is as follows: left X right According to Y top Y bottom X pupil Y pupil X left and X right Calculate the relative position coefficient: wherein , are the relative position coefficients of the horizontal and vertical direction absolute focus point coordinates, respectively. wherein (x, y) are the relative coordinates of the focus point; and ) is the relative coordinate of the focus point; The absolute coordinates of the focal points are obtained by combining the relative positions of the pupils and the attention region coordinates: wherein is the focal point absolute coordinate; The line-of-sight trajectory is obtained by smoothly connecting the absolute coordinates of the focal points frame by frame; S3, feature extraction is performed on the gaze distribution data by using a graph convolutional neural network to obtain feature data, the feature data is input into a first support vector regression model to obtain an anxiety and depression prediction value based on the gaze distribution, and the line-of-sight trajectory is input into a second support vector regression model to obtain an anxiety and depression prediction value based on the line-of-sight trajectory; S4, the anxiety and depression prediction value based on the line-of-sight distribution and the anxiety and depression prediction value based on the line-of-sight trajectory are fused to obtain a psychological evaluation result of the tester.
2. The gaze distribution based anxiety depression detection method of claim 1, wherein, The test condition comprises: The face illumination is kept uniform, the environmental brightness is 400-500 lux, the test is performed in an environment without stroboscopic light, and the subject is N centimeters away from the screen; In the initial stage of the facial video acquisition, a white cross appears in the center of the black screen, and the cross disappears after the tester's gaze on the screen center is detected for more than 3 s, and the next stage is entered; After the tester's gaze point is detected on the screen center for more than 3 s, the cross disappears, and three pictures of different emotions of positive, neutral and negative appear on the screen and last for 10 s. 3.The gaze distribution based anxiety depression detection method of claim 1, wherein, Before the absolute coordinates of the focal points are smoothly connected frame by frame, the method further comprises: The missing frame data of the tester when closing eyes is completed according to the coordinates before and after the missing values.
4. A gaze distribution based anxiety depression detection system characterized in that, The method comprises the following steps: A video acquisition module is configured to acquire a facial video of a tester under a test condition; A video processing module is configured to acquire real-time gaze distribution data and a line-of-sight trajectory of the tester based on the facial video; comprising: S201, acquiring original data of a face frame of a person in the facial video by using OpenFace, comprising: The subject is N centimeters away from the screen, and four vectors are defined to determine the screen area. When N = 75, the bounding vectors are as follows: , , , are delimiting vectors; The face frame of the tester is obtained using the open source tool OpenFace to obtain the rotation angles of the head X axis, Y axis and Z axis in the video, marked as α, β and γ, The rotated bounding vector is: wherein , i = 1,2,3,4 are the four delimited vectors after rotation; S202, obtaining the gaze distribution data of the tester based on the face frame raw data, including: The subject is N centimeters away from the screen, i.e. Y is a fixed value, and the three-dimensional coordinates (X, Y, Z) are transformed into (X, Z) to obtain a gaze coordinate of the tester on the screen, and (X, Y) is used to replace (X, Z) to describe the coordinates of the point on the target plane: , wherein is the gaze distribution boundary; The screen is evenly divided into 3x3 square block regions marked 0-8 from left to right and from top to bottom, and the regions where the lines of sight fall are summarized; the 9 block regions are regarded as 9 nodes of a graph, and the line of sight falling on a certain region is equivalent to being on a certain node. Sampling is performed every ten frames to obtain a directed graph, which is the gaze distribution data; S203, obtaining the gaze trajectory based on the face frame raw data, including: Through OpenFace, get the 6 coordinates of the eye e1 to e6, use Hough transform to find the pupil position (X pupil ,Y pupil ), the pupil horizontal coordinate is perpendicular to the intersection of the hexagon top and bottom; calculate the intersection Y top ,Y bottom by the following formula: By calculating the intersection point Y top Y bottom The method for calculating the x-coordinate (X) of the intersection point of the horizontal line and the hexagon with the pupil's vertical coordinate is as follows: left X right According to Y top Y bottom X pupil Y pupil X left and X right Calculate the relative position coefficient: wherein , are the relative position coefficients of the horizontal and vertical direction absolute focus point coordinates, respectively; wherein (x, y) are the relative coordinates of the focus point; and ) is the relative coordinates of the focus point; and The absolute coordinates of the focal point are obtained by combining the relative position of the pupil and the attention region coordinates: wherein is the focal point absolute coordinate; The gaze trajectory is obtained by smoothly connecting the absolute coordinates of the focal point frame by frame; A prediction module is configured to extract features from the gaze distribution data through a graph convolutional neural network to obtain feature data, input the feature data into a first support vector regression model to obtain an anxiety and depression prediction value based on the gaze distribution, and input the gaze trajectory into a second support vector regression model to obtain an anxiety and depression prediction value based on the gaze trajectory; A fusion module is configured to fuse the anxiety and depression prediction value based on the gaze distribution and the anxiety and depression prediction value based on the gaze trajectory to obtain a psychological assessment result of the tester.
5. A computer readable storage medium, characterized in that, The computer program for detecting anxiety and depression based on gaze distribution is stored, wherein the computer program causes the computer to execute the anxiety and depression detection method based on gaze distribution as claimed in any one of claims 1-3.
6. An electronic device, comprising: Comprise: One or more processors; Memory; And One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the programs comprise a program for executing the anxiety and depression detection method based on gaze distribution as claimed in any one of claims 1-3.
Citation Information
Patent Citations
Psychological abnormality detection method and device, storage medium and electronic equipment
CN110393539A
Depressive population eye movement identification method based on significant difference and emotion analysis of images
CN112674770A