Emotion Recognition in the Wild via Convolutional Neural Networks and Mapped Binary Patterns

No algorithm description given

1. Introduction This algorithm gives you the emotion for each person in the given photo with its corresponding confidence interval. Input: (Required) Image Data API Url, Web (http/https) Url, binary image or a base64 encoded image. (Optional) Number of results (default=3, max=7) Output: A list of emotions and bounding-box information for each detected person Note: The first call to this algorithm will take a bit longer than sequential calls to due algorithm initialization. All following calls will be significantly faster. 2. Examples Example 1. Parameter 1: Data API Url { "image": "data://deeplearning/example_data/elon_musk.jpg" } Output { "results": [ { "bbox": { "bottom": 911, "left": 295, "right": 849, "top": 357 }, "emotions": [ {"confidence": 0.9386989, "label": "Happy"}, {"confidence": 0.0483937, "label": "Neutral"}, {"confidence": 0.0120008, "label": "Disgust"} ], "person": 0 } ] } Example 2. Parameter 1: HTTP Url { "image": "https://s3.amazonaws.com/algorithmia-assets/algo_desc_images/deeplearning_EmotionRecognitionCNNMBP/jim_caviezel.jpg" } Output: { "results": [ { "bbox": { "bottom": 1094, "left": 354, "right": 1019, "top": 428 }, "emotions": [ {"confidence": 0.9999458, "label": "Happy"}, {"confidence": 0.0000528, "label": "Neutral"}, {"confidence": 8e-7, "label": "Disgust"} ], "person": 0 } ] } Example 3. Parameter 1: Base64 image { "image": "data:image/png;base64....", } Output; { "results": [ { "bbox": { "bottom": 911, "left": 295, "right": 849, "top": 357 }, "emotions": [ {"confidence": 0.9386989, "label": "Happy"}, {"confidence": 0.0483937, "label": "Neutral"}, {"confidence": 0.0120008, "label": "Disgust"} ], "person": 0 } ] } Example 4. Parameter 1: Data API Url Parameter 2: Number of results { "image": "data://deeplearning/example_data/elon_musk.jpg", "numResults": 7 } Output; { "results": [ { "bbox": { "bottom": 911, "left": 295, "right": 849, "top": 357 }, "emotions": [ {"confidence": 0.9386989, "label": "Happy"}, {"confidence": 0.0483937, "label": "Neutral"}, {"confidence": 0.0120008, "label": "Disgust"}, {"confidence": 0.000406, "label": "Sad"}, {"confidence": 0.0003461, "label": "Fear"}, {"confidence": 0.00015, "label": "Angry"}, {"confidence": 0.0000046, "label": "Surprise"} ], "person": 0 } ] } 3. Credits For more information, please refer to: http://www.openu.ac.il/home/hassner/projects/cnn_emotions/ or Gil Levi and Tal Hassner, Emotion Recognition in the Wild via Convolutional Neural Networks and Mapped Binary Patterns, Proc. ACM International Conference on Multimodal Interaction (ICMI), Seattle, Nov. 2015 dlib/FaceDetection was used to detect faces in given images. Demo images were taken from: https://en.wikipedia.org/wiki/Elon_Musk#/media/File:Elon_Musk_2015.jpg _ https://gl.wikipedia.org/wiki/Jim_Caviezel#/media/File:Jim_Caviezel_SDCC_2013.jpg

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.

Internet access

This algorithm has Internet access. This is necessary for algorithms that rely on external services, however it also implies that this algorithm is able to send your input data outside of the Algorithmia platform.


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/deeplearning/EmotionRecognitionCNNMBP/1.0.0
View cURL Docs
algo auth
# Enter API Key: YOUR_API_KEY
algo run algo://deeplearning/EmotionRecognitionCNNMBP/1.0.0 -d '{{input | formatInput:"cli"}}'
View CLI Docs
import (
  algorithmia "github.com/algorithmiaio/algorithmia-go"
)

input := {{input | formatInput:"go"}}

var client = algorithmia.NewClient("YOUR_API_KEY", "")
algo, _ := client.Algo("algo://deeplearning/EmotionRecognitionCNNMBP/1.0.0")
resp, _ := algo.Pipe(input)
response := resp.(*algorithmia.AlgoResponse)
fmt.Println(response.Result)
View Go 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://deeplearning/EmotionRecognitionCNNMBP/1.0.0");
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://deeplearning/EmotionRecognitionCNNMBP/1.0.0")
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://deeplearning/EmotionRecognitionCNNMBP/1.0.0")
           .pipe(input)
           .then(function(output) {
             console.log(output);
           });
View Javascript Docs
var input = {{input | formatInput:"javascript"}};
Algorithmia.client("YOUR_API_KEY")
           .algo("algo://deeplearning/EmotionRecognitionCNNMBP/1.0.0")
           .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('deeplearning/EmotionRecognitionCNNMBP/1.0.0')
print algo.pipe(input)
View Python Docs
library(algorithmia)

input <- {{input | formatInput:"r"}}
client <- getAlgorithmiaClient("YOUR_API_KEY")
algo <- client$algo("deeplearning/EmotionRecognitionCNNMBP/1.0.0")
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('deeplearning/EmotionRecognitionCNNMBP/1.0.0')
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("deeplearning/EmotionRecognitionCNNMBP/1.0.0");
let response = algo.pipe(input);
View Rust Docs
import Algorithmia

let input = "{{input | formatInput:"swift"}}";
let client = Algorithmia.client(simpleKey: "YOUR_API_KEY")
let algo = client.algo(algoUri: "deeplearning/EmotionRecognitionCNNMBP/1.0.0") { resp, error in
  print(resp)
}
View Swift Docs
Discussion
  • {{comment.username}}