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.
-
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
-
Clone the repository:
git clone https://github.com/NikhilKalloli/Face-Recognition.git
-
Navigate to the directory:
cd Face-Recognition
-
Install the required dependencies(in a virtual Environment):
pip install -r requirements.txt
-
Run the Streamlit app:
streamlit run streamlit_app.py
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.
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.
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.
This project is licensed under the MIT License.
If you have any feedback, please reach out to me at [email protected]