Giter Club home page Giter Club logo

gui-face-recognizer's Introduction

GUI Face recognizer

A GUI based webcam realtime video Face Recognizer coded in Python3 for Windows.

Screenshots

"Main UI" "Face Recognition"

Usage:

Required download:

  • Download the faces.tar file from here.
  • Extract to a folder named faces and move the folder into the Face Recognizer folder.

Required Packages:

Install Python3 and Anaconda if you haven't.

  • Create a new conda environment
conda create --name envname
  • Activate the environment
conda activate envname
  • Install Keras, OpenCV, Numpy, h5py and PIL:
conda install keras
conda install opencv
conda install numpy
conda install h5py
conda install pillow

Running the application

cd Face Recognizer
python main_ui.py

Implementation:

Dataset

"NO" class:

  • The faces dataset forms the NO class of the dataset.

"YES" class:

  • Frontal face Haar cascade is used for webcam based face detection in OpenCV.
  • The detected face in every frame of the video stream is cropped and saved as an image.
  • This forms the "YES" class of the dataset

Augmentation:

  • Since the dataset is rather small, Keras Image data generator is used for Image augmentation.

Model:

  • A Convolutional Neural Network is built using Keras. This model is trained on the constructed dataset over 25 epochs with 400 samples per epoch.
  • The loss function used is Binary crossentropy and the optimizer used is adam.
  • The model is saved after training into a .h5 file for later use.
  • The class indices are also saved into a poslabel.txt file.

Recognition:

  • For every frame in the video stream, face is detected using frontal_face_haar_cascade in Opencv.
  • The detected face is saved to a tmpimg.jpg file.
  • Th trained CNN model is used to recognize the face.
  • The result is shown using cv.rectangle around the face and text.
  • Green colored rectangle and Name text if YES else Red colored rectangle and Not Name text.

gui-face-recognizer's People

Contributors

neeru1207 avatar

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.