Giter VIP home page Giter VIP logo

face_attributes_classification_with_dlib's Introduction

gender_classifier_dlib_transfer_learning

A simple demo of gender classifier by using dlib face recognition model as a feature extractor

By using dlib face recognition model, we can do transfer learning to classify gender of face, using sklearn ML framwork. The traning dataset is all asian face, due to the lack of public asian gender dataset. However, there are many private picture from my own, so I am not going to share the dataset.

If you are intrested in trainig by yourself, you can use google photo crawler to download image and label my your self https://github.com/hellock/icrawler

I also provided simple pretrained model if you want to use.

Here is the evaluation metric

               precision    recall  f1-score   support

          f        0.90      0.99      0.94       159
          m        0.99      0.91      0.95       189

 avg / total       0.95      0.95      0.95       348

Environment

  • MacOS or Ubuntu
  • face_recognition 1.2.2
  • dlib 19.10.0
  • Python 3.6.4
  • sklearn 0.19.1
  • skimage 0.13.1

How to run the code and set prerequisite ?

First, you need to set up the environment of dlib, sklearn and face_recognition, however, you cannot simply use pip install to install dlib, you should build it from source or use conda install -c menpo dlib to install it. It is a tricky step, so I prepare the whole installation script for opencv, dlib, face_recognition and the other useful library for computer vision and machine learning in Python 3.6, here is the link

https://github.com/cftang0827/python-computer-vision-env_install

Or if you don't want to use whole script, you could follow the installation step from face_recognition API https://github.com/ageitgey/face_recognition#installation-options

It's quite simple and useful

face_attributes_classification_with_dlib's People

Contributors

digital-nomad-cheng avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

face_attributes_classification_with_dlib's Issues

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.