GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - peshmerge/facebox_python: A python interface to interact with the great Machinebox/Facebox

BranchesTags
Open more actions menu

Latest commit

 

History

16 Commits
16 Commits

Folders and files

NameName
Last commit message
Last commit date
obama
obama
 
 
trump
trump
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
Roboto-Bold.ttf
Roboto-Bold.ttf
 
 
check.py
check.py
 
 
failed_log.txt
failed_log.txt
 
 
obama1.jpg
obama1.jpg
 
 
obama2.jpg
obama2.jpg
 
 
obama3.jpg
obama3.jpg
 
 
obama4.jpg
obama4.jpg
 
 
obama5.jpg
obama5.jpg
 
 
requirements.txt
requirements.txt
 
 
teach.py
teach.py
 
 
trump1.jpg
trump1.jpg
 
 
trump2.jpg
trump2.jpg
 
 
trump3.jpg
trump3.jpg
 
 
trump4.jpg
trump4.jpg
 
 

Repository files navigation

facebox_python

License: MIT Build Status

A python interface to interact with the great Machinebox/Facebox. At the moment I have implemented only two endpoints:

1. facebox/teach
2. facebox/check

The reason I have written this interface is because I wanted to teach the facebox multiple people together, and because I wanted to get the result of recognition task facebox/check as an image with boxes around the detected faces.

Usage:

  1. Signup for a free account on Machinebox/Facebox.
  2. Run the docker-image using

docker run -p 8080:8080 -e "MB_KEY=$MB_KEY" machinebox/facebox

Don't forget to add the MB_KEY to your path or ~/.bashrc file on Linux. Check documentation on how to do that.

  1. from the commandline call either teach.py or check.py

Teach endpoint

To teach the facebox a person/face you have to make a folder with the name of the person. The dataset structure should look like this:

Dataset structure
person_1/
    img1.jpg
    img2.jpg
    ........
person_2/
    image1.png
    image2.png
    ..........
person_3/
    image1.jpeg
    image2.jpeg
    ..........    
..........

Allowed extensions for training/teaching are: .jpg, .png and .jpeg

Remember with a free license of Machinebox/Facebox you are allowed to teach only 20 faces.

Then just call teach.py from the command line At the end of the teaching process the file failed_log.txt will be written down. The file keep tracks of all failed teaching images/faces. So you can then check why an image has failed to be recognized or taught!

Check endpoint

You can the file check.py --file [filename_path] --save [yes or No]

--file argument:

you need to specify the iamge/path to the image you want to check

--save argument:

this is used to save the returned image from the facebox. If you give it yes it will save a copy the returned image with recognition boxes on the disk with the name machinebox-ORIGINAL_FILENAME.jpg. Or give it no and it will only display the returned image without saving it.

For example if you want to test the image trump1.jpg then you have to execute this command py check.py --image trump1.jpg --save no I don't want to save the image, I just want to see it

Note: py command is shortcut for my python3.6 on Ubuntu 18.04

License

MIT License

About

A python interface to interact with the great Machinebox/Facebox

Resources

Readme
MIT license
Activity

Stars

9 stars

Watchers

2 watching

Forks

4 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.