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
Creates a named collection to group enrollments.
Example
iex> TruFace.Detective.create_collection("test_collection")
{:ok, "collection_id"}
Creates a named collection to group enrollments.
Example
iex> TruFace.Detective.create_collection!("test_collection")
"collection_id"
Enrolls a set of images.
Example
iex> TruFace.Detective.enroll([img1, img2, img3], "en1")
{:ok, "enrollment_id"}
Enrolls a set of images.
Example
iex> TruFace.Detective.enroll!([img1, img2, img3], "en1")
"enrollment_id"
Checks if an image matches an enrollment in the collection.
Example
iex> TruFace.Detective.identity?(image_binary, "collection_id")
{:ok, "person_id"}
Checks if an image matches an image in an enrollment.
Example
iex> TruFace.Detective.match?(image_binary, "enrollment_id")
{:ok, 0.7}
Triggers training for the classifier of a collection.
Example
iex> TruFace.Detective.train("collection_id")
{:ok, "collection_id"}
Updates an enrollment with the given set of images.
Example
iex> TruFace.Detective.update([img1, img2, img3], enrollment_id)
{:ok, "enrollment_id"}
Updates an enrollment with the given set of images.
Example
iex> TruFace.Detective.update!([img1, img2, img3], enrollment_id)
"enrollment_id"
Updates a collection by adding an enrollment.
Example
iex> TruFace.Detective.update_collection("enrollment_id", "collection_id", "col1")
{:ok, "collection_id"}
Updates a collection by adding an enrollment.
Example
iex> TruFace.Detective.update_collection!("enrollment_id", "collection_id", "col1")
"collection_id"