Giter Site home page Giter Site logo

tejarsha-arigila / age-gender-emotion-analyzer Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 22.82 MB

Age, Gender & Emotion Analyzer

License: MIT License

Python 100.00%
age-prediction ai cnn emotion-recognition gender-recognition keras opencv python tensorflow

age-gender-emotion-analyzer's Introduction

License: MIT

๐Ÿš€ AGenEmozer (Age, Gender, and Emotion Analyzer)

Python OpenCV TensorFlow Keras NumPy Pandas

AGenEmozer is a software tool that uses artificial intelligence to make educated guesses about a person's age, gender, and emotional state from a photo.

Table of Contents

Output

Description

The project includes four main Python scripts:

  1. age_training.py: This script is for training a Convolutional Neural Network (CNN) model to recognize different age groups from images. The trained model is saved as 'age_model.h5'.

  2. gender_training.py: This script is for training a CNN model to recognize gender from images. The trained model is saved as 'gender_model.h5'.

  3. emotion_training.py: This script is for training a CNN model to recognize three classes of emotions from images: positive, negative, and neutral. The trained model is saved as 'emotion_model.h5'.

  4. AGenEmozer.py: This script uses three pre-trained models to analyze faces in images or from a webcam feed. It predicts the age, gender, and emotion for each detected face.

๐Ÿ›  Installation

  1. Clone this repository.
git clone https://github.com/Tejarsha-Arigila/Age-Gender-Emotion-Analyzer.git
  1. Install required Python packages.
pip install -r requirements.txt

๐ŸŽฎ Usage

Datasets

Download the datasets and place them under ./data/ folder before training.

  1. Age : Merged & Augmented UTK Faces & Facial Age Dataset
  2. Gender : UTKFace
  3. Emotion : CK + 48

๐ŸŽ“ Train the Models

Each training script accepts a configuration file as an argument. These configuration files are expected to be in YAML format and specify details like the directory of the training data, the model path, the number of epochs for training, and other parameters.

  1. Run the age_training.py script.
python age_training.py --config ./configs/age_config.yaml
  1. Run the gender_training.py script.
python gender_training.py --config ./configs/gender_config.yaml
  1. Run the emotion_training.py script.
python emotion_training.py --config ./configs/emotion_config.yaml

๐ŸŒŸ Use the Age, Gender, and Emotion Analyzer

Run the AGenEmozer.py script.

  • To analyze an image, provide the image path as an argument:
python AGenEmozer.py --image <image_path.jpg>
  • To analyze the webcam feed, run the script without the image argument:
python AGenEmozer.py

๐Ÿ“ข Note

Please ensure that the models 'age_model.h5', 'gender_model.h5', and 'emotion_model.h5' are present in ./model/ directory of the project. You can train these models using the provided scripts.

๐Ÿค Contribution

Contributions are welcome! Please create an issue for discussion before submitting a pull request.

๐Ÿ“œ License

This project is licensed under the MIT License. Please see the LICENSE file for details.

age-gender-emotion-analyzer's People

Contributors

tejarsha-arigila avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

marketcalls

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.