Code Monkey home page Code Monkey logo

faced's Introduction

Face Detection Web API

Face Detection Web API is written on Go. The detection approach is powered by github.com/esimov/pigo library. The library gives good results out of the box and it's free of charge :)

Installation

The API spec is implemented in go-swagger 2.0.

Install go-swagger with brew (visit https://goswagger.io/install.html for more options):

$ brew tap go-swagger/go-swagger
$ brew install go-swagger

Get the app:

$ go get -u github.com/regeda/faced

Development

API Spec

Run go generate to get "go" code if swagger.yml changed.

Run the web server:

$ ./run.sh

or

$ go run cmd/face-detection-app-server/main.go \
  --port=5555 \
  --pigo-cascade-file=internal/pigo/cascade/facefinder \
  --pigo-puploc-file=internal/pigo/cascade/puploc \
  --pigo-flploc-dir=internal/pigo/cascade/lps

Run go run cmd/face-detection-app-server/main.go --help for more options

Then navigate to http://127.0.0.1:5555/docs in your preferred browser.

Tests

Put your commands in generate.go file if you require mocks for tests. Then run go generate.

Deployment

Face Detection Web API is a cloud-enabled web service. No 3d-party APIs required. You can pack the application into the Docker image and spin up containers in the Kubernetes cluster.

Optimizations

To reduce CPU utilization of the server, the web service can be run behind a caching reverse proxy (aka Squid, Varnish, Nginx). Because of the HTTP handler for faces detection is implemented as HTTP GET method and the detection algorithm is based on a static data model.

faced's People

Contributors

regeda avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.