Skip to content

atkei/deepface-grpc-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deepface gRPC Server

Biometric face feature extraction, matching and verification gRPC server implementation using Deepface.

Prerequisite

  • Python 3.10
  • PostgreSQL

How to Run

Install dependencies.

pip install pipenv
pipenv install
pipenv shell

Start the PostgreSQL server.
The following is an example for using Docker Compose.

cd docker
docker-compose up -d postgres

Run the database migration.

cd server
piccolo migrations forwards face_service 

Start the server.

python server.py

Docker Build and Run

Build a docker image.

docker build face-service -t face-service .

Run the server as a docker container.

cd docker
docker-compose up -d

Configuration

Support the following environment variables.

Name Description Default
FACE_SERVICE_LISTEN_PORT gRPC server listen port 50051
FACE_SERVICE_LOG_LEVEL Logging level (INFO, DEBUG) INFO
FACE_SERVICE_SIM_METRICS Similality metrics of face matching (cosine, euclidean, euclidean_l2) cosine
FACE_SERVICE_SIM_THRESHOLD Similality threshold of face matching 0.5
FACE_SERVICE_RECOGNITION_MODEL Face recognition model for matching and verification (Facenet, VGG-Face, Facenet512, ArcFace, OpenFace) Facenet
FACE_SERVICE_DETECT_BACKEND Face detection backend (opencv, ssd, mtcnn, retinaface) opencv
FACE_SERVICE_DB_NAME Database name face_db
FACE_SERVICE_DB_USER Database username postgres
FACE_SERVICE_DB_PASS Database password postgres
FACE_SERVICE_DB_HOST Database host localhost
FACE_SERVICE_DB_PORT Database port 35432
FACE_SERVICE_DB_MAX_POOL_SIZE Database maximum connection pool size 20

About

gRPC server implementation using deepface

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published