Coder Social home page Coder Social logo

fast_face_finder's Introduction

Fast Face Finder

Finds faces at an url

Description

Finds all faces on images at the specified URL. Based on FastAPI library for serving HTTP endpoint. It uses dlib library for face detection and alignment. All the detected images are saved to ./images directory, with a separate subdirectory for each URL parsed.

Configuration is in the config.yml file. Here you can configure the dlib model binary used for face landmarks detection, and the final face image file size.

Usage

Run using the uvicorn:

uvicorn --workers 4 main:app

Docker

  • build Docker image:

docker build -t fast_face_finder .

It will take a while as dlib compiling is a long process.

  • run the container:

mkdir $(pwd)/detected_faces

docker run -d --name fast_face_finder -p 80:80 -v $(pwd)/detected_faces:/app/images fast_face_finder

The -v docker argument is optional. It will mount the host directory ./detected_faces/ into /app/images/ in the container, where all faces images will be collected in.

The container exposes port 80, you can make get requests to it, the endpoint name is faces. It accepts url query argument with the url to parse for images.

Url has to be encoded, you can use https://www.urlencoder.org/ for that.

Example (open in browser):

http://127.0.0.1/faces?url=abc.com

or with wget

wget http://127.0.0.1/faces?url=https%3A%2F%2Fwww.bbc.com%2Fnews%2Fworld-59109186

fast_face_finder's People

Contributors

sergeyleyko avatar

Watchers

 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.