diff --git a/dbm_lib/config/config_raw_feature.py b/dbm_lib/config/config_raw_feature.py index b246ab35..554359cd 100644 --- a/dbm_lib/config/config_raw_feature.py +++ b/dbm_lib/config/config_raw_feature.py @@ -196,6 +196,7 @@ class ConfigRawReader(object): self.com_exp = config['raw_feature']['com_exp'] self.com_lower_exp = config['raw_feature']['com_lower_exp'] self.com_upper_exp = config['raw_feature']['com_upper_exp'] + self.pai_exp = config['raw_feature']['pai_exp'] self.hap_exp_full = config['raw_feature']['hap_exp_full'] self.sad_exp_full = config['raw_feature']['sad_exp_full'] self.sur_exp_full = config['raw_feature']['sur_exp_full'] @@ -210,6 +211,8 @@ class ConfigRawReader(object): self.com_exp_full = config['raw_feature']['com_exp_full'] self.com_lower_exp_full = config['raw_feature']['com_lower_exp_full'] self.com_upper_exp_full = config['raw_feature']['com_upper_exp_full'] + self.pai_exp_full = config['raw_feature']['pai_exp_full'] + self.fac_AsymMaskMouth = config['raw_feature']['fac_AsymMaskMouth'] self.fac_AsymMaskEye = config['raw_feature']['fac_AsymMaskEye'] self.fac_AsymMaskEyebrow = config['raw_feature']['fac_AsymMaskEyebrow'] diff --git a/dbm_lib/dbm_features/raw_features/util/video_util.py b/dbm_lib/dbm_features/raw_features/util/video_util.py index fe47e635..cbde2803 100644 --- a/dbm_lib/dbm_features/raw_features/util/video_util.py +++ b/dbm_lib/dbm_features/raw_features/util/video_util.py @@ -171,6 +171,8 @@ def calc_of_for_video(of,face_cfg,fe_cfg): emotion_exp(face_cfg.LOWER_ACTION_UNITS,of,[fe_cfg.com_lower_exp,fe_cfg.com_lower_exp_full],fe_cfg.err_reason) #Composite upper face Expressivity emotion_exp(face_cfg.UPPER_ACTION_UNITS,of,[fe_cfg.com_upper_exp,fe_cfg.com_upper_exp_full],fe_cfg.err_reason) + #Composite pain expressivity + emotion_exp(face_cfg.pai,of,[fe_cfg.pai_exp,fe_cfg.pai_exp_full],fe_cfg.err_reason) #AU happiness presence emotion_pres(face_cfg.happiness,of,fe_cfg.happ_occ,fe_cfg.err_reason) #AU Sad presence diff --git a/dbm_lib/dbm_features/raw_features/video/face_config/face_config_reader.py b/dbm_lib/dbm_features/raw_features/video/face_config/face_config_reader.py index 19fe1d28..b861571f 100644 --- a/dbm_lib/dbm_features/raw_features/video/face_config/face_config_reader.py +++ b/dbm_lib/dbm_features/raw_features/video/face_config/face_config_reader.py @@ -31,7 +31,7 @@ class ConfigFaceReader(object): self.POS_ACTION_UNITS = config['cdx_face_config']['POS_ACTION_UNITS'] self.NET_ACTION_UNITS = config['cdx_face_config']['NET_ACTION_UNITS'] self.LOWER_ACTION_UNITS = config['cdx_face_config']['LOWER_ACTION_UNITS'] - self.UPPER_ACTION_UNITS = config['cdx_face_config']['LOWER_ACTION_UNITS'] + self.UPPER_ACTION_UNITS = config['cdx_face_config']['LOWER_ACTION_UNITS'] self.happiness = config['cdx_face_config']['happiness'] self.sadness = config['cdx_face_config']['sadness'] self.surprise = config['cdx_face_config']['surprise'] @@ -39,6 +39,7 @@ class ConfigFaceReader(object): self.anger = config['cdx_face_config']['anger'] self.disgust = config['cdx_face_config']['disgust'] self.contempt = config['cdx_face_config']['contempt'] + self.pain = config['cdx_face_config']['pain'] self.cai = config['cdx_face_config']['CAI'] self.SELECTED_FEATURES = config['cdx_face_config']['SELECTED_FEATURES'].split(',') self.face_expr_dir = config['cdx_face_config']['face_expr_dir'] diff --git a/resources/features/derived_feature.yml b/resources/features/derived_feature.yml index e48350b0..ecff066a 100644 --- a/resources/features/derived_feature.yml +++ b/resources/features/derived_feature.yml @@ -130,6 +130,7 @@ derive_feature: com_exp: ['mean', 'std', 'pct'] com_lower_exp: ['mean','std','pct'] com_upper_exp: ['mean','std','pct'] + pai_exp: ['mean','std','pct'] hap_exp_full: ['mean', 'std'] sad_exp_full: ['mean', 'std'] sur_exp_full: ['mean', 'std'] @@ -143,6 +144,7 @@ derive_feature: com_exp_full: ['mean', 'std'] com_lower_exp_full: ['mean','std'] com_upper_exp_full: ['mean', 'std'] + pai_exp_full: ['mean','std'] #Facial Landmarks fac_LMK00disp: ['mean', 'std'] diff --git a/resources/features/raw_feature.yml b/resources/features/raw_feature.yml index 9f98ffca..736393bb 100644 --- a/resources/features/raw_feature.yml +++ b/resources/features/raw_feature.yml @@ -28,6 +28,8 @@ raw_feature: com_exp: fac_comintsoft com_lower_exp: fac_comlowintsoft com_upper_exp: fac_comuppintsoft + pai_exp: fac_paiintsoft + hap_exp_full: fac_hapinthard sad_exp_full: fac_sadinthard sur_exp_full: fac_surinthard @@ -42,6 +44,7 @@ raw_feature: com_exp_full: fac_cominthard com_lower_exp_full: fac_comlowinthard com_upper_exp_full: fac_comuppinthard + pai_exp_full: fac_paiinthard #Facial asymmetry fac_AsymMaskMouth: fac_asymmaskmouth diff --git a/resources/services/face_util.yml b/resources/services/face_util.yml index 0681f599..d4fe6274 100644 --- a/resources/services/face_util.yml +++ b/resources/services/face_util.yml @@ -12,6 +12,7 @@ cdx_face_config: anger: [[4, 5, 7, 23]] disgust: [[9, 15]] contempt: [[12, 14]] + pain: [[4, 6, 7, 9, 10, 12, 20, 26]] CAI: [[6, 12],[1, 4, 15],[2, 5, 26],[7, 20, 26],[23],[9],[12, 14]] SELECTED_FEATURES: AU,POSE face_expr_dir: /video/face_expressivity