CN116369918B - Emotion detection method, system, device and storage medium - Google Patents

Emotion detection method, system, device and storage medium Download PDF

Info

Publication number
CN116369918B
CN116369918B CN202310149666.2A CN202310149666A CN116369918B CN 116369918 B CN116369918 B CN 116369918B CN 202310149666 A CN202310149666 A CN 202310149666A CN 116369918 B CN116369918 B CN 116369918B
Authority
CN
China
Prior art keywords
emotion
different
vector
expression
attribute
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310149666.2A
Other languages
Chinese (zh)
Other versions
CN116369918A (en
Inventor
雷煜
王长明
高伟
韩林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jueming Technology Co ltd
Original Assignee
Beijing Jueming Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jueming Technology Co ltd filed Critical Beijing Jueming Technology Co ltd
Priority to CN202310149666.2A priority Critical patent/CN116369918B/en
Publication of CN116369918A publication Critical patent/CN116369918A/en
Application granted granted Critical
Publication of CN116369918B publication Critical patent/CN116369918B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/16Devices for psychotechnics; Testing reaction times ; Devices for evaluating the psychological state
    • A61B5/165Evaluating the state of mind, e.g. depression, anxiety
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7271Specific aspects of physiological measurement analysis
    • A61B5/7275Determining trends in physiological measurement data; Predicting development of a medical condition based on physiological measurements, e.g. determining a risk factor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/172Classification, e.g. identification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/174Facial expression recognition
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H50/00ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics
    • G16H50/30ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics for calculating health indices; for individual health risk assessment
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Medical Informatics (AREA)
  • General Physics & Mathematics (AREA)
  • Public Health (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Evolutionary Computation (AREA)
  • Multimedia (AREA)
  • Software Systems (AREA)
  • Biophysics (AREA)
  • Pathology (AREA)
  • Computing Systems (AREA)
  • Molecular Biology (AREA)
  • Psychiatry (AREA)
  • Databases & Information Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Surgery (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Animal Behavior & Ethology (AREA)
  • Veterinary Medicine (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • Child & Adolescent Psychology (AREA)
  • Hospice & Palliative Care (AREA)
  • Epidemiology (AREA)
  • Educational Technology (AREA)
  • Signal Processing (AREA)
  • Physiology (AREA)
  • Social Psychology (AREA)
  • Primary Health Care (AREA)
  • Developmental Disabilities (AREA)
  • Psychology (AREA)
  • Computational Linguistics (AREA)
  • General Engineering & Computer Science (AREA)

Abstract

The application provides a method, a system, equipment and a storage medium for emotion detection, wherein the method for emotion detection comprises the steps of synthesizing expression pictures with different emotions and different emotion intensities by using a neural network; obtaining emotion type recognition results and emotion intensity recognition values of the emotion images recognized by the testee; and determining the depressed emotion and the depressed emotion intensity of the testee according to the emotion type recognition result and the emotion intensity recognition value. According to the method, the synthesized expression image is generated by utilizing the deep neural network, the expression recognition test is carried out based on the synthesized expression image, the rapid recognition of the depression emotion of the tester is realized, and the accuracy of depression emotion detection is greatly improved.

Description

Emotion detection method, system, device and storage medium
Technical Field
The application belongs to the technical field of mental health evaluation, and particularly relates to a mood detection method, a mood detection system, mood detection equipment and a storage medium.
Background
Automatic identification of depressed mood and depressed patients is a currently important scientific problem and research hotspot. The depression recognition method is to enable a tester to judge the expressions of the photos with different expressions, and judge the depression emotion through the deviation of emotion perception. In such an embodiment, a person is invited to take different facial expression images, and a limited number of facial databases of different expressions are built. However, the collection difficulty of the true person pictures is high, the number of the pictures is limited, the emotion types of the pictures are limited by subjective understanding of photographers on emotion, and the problem of portrait copyright exists. Therefore, the current depression emotion detection method is difficult to practically apply, and the test result is not stable enough.
Disclosure of Invention
The emotion detection method, system, equipment and storage medium provided by the invention can realize rapid identification of the depressed emotion of the tester, and greatly improve the accuracy of depressed emotion detection.
According to a first aspect of embodiments of the present application, there is provided a picture-based emotion detection method, including:
synthesizing expression pictures with different emotions and different emotion intensities by using a neural network;
obtaining emotion type recognition results and emotion intensity recognition values of the emotion images recognized by the testee;
and determining the depressed emotion and the depressed emotion intensity of the testee according to the emotion type recognition result and the emotion intensity recognition value.
In some embodiments of the present application, synthesizing emoticons of different emotions and different emotion intensities using a neural network includes:
constructing a training data set of a target crowd and data sets of different moods of the target crowd;
inputting the training data set into a deep neural network algorithm for training to obtain a face image generation model of a target crowd;
acquiring attribute vectors corresponding to different emotions according to the data sets of the different emotions;
and adjusting attribute vectors in the face image generation model to obtain face photos with different emotions and different emotion intensities.
In some embodiments of the present application, obtaining attribute vectors corresponding to different expressions according to data sets of different emotions includes: randomly acquiring two sample pictures from different emotion data sets;
inputting the two sample pictures into a picture latent code predictor to obtain a first characteristic latent vector and a second characteristic latent vector corresponding to the two sample pictures, and obtaining a first output value and a second output value corresponding to the two sample pictures in a certain emotion;
according to the difference value of the first characteristic latent vector and the second characteristic latent vector and the ratio of the difference value of the first output value and the second output value, obtaining attribute vectors corresponding to two sample pictures in a certain emotion;
and sequentially acquiring attribute vectors corresponding to different emotions.
In some embodiments of the present application, adjusting attribute vectors in a face image generation model to obtain face photos with different emotions and different emotion intensities includes:
multiplying the attribute vector corresponding to the target emotion by different scaling factors to adjust the attribute vector, so as to obtain different new attribute vectors; modifying emotion related vectors in the input codes according to different new attribute vectors to obtain different new input codes;
and inputting different new input codes into a face image generation model to obtain face photos with different emotion intensities under the target emotion. In some embodiments of the present application, modifying the emotion-related vector in the input code according to the different new attribute vectors to obtain the different new input codes includes:
generating a random one-dimensional vector Z as an input code; changing a one-dimensional vector Z into a multidimensional vector W in the hidden variable space through a Mapping network;
modifying the emotion-related vector in the multidimensional vector W according to different new attribute vectors;
a different new multidimensional vector is obtained as a new input code.
In some embodiments of the present application, obtaining an emotion category recognition result and an emotion intensity recognition value of a subject recognition expression picture includes:
acquiring detection form data of completion of identifying expression pictures by a testee; the form data comprises a hook control or a text box control; and obtaining emotion category recognition results and emotion intensity recognition values corresponding to the checking control or the textbox control.
According to a second aspect of embodiments of the present application, there is provided an emotion detection system, to which any one of the above emotion detection methods is applied, including:
expression picture synthesis module: the method is used for synthesizing expression pictures with different emotions and different emotion intensities by using a neural network;
and a data acquisition module: the emotion classification recognition result is used for acquiring emotion intensity recognition values of the emotion images recognized by the testee; emotion detection module: and the device is used for determining the depressed emotion and the depressed emotion intensity of the testee according to the emotion category recognition result and the emotion intensity recognition value.
In some embodiments of the present application, the expression picture synthesis module includes a data set unit, a model generation unit, an attribute vector unit, and a picture generation unit, specifically:
the data set unit is used for constructing a training data set of the target crowd and data sets of different moods of the target crowd;
the model generation unit is used for inputting the training data set into a deep neural network algorithm for training to obtain a face image generation model of the target crowd;
the attribute vector unit is used for acquiring attribute vectors corresponding to different emotions according to the data sets of different emotions;
and the picture generation unit is used for adjusting the attribute vector in the face image generation model to obtain face photos with different emotions and different emotion intensities.
According to a third aspect of embodiments of the present application, there is provided an emotion detection device, including:
a memory: for storing executable instructions;
and the processor is used for being connected with the memory to execute the executable instructions so as to complete the emotion detection method.
According to a fourth aspect of embodiments of the present application, there is provided a computer-readable storage medium having a computer program stored thereon; the computer program is executed by the processor to implement the emotion detection method.
The emotion detection method, the emotion detection system, the emotion detection equipment and the storage medium are adopted, and the emotion detection method comprises the steps of synthesizing expression pictures with different emotions and different emotion intensities by utilizing a neural network; obtaining emotion type recognition results and emotion intensity recognition values of the emotion images recognized by the testee; and determining the depressed emotion and the depressed emotion intensity of the testee according to the emotion type recognition result and the emotion intensity recognition value. According to the method, the synthesized expression image is generated by utilizing the deep neural network, the expression recognition test is carried out based on the synthesized expression image, the rapid recognition of the depression emotion of the tester is realized, and the accuracy of depression emotion detection is greatly improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute an undue limitation to the application. In the drawings:
a schematic step diagram of an emotion detection method according to an embodiment of the present application is shown in fig. 1;
a schematic diagram of steps for synthesizing an emoticon using a neural network according to an embodiment of the present application is shown in fig. 2;
fig. 3 is a schematic diagram of steps for obtaining a subject identification result according to an embodiment of the present application;
a schematic diagram of steps for determining a depressed mood from a subject identification result according to an embodiment of the present application is shown in fig. 4;
fig. 5 shows a schematic structural diagram of an expression picture synthesis model according to an embodiment of the present application;
fig. 6 is a schematic flow chart of obtaining attribute vectors corresponding to a picture according to an embodiment of the present application;
a schematic flow chart of generating different intensity emoticons according to an embodiment of the present application is shown in fig. 7;
a schematic structural diagram of an emotion detection system according to an embodiment of the present application is shown in fig. 8;
a schematic structural diagram of an emotion detection device according to an embodiment of the present application is shown in fig. 9.
Detailed Description
In the process of realizing the application, the inventor finds that the existing research is to invite a real person to shoot different facial expression images and construct a limited number of different expression image databases to perform expression recognition capability test.
However, expression recognition capability tests are performed by inviting a real person to take different facial expression images, constructing a limited number of different expression image databases. This approach has several problems: 1. the intensity of each expression is difficult to accurately control; 2. every person has deviation in understanding the expression, and the consistency of the expression categories of the images is not high enough. 3. Only limited expressive pictures can be generated, and the picture has the problem of portrait copyright. The above problems lead to the fact that the analysis of depression emotion based on expression recognition is tightly limited to academic research, and is difficult to be popularized and applied practically.
Therefore, the facial expression picture database construction method based on artificial intelligence applies different expression pictures synthesized by artificial intelligence technology to emotion recognition analysis, can realize rapid recognition of the depressed emotion of a tester, simultaneously avoids the repeated problems of a small number of true human pictures and repeated test images, does not have the facial portrait problem, and has important practical application value. With the development of artificial intelligence technology, the current artificial intelligence algorithm can generate realistic face pictures, so as to achieve the effect of spurious.
In addition, a large number of researches show that the depressed emotion can influence the perception of an individual to external emotional clues, particularly the recognition capability of facial expressions, and based on the fact, the method for recognizing the emotion type recognition result and the emotion intensity recognition value of the emotion image of the testee determines the depressed emotion and the depressed emotion intensity of the testee, and compared with the method for recognizing the emotion type recognition result and the emotion intensity recognition value of the emotion image of the testee directly according to the emotion image of the testee, the method is more accurate and convenient to implement compared with the traditional depressed emotion recognition method.
The depression emotion detection method fully utilizes the image generation capacity of the deep neural network, avoids the problems of personal portrait and limited quantity in facial expression image generation, and realizes unlimited facial expression generation by introducing the deep neural network. Through introducing the expression pictures with different intensities into the test, the emotion perception capability of the tester can be evaluated in a grading manner, and the rapid depression emotion detection is realized. The testing method is simple and easy to realize, and an online depression emotion testing tool can be developed based on the method, so that depression emotion detection of a large-scale crowd is realized.
Specifically, the emotion detection method, system, device and storage medium of the application comprise the steps of synthesizing expression pictures with different emotions and different emotion intensities by using a neural network; obtaining emotion type recognition results and emotion intensity recognition values of the emotion images recognized by the testee; and determining the depressed emotion and the depressed emotion intensity of the testee according to the emotion type recognition result and the emotion intensity recognition value. According to the method, the synthesized expression image is generated by utilizing the deep neural network, the expression recognition test is carried out based on the synthesized expression image, the rapid recognition of the depression emotion of the tester is realized, and the emotion detection accuracy is greatly improved. In order to make the technical solutions and advantages of the embodiments of the present application more apparent, the following detailed description of exemplary embodiments of the present application is given with reference to the accompanying drawings, and it is apparent that the described embodiments are only some of the embodiments of the present application and not exhaustive of all the embodiments. It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other.
Example 1
A schematic step diagram of a picture-based emotion detection method according to an embodiment of the present application is shown in fig. 1.
As shown in fig. 1, the image-based emotion detection method in the embodiment of the present application includes the following specific steps.
S1: synthesizing expression pictures with different emotions and different emotion intensities by using a neural network; s2: obtaining emotion type recognition results and emotion intensity recognition values of the emotion images recognized by the testee; s3: and determining the depressed emotion and the depressed emotion intensity of the testee according to the emotion type recognition result and the emotion intensity recognition value.
According to the method, the synthesized expression image is generated by utilizing the deep neural network, and the rapid identification of the depression emotion of the tester is realized based on the synthesized expression image, so that the emotion detection accuracy is greatly improved.
Meanwhile, the method for acquiring the emotion type recognition result and the emotion intensity recognition value of the emotion image of the testee determines the depressed emotion and the depressed emotion intensity of the testee, and compared with the method for directly recognizing the emotion image of the testee according to the emotion image of the testee, the method is more favorable for the actual psychological activities of the testee, and compared with the traditional depressed emotion recognition method, the method is more accurate and convenient to implement.
A schematic diagram of steps for synthesizing an emoticon using a neural network according to an embodiment of the present application is shown in fig. 2.
As shown in fig. 2, in S1, the synthesis of the emoticons with different emotions and different emotion intensities by using the neural network includes:
s11: and constructing a training data set of the target crowd and data sets of different moods of the target crowd.
S12: and inputting the training data set into a deep neural network algorithm for training to obtain a face image generation model of the target crowd. S13: and acquiring attribute vectors corresponding to different emotions according to the data sets of different emotions.
Specifically, according to the data sets of different emotions, attribute vectors corresponding to different emotions are obtained, including:
firstly, randomly acquiring two sample pictures from data sets of different moods; then, inputting the two sample pictures into a picture latent code predictor to obtain a first characteristic latent vector and a second characteristic latent vector corresponding to the two sample pictures, and obtaining a first output value and a second output value corresponding to one emotion of the two sample pictures; secondly, according to the ratio of the difference value of the first characteristic latent vector and the second characteristic latent vector to the difference value of the first output value and the second output value, obtaining attribute vectors corresponding to two sample pictures in a certain emotion; finally, attribute vectors corresponding to different emotions are sequentially acquired.
S14: and adjusting attribute vectors in the face image generation model to obtain face photos with different emotions and different emotion intensities. Specifically, adjusting attribute vectors in a face image generation model to obtain face photos with different emotions and different emotion intensities, including:
firstly, the attribute vector corresponding to the target emotion is multiplied by different scaling factors to adjust the attribute vector, so as to obtain different new attribute vectors.
And then, modifying the emotion related vector in the input code according to different new attribute vectors to obtain different new input codes. In the implementation, firstly, a random one-dimensional vector Z is generated as an input code; changing a one-dimensional vector Z into a multidimensional vector W in the hidden variable space through a Mapping network; then, modifying the emotion-related vector in the multidimensional vector W according to different new attribute vectors; finally, a different new multidimensional vector is obtained as a new input code.
And finally, inputting different new input codes into a face image generation model to obtain face photos with different emotion intensities under the target emotion. And sequentially acquiring attribute vectors corresponding to different emotions according to the method.
A schematic diagram of steps for obtaining a subject identification result according to an embodiment of the present application is shown in fig. 3.
As shown in fig. 3, obtaining the emotion type recognition result and the emotion intensity recognition value of the emotion image recognized by the testee in S2 includes:
s21: acquiring detection form data of completion of identifying expression pictures by a testee; form data includes a tick control or a textbox control. S22: and obtaining emotion category recognition results and emotion intensity recognition values corresponding to the checking control or the textbox control.
A schematic diagram of steps for determining a depressed mood from a subject identification result according to an embodiment of the present application is shown in fig. 4.
As shown in fig. 4, finally, determining the depressed emotion and the depressed emotion intensity of the subject according to the emotion classification recognition result and the emotion intensity recognition value in S3 includes:
and S31, comparing the emotion type recognition result and the emotion intensity recognition value with the correct emotion result and emotion intensity value to obtain emotion recognition accuracy and emotion intensity deviation. And S32, determining whether the emotion is depressed emotion and the depressed emotion intensity according to the emotion recognition accuracy and the emotion intensity deviation.
In order to further describe the emotion detection scheme of the present application, detailed description is made below for specific implementation scenarios.
At present, in facial expression picture recognition, the adopted data are all expression pictures shot by a real person, the picture acquisition workload is large, the number of pictures in a database is very limited, and basically, only tens of pictures are adopted. In repeated tests, limited pictures can cause repeated effects in the test, and test results are not accurate after testers are familiar with the picture content. In addition, the expression intensity of the expression picture shot by the real person is difficult to carry out multiple intensity classification, and recognition analysis of expressions with different intensities is difficult to realize.
Firstly, aiming at the problems of few samples and inconvenience in implementation caused by the adoption of the true human expression picture at present, the application provides a method for synthesizing human face pictures with different expressions in batches, which fully utilizes the image generation capability of an artificial intelligence technology and synthesizes the expression pictures with different intensities and types by controlling the latent vectors with different expression attributes in the generated pictures. Then, through manual screening, selecting the pictures meeting the conditions to be added into a database, and forming an expression image database which is completely composed of virtual facial expressions and is used for identifying the depressed emotion.
The depression emotion detection scheme mainly comprises the following steps:
1) A training dataset is constructed.
And collecting at least 10 ten thousand face pictures from the Internet by utilizing a web crawler to form a data set 1.
Then, carrying out expression attribute labeling on each picture by using a disclosed facial picture expression recognition model, such as a facial expression attribute recognition interface of Microsoft; the expression attribute of each face picture mark comprises: six emotions including happiness, aversion, fear, surprise, anger and sadness are included, and the marked data form a data set 2.
2) And training to generate a network model of the expression picture.
Fig. 5 shows a schematic structural diagram of an expression picture synthesis model according to an embodiment of the present application.
As shown in fig. 5, the model was trimmed with data set 1 based on the StyleGAN2 pre-training model developed by NVIDIA corporation, and the generated model was trimmed to a state where all the pictures were generated.
3) And calculating attribute vectors corresponding to different expressions.
Fig. 6 is a schematic flow chart of obtaining attribute vectors corresponding to pictures according to an embodiment of the present application.
As shown in fig. 6, two sample pictures 1 and 2 are taken from the data set 2 randomly, and are respectively input into the picture latent code predictor, so that the feature latent vectors of the two pictures, namely, the latent vector 1 and the latent vector 2, can be obtained, and meanwhile, the output values a1 and a2 on a certain expression attribute can be obtained, so that the estimated value= (the latent 1-the latent 2)/(a 1-a 2) of an attribute vector can be obtained.
And continuously selecting paired samples to obtain n attribute vector estimated values, and finally averaging all n estimated vectors to obtain the attribute vector Att of a certain attribute.
4) And generating expression pictures with different intensities.
A schematic flow chart of generating different intensity emoticons according to an embodiment of the present application is shown in fig. 7.
As shown in fig. 7, first, a random one-dimensional vector Z of length 512 is generated as an input code. Then, Z is changed to W in the hidden variable space by Mapping network, and in StyleGAN2, W is an 18×512-dimensional vector, where the first 18 rows of W contain main information related to facial expression.
Then, after the attribute vector Att is multiplied by a specific scaling factor alpha, the result is sequentially added to the first 18 rows of vectors of W to obtain a vector W_new after the attribute is modified, and after the W_new is input into a generating network, an image after the attribute is modified can be obtained.
By modifying the size of the scaling factor α, we can get corresponding expression pictures with different intensities, where 50 expression pictures with different intensities are generated for each expression.
5) And (5) manually calibrating the synthesized expression picture.
In the preferred implementation, in order to obtain facial expression pictures with different intensities which meet subjective feelings of people, the expression intensity level of the generated image can be divided through manual evaluation. The manual assessment method comprises the following steps: and grading 50 different-intensity expression pictures under each expression by 50 expression evaluation staff, taking a neutral image without expression as intensity 0 and taking the maximum expression intensity as intensity 5, and sequentially selecting pictures with intensity grades of 1-5. Finally, selecting the picture with the largest number of people to be evaluated from each intensity level as the expression picture representing the intensity level.
6) Depression emotion recognition based on expression discrimination.
And randomly presenting the pictures with different grades and different categories to a tester, and requesting the tester to judge the expression category of each presented picture. In the expression discrimination task, 2 pictures with each intensity in each expression type are selected, and 2 pictures with 5 grades of intensity under 6 types of emotion are selected respectively, wherein 60 pictures are taken in total.
Each picture is presented to the testee randomly for 1 second, and then the testee is required to judge which expression is in the picture just seen, and the testee fills the recognition result into the electronic form data.
After the test is finished, the average value of the happy expression judgment accuracy and the surprise expression judgment accuracy in the form data can be calculated to be used as a depression emotion degree index.
The emotion detection method comprises the steps of synthesizing expression pictures with different emotions and different emotion intensities by using a neural network; obtaining emotion type recognition results and emotion intensity recognition values of the emotion images recognized by the testee; and determining the depressed emotion and the depressed emotion intensity of the testee according to the emotion type recognition result and the emotion intensity recognition value. According to the method, the synthesized expression image is generated by utilizing the deep neural network, the expression recognition test is carried out based on the synthesized expression image, the rapid recognition of the depression emotion of the tester is realized, and the accuracy of depression emotion detection is greatly improved.
Meanwhile, the method for determining the depressed emotion and the depressed emotion intensity of the testee by acquiring the emotion type recognition result and the emotion intensity recognition value of the testee recognition expression picture is more preferable to the actual psychological activities of the testee compared with the method for directly detecting the depressed emotion according to the expression picture of the testee, and is more accurate and convenient to implement compared with the traditional depressed emotion recognition.
Example 2
The embodiment provides an emotion detection system, and the emotion detection method of the embodiment 1 is applied; for details not disclosed in the emotion detection system of this embodiment, please refer to the specific implementation of the emotion detection method in other embodiments.
A schematic structural diagram of an emotion detection system according to an embodiment of the present application is shown in fig. 8.
As shown in fig. 8, the emotion detection system in the embodiment of the present application specifically includes an expression image synthesis module 10, a data acquisition module 20, and an emotion detection module 30.
The expression picture synthesizing module 10 further includes a data set unit, a model generating unit, an attribute vector unit, and a picture generating unit.
In particular, the method comprises the steps of,
expression picture synthesis module 10: the method is used for synthesizing the expression pictures with different emotions and different emotion intensities by using the neural network. The data acquisition module 20: and the emotion type recognition result and the emotion intensity recognition value are used for acquiring the emotion type recognition result of the emotion picture recognized by the testee. Emotion detection module 30: and the device is used for determining the depressed emotion and the depressed emotion intensity of the testee according to the emotion category recognition result and the emotion intensity recognition value.
In some embodiments of the present application, the expression picture composition module 10 includes a data set unit, a model generation unit, an attribute vector unit, and a picture generation unit.
Wherein the data set unit is used for: and constructing a training data set of the target crowd and data sets of different moods of the target crowd. The model generation unit is used for: and inputting the training data set into a deep neural network algorithm for training to obtain a face image generation model of the target crowd.
The attribute vector unit is used for: and acquiring attribute vectors corresponding to different emotions according to the data sets of different emotions.
Specifically, according to the data sets of different emotions, attribute vectors corresponding to different emotions are obtained, including:
firstly, randomly acquiring two sample pictures from data sets of different moods; then, inputting the two sample pictures into a picture latent code predictor to obtain a first characteristic latent vector and a second characteristic latent vector corresponding to the two sample pictures, and obtaining a first output value and a second output value corresponding to one emotion of the two sample pictures; secondly, according to the ratio of the difference value of the first characteristic latent vector and the second characteristic latent vector to the difference value of the first output value and the second output value, obtaining attribute vectors corresponding to two sample pictures in a certain emotion; finally, attribute vectors corresponding to different emotions are sequentially acquired.
The picture generation unit is used for: and adjusting attribute vectors in the face image generation model to obtain face photos with different emotions and different emotion intensities.
Specifically, adjusting attribute vectors in a face image generation model to obtain face photos with different emotions and different emotion intensities, including:
firstly, the attribute vector corresponding to the target emotion is multiplied by different scaling factors to adjust the attribute vector, so as to obtain different new attribute vectors.
And then, modifying the emotion related vector in the input code according to different new attribute vectors to obtain different new input codes. In the implementation, firstly, a random one-dimensional vector Z is generated as an input code; changing a one-dimensional vector Z into a multidimensional vector W in a hidden variable space through a Mapping network; then, modifying the emotion-related vector in the multidimensional vector W according to different new attribute vectors; finally, a different new multidimensional vector is obtained as a new input code.
And finally, inputting different new input codes into a face image generation model to obtain face photos with different emotion intensities under the target emotion. And sequentially acquiring attribute vectors corresponding to different emotions according to the method.
The data obtaining module 20 obtains the emotion classification recognition result and the emotion intensity recognition value of the emotion image recognized by the testee, and includes: acquiring detection form data of completion of identifying expression pictures by a testee; form data includes a tick control or a textbox control. And obtaining emotion category recognition results and emotion intensity recognition values corresponding to the checking control or the textbox control.
Finally, determining the depressed emotion and the depressed emotion intensity of the subject according to the emotion classification recognition result and the emotion intensity recognition value in the emotion detection module 30 includes: and comparing the emotion type recognition result and the emotion intensity recognition value with the correct emotion result and the correct emotion intensity value to obtain the emotion recognition accuracy and the emotion intensity deviation. And determining whether the emotion is depressed emotion and the depressed emotion intensity according to the emotion recognition accuracy and the emotion intensity deviation.
By adopting the emotion detection system, the expression picture synthesis module 10 synthesizes the expression pictures with different emotions and different emotion intensities by using a neural network; the data acquisition module 20 acquires emotion type recognition results and emotion intensity recognition values of the images of the detected person recognition expressions; the emotion detection module 30 determines a depressed emotion and a depressed emotion intensity of the subject according to the emotion category recognition result and the emotion intensity recognition value. According to the method, the synthesized expression image is generated by utilizing the deep neural network, the expression recognition test is carried out based on the synthesized expression image, the rapid recognition of the depression emotion of the tester is realized, and the emotion detection accuracy is greatly improved.
Meanwhile, the method for acquiring the emotion type recognition result and the emotion intensity recognition value of the emotion image of the testee determines the depressed emotion and the depressed emotion intensity of the testee, and compared with the method for directly recognizing the emotion image of the testee according to the emotion image of the testee, the method is more favorable for the actual psychological activities of the testee, and compared with the traditional depressed emotion recognition method, the method is more accurate and convenient to implement.
Example 3
The present embodiment provides an emotion detection device, and for details not disclosed in the emotion detection device of the present embodiment, please refer to specific implementation contents of the emotion detection method or system in other embodiments.
A schematic structural diagram of an emotion detection device 400 according to an embodiment of the present application is shown in fig. 9.
As shown in fig. 9, the emotion detection device 400 includes:
memory 402: for storing executable instructions;
processor 401 is operative to interface with memory 402 to execute executable instructions to perform an emotion detection method.
It will be appreciated by those skilled in the art that schematic diagram 9 is merely an example of emotion detection device 400 and does not constitute a limitation of emotion detection device 400, and may include more or fewer components than illustrated, or may combine certain components, or different components, such as emotion detection device 400 may also include input and output devices, network access devices, buses, and the like.
The processor 401 (Central Processing Unit, CPU) may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor 401 may be any conventional processor or the like, the processor 401 being a control center of the emotion detection device 400, and the various interfaces and lines being used to connect the various parts of the entire emotion detection device 400.
Memory 402 may be used to store computer readable instructions, and processor 401 may implement the various functions of emotion detection device 400 by executing or executing computer readable instructions or modules stored within memory 402, and invoking data stored within memory 402. The memory 402 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data created according to the use of emotion detection device 400, and the like. In addition, the Memory 402 may include a hard disk, memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card), at least one disk storage device, a Flash Memory device, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), or other non-volatile/volatile storage device. The modules integrated with emotion detection device 400 may be stored in a computer readable storage medium if implemented in the form of software functional modules and sold or used as a stand-alone product. Based on such understanding, the present invention may implement all or part of the flow of the method of the above-described embodiments, or may be implemented by directing related hardware through computer-readable instructions, which may be stored in a computer-readable storage medium, which, when executed by a processor, implement the steps of the various method embodiments described above.
Example 4
The present embodiment provides a computer-readable storage medium having a computer program stored thereon; the computer program is executed by the processor to implement the emotion detection method in other embodiments.
According to the emotion detection equipment and the storage medium, the expression pictures with different emotions and different emotion intensities are synthesized by utilizing the neural network; obtaining emotion type recognition results and emotion intensity recognition values of the emotion images recognized by the testee; and determining the depressed emotion and the depressed emotion intensity of the testee according to the emotion type recognition result and the emotion intensity recognition value. According to the method, the synthesized expression image is generated by utilizing the deep neural network, and the rapid identification of the depressed emotion of the tester is realized based on the synthetic expression image generating capability, so that the emotion detection accuracy is greatly improved.
Meanwhile, the method for determining the depressed emotion and the depressed emotion intensity of the testee by acquiring the emotion type recognition result and the emotion intensity recognition value of the testee recognition expression picture is more favorable for real psychological activity detection of the testee compared with the method for directly detecting the expression picture of the testee, and is more accurate and convenient to implement compared with the traditional depressed emotion recognition. It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein. The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the invention. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various modifications and variations can be made in the present application without departing from the spirit or scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims and the equivalents thereof, the present application is intended to cover such modifications and variations.

