Giter Club home page Giter Club logo

facialrecognition's Introduction

Facial Recognition

This facial recognition project is designed to train a model on a set of labeled images and then use the model to recognize and identify faces in real-time through a webcam feed.

Project Structure

The project is organized as follows:

  • images/: Contains labeled images for training. Each image should be named after the person in the image (e.g., ElonMusk.png).
  • src/: Contains the source code.
    • train_model.py: Script to train the face recognition model.
    • recognize_faces.py: Script for real-time face recognition.
  • models/: Stores the trained model file.
  • requirements.txt: Lists the Python dependencies.

Setup

Prerequisites

  • Python 3.6 or higher
  • A webcam for real-time face recognition

Installation

  1. Clone the repository to your local machine:

    git clone https://github.com/AnamolZ/FacialRecognition.git
    cd FacialRecognition
    
  2. Set up a virtual environment (optional but recommended):

    python -m venv env
    .\env\Scripts\activate  # On Windows
    source env/bin/activate  # On Unix or MacOS
    

. Set up dlib installation:

pip install dlib_file_name.whl
pip install cmake
pip install face_recognition
  1. Install the required dependencies:
    pip install -r requirements.txt
    

Usage

  1. Place your labeled image files in the images/ directory. Ensure each image is named after the person in the image.

  2. Run train_model.py to train the model. This will create a model file in the models/ directory:

    python src/train_model.py
    
  3. Run recognize_faces.py to start the real-time face recognition:

    python src/recognize_faces.py
    

Contributing

Contributions to this project are welcome! Please fork the repository, make your changes, and submit a pull request.

License

Specify your license here. Common choices include MIT, GPL, and Apache 2.0.

facialrecognition's People

Contributors

anamolz avatar

Watchers

 avatar  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.