All Projects → arunponnusamy → Gender Detection Keras

arunponnusamy / Gender Detection Keras

Licence: mit
Gender detection (from scratch) using deep learning with keras and cvlib.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Gender Detection Keras

Anime Face Detector
A Faster-RCNN based anime face detector implementation using tensorflow.
Stars: ✭ 117 (-20.41%)
Mutual labels:  face-detection
Faceboxes
使用pytorch实现了FaceBoxes: A CPU Real-time Face Detector with High Accuracy
Stars: ✭ 131 (-10.88%)
Mutual labels:  face-detection
Animoji Animate
Facial-Landmarks Detection based animating application similar to Apple-Animoji™
Stars: ✭ 142 (-3.4%)
Mutual labels:  face-detection
Facedetection
iPhone app for detecting faces from a live camera feed using Swift and iOS 13 API's.
Stars: ✭ 123 (-16.33%)
Mutual labels:  face-detection
Flutter android
Android bindings plugin for Flutter.
Stars: ✭ 131 (-10.88%)
Mutual labels:  face-detection
Facerecognition
This is an implematation project of face detection and recognition. The face detection using MTCNN algorithm, and recognition using LightenenCNN algorithm.
Stars: ✭ 137 (-6.8%)
Mutual labels:  face-detection
Tenginekit
TengineKit - Free, Fast, Easy, Real-Time Face Detection & Face Landmarks & Face Attributes & Hand Detection & Hand Landmarks & Body Detection & Body Landmarks & Iris Landmarks & Yolov5 SDK On Mobile.
Stars: ✭ 2,103 (+1330.61%)
Mutual labels:  face-detection
Jeelizfacefilter
Javascript/WebGL lightweight face tracking library designed for augmented reality webcam filters. Features : multiple faces detection, rotation, mouth opening. Various integration examples are provided (Three.js, Babylon.js, FaceSwap, Canvas2D, CSS3D...).
Stars: ✭ 2,042 (+1289.12%)
Mutual labels:  face-detection
Facelandmarksdetection
Finds facial features such as face contour, eyes, mouth and nose in an image.
Stars: ✭ 130 (-11.56%)
Mutual labels:  face-detection
Face Recognition.js
Simple Node.js package for robust face detection and face recognition. JavaScript and TypeScript API.
Stars: ✭ 1,768 (+1102.72%)
Mutual labels:  face-detection
Libfacedetection
An open source library for face detection in images. The face detection speed can reach 1000FPS.
Stars: ✭ 10,852 (+7282.31%)
Mutual labels:  face-detection
Insightface Just Works
Insightface face detection and recognition model that just works out of the box.
Stars: ✭ 127 (-13.61%)
Mutual labels:  face-detection
Facedetection
🌟 Human Face Detection based on AdaBoost
Stars: ✭ 137 (-6.8%)
Mutual labels:  face-detection
Deepstack
The World's Leading Cross Platform AI Engine for Edge Devices
Stars: ✭ 120 (-18.37%)
Mutual labels:  face-detection
Pyramidbox.pytorch
Pyramidbox implement with pytorch
Stars: ✭ 142 (-3.4%)
Mutual labels:  face-detection
Faster Mobile Retinaface
[CVPR 2020] Reimplementation of RetinaFace, faster and stronger.
Stars: ✭ 117 (-20.41%)
Mutual labels:  face-detection
2015 face detection
CVPR2015 Cascade CNNs for Face Detection
Stars: ✭ 135 (-8.16%)
Mutual labels:  face-detection
Deep Face Recognition
One-shot Learning and deep face recognition notebooks and workshop materials
Stars: ✭ 147 (+0%)
Mutual labels:  face-detection
Hololenswithopencvforunityexample
HoloLens With OpenCVforUnity Example
Stars: ✭ 142 (-3.4%)
Mutual labels:  face-detection
Face Mask Browser Extension
😷 A browser extension that puts masks on faces on the internet
Stars: ✭ 141 (-4.08%)
Mutual labels:  face-detection

Gender detection (from scratch) using deep learning with keras and cvlib

The keras model is created by training SmallerVGGNet from scratch on around 2200 face images (~1100 for each class). Face region is cropped by applying face detection using cvlib on the images gathered from Google Images. It acheived around 96% training accuracy and ~90% validation accuracy. (20% of the dataset is used for validation)

Update :

Checkout the gender detection functionality implemented in cvlib which can be accessed through a single function call detect_gender().

Python packages

  • numpy
  • opencv-python
  • tensorflow
  • keras
  • requests
  • progressbar
  • cvlib

Install the required packages by executing the following command.

$ pip install -r requirements.txt

Note: Python 2.x is not supported

Make sure pip is linked to Python 3.x (pip -V will display this info).

If pip is linked to Python 2.7. Use pip3 instead. pip3 can be installed using the command sudo apt-get install python3-pip

Using Python virtual environment is highly recommended.

Usage

image input

$ python detect_gender.py -i <input_image>

webcam

$ python detect_gender_webcam.py

When you run the script for the first time, it will download the pre-trained model from this link and place it under pre-trained directory in the current path.

(If python command invokes default Python 2.7, use python3 instead)

Sample output :

Training

You can download the dataset I gathered from Google Images from this link and train the network from scratch on your own if you are interested. You can add more images and play with the hyper parameters to experiment different ideas.

Additional packages

  • scikit-learn
  • matplotlib

Install them by typing pip install scikit-learn matplotlib

Usage

Start the training by running the command

$ python train.py -d <path-to-dataset>

(i.e) $ python train.py -d ~/Downloads/gender_dataset_face/

Depending on the hardware configuration of your system, the execution time will vary. On CPU, training will be slow. After the training, the model file will be saved in the current path as gender_detection.model.

If you have an Nvidia GPU, then you can install tensorflow-gpu package. It will make things run a lot faster.

Help

If you are facing any difficulty, feel free to create a new issue or reach out on twitter @ponnusamy_arun .

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].