deeplearning

deeplearning / DeepFaceRecognition / 1.0.0

README.md

1. Introduction

This is an image classifier specifically trained for classifying celebrities.

Input:

  • (Required) Image Data API Url, Web (http/https) Url, binary image or a base64 encoded image.
  • (Optional) Number of results. (Default=5)

Output:

  • Top N recognized faces.

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/enrico_colantoni.jpg"
}

Output

{
  "results": [
    {"confidence": 0.20158538222312927, "label": "Enrico_Colantoni"},
    {"confidence": 0.044169820845127106,"label": "Lavell_Crawford"},
    {"confidence": 0.03976121544837952,"label": "Rob_Reiner"},
    {"confidence": 0.037657905369997025,"label": "Rob_Corddry"},
    {"confidence": 0.031581733375787735,"label": "Evan_Handler"}
  ]
}

Example 2.

  • Parameter 1: HTTP Url
{
  "image": "https://s3.amazonaws.com/algorithmia-assets/algo_desc_images/deeplearning_DeepFaceRecognition/emerson.png"
}

Output:

{
  "results":[
    {"confidence": 0.9995269775390625,"label": "Michael_Emerson"},
    {"confidence": 0.00009688903810456395,"label": "Carrie_Preston"},
    {"confidence": 0.0000443705648649484,"label": "Sterling_Beaumon"},
    {"confidence": 0.00002123577360180207,"label": "Beth_Grant"},
    {"confidence": 0.00002013444282056298,"label": "Jean_Reno"}
  ]
}

Example 3.

  • Parameter 1: Base64 image
{
    "image": "data:image/png;base64....",
}

Output;

{
  "results":[
    {"confidence": 0.20270781219005587,"label": "Sunny_Leone"},
    {"confidence": 0.10446135699748994,"label": "Victoria_Justice"},
    {"confidence": 0.09768102318048477,"label": "Madalina_Diana_Ghenea"},
    {"confidence": 0.07961906492710115,"label": "Azita_Ghanizada"},
    {"confidence": 0.04733692482113838,"label": "Sarah_Shahi"}
  ]
}

Example 4.

  • Parameter 1: Data API Url
  • Parameter 2: Number of results.
{
    "image": "data://deeplearning/example_data/enrico_colantoni.jpg",
    "numResults": 15
}

Output:

{
  "results": [
    {"confidence": 0.20158538222312927, "label": "Enrico_Colantoni"},
    {"confidence": 0.044169820845127106,"label": "Lavell_Crawford"},
    {"confidence": 0.03976121544837952,"label": "Rob_Reiner"},
    {"confidence": 0.037657905369997025,"label": "Rob_Corddry"},
    {"confidence": 0.031581733375787735,"label": "Evan_Handler"},
    {"confidence": 0.027566682547330856,"label": "Telly_Savalas"},
    {"confidence": 0.021069753915071487,"label": "Kurt_Fuller"},
    {"confidence": 0.0207058172672987,"label": "Don_Rickles"},
    {"confidence": 0.017841791734099388,"label": "Stephen_Lee"},
    {"confidence": 0.017642010003328323,"label": "Chris_Bauer"},
    {"confidence": 0.01729157194495201,"label": "Gabe_Kaplan"},
    {"confidence": 0.016788098961114883,"label": "Paul_Scheer"},
    {"confidence": 0.015448397025465964,"label": "Richard_Karn"},
    {"confidence": 0.014864292927086352,"label": "Gary_Valentine"},
    {"confidence": 0.013393213041126728,"label": "Tim_Russ"}
  ]
}

3. Credits

For more information please refer to: http://www.robots.ox.ac.uk/~vgg/publications/2015/Parkhi15/ or Parkhi, O. M. and Vedaldi, A. and Zisserman, A. Deep Face Recognition. British Machine Vision Conference. (2015)

Demo image was retrieved from Wikipedia:

https://commons.wikimedia.org/wiki/File:Emersongfdl.PNG