Projects.FaceEmotions package

Submodules

Projects.FaceEmotions.FaceEmotions module

class Projects.FaceEmotions.FaceEmotions.FaceEmotions(config: dict)[source]

Bases: object

Detect faces in images and predict their emotion.

Initialize the models.

Parameters:

config (dict) – Configuration dict.

predict(image: Image) List[Face][source]

Predicts the position and the emotion of faces on an image.

Parameters:

image (toolbox.Structures.Image) – An Image object.

Returns:

A list of Face data models.

Return type:

List[DataModels.Face]

update_face(image: Image, face: Face) Face[source]

Predict the emotion of a Face data model.

Parameters:
  • image (toolbox.Structures.Image) – An Image object.

  • face (DataModels.Face) – A Face data model object.

Returns:

The same Face data model with the emotions

attributes updated.

Return type:

DataModels.Face

Projects.FaceEmotions.api module

class Projects.FaceEmotions.api.FaceEmotionsApi[source]

Bases: ApiBase

Initialize the API.

Parameters:

base_dm (Optional[Type, optional) – Data model class that will be sent. Defaults to None.

TITLE = 'Face Emotions API'
Projects.FaceEmotions.api.main()[source]

Projects.FaceEmotions.demo module

class Projects.FaceEmotions.demo.Demo[source]

Bases: DemoBase

Initialize the demo.

Projects.FaceEmotions.demo.main()[source]

Module contents