All Projects → urandu → face_detect_api

urandu / face_detect_api

Licence: LGPL-3.0 license
This is a simple face detection api that takes as input, an image and gives as output, detected faces on the image. This API can be used as an alternative to the paid face detection APIs currently available as it gives quite good accuracy levels.

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to face detect api

Face-Recognition-Jetson-Nano
Recognize 2000+ faces on your Jetson Nano with database auto-fill and anti-spoofing
Stars: ✭ 63 (+142.31%)
Mutual labels:  face-detection, mtcnn-face-detection
Face-Recognition-Raspberry-Pi-64-bits
Recognize 2000+ faces on your Raspberry Pi 4 with database auto-fill and anti-spoofing
Stars: ✭ 48 (+84.62%)
Mutual labels:  face-detection, mtcnn-face-detection
minio-boshrelease
MinIO release for http://bosh.io/
Stars: ✭ 31 (+19.23%)
Mutual labels:  minio
gitlab-chart
Kubernetes Helm chart to deploy GitLab
Stars: ✭ 59 (+126.92%)
Mutual labels:  minio
facetool
Command line utility to manipulate faces in videos and images
Stars: ✭ 38 (+46.15%)
Mutual labels:  face-detection
Face-Recognition
Machine Learning project to recognise faces from an Image just like facebook or video stream
Stars: ✭ 95 (+265.38%)
Mutual labels:  face-detection
Face-alignment-Trees
This is the C++ implement of the paper: Face Detection, Pose Estimation, and Landmark Localization in the Wild
Stars: ✭ 17 (-34.62%)
Mutual labels:  face-detection
Face-Recognition-using-Raspberry-Pi
A small project which does face detection using OpenCV library.
Stars: ✭ 48 (+84.62%)
Mutual labels:  face-detection
WreckFaceApp
Android application for gender, age and face recognition using OpenCV and JavaCV libraries
Stars: ✭ 21 (-19.23%)
Mutual labels:  face-detection
OpenCV-Face-Recognition-Android
Face Detection & Recognition on Android using OpenCV
Stars: ✭ 28 (+7.69%)
Mutual labels:  face-detection
face-recognition
🙂 An OpenCV application that can detect & recognize your face in real-time
Stars: ✭ 13 (-50%)
Mutual labels:  face-detection
Face-Mask
Real time webcam face detection, protect yourself from COVID19 with a virtual mask
Stars: ✭ 64 (+146.15%)
Mutual labels:  face-detection
minback-postgres
A container which provides the ability to backup a PostgreSQL database to Minio on demand
Stars: ✭ 18 (-30.77%)
Mutual labels:  minio
Face-Detection-and-Tracking
Computer Vision model to detect face in the first frame of a video and to continue tracking it in the rest of the video. This is implemented in OpenCV 3.3.0 and Python 2.7
Stars: ✭ 24 (-7.69%)
Mutual labels:  face-detection
T System
the moving objects tracking system via two axis camera motion (and as optionally n joint robotic arm) for raspberry pi distributions
Stars: ✭ 17 (-34.62%)
Mutual labels:  face-detection
fss3
FSS3 is an S3 filesystem abstraction layer for Golang
Stars: ✭ 52 (+100%)
Mutual labels:  minio
jeelizGlanceTracker
JavaScript/WebGL lib: detect if the user is looking at the screen or not from the webcam video feed. Lightweight and robust to all lighting conditions. Great for play/pause videos if the user is looking or not, or for person detection. Link to live demo.
Stars: ✭ 68 (+161.54%)
Mutual labels:  face-detection
insight-face-paddle
End-to-end face detection and recognition system using PaddlePaddle.
Stars: ✭ 52 (+100%)
Mutual labels:  face-detection
metalnetes
Create and manage multiple Kubernetes clusters using KVM on a bare metal Fedora 29 server. Includes helm + rook-ceph + nginx ingress + the stock analysis engine (jupyter + redis cluster + minio + automated cron jobs for data collection) - works on Kubernetes version v1.16.0 - 1.16.3 was not working
Stars: ✭ 37 (+42.31%)
Mutual labels:  minio
Facial-Recognition-Tool
➰ A Facial Recognition tool based on Open-CV.
Stars: ✭ 44 (+69.23%)
Mutual labels:  face-detection

Maintainability Docker build and push

Face Detect API

