项目作者: ash2703

项目描述 :
REST API for face recognition
高级语言: Python
项目地址: git://github.com/ash2703/Face-Recognition-Api.git
创建时间: 2020-06-30T22:49:49Z
项目社区:https://github.com/ash2703/Face-Recognition-Api

开源协议:

下载


Face-Recognition-API

Utilising the face recognition library built on top of dlib to create a REST API using Flask


Dependencies:

  • Python 3.6
  • Visual Studio Build Tools
  • Face-recognition
  • openCV
  • dlib
  • cmake
  • flask

Setup Build Environment

  • Clone the repository

    1. git clone https://github.com/ash2703/Face-Recognition-Api.git

    Navigate to the root of the above cloned repo.

  • Install Dependencies

    Refer this for detailed instructions

  1. ```
  2. CMake : https://cmake.org/download/
  3. Visual Studio : https://visualstudio.microsoft.com/visual-cpp-build-tools/
  4. Add Cmake to system PATH
  5. pip install -r requirements.txt
  6. ```
  • Create Face Database

    Follow this directory structure, store multiple photos of same person in a single folder

    1. face_gallery
    2. ├───person
    3. photo1.jpg
    4. photo2.jpg
    5. ├───obama
    6. obama.jpg
    7. └───trump
    8. donald-trump-premiere-king-kong
    9. trump.jpg

Testing the pipleine

1. Face Recognition

To run the recogniton alone

  1. python recognizer.py

2. Recogniton API

  1. python api.py #Run the api
  2. curl -XPOST -F "file=@sample/obamas.jpg" http://127.0.0.1:5001