This project will detect faces and face features such as eyes & mouth. It will identify faces, and apply different filters and/or objects relative to the face dependent on whose face it is (also different actions like smiling may trigger swapping filters). The program will be implemented in Python. We will be experimenting with different algorithms for face detection/recognition and comparing the results.
This code was tested on the following OS:
- macOS Big Sur v.11.4
- macOS Monterey v.12.3.1
- Windows 11
and in general should run on any machine with python 3.9 and required modules
Assuming you have python3.9 and pip installed, before you potentially alter an existing python environment you have, you'll probably want to create a new virtual environment. Once it's activated, install the necessary modules in requirements.txt by running
pip install -r requirements.txt
On macOS, in general, users should be able to run liveRecognition.py with no command line arguments.
python liveRecognition.py
On Windows, if this doesn't work, you'll want to try
python liveRecognition.py windows
If you've installed the EpocCam driver on your computer (which allows you to use your iPhone camera input), you may need to specify that you still actually want to use your webcam.
python liveRecognition.py webcam
Key | Action |
---|---|
p | pause |
b | toggle bounding box |
n | toggle displaying name |
f | toggle filters |
0 | turn everything off |
1 | draw all boxes |
2-6 | recognition model mode |
q | quit |