Claims (4)

1. A method of emotion detection, comprising:
synthesizing expression pictures with different emotions and different emotion intensities by using a neural network, wherein the method comprises the following steps: constructing a training data set of a target crowd and data sets of different moods of the target crowd; inputting the training data set into a deep neural network algorithm for training to obtain a face image generation model of a target crowd; acquiring attribute vectors corresponding to different emotions according to the data sets of different emotions; adjusting attribute vectors in the face image generation model to obtain face photos with different emotions and different emotion intensities;
obtaining emotion category recognition results and emotion intensity recognition values of the testee recognizing the expression picture, wherein the emotion category recognition results and emotion intensity recognition values comprise: acquiring detection form data of the completion of the identification of the expression picture by the testee; the detection form data comprises a checking control or a textbox control; acquiring emotion category identification results and emotion intensity identification values corresponding to the checking control or the textbox control;
determining the depressed emotion and the depressed emotion intensity of the testee according to the emotion category identification result and the emotion intensity identification value;
the obtaining the attribute vector corresponding to the different expressions according to the data sets of the different emotions comprises the following steps:
randomly acquiring two sample pictures from the data set of different moods;
inputting the two sample pictures into a picture latent code predictor to obtain a first characteristic latent vector and a second characteristic latent vector corresponding to the two sample pictures;
inputting the two sample pictures into an attribute identifier to obtain a first output value and a second output value of the two sample pictures corresponding to a certain emotion;
obtaining attribute vectors corresponding to the two sample pictures in a certain emotion according to the ratio of the difference value of the first characteristic latent vector and the second characteristic latent vector to the difference value of the first output value and the second output value;
sequentially obtaining attribute vectors corresponding to different emotions;
the adjusting the attribute vector in the face image generation model to obtain face photos with different emotions and different emotion intensities comprises the following steps:
multiplying the attribute vector corresponding to the target emotion by different scaling factors to adjust the attribute vector to obtain different new attribute vectors;
modifying emotion related vectors in the input codes according to the different new attribute vectors to obtain different new input codes;
inputting the different new input codes into the face image generation model to obtain face photos with different emotion intensities under the target emotion;
modifying the emotion related vector in the input code according to the different new attribute vectors to obtain different new input codes, including:
generating a random one-dimensional vector Z as an input code; changing the one-dimensional vector Z into a multidimensional vector W in a hidden variable space through a Mapping network;
modifying the emotion-related vector in the multidimensional vector W according to the different new attribute vectors;
a different new multidimensional vector is obtained as a new input code.
2. An emotion detection system, employing the emotion detection method of claim 1, comprising:
expression picture synthesis module: the method is used for synthesizing expression pictures with different emotions and different emotion intensities by using a neural network;
and a data acquisition module: the emotion type recognition result is used for obtaining emotion intensity recognition values of the testee for recognizing the expression pictures;
emotion detection module: the method comprises the steps of determining a depressed emotion and a depressed emotion intensity of a testee according to emotion category identification results and emotion intensity identification values;
the expression picture synthesis module comprises a data set unit, a model generation unit, an attribute vector unit and a picture generation unit, and is specific:
the data set unit is used for constructing a training data set of the target crowd and data sets of different moods of the target crowd;
model generation unit: the training data set is used for inputting the training data set into a deep neural network algorithm for training to obtain a face image generation model of a target crowd;
attribute vector unit: the attribute vector is used for acquiring attribute vectors corresponding to different emotions according to the data sets of different emotions;
a picture generation unit: and the attribute vector is used for adjusting the attribute vector in the face image generation model to obtain face photos with different emotions and different emotion intensities.
3. An emotion detection device comprising:
a memory: for storing executable instructions;
a processor for interfacing with a memory to execute executable instructions to perform the emotion detection method of claim 1.
4. A computer-readable storage medium, characterized in that a computer program is stored thereon; a computer program to be executed by a processor to implement the emotion detection method as claimed in claim 1.
CN202310149666.2A 2023-02-22 2023-02-22 Emotion detection method, system, device and storage medium Active CN116369918B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310149666.2A CN116369918B (en) 2023-02-22 2023-02-22 Emotion detection method, system, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310149666.2A CN116369918B (en) 2023-02-22 2023-02-22 Emotion detection method, system, device and storage medium

