Public | Automated Build

Last pushed: 2 months ago
Short Description
An openface script that runs a REST server
Full Description


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


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


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


Adapted from which is licenced under the Apache License, Version 2.0 and Copyright 2015-2016 Carnegie Mellon University

Docker Pull Command