Skip to content

vinilis24/demoFaceRecog

Repository files navigation

demoFaceRecog

Setup

  1. Create python virtual environment
    # create virtual environment
    python -m venv env
    
    # activate the environment
    source env/bin/activate
  2. Install opencv requirement
    # Install requirements.txt
    pip install -r requirements.txt

Collect image data and build datasets

NOTE" Make sure to have good camera

  1. Create a folder named datasets

    mkdir datasets
  2. Run datacollect.py and enter id of the user.

    #This id is to differentiate each users by id in an array list of name inside the main code
    Enter Your ID:
  3. Run trainingdemo.py to create a yml file to store the trained data of faces.

    #Processing the datasets of a face and turn into yml file
    Training Completed............

Image Recognition code

NOTE" Make sure to put the name of the users in the dataset. Sort by ID in an array

  1. Enter image recognition code, Modify the name_list array. number of array based on the id inside datasets.
    #Input name of users
    name_list = ["", "Joshua",  "Vinilis", "Johnny"]
  1. Run facial recognition code like default_Main.py
    #Output
    ID: 2 Confidence: 47.35577424898243
    Detected Face - Name: Vinilis
    ID: 0 Confidence: 35.25912327297898
    Detected Face - Name: Unknown
    ...

Others

Kept a few other ways of coding for facial recognition.

#extra requirement may needed for code within others folder
pip install face_recognition

eg. datasets

https://drive.google.com/file/d/1Uo808jFDhK97ae7zPob7KiKHU6pBl2Wv/view?usp=sharing

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages