cognixir v0.4.0 Cognixir.FaceApi

Provides functions for face detection, verification and grouping

Summary

Functions

Detects a face and returns various detail information like face position, landmarks and attributes. See official api doc for supported options

Checks if two provided faces are identical. First, you need to run detect_face on each face to get a face id, then you can compare both faces

Functions

detect_face(image, options \\ %Cognixir.FaceApi.DetectOptions{})

Detects a face and returns various detail information like face position, landmarks and attributes. See official api doc for supported options.

Parameters

  • image: A string containing valid image url or binary file content of an image
  • options: DetectOptions with additional parameters (optional)

Examples

iex> ComputerVision.analyze_image(“http://example.com/images/test.jpg”, %FaceApi.DetectOptions{returnFaceLandmarks: true, returnFaceAttributes: “age,gender”})

{ :ok, response_map }

verify_faces(face_id_1, face_id_2)

Checks if two provided faces are identical. First, you need to run detect_face on each face to get a face id, then you can compare both faces

Parameters

  • face_id_1: face id of first face
  • face_id_2: face id of second face

Examples

iex> ComputerVision.verify_faces(“id_1”, “id_2”)

{ :ok, %{“isIdentical” => false, “confidence” => 0.0} }