Nawaf-Rayhan585/Face-Recognition
Nawaf-Rayhan585/Face-Recognition has 41 GitHub stars and 13 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-11 21:59 UTC. Last push 2026-09-27.
Lightweight face recognition template with Jarvis-style overlay — pure OpenCV (Haar + LBPH), runs on any laptop
Measured star growth
- in 24h
- 0
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalFace Recognition Template 🧑🦱
Lightweight, reusable face recognition with a Jarvis-style dot overlay. Pure OpenCV — Haar cascade for detection, LBPH for recognition. No dlib, no cmake, no GPU, no model downloads. Runs on any laptop.
Works with: webcam · images · video files
Setup
pip install -r requirements.txt
That's it. opencv-contrib-python includes everything needed.
Register a person
python register_face.py John john.jpg
Use a clear front-facing photo. You can register the same person multiple times with different photos (different angles/lighting) — it improves accuracy, each call retrains the model automatically.
Run
python main.py # webcam
python main.py --source photo.jpg --output result.jpg
python main.py --source video.mp4 --output result.mp4
Known face = name + cyan box + jarvis dots. Unknown = red box.
Press q to quit (webcam/video mode).
Reuse for a new client
- Copy this whole folder.
- Delete everything inside
data/faces/, plusdata/lbph_model.ymlanddata/labels.txt. - Register new client's people.
- Done — same code, new data.
Notes
CONFIDENCE_THRESHOLDin main.py (70) = strictness. LBPH confidence is a distance score — LOWER means better match, so lower threshold = stricter.- Accuracy improves a lot with 3-5 photos per person vs just 1.
- Haar cascade is decent but not perfect at odd angles/low light — swap in a DNN detector later if a client needs higher accuracy.
Project structure
core/detector.py # Haar detection + LBPH recognition
core/ui.py # Jarvis-style dots + boxes
main.py # run on webcam / image / video
register_face.py # add a person
models/ # Haar cascade xml
Want higher accuracy?
This template is built to be light. For production (bad lighting, side angles, big crowds), swap the detector/recognizer for a deep model like InsightFace (ArcFace) or a YOLO face model. The rest of the code stays the same.
License
MIT — see LICENSE.
Built by Nawaf Rayhan · [email protected] · ⭐ the repo if it helped you
Explore related projects
codecrafters-io/build-your-own-x
Master programming by recreating your favorite technologies from scratch.
561,892 starspublic-apis/public-apis
A collective list of free APIs
498,274 starsmorluto/rea
Reverse engineer anything with agents, from app behavior down to native binaries.
452,956 starsopenclaw/openclaw
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
394,371 stars