go-faces

command module
v0.0.0-...-b919544 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2024 License: CC0-1.0 Imports: 17 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

faces

wakatime Code lines Comments

Face detection HTTP microservice based on dlib.

Installation

Portable statically-linked binary for Linux AMD64 is available on releases.

wget https://github.com/vearutop/faces/releases/latest/download/linux_amd64.tar.gz && tar xf linux_amd64.tar.gz && rm linux_amd64.tar.gz
./faces -h

It is also available as docker image.

docker run --rm -p 8011:80 vearutop/faces

If you want to build the app from source, please follow the instructions on dependencies setup.

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.

curl -X 'POST' \
  'http://localhost:8011/image' \
  -H 'accept: application/json' \
  -H 'Content-Type: multipart/form-data' \
  -F 'image=@faces.jpg;type=image/jpeg'
{
  "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 <https://github.com/davisking/dlib-models>__ and are licensed in the public domain or under CC0 1.0 Universal. See LICENSE.

Documentation

Overview

Package main implements faces app.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址