Skip to content

Latest commit

 

History

History
67 lines (46 loc) · 2.38 KB

README.en.md

File metadata and controls

67 lines (46 loc) · 2.38 KB

Lao document version | English document version

face_recon

face_recon is a RESTful API implementing face recognition system developed with Python and Flask framework which can connect to IP camera that support RTSP protocol.

Note: Still in development, several bugs may occurs

demo

Concept

face_recon is a RESTful API managing data for identification, e.g. a picture with face. Using face verification principle to identify, retrieving person picture in database to compare with target picture by calculating distance between face embedding vector.

Dashboard

face_recon has Web UI for easily use. Visit facerecon_dashboard for more information.

Installation

Requirements

Clone this repo and then run following command to install required dependencies:

pip3 install -r requirements.txt

Usage

Start web server with following command:

python3 app.py

Testing with Webcam

Assuming you don't have IP camera and you want to test via webcam, you can do so by editing IpcameraStream.py, change url to number or IO path of camera e.g. 0 or /dev/video0 for Linux and macOS.

class IpcameraStream:
    def __init__(self, uri):
        self.stream = cv2.VideoCapture(0) # Edit here
        self.stream.set(cv2.CAP_PROP_FRAME_WIDTH, 640)
        self.stream.set(cv2.CAP_PROP_FRAME_HEIGHT, 480)
        self.stream.set(cv2.CAP_PROP_BUFFERSIZE, 3)
        ....

TODO

  • Change face reognition model to VGGFACE2
  • Optimize stream camera
  • Create production setup
  • Create Docker setup
  • Improve english readme (this doc)
  • Write test
  • Add support usb camera
  • Support store and calculate distance face embedding in database