Publications (2)

Publication Number Publication Date
CN116369918A CN116369918A (en) 2023-07-04
CN116369918B true CN116369918B (en) 2024-02-20

Family

ID=86966301

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310149666.2A Active CN116369918B (en) 2023-02-22 2023-02-22 Emotion detection method, system, device and storage medium

Country Status (1)

Country Link
CN (1) CN116369918B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160057954A (en) * 2014-11-14 2016-05-24 상명대학교서울산학협력단 Evaluation method of social intelligence based on recognition and expression of emotion by facial action
KR20180049706A (en) * 2016-11-03 2018-05-11 (주)창조게릴라 Method for inspecting of emotion by using image
CN109657554A (en) * 2018-11-21 2019-04-19 腾讯科技(深圳)有限公司 A kind of image-recognizing method based on micro- expression, device and relevant device
WO2022022043A1 (en) * 2020-07-27 2022-02-03 平安科技(深圳)有限公司 Head image generation method, apparatus, server, and storage medium
CN114581992A (en) * 2022-03-07 2022-06-03 山东大学 Human face expression synthesis method and system based on pre-training StyleGAN

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040116779A1 (en) * 2002-12-13 2004-06-17 Bien Denise Jean Method and tool for determining a physical or emotional state of a person
US11640684B2 (en) * 2020-07-21 2023-05-02 Adobe Inc. Attribute conditioned image generation
US11823490B2 (en) * 2021-06-08 2023-11-21 Adobe, Inc. Non-linear latent to latent model for multi-attribute face editing

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160057954A (en) * 2014-11-14 2016-05-24 상명대학교서울산학협력단 Evaluation method of social intelligence based on recognition and expression of emotion by facial action
KR20180049706A (en) * 2016-11-03 2018-05-11 (주)창조게릴라 Method for inspecting of emotion by using image
CN109657554A (en) * 2018-11-21 2019-04-19 腾讯科技(深圳)有限公司 A kind of image-recognizing method based on micro- expression, device and relevant device
WO2022022043A1 (en) * 2020-07-27 2022-02-03 平安科技(深圳)有限公司 Head image generation method, apparatus, server, and storage medium
CN114581992A (en) * 2022-03-07 2022-06-03 山东大学 Human face expression synthesis method and system based on pre-training StyleGAN

