Tired of manually verifying faces aganist ID manually? Here, as a part of the Image Processing and Recognition class, we improvise an advanced facial recognition that could be deployed quickly on any machine with a Python enviroment.
This script can automatically verifying in real-time a face and comparing against an uploaded photo ID (passport, driver license, student ID, etc).
The script works in 3 stages:
- Automatically detecting facial features from photo ID using OpenCV built-in classifier
- Automatically capturing and extracting real-time facial data
- Comparing extracted facial features from photo ID and real-time data using [DeepFace]
- Clone the repo or download the repo as zip file. (IMPORTANT: Running only the Main.py or GUI.py will result in error, see Program Structure for more information)
- Install the following librabies:
- Run the program from
GUI.py
. - A pop-up will appear as follows:
- Click on the "Upload Photo" button to upload a photo ID.
- Click on the "Capture Photo from Webcam" to continue.
- The webcam will open. Look straight at the webcam. When ready, press Enter to continue.
- Press "Verify" to complete the process.
- Why the program does not work well when I wear glasses? The program does not work well when comparing faces with and without glasses. This problem is most likely happend if you use an ICAO 9303-compliant document issued after 2016, such as passport or enhanced driver license.