This project implements a facial recognition system with hand gesture detection using OpenCV and MediaPipe. It includes functionalities to create a dataset, train a model, and test it in real-time with a webcam.
- Face detection using OpenCV's Haar cascades.
- Hand gesture recognition using MediaPipe.
- Training a face recognition model with LBPH (Local Binary Pattern Histogram).
- Real-time face and hand gesture detection.
Ensure you have Python installed along with the following dependencies:
pip install opencv-python numpy mediapipe pillowTo capture face images and create a dataset, uncomment the create_dataset() function in opencv.py and run:
python opencv.pyPress q to stop capturing after collecting sufficient images.
Train the face recognition model by running:
python opencv.pyThis will generate a model.yml file containing the trained model.
Test real-time face recognition with hand gesture-based identification by running:
python opencv.pyPress q to exit the test mode.
OpenCV/
│── faceDataset/ # Folder containing captured face images
│── model.yml # Trained face recognition model
│── opencv.py # Main script for dataset creation, training, and testing
│── README.md # Documentation
- Python
- OpenCV
- NumPy
- Pillow
- MediaPipe