What it Does: Learning Phase: Captures 250 face images of a person. Asks for their name. Saves them in a folder named after the person. Recognition Phase: Uses LBPH recognizer (simple and fast). Detects and labels known persons. Labels others as "Unknown".
What this project does: This is a face recognition system using your webcam. It has two parts: Learning phase – You show your face and tell your name. It takes 250 photos and saves them. Recognition phase – It uses your webcam in real time to recognize known people or label as "Unknown".
Requirements (Install First) Before running anything, open your terminal or command prompt and run: pip install opencv-contrib-python That's all you need!
🗂 Folder Structure project_folder/ │ ├── dataset/ ← Where face images are stored ├── face_training.py ← Run this to add a new person └── face_recognition.py← Run this to recognize faces in real time
if you want to add more people
Just run face_training.py again and enter a different name. It will store their images too, and next time they’ll be recognized!
Troubleshooting
Error: cv2.face not found? Make sure you installed the right package:
pip install opencv-contrib-python
No face detected? Make sure there's enough light and you're looking at the camera.
Students doing a face recognition mini-project
Anyone curious about how real-time face recognition works!
For More info Contact me via Whatsapp (+923482610235)