A repo containing two projects. One is a Siamese neural net for training a face recognition system. This architecture is specifically designed to handle tasks that involve finding similarities or relationships between two distinct inputs. The aim is to learn a feature representation that can then be used to compare two inputs meaningfully. The architecture consists of two identical subnetworks that process the input data separately.
pip3 install opencv-python numpy keras tensorflow PIL
# then:
./app.py # Opens video feed
The second project is a small ML program that makes use of keras/tensorflow and OpenCV for recognition of facial expressions.
This program makes use of Cascade Classifier Training (CCT).
The code uses pretrained Haar Cascade models to detect faces in the live feed. The necessary XML file is loaded using the CascadeClassifier loading method. The detection is then performed by the detectMultiScale method, which returns boundary rectangles for the detected face. Since the Haar Cascade function is trained on images in grayscale, the code also converts each frame from the feed into grayscale - these are then cropped for the faces in the image.
Some more information on the method used can be found in this helpful video on OpenCV Face Detection
pip3 install opencv-python numpy keras tensorflow PIL
# then:
./recognition-runner.py # Opens video feed