Combining the popular face_recognition library with a simple flask backend that can receive images and respond with the labeled ones, without saving them locally.
pip3 install -r requirements.txt
- To run the server with the sample model
python3 api.py
- To train your own KNN classifier with your dataset, place your images according to the structure below:
images/train/
βββ <person1_name>/
β βββ <someimage1>.jpeg
β βββ <someimage2>.jpeg
β βββ ...
βββ <person2_name>/
β βββ <someimage1>.jpeg
β βββ <someimage2>.jpeg
βββ ...
python3 train.py
The trained model will be placed in the root folder, named as "trained_knn_model.clf"
MIT