- Chan Yu Yan, Sam
- Kwan Man Hei, Andy
- Srivastava Dhruv
- Tamanna Singhal
- Oshi Garg
Run the facerecognition.sql file. This will create a new database comp3278gr6, with some dummy data for the application.
Create virtual environment using Anaconda with the help of the requirements.txt file provided (make 3.x the latest stable Python version).
conda create -n face python=3.x
conda activate face
pip install -r requirements.txt
Activate the environment once ready.
Run the face_capture.py script to capture images for the user. As the dummy data already has entries for customers, please train the model according to the order in which the customers are present in the table by changing the value of the user_name variable to the names appearing in the customer table (the first name has already been added in the script). Before running the script, please ensure that a directory named data is present (the script may cause errors if the directory is not present).
"""
user_name = "Dhruv" # the name
NUM_IMGS = 400 # the number of saved images
"""
python face_capture.py
Run the train.py script to train the model.
python train.py
train.yml and labels.pickle will be created at the current folder.
Before running the DF_App.py script, please connect the script with the database by changing user and passwd values as follows (where xxxxx is the password of the user's root):
# create database connection
myconn = mysql.connector.connect(host="localhost", user="root", passwd="xxxxx", database="comp3278gr6")
Run the DF_App.py script to run the application (it may take some time to start). Please refer to the demo video on how to use the application.
python DF_App.py
Note: Use python3 instead of python to run the python scripts depending on your PATH environment variable.