-
- Using SSH:
git clone git@github.com:vijuSR/face_recognition.git
OR - Using HTTP:
git clone https://github.com/vijuSR/face_recognition.git
- Using SSH:
-
- Create the virtual environment
python3 -m venv </path/to/venv>
- Activate your virtual-environment
- Linux:
source </path/to/venv>/bin/activate
- Windows:
cd </path/to/venv>
then.\Scripts\activate
- Linux:
- Install the requirements
cd <root-dir-of-project>
pip install -I -r requirements.txt
- Create the virtual environment
-
STEP 0: Configurations
- There are two supported databases: sqlite and postgres
- Current setting is to use sqlite. For using postgres change SQLALCHEMY_SQLITE in this line to SQLALCHEMY_POSTGRES
- Also, if you are using postgres, change the config.ini file accordingly.
- In 'config.ini' file and change the path to "haarcascade_frontalface_default.xml" file path on your system. For example on my system it's: > "G:/VENVIRONMENT/computer_vision/Lib/site-packages/cv2/data/haarcascade_frontalface_default.xml" where > "G:/VENVIRONMENT/computer_vision" is my virtual environment path.
-
STEP 1: Database setup
- Postgres:
- Install postgres, create a database and change 'config.ini' file accordingly.
- Creating required tables:
-
cd </to/repo/root/dir>
- in shell/notebook run
from database_client.database import Operations
Operations.create_tables()
- Postgres:
You can use this project in two ways:
- With flask app:
cd </to/repo/root/dir>
- run
python3 routes.py
- Available endpoints:
- "/": home page, used to upload image for celebs recognition.
- "/face_recognition": result of celeb recognition, can't be accessed directly.
- "/new_celeb": presents a form for adding new celeb in the database.
- "/add_celeb": adds the celebrity to the database.
Disabled the public access to the '\new_celeb' endpoint at demo website: poor-mans-rekognition.herokuapp.com
- Directly the core model package- Checkout the notebook "demo-sqlite.ipynb" (without flask app):
cd </to/repo/root/dir>
- run
jupyter notebook
- click on "demo-sqlite.ipynb"
- Transfer learning on celeb dataset with "Siamese network"
- Accuracy analysis with grayscale facial image captures.
- Better face detection
- Change the result to json
- Extend to multiple faces in an image frame.
- Video processing (recognize celebs in video scenes).
- Top n matching celebs.
- Automate deployment.