A recent positive development in machine learning has been the availability of fast and accurate methods for detecting and recognizing human faces in an image. Given a photograph, we would like to know where the human faces (if any) are located in the photograph, as well as the approximate shape of each face. This is an import first step for face recognition, biometrics, and instant messaging apps that allow animal parts to be overlaid onto human faces.
Baresoil can be used to quickly turn standard command-line programs into scalable web services. For this benchmark, Adam Geitgey's Modern Face Recognition with Deep Learning Python tutorial is adapted into a Baresoil server-side function using approximately 100 lines of Python from the tutorial.
The images on the right show the location of facial features extracted from each face found in the left image. Each yellow box represents a face, and facial features are outlined in red.
The adapted code is deployed to a Baresoil cluster consisting of 5 c4.8xlarge AWS EC2 instances. As of Wed Aug 09 2017 20:30:52 GMT-0700 (PDT), the overall throughput of this cluster was measured at 633 gigabytes per hour of image data analyzed for faces, for a total cost of $8.58 USD per hour. The code and data repository contains the Baresoil adaptation of Adam Geitgey's tutorial.
|Images processed per hour||120100|
|Image data processed per hour||633 GB|
|Cluster cost per hour (on-demand)*||$8.58 USD|
|Cluster cost per hour (reserved)||$5.66 USD|
* Using 5 on-demand EC2 c4.8xlarge instances in us-east-2, priced at $1.591 per hour, RDS on-demand costs of $0.095 per hour, ELB costs of $0.025 per hour and $0.008 per gigabyte transferred. Pixel resolution of all test images is approximately 3840x2160 (i.e., 4K video frame).