src.classification.fusion package¶
Submodules¶
src.classification.fusion.fusion_classifier module¶
This file contains a fusion emotion classifier fusing image, plant and watch probabilities
- class src.classification.fusion.fusion_classifier.FusionClassifier(parameters: Optional[Dict] = None)¶
Bases:
EmotionClassifier
Class that implements the fusion emotion classifier. This classifier performs early fusion from the following classifiers: image, plant and watch (they can be excluded or included). We take the seven emotion probabilities as features from the three classifiers and then classify this data. We do not take the real features that the classifiers extract as our input data.
To generate the data required to use this classifier, run the script: src/evaluation/scripts/continuous_data_creation.py
- classify(parameters: Optional[Dict] = None, **kwargs) array ¶
Classification method used to classify emotions from images
- Parameters:
parameters – Parameter dictionary used for classification
kwargs – Additional kwargs parameters
- Returns:
An array with predicted emotion indices
- initialize_model(parameters: Dict) None ¶
Initializes a new fusion model architecture
- load(parameters: Optional[Dict] = None, **kwargs) None ¶
Loading method that loads a previously trained model from disk.
- Parameters:
parameters – Parameters required for loading the model
kwargs – Additional kwargs parameters
- prepare_training(parameters: Dict) None ¶
Function that prepares the training by initializing optimizer, loss, metrics and callbacks for training.
- Parameters:
parameters – Training parameters
- save(parameters: Optional[Dict] = None, **kwargs) None ¶
Saving method that saves a previously trained model on disk.
- Parameters:
parameters – Parameters required for storing the model
kwargs – Additional kwargs parameters
- train(parameters: Optional[Dict] = None, **kwargs) None ¶
Training method for Fusion model
- Parameters:
parameters – Parameter dictionary used for training
kwargs – Additional kwargs parameters
Module contents¶
This package contains multi-modal and fusion emotion classifiers.