Rekognition uses ex_aws under the hood so you should go through their README for more information on how to setup/configure the project, it's really easy.
You can check AWS Rekognition documentation for the list of functionalities and available actions.
The package can be installed by adding ex_aws_rekognition
to your list of dependencies in mix.exs
:
def deps do
[
{:ex_aws_rekognition, "~> 0.6.0"}
]
end
{:ok, source_image_binary} = File.read("path/to/face_source.jpeg")
{:ok, target_image_binary} = File.read("path/to/face_target.jpeg")
ExAws.Rekognition.compare_faces(
source_image_binary,
target_image_binary,
similarity_threshold: 0.5
)
|> ExAws.request()
Complete documentation can be found at https://hexdocs.pm/ex_aws_rekognition/ExAws.Rekognition.html.