https://github.com/andriykalashnykov/go-faces-http
Face detection HTTP microservice based on dlib
https://github.com/andriykalashnykov/go-faces-http
dlib dlib-face-detection dlib-face-recognition dlib-library go golang
Last synced: 4 months ago
JSON representation
Face detection HTTP microservice based on dlib
- Host: GitHub
- URL: https://github.com/andriykalashnykov/go-faces-http
- Owner: AndriyKalashnykov
- License: cc0-1.0
- Created: 2024-10-19T04:28:58.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2026-01-28T20:43:55.000Z (5 months ago)
- Last Synced: 2026-01-29T02:52:07.156Z (4 months ago)
- Topics: dlib, dlib-face-detection, dlib-face-recognition, dlib-library, go, golang
- Language: Go
- Homepage:
- Size: 97.4 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://hits.sh/github.com/AndriyKalashnykov/go-faces-http/)
[](https://creativecommons.org/publicdomain/zero/1.0/)
[](https://app.renovatebot.com/dashboard#github/AndriyKalashnykov/go-faces-http)
# go-faces-http
Face detection HTTP microservice based on [`dlib`](https://github.com/davisking/dlib-models).
## Installation
Portable statically-linked binary for Linux AMD64 is available
on [releases](https://github.com/AndriyKalashnykov/go-faces-http/releases).
```
wget https://github.com/AndriyKalashnykov/go-faces-http/releases/download/latest/linux_amd64.tar.gz && tar xf linux_amd64.tar.gz && rm linux_amd64.tar.gz
./faces -h
```
It is also available as a docker image.
```
docker run --rm -p 8011:80 ghcr.io/andriykalashnykov/go-faces-http:v0.0.9
```
If you want to build the app from source, please follow the instructions on
[dependency setup](https://github.com/Kagami/go-face?tab=readme-ov-file#requirements).
## Usage
```
./faces -h
Usage of ./faces:
-listen string
listen address (default "localhost:8011")
```
Start server.
```
./faces
2024/01/15 23:44:22 recognizer init 424.357089ms
2024/01/15 23:44:22 http://localhost:80/docs
```
Send request.
```
mkdir ~/projects && cd ~/projects
git clone https://github.com/AndriyKalashnykov/go-faces-http
cd ~/projects/go-faces-http
curl -X 'POST' \
'http://localhost:8011/image' \
-H 'accept: application/json' \
-H 'Content-Type: multipart/form-data' \
-F 'image=@person.jpg;type=image/jpeg'
```
```json
{
"elapsedSec": 2.373028184,
"found": 4,
"faces": [
{
"Rectangle": {
"Min": {
"X": 584,
"Y": 1228
},
"Max": {
"X": 1029,
"Y": 1673
}
},
"Descriptor": [
-0.122200325,
0.10511437,
0.05358115,
0.011272355,
-0.09460048,
"............. cut here ..........."
]
}
]
}
```
This repo contains models, that were created by [Davis King dlib-models](https://github.com/davisking/dlib-models) and are
licensed in the public domain or under CC0 1.0 Universal. See [LICENSE](./LICENSE).
### References
* [Building a platform-specific executable with Docker Image and uploading to GiHub releases](https://dev.to/vearutop/building-a-portable-face-recognition-application-with-go-and-dlib-12p1)