This is a simple face detection api that takes as input, an image and gives as output, detected faces on the image. This API can be used as an alternative to the paid face detection APIs currently available as it gives quite good accuracy levels. the technologies used include:

  • Django
  • Docker
  • TensorFlow with MTCNN model
  • Minio
  • PostgreSQL
  • RabbitMQ
  • Redis
  • Celery

Architecture

The architecture used is a micro-service architecture with asynchronous processing of requests. The diagram below highlights the architecture used;

alt text

Local Deployment

To deploy the API locally, run the following commands

  • Clone this repo git clone https://github.com/urandu/face_detect_api.git

  • cd face_detect_api

  • Run docker-compose up

  • Wait for the necessary docker images to be pulled and started

  • On a different terminal, run docker-compose run api python manage.py makemigrations

  • Then run docker-compose run api python manage.py migrate

  • (Optional) create superuser by running docker-compose run api python manage.py createsuperuser you will be prompted for a username, email and password. these are the admin credentials for django admin

  • To test our API, we shall send a post request to the endpoint http://localhost:8900/api/image/

curl -i -X POST -H "Content-Type: multipart/form-data" 
-F "request_id=12345" -F "callback_url=<replace with requestbin.com endpoint>" -F "image=<path to image>" http://localhost:8900/api/image/

  • callback response
{
    "image_id": "0a5a49c6-18dc-4b3a-b984-70476280aa13",
    "request_id": "123456789",
    "faces": [
        {
            "confidence": "0.9999778270721436",
            "box": "[205, 130, 34, 44]",
            "keypoints": "{'left_eye': (216, 146), 'right_eye': (233, 148), 'nose': (224, 157), 'mouth_left': (216, 165), 'mouth_right': (230, 166)}"
        },
        {
            "confidence": "0.9999626874923706",
            "box": "[652, 132, 35, 43]",
            "keypoints": "{'left_eye': (662, 151), 'right_eye': (678, 148), 'nose': (670, 156), 'mouth_left': (666, 167), 'mouth_right': (679, 165)}"
        },
        {
            "confidence": "0.9999274015426636",
            "box": "[564, 338, 38, 45]",
            "keypoints": "{'left_eye': (576, 355), 'right_eye': (595, 355), 'nose': (586, 364), 'mouth_left': (577, 374), 'mouth_right': (593, 374)}"
        },
        {
            "confidence": "0.9998524188995361",
            "box": "[491, 154, 31, 40]",
            "keypoints": "{'left_eye': (501, 170), 'right_eye': (516, 170), 'nose': (509, 177), 'mouth_left': (502, 186), 'mouth_right': (515, 186)}"
        },
        {
            "confidence": "0.9997138381004333",
            "box": "[294, 253, 33, 41]",
            "keypoints": "{'left_eye': (303, 269), 'right_eye': (319, 267), 'nose': (310, 277), 'mouth_left': (304, 285), 'mouth_right': (319, 284)}"
        },
        {
            "confidence": "0.9995110034942627",
            "box": "[293, 134, 34, 45]",
            "keypoints": "{'left_eye': (304, 150), 'right_eye': (321, 151), 'nose': (313, 161), 'mouth_left': (305, 168), 'mouth_right': (320, 169)}"
        },
        {
            "confidence": "0.999414324760437",
            "box": "[406, 69, 33, 40]",
            "keypoints": "{'left_eye': (414, 83), 'right_eye': (431, 82), 'nose': (423, 89), 'mouth_left': (417, 100), 'mouth_right': (431, 99)}"
        },
        {
            "confidence": "0.9993127584457397",
            "box": "[418, 246, 40, 51]",
            "keypoints": "{'left_eye': (429, 265), 'right_eye': (449, 266), 'nose': (438, 275), 'mouth_left': (430, 286), 'mouth_right': (446, 287)}"
        },
        {
            "confidence": "0.9989363551139832",
            "box": "[733, 160, 40, 51]",
            "keypoints": "{'left_eye': (743, 180), 'right_eye': (763, 180), 'nose': (751, 189), 'mouth_left': (744, 200), 'mouth_right': (761, 200)}"
        },
        {
            "confidence": "0.995890200138092",
            "box": "[575, 248, 31, 39]",
            "keypoints": "{'left_eye': (585, 262), 'right_eye': (601, 262), 'nose': (593, 269), 'mouth_left': (585, 277), 'mouth_right': (598, 278)}"
        }
    ],
    "output_image_url": "localhost:8900/api/image/?image_id=0a5a49c6-18dc-4b3a-b984-70476280aa13"
}

Below is an example image we used:

input image

alt text

output image

alt text

Please take a look at this medium article on how we developed the API

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].