tru_face v0.1.2 TruFace.Detective View Source

Detective module provides functions for face detection.

Link to this section Summary

Functions

Creates a named collection to group enrollments

Creates a named collection to group enrollments

Enrolls a set of images

Enrolls a set of images

Checks if an image matches an enrollment in the collection

Checks if an image matches an image in an enrollment

Triggers training for the classifier of a collection

Updates an enrollment with the given set of images

Updates an enrollment with the given set of images

Updates a collection by adding an enrollment

Updates a collection by adding an enrollment

Link to this section Functions

Link to this function create_collection(name) View Source
create_collection(String.t) :: {:ok, String.t} | {:error, map}

Creates a named collection to group enrollments.

Example

iex> TruFace.Detective.create_collection("test_collection")
{:ok, "collection_id"}
Link to this function create_collection!(name) View Source
create_collection!(String.t) :: {:ok, String.t} | {:error, map}

Creates a named collection to group enrollments.

Example

iex> TruFace.Detective.create_collection!("test_collection")
"collection_id"
Link to this function enroll(images, name) View Source
enroll(list, String.t) :: {:ok, String.t} | {:error, map}

Enrolls a set of images.

Example

iex> TruFace.Detective.enroll([img1, img2, img3], "en1")
{:ok, "enrollment_id"}
Link to this function enroll!(images, name) View Source
enroll!(list, String.t) :: String.t | map

Enrolls a set of images.

Example

iex> TruFace.Detective.enroll!([img1, img2, img3], "en1")
"enrollment_id"
Link to this function identity?(raw_image, collection_id) View Source

Checks if an image matches an enrollment in the collection.

Example

iex> TruFace.Detective.identity?(image_binary, "collection_id")
{:ok, "person_id"}
Link to this function match?(raw_image, enrollment_id) View Source
match?(binary, String.t) :: {:ok, float} | {:error, map}
match?(binary, String.t) :: {:ok, String.t} | {:error, map}

Checks if an image matches an image in an enrollment.

Example

iex> TruFace.Detective.match?(image_binary, "enrollment_id")
{:ok, 0.7}
Link to this function train(collection_id) View Source
train(String.t) :: {:ok, String.t} | {:error, map}

Triggers training for the classifier of a collection.

Example

iex> TruFace.Detective.train("collection_id")
{:ok, "collection_id"}
Link to this function update(images, enrollment_id) View Source
update(list, String.t) :: {:ok, String.t} | {:error, map}

Updates an enrollment with the given set of images.

Example

iex> TruFace.Detective.update([img1, img2, img3], enrollment_id)
{:ok, "enrollment_id"}
Link to this function update!(images, enrollment_id) View Source
update!(list, String.t) :: String.t | map

Updates an enrollment with the given set of images.

Example

iex> TruFace.Detective.update!([img1, img2, img3], enrollment_id)
"enrollment_id"
Link to this function update_collection(enrollment_id, collection_id) View Source
update_collection(String.t, String.t) ::
  {:ok, String.t} |
  {:error, map}

Updates a collection by adding an enrollment.

Example

iex> TruFace.Detective.update_collection("enrollment_id", "collection_id", "col1")
{:ok, "collection_id"}
Link to this function update_collection!(enrollment_id, collection_id) View Source
update_collection!(String.t, String.t) :: String.t | map

Updates a collection by adding an enrollment.

Example

iex> TruFace.Detective.update_collection!("enrollment_id", "collection_id", "col1")
"collection_id"