Skip to content

An openface script that runs a REST server. Posted images are compared against a large dataset, and the most likely match is returned. Works with https://hub.docker.com/r/uoacer/openface-mass-compare/

License

Notifications You must be signed in to change notification settings

UoA-eResearch/openface_mass_compare

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

openface_mass_compare

An openface script that runs a REST server. Posted images are compared against a large dataset, and the most likely match is returned. Works with https://hub.docker.com/r/uoacer/openface-mass-compare/

Setup

Create a folder called "images". Create a folder for each person, and place at least one image for each person in their folder
Optionally, add a file called "data.json" containing additional information about each person in the same folder as this script
This folder containing your images directory and data.json should be mounted into the container as /root/data when you run the below docker run command in this directory

Installation

sudo su
apt-get install docker
docker pull uoacer/openface-mass-compare
docker run --name=omc --restart=always --detach=true --volume="`pwd`:/root/data" --publish="8000:8000" --net=host uoacer/openface-mass-compare
The volume command mounts the real directory on the left of the colon to the /root/data directory in the container
The first time you run this, it'll create a 2D matrix, where each element is an image from the images folder, processed by the Torch7 network
Once it's done, it'll save the result to data.pickle, for faster startup next time. For a dataset of 3678 images building this pickle file takes ~6.8 minutes
To view the logs, run the command
docker logs -f omc
To test, run
time curl localhost:8000 --data-binary @image.jpg -vv

Credits

Adapted from https://github.com/cmusatyalab/openface/blob/master/demos/compare.py which is licenced under the Apache License, Version 2.0 and Copyright 2015-2016 Carnegie Mellon University

About

An openface script that runs a REST server. Posted images are compared against a large dataset, and the most likely match is returned. Works with https://hub.docker.com/r/uoacer/openface-mass-compare/

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published