This project is a real-time face detection application that captures and saves an image when a smiling face is detected. The system utilizes OpenCV and MediaPipe for facial recognition and TensorFlow Lite for optimized inference.
- Detects faces in real-time using OpenCV and MediaPipe
- Identifies when a person is smiling
- Automatically captures and saves the image upon detecting a smile
- Saves captured images in a designated folder
Ensure you have the following dependencies installed:
pip install -r requirements.txt
- OpenCV (
cv2
) - MediaPipe
- NumPy
- TensorFlow Lite
- Clone this repository:
git clone https://github.com/your-username/capture-smiling-face.git
- Navigate to the project directory:
cd capture-smiling-face
- Install dependencies:
pip install -r requirements.txt
- Run the script:
python capture_smiling_face.py
- The camera opens and detects a face in real-time.
- The system analyzes facial landmarks to check for a smile.
- Once a smile is detected, it captures and saves the image automatically.
- The captured image is stored in the project folder (
Capture Smiling Face
).
Captured images are saved in:
C:\Users\Vaishnavi\Desktop\Capture Smiling Face
To change this location, modify the save path in capture_smiling_face.py
.
If you would like to contribute:
- Fork the repository.
- Create a new branch:
git checkout -b feature-branch
. - Commit your changes:
git commit -m 'Add new feature'
. - Push to the branch:
git push origin feature-branch
. - Open a Pull Request.
This project is open-source and available under the MIT License.