Also Published As

Publication number Publication date
CN116369918A (en) 2023-07-04

Similar Documents

Publication Publication Date Title
Duffy et al. Feature selective validation (FSV) for validation of computational electromagnetics (CEM). part I-the FSV method
CN110335259B (en) Medical image identification method and device and storage medium
CN105654066A (en) Vehicle identification method and device
CN109919252B (en) Method for generating classifier by using few labeled images
KR101955919B1 (en) Method and program for providing tht region-of-interest in image by deep-learing algorithm
KR20210108376A (en) Apparatus and method for utilizing brain trait activity map database to characterize content
Morgenstern et al. An image-computable model of human visual shape similarity
CN107967461B (en) SVM (support vector machine) differential model training and face verification method, device, terminal and storage medium
CN113537496A (en) Deep learning model visual construction system and application and design method thereof
CN108198172A (en) Image significance detection method and device
Fernandez-Lozano et al. Visual complexity modelling based on image features fusion of multiple kernels
CN108491881A (en) Method and apparatus for generating detection model
CN110210380A (en) The analysis method of personality is generated based on Expression Recognition and psychology test
CN111599444A (en) Intelligent tongue diagnosis detection method and device, intelligent terminal and storage medium
Liu et al. How to synthesize a large-scale and trainable micro-expression dataset?
Albohn et al. A data-driven, hyper-realistic method for visualizing individual mental representations of faces
Goutham et al. Brain tumor classification using EfficientNet-B0 model
CN116369918B (en) Emotion detection method, system, device and storage medium
Carlisi et al. Using genetic algorithms to uncover individual differences in how humans represent facial emotion
Khortiuk et al. Scoring System Based on Neural Networks for Identification of Factors in Image Perception.
CN111383217A (en) Visualization method, device and medium for evaluation of brain addiction traits
Ke et al. An automatic instrument recognition approach based on deep convolutional neural network
Zhang et al. A Set of Comprehensive Evaluation System for Different Data Augmentation Methods
CN109583275B (en) Weight judgment method of barefoot footprint based on CNN
Matsuhira et al. Pointedness of an image: Measuring how pointy an image is perceived

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant