Net::Azure::CognitiveServices::Face - A wrapper class for Face API of Azure Cognitive Services
use Net::Azure::CognitiveServices::Face; Net::Azure::CognitiveServices::Face->access_key('YOUR_ACCESS_KEY'); ### Face - Detect my $face_api = Net::Azure::CognitiveServices::Face->Face; my $result = $face_api->detect( "http://example.com/photo.jpg", returnFaceAttributes => ['age', 'gender'], ); printf "age: %d, gender: %d\n", $result->[0]{faceAttributes}{age}, $result->[0]{faceAttributes}{gender}; ### Person - List Persons in a PersonGroup my $person_api = Net::Azure::CognitiveServices::Face->Person; $result = $person_api->list('my_person_group'); for my $person (@$result) { printf "name: %s, personId: %s\n", $person->{name}, $person->{personId}; }
Net::Azure::CognitiveServices::Face provides following subclasses.
Please see https://dev.projectoxford.ai/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236 for more information.
Set the access key for accessing to Azure Cognitive Services APIs
Returns an instance of Net::Azure::CognitiveServices::Face::Face
Returns an instance of Net::Azure::CognitiveServices::Face::FaceList
Returns an instance of Net::Azure::CognitiveServices::Face::Person
Returns an instance of Net::Azure::CognitiveServices::Face::PersonGroup
Copyright (C) ytnobody.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
ytnobody <ytnobody@gmail.com>
To install Net::Azure::CognitiveServices::Face, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Azure::CognitiveServices::Face
CPAN shell
perl -MCPAN -e shell install Net::Azure::CognitiveServices::Face
For more information on module installation, please visit the detailed CPAN module installation guide.