This is a Flask web application that uses OpenCV to apply virtual glasses filtering to a live video feed from a user's webcam, using facial recognition and gesture recognition.
- Developers: 1. Minghui Zhu ; 2. Congcong Ma; 3. Thomas Barker.
- Mentor: JJ Je. (Shout out to Duke Ignite organizers and mentors!)
Developers Selfie with Glasses Filtering😎.
- Uses OpenCV to track the user's face in real-time, detecting facial landmarks such as the eyes.
- Applies virtual glasses filtering to the user's face in the video feed, based on the detected eyes coordinates.
- Uses handing tracking and gesture recognition to allow the user to switch between different types of glasses by making specific hand gestures in front of the webcam:
- fingers up: keep changing glasses;
- fingers down: stop.
- Supports multiple types of glasses, each with their own unique style and design.
- Resizes the video feed to half the original size to improve performance.
- Allows mutliple faces and fits multiple glasses.
- Clone the repository to your local machine.
- Install the required Python packages.
- Download the pre-trained facial landmark detection model from dlib here and place it in the root directory of the project.
- Run the application by executing python app.py.
- Open a web browser and navigate to http://localhost:5050.
- Allow the application to access your webcam.
- The live video feed should now appear in the browser window with virtual glasses applied to your face.
- Make specific hand gestures in front of the webcam to switch between different types of glasses.
- Improve the accuracy of the gesture landmark detection when the background and the hands are in the same color.
- Handle the issues it run slowly on some laptops.
- Deploy it.