Taxonomy Icon

Artificial Intelligence

Facial Recognizer

Get this modelTry the API

Overview

The model detects faces in an input image and then generates an embedding vector for each face. The generated embeddings can be used for downstream tasks such as classification, clustering, verification etc. The model accepts an image as input and returns the bounding box coordinates, probability and embedding vector for each face detected in the image. The model is based on the the FaceNet model.

Model Metadata

Domain Application Industry Framework Training Data Input Data Format
Vision Facial Recognition Multi Tensorflow VGGFace2 Image File

References

Licenses

Component License Link
Model Github Repository Apache 2.0 LICENSE
Model Weights MIT LICENSE
Model Code (3rd party) MIT LICENSE
Test assets Various Asset README

Options available for deploying this model

This model can be deployed using the following mechanisms:

  • Deploy from Dockerhub:
    docker run -it -p 5000:5000 codait/max-facial-recognizer
    
  • Deploy on Kubernetes:
    kubectl apply -f https://raw.githubusercontent.com/IBM/MAX-Facial-Recognizer/master/max-facial-recognizer.yaml
    
  • Locally: follow the instructions in the model README on GitHub

Example Usage

Once deployed, you can test the model from the command line. For example if running locally:

curl -F "image=@assets/Lenna.jpg" -XPOST http://localhost:5000/model/predict

You should see a JSON response like that below:

{
  "status": "ok",
  "predictions": [
    {
      "detection_box": [
        85.5373387336731,
        77.938033670187,
        149.2407527267933,
        170.62581571377814
      ],
      "probability": 0.9959015250205994,
      "embedding": [
        -0.016315622255206108,
        -0.04482162743806839,
        -0.02662980556488037,
        -0.003268358064815402,
        0.0253919567912817,
        0.07166660577058792,
        -0.0225024726241827,
        ...
        -0.05647726729512215
      ]
    }
  ]
}