Code Monkey home page Code Monkey logo

gender_recognition's Introduction

Model trainer

Description

This model was created to explain how to recognice the gender of a person based in the face using CNN(Convolutional Neural network) with Keras.

Virtual enviroment

You can create a virtual environment using following commands.

In linux maybe you need the following package sudo apt-get install python3-venv

Description Linux Win
Install virtenv python3 -m pip install --user virtualenv py -m pip install --user virtualenv
Create enviroment python3 -m venv modelTrainerEnv py -m venv modelTrainerEnv
Activate enviroment source modelTrainerEnv/bin/activate .\modelTrainerEnv\Scripts\activate
Install packages pip install --upgrade -r requirements.txt pip install --upgrade -r requirements.txt
Inactivate deactivate deactivate

USE

This project is a CNN based in a large-scale image recognition training model, as called VGG, this model is based in layers and a compression of an image, the schema is explained in the following graph:

:blurdata:

Training

To train the model just run with python 3.6 and the environment created the file training.py, ensure the route of the 'datadir' variable is set as your dataset photos is. To download the dataset you can see follow URL. https://storage.googleapis.com/pretrained-model-gender/gender_dataset_face.rar

The VGG perfonrmance will be ploting and the image is one like this.

:blurdata:

Recognition

To run the recognition ensure the model is in the folder 'model' and run detection.py and comment the variable 'model_path', if you haven't the model the app download a model automatically.

Aplication Version
Python Python 3.9.10
OpenCV 4.1.0
numpy 1.16.3
tensorflow 1.13
keras 2.2.4
cvlib 0.2.1
scikit-learn 0.21.1
matplotlib 3.0.3

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.