Projects.AgeGender package

Submodules

Projects.AgeGender.AgeGender module

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

Bases: object

Detect faces on images and predict its age and gender.

Initialize the models.

Parameters:

config (dict) – Configuration dict.

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

Predict the position, age and gender of faces in 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 age and gender 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 age and gender

attributes updated.

Return type:

DataModels.Face

Projects.AgeGender.api module

class Projects.AgeGender.api.AgeGenderApi[source]

Bases: ApiBase

Initialize the API.

Parameters:

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

TITLE = 'Age Gender API'
Projects.AgeGender.api.main()[source]

Projects.AgeGender.demo module

class Projects.AgeGender.demo.Demo[source]

Bases: DemoBase

Initialize the demo.

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

Module contents