Remove sub-classes Facet, OpenFace, Affdex and consolidate into a single Fex class.
4 key features.
Detector class: Detects facial landmarks, AUs, emotions, from a face image or video.
Fex class: Main data class for manipulation
Extractor class: Extracts features from a Fex object.
Plot & visualization functions.
Sample usage.
1. Detector class.
detector = Detector()
# save detection results to a file or a Fex output.
fex = detector.detect_image(filename=imageFile)
fex =detector.detect_video(filename=videoFile)
2. Fex class
2-1. Initializing.
# load directly from image
fex = detector.detect_image(imageFile)
# load from Facet, OpenFace, or Affectiva files.
fex = Fex()
fex = fex.read_facet(filename=facetfile)
fex = fex.read_openface(filename=facetfile)
fex = fex.read_affectiva(filename=facetfile)
functionals
fex.aus: Dataframe of action units.
fex.emotions: Dataframe of emotions
structurals
fex.landmarks: Dataframe of facial landmarks
fex.facebox: Dataframe of face bounding box.
designs
fex.time: Dataframe of time info.
fex.design: Dataframe of design matrix info.
all
fex.data: Dataframe of all columns.
meta
fex.meta: meta info such as filenames, fps, etc.
aus, emotions, landmarks, facebox, time, sessions should all just be a function that uses column names for each to slice fex.data. Column names should be stored under fex.au_columns, fex.emotion_columns, fex.landmark_columns, fex.facebox_columns, fex.time_columns, fex.design_columns.
2-3 Methods.
All methods are implemented under the Fex class but they can also be aggregated using the Extractor class.
extract_meanextract_minextract_maxextract_summary: Wrapper to extract mean, min, and max.
extract_waveletextract_multi_waveletextract_boftcalc_pspi
3. Extractor class (TBD on whether to scrap)
The extractor class simply aggregates info from different Fex class. For example collect all features across files:
extractor = Extractor()
for file in imagefiles:
fex = Fex.read_facet(file)
extractor.min(fex)
Remove sub-classes
Facet
,OpenFace
,Affdex
and consolidate into a singleFex
class.4 key features.
Sample usage.
1. Detector class.
2. Fex class
2-1. Initializing.
or initialize with info and read file.
2-2. Attributes.
functionals
fex.aus
: Dataframe of action units.fex.emotions
: Dataframe of emotionsstructurals
fex.landmarks
: Dataframe of facial landmarksfex.facebox
: Dataframe of face bounding box.designs
fex.time
: Dataframe of time info.fex.design
: Dataframe of design matrix info.all
fex.data
: Dataframe of all columns.meta
fex.meta
: meta info such as filenames, fps, etc.aus, emotions, landmarks, facebox, time, sessions should all just be a function that uses column names for each to slice
fex.data
. Column names should be stored underfex.au_columns
,fex.emotion_columns
,fex.landmark_columns
,fex.facebox_columns
,fex.time_columns
,fex.design_columns
.2-3 Methods.
All methods are implemented under the Fex class but they can also be aggregated using the
Extractor
class.extract_mean
extract_min
extract_max
extract_summary
: Wrapper to extract mean, min, and max.extract_wavelet
extract_multi_wavelet
extract_boft
calc_pspi
3. Extractor class (TBD on whether to scrap)
The extractor class simply aggregates info from different Fex class. For example collect all features across files:
4. Visualization & plotting.
Static plotting Interactive plotting.
Reference: https://github.com/fexmetrica/fex-metrica/blob/master/fexSDK/src/fexc.m