Skip to content

A Streamlit web application for face recognition using a pre-trained YOLO model and the DeepFace library.

License

Notifications You must be signed in to change notification settings

NikhilKalloli/Face-Recognition

Repository files navigation

Face-Recognition

This is a Streamlit web application for face recognition using a pre-trained YOLO (You Only Look Once) model and the DeepFace library. The app allows users to upload an image, detects faces, and performs face recognition to identify known faces.

Quick Overview of Working

  • Face Detection: The app uses the YOLO model to detect faces in uploaded images.

  • Face Extraction: Crop and save the detected faces.

  • Face Recognition: The DeepFace library is employed for face recognition. Known faces are saved in the 'known' folder, and unknown faces are saved in the 'unknown' folder.

  • User-friendly Interface: The Streamlit app provides a user-friendly interface for easy interaction.

FaceRecognition.mp4

Usage

  1. Clone the repository:

    git clone https://github.com/NikhilKalloli/Face-Recognition.git
    
  2. Navigate to the directory:

    cd Face-Recognition
    
  3. Install the required dependencies(in a virtual Environment):

    pip install -r requirements.txt
    
  4. Run the Streamlit app:

    streamlit run streamlit_app.py
    

Customization

Currently the model is trained on the following World leaders:

To be able to recognise any face you want to all you need is a few photos of that person and follow the documentation here.

Watch a Youtube Video here if you find it hard to follow.

Deployment

I would advise to deploy it on Streamlit since the libraries are larger in size and other deployment services will run out of memory while building the application. Make sure you include packages.txt consisting of libgl1-mesa-glx library.

Acknowledgement: This repository is the deployed and simplified version of this.

Contributing

Contributions are welcome! If you have any improvements or new features to suggest, please create a pull request.

If you have any questions or issues, feel free to open an issue.

License

This project is licensed under the MIT License.

Connect with Me

Twitter LinkedIn

Feedback

If you have any feedback, please reach out to me at [email protected]