Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

tolgasumer/face-api

Open more actions menu

Repository files navigation

Face API

Version License: MIT

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.

💾 Install

pip3 install -r requirements.txt

🚀 Usage

  • 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"

  • Send POST requests to the /upload endpoint with a file on them as form-data Postman

Sample results of using it as the backend of a web page

Frontend

📝 License

MIT


About

Combining the popular face_recognition library with a simple flask backend

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.