Face Detection service provides simple API to detect faces on given image. Service will also detect eyes (pupil) points and mouth area for every detected face.
The actual API has only 1 endpoint which requires no authentication.
Method | Endpoint | Description |
---|---|---|
GET | /v1/facedetection/:image_url_base64_encoded* | Detect faces on given image and returns json response |
*provided image URL should be base64 encoded
Example request:
curl http://localhost:8080/v1/facedetection/aHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL2VzaW1vdi9waWdvL21hc3Rlci90ZXN0ZGF0YS9zYW1wbGUuanBn
Example response:
{
"faces": [
{
"bounds": {
"x": 573,
"y": 79,
"height": 52,
"width": 52
},
"mouth": {
"x": 596,
"y": 125,
"height": 1,
"width": 18
},
"left_eye": {
"x": 595,
"y": 103,
"scale": 0
},
"right_eye": {
"x": 615,
"y": 103,
"scale": 0
}
},
...
]
}
It's super simple, service has no configuration required to start.
Clone the project and then run this command inside the project folder:
go run ./cmd/facedetection/
In order to see demo for the service, run the service locally and visit Demo page
go test -v github.com/bugimetal/facedetection/...