A lightweight real-time face detection & recognition app built with OpenCV / Node.js
This project provides a straightforward solution for detecting and recognising faces in real time, using a webcam or camera feed.
It’s built with Node.js and opencv4nodejs (OpenCV bindings for Node), making it easy to extend, integrate and deploy.
- Real-time face detection using your camera
- Face recognition against a set of known faces
- Lightweight and modular — easy to integrate into other systems
- Works across Windows / macOS / Linux (given OpenCV dependencies are satisfied)
- Can be extended for access control, attendance systems, automation projects, creative installations
- Language: Python
- Library:
opencv-pythonmediapipe - Platform: Desktop / Laptop (with webcam or external camera)
- License: MIT – free to use, modify, distribute
git clone https://github.com/Raziel206/FaceRecognition.git
cd FaceRecognition
pip install virtualenv
py -3.10 -m venv env
.\env\Scripts\activate
pip install -r requirements.txt
python -m src.mainFaceRecognition/
│
├── src/
│ ├── untils/
│ │ ├── __init__.py
│ │ ├── face_detect.py
│ │ ├── hand_detect.py
│ │ └── resizing.py
│ ├── __init__.py
│ ├── extension.py
│ └── main.py
├── .gitignore
├── LICENSE
├── README.md
└── requirements.txt-
Use for door-access system: recognise authorised faces and trigger unlock
-
Use in classrooms / events: automatic attendance marking based on face recognition
-
Use for creative installations: trigger lights/sounds when certain faces appear
-
Use as a base for more advanced CV/AI work: add expression recognition, mask-detection, emotion tracking
-
Use clear, well-lit face images for each person in the known_faces/ folder — good data = better recognition
-
Maintain consistent lighting and camera position for best accuracy
-
Tune recognition thresholds (in recognizer logic) to avoid false positives or mis-matches
-
If performance is slow, reduce camera resolution or adjust detection/recognition parameters
-
Always test with multiple poses (frontal, slight angles) and different lighting conditions
Contributions are welcome and appreciated!
Whether it's a bug fix, feature improvement, documentation enhancement, or optimization — every contribution helps.
- Fork the repository
- Create a new branch for your feature or bug fix
git checkout -b feature-name
- Make a pull request, or if it is a big change/major feature, create an issue.
This project wouldn't be possible without the amazing work of the open-source community.
Special thanks to:
- Python — for being simple, fast to prototype, and developer-friendly
- OpenCV — the core of real-time computer vision in this project
- MediaPipe — for efficient, production-ready face detection & landmark tracking
- All contributors of these libraries for keeping them free, powerful, and evolving
Huge respect to open-source. This project stands on the shoulders of giants.
This project is licensed under the MIT License.