Git Product home page Git Product logo

face-postgre's Introduction

Face index with PostgreSQL

A small demo based on ageitgey/face_recognition

Setup

Deps:

pip install py-postgresql face_recognition opencv-python

Start PostgreSQL 9.6 in docker or natively

docker-compose up -d

Initialize DB

python db.py

Usage

Add images to index

python face-add.py <image.jpg>
python face-add.py ../lfw/Bill_Clinton/Bill_Clinton_0009.jpg 
Found 1 faces in the image file ../lfw/Bill_Clinton/Bill_Clinton_0009.jpg
- Face #0 found at Left: 86 Top: 96 Right: 175 Bottom: 186


python face-add.py ../lfw/John_Malkovich/John_Malkovich_0001.jpg 
Found 1 faces in the image file ../lfw/John_Malkovich/John_Malkovich_0001.jpg
- Face #0 found at Left: 76 Top: 86 Right: 165 Bottom: 176


python face-add.py ../lfw/Bill_Gates/Bill_Gates_0006.jpg 
Found 1 faces in the image file ../lfw/Bill_Gates/Bill_Gates_0006.jpg
- Face #0 found at Left: 67 Top: 80 Right: 175 Bottom: 187

Search for face by image

python face-find.py <image.jpg>
python face-find.py ../lfw/John_Malkovich/John_Malkovich_0003.jpg 
Found 1 faces in the image file ../lfw/John_Malkovich/John_Malkovich_0003.jpg
- Face #0 found at Left: 67 Top: 68 Right: 175 Bottom: 175
[('../lfw/John_Malkovich/John_Malkovich_0001.jpg',)]


python face-find.py ../lfw/Bill_Clinton/Bill_Clinton_0002.jpg 
Found 1 faces in the image file ../lfw/Bill_Clinton/Bill_Clinton_0002.jpg
- Face #0 found at Left: 86 Top: 86 Right: 175 Bottom: 176
[('../lfw/Bill_Clinton/Bill_Clinton_0009.jpg',)]

face-postgre's People

Contributors

vearutop avatar

Watchers

 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.