Code Monkey home page Code Monkey logo

age-gender-estimation's Introduction

The MXNet Implementation of Face Age and Gender Estimation

This repository contains a lightweight model for face age and gender estimation. The model is very small and efficient about 1MB size, 10ms on single CPU core. Gender accuracy 96% on validation set and 4.1 age MAE.

Two methods (MTCNN and ESSH) are both provided in this repository for face detection and alignment. For easy cases, the results of two methods are almost the same, however, on hard cases the ESSH method has a much better detection results. You can use python test.py --det 0 to choose MTCNN method, or use python test.py --det 1 for ESSH.

Environment

This repository has been tested under the following environment:

  • Python 2.7
  • Ubuntu 18.04
  • Mxnet-cu90 (==1.3.0)

Installation

  1. Prepare the environment.

  2. Clone the repository.

  3. Type make to build necessary cxx libs.

Training

You can download rec format file directly in here: BaiduCloud or GoogleDrive , or package it youself according to the following steps

You can first train on imdb, then fine tune on wiki dataset. Train MobileNet 0.25X on a GPU such as GTX-1080Ti according to the following command

CUDA_VISIBLE_DEVICES='0' python -u train.py --data-dir $DATA_DIR --prefix './models/model' --network m1 --multiplier 0.25 --per-batch-size 128 --lr 0.01 --lr-steps '10000' --ckpt 2

Instead, you can edit train.sh and run sh ./train.sh to train your models.

Testing

  • Download the ESSH model from BaiduCloud or GoogleDrive and place it in ./ssh-model/.

  • You can use python test.py to test the pre-trained models or your own models.

Results

Results of face age and gender estimation (inferenced from model MobileNet 0.25X) are shown below.

License

MIT LICENSE

Acknowledgment

The code is adapted based on an intial fork from the insightface repository.

age-gender-estimation's People

Contributors

deepinx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

age-gender-estimation's Issues

How to preprocess train dataset

@deepinx Thank you for you job!
How to preprocess train dataset?The add_age_rec.py, convrt_rec.py or something else?
Could you tell me the execution sequence or preprocess?
There is a lot of dirty data in imdb-wiki dataset.I want to know how do you filter data.

fine tune gender prediction

Hi
I want to find tune gender prediction but I don't want to change age estimation.
what is the best way to do this?
thanks in advance

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.