https://github.com/basklash/face-recognition
An application that recognizes faces. If you put a picture of yourself in a folder, the application will find your picture, recognize it and recognize you. Projects written entirely in Python.
https://github.com/basklash/face-recognition
face-detection face-recognition face-recognition-python opencv python python-script
Last synced: 6 months ago
JSON representation
An application that recognizes faces. If you put a picture of yourself in a folder, the application will find your picture, recognize it and recognize you. Projects written entirely in Python.
- Host: GitHub
- URL: https://github.com/basklash/face-recognition
- Owner: BaskLash
- Created: 2023-07-14T12:09:01.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-06T10:17:01.000Z (almost 2 years ago)
- Last Synced: 2025-06-12T20:37:41.657Z (7 months ago)
- Topics: face-detection, face-recognition, face-recognition-python, opencv, python, python-script
- Language: Python
- Homepage:
- Size: 178 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Face Recognition with OpenCV and face_recognition
A friend of mine wanted a camera to be installed on the door when he stood in front of it to see if it was really him. My friend holds up his face. The camera looks to see if it is him, and if it is, it opens the lock on the door. If it's not him, the door stays closed, but a snapshot is taken to see who it was.
The future: Can detect when someone is stealing something in front of the door, an anti-burglary system, which is then connected to the cloud and automatically forwarded to the police.
This project demonstrates real-time face recognition using OpenCV and the face_recognition library. It allows you to recognize faces captured by your webcam and label them accordingly.
## Requirements
- Python 3.x
- OpenCV (`cv2`)
- face_recognition library
## Installation
1. Install Python if you haven't already. You can download it from the [official Python website](https://www.python.org/downloads/).
2. Install OpenCV and face_recognition:
```
pip install opencv-python-headless
pip install face_recognition
```
## Usage
1. Clone or download this repository to your local machine.
2. Place an image of the face you want to recognize in the project directory and update the filename in the code.
3. Run the script:
```
python face_recognition_demo.py
```
4. The webcam will activate, and faces in the video feed will be recognized in real-time.
## Important Notes
- Ensure that your webcam is correctly connected and recognized by your operating system.
- OpenCV is required to read from your webcam. However, it is not necessary to use the face_recognition library alone.
- If you encounter difficulties installing OpenCV, you may want to try alternative demos provided by face_recognition that do not require it.
## Credits
This project utilizes the following libraries:
- [OpenCV](https://opencv.org/)
- [face_recognition](https://github.com/ageitgey/face_recognition)
## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.