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