Recognize Faces

No algorithm description given

Uses a trained face recognizer to identify faces. This is a wrapper for the FaceRecognition algorithm.  The FaceRecognition algorithm additionally requires a user to specify a "classify" mode, so this wrapper makes things slightly more convenient.  Users must pass in a list of JSON objects, one for each image.  Each image JSON object must have a "Path" field specifying the image URL (e.g. the path to the image in an Algorithmia collection).  Optionally, it may have a "ID" field with an ID (or label) saying whose face is pictured.  This is useful mainly for academic purposes to evaluate the model; of course in many real-world situations the point of having a face recognizer is to recognize people whose identity is not explicitly labeled already.   (Note: if an image has multiple faces, each face will be classified.  As in the accompanying Train/Update Face Recognizer algorithms, any ID that is provided will be the "ground truth" ID for each face in the image.) Users must also specify the full path to a face recognizer in an Algorithmia data collection (including the name of the face recognizer XML file).  There must also be a map of human IDs to internal numeric labels in a file with the same name plus an "_idList.txt" tag and extension instead of a ".xml" extension. Both files must have the same name and must be in the same directory (the default name is facerec.xml and facerec_idList.txt).  These would both have been created, say, by a run of the companion Train Face Recognizer algorithm.   The output will be in JSON format, where each image path will have a list of predictions--one prediction for each face in the image--in JSON format.  Each prediction will contain: the predicted ID, the actual ID (if known), and the uncertainty, which is actually a distance measure to the nearest match.  Note: the predicted ID will be "Unknown" if the uncertainty is too high (at this time the threshold is 100).  (For clarity, it is obviously highly recommended that "Unknown" not be used as a valid image ID.)

Tags
(no tags)

Cost Breakdown

0 cr
royalty per call
1 cr
usage per second
avg duration
This algorithm has permission to call other algorithms which may incur separate royalty and usage costs.

Cost Calculator

API call duration (sec)
×
API calls
=
Estimated cost
per calls
for large volume discounts
For additional details on how pricing works, see Algorithmia pricing.

Calls other algorithms

This algorithm has permission to call other algorithms. This allows an algorithm to compose sophisticated functionality using other algorithms as building blocks, however it also carries the potential of incurring additional royalty and usage costs from any algorithm that it calls.


To understand more about how algorithm permissions work, see the permissions documentation.

1. Type your input

2. See the result

Running algorithm...

3. Use this algorithm

curl -X POST -d '{{input | formatInput:"curl"}}' -H 'Content-Type: application/json' -H 'Authorization: Simple YOUR_API_KEY' https://api.algorithmia.com/v1/algo/mheimann/RecognizeFaces/0.1.3
View cURL Docs
algo auth
# Enter API Key: YOUR_API_KEY
algo run algo://mheimann/RecognizeFaces/0.1.3 -d '{{input | formatInput:"cli"}}'
View CLI Docs
import com.algorithmia.*;
import com.algorithmia.algo.*;

String input = "{{input | formatInput:"java"}}";
AlgorithmiaClient client = Algorithmia.client("YOUR_API_KEY");
Algorithm algo = client.algo("algo://mheimann/RecognizeFaces/0.1.3");
AlgoResponse result = algo.pipeJson(input);
System.out.println(result.asJsonString());
View Java Docs
import com.algorithmia._
import com.algorithmia.algo._

val input = {{input | formatInput:"scala"}}
val client = Algorithmia.client("YOUR_API_KEY")
val algo = client.algo("algo://mheimann/RecognizeFaces/0.1.3")
val result = algo.pipeJson(input)
System.out.println(result.asJsonString)
View Scala Docs
var input = {{input | formatInput:"javascript"}};
Algorithmia.client("YOUR_API_KEY")
           .algo("algo://mheimann/RecognizeFaces/0.1.3")
           .pipe(input)
           .then(function(output) {
             console.log(output);
           });
View Javascript Docs
var input = {{input | formatInput:"javascript"}};
Algorithmia.client("YOUR_API_KEY")
           .algo("algo://mheimann/RecognizeFaces/0.1.3")
           .pipe(input)
           .then(function(response) {
             console.log(response.get());
           });
View NodeJS Docs
import Algorithmia

input = {{input | formatInput:"python"}}
client = Algorithmia.client('YOUR_API_KEY')
algo = client.algo('mheimann/RecognizeFaces/0.1.3')
print algo.pipe(input)
View Python Docs
library(algorithmia)

input <- {{input | formatInput:"r"}}
client <- getAlgorithmiaClient("YOUR_API_KEY")
algo <- client$algo("mheimann/RecognizeFaces/0.1.3")
result <- algo$pipe(input)$result
print(result)
View R Docs
require 'algorithmia'

input = {{input | formatInput:"ruby"}}
client = Algorithmia.client('YOUR_API_KEY')
algo = client.algo('mheimann/RecognizeFaces/0.1.3')
puts algo.pipe(input).result
View Ruby Docs
use algorithmia::*;

let input = {{input | formatInput:"rust"}};
let client = Algorithmia::client("YOUR_API_KEY");
let algo = client.algo('mheimann/RecognizeFaces/0.1.3');
let response = algo.pipe(input);
View Rust Docs
Discussion
  • {{comment.username}}