line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Azure::CognitiveServices::Face::Face; |
2
|
29
|
|
|
29
|
|
192
|
use strict; |
|
29
|
|
|
|
|
61
|
|
|
29
|
|
|
|
|
812
|
|
3
|
29
|
|
|
29
|
|
145
|
use warnings; |
|
29
|
|
|
|
|
61
|
|
|
29
|
|
|
|
|
786
|
|
4
|
29
|
|
|
29
|
|
155
|
use base 'Net::Azure::CognitiveServices::Face::Base'; |
|
29
|
|
|
|
|
59
|
|
|
29
|
|
|
|
|
13426
|
|
5
|
|
|
|
|
|
|
|
6
|
5
|
|
|
5
|
1
|
53
|
sub path {'/face/v1.0'}; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub _detect_request { |
9
|
1
|
|
|
1
|
|
1000
|
my ($self, $image_url, %param) = @_; |
10
|
|
|
|
|
|
|
my %query = ( |
11
|
|
|
|
|
|
|
returnFaceId => defined $param{returnFaceId} ? $param{returnFaceId} : 'true', |
12
|
|
|
|
|
|
|
returnFaceLandmarks => defined $param{returnFaceLandmarks} ? $param{returnFaceLandmarks} : 'false', |
13
|
1
|
50
|
|
|
|
10
|
returnFaceAttributes => defined $param{returnFaceAttributes} ? join(',', @{$param{returnFaceAttributes}}) : '', |
|
1
|
50
|
|
|
|
7
|
|
|
|
50
|
|
|
|
|
|
14
|
|
|
|
|
|
|
); |
15
|
1
|
|
|
|
|
11
|
$self->build_request(POST => ['detect', %query], undef, {url => $image_url}); |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub detect { |
19
|
0
|
|
|
0
|
1
|
0
|
my ($self, $image_url, %param) = @_; |
20
|
0
|
|
|
|
|
0
|
my $req = $self->_detect_request($image_url, %param); |
21
|
0
|
|
|
|
|
0
|
$self->request($req); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub _find_similar_request { |
25
|
1
|
|
|
1
|
|
960
|
my ($self, %param) = @_; |
26
|
1
|
|
|
|
|
13
|
$self->build_request(POST => ['findsimilars'], undef, {%param}); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub find_similar { |
30
|
0
|
|
|
0
|
1
|
0
|
my ($self, %param) = @_; |
31
|
0
|
|
|
|
|
0
|
my $req = $self->_find_similar_request(%param); |
32
|
0
|
|
|
|
|
0
|
$self->request($req); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub _group_request { |
36
|
1
|
|
|
1
|
|
998
|
my ($self, %param) = @_; |
37
|
1
|
|
|
|
|
12
|
$self->build_request(POST => ['group'], undef, {%param}); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub group { |
41
|
0
|
|
|
0
|
1
|
0
|
my ($self, %param) = @_; |
42
|
0
|
|
|
|
|
0
|
my $req = $self->_group_request(%param); |
43
|
0
|
|
|
|
|
0
|
$self->request($req); |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub _identify_request { |
47
|
1
|
|
|
1
|
|
925
|
my ($self, %param) = @_; |
48
|
1
|
|
|
|
|
11
|
$self->build_request(POST => ['identify'], undef, {%param}); |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
sub identify { |
52
|
0
|
|
|
0
|
1
|
0
|
my ($self, %param) = @_; |
53
|
0
|
|
|
|
|
0
|
my $req = $self->_identify_request(%param); |
54
|
0
|
|
|
|
|
0
|
$self->request($req); |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub _verify_request { |
58
|
1
|
|
|
1
|
|
962
|
my ($self, %param) = @_; |
59
|
1
|
|
|
|
|
11
|
$self->build_request(POST => ['verify'], undef, {%param}); |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
sub verify { |
63
|
0
|
|
|
0
|
1
|
|
my ($self, %param) = @_; |
64
|
0
|
|
|
|
|
|
my $req = $self->_verify_request(%param); |
65
|
0
|
|
|
|
|
|
$self->request($req); |
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
1; |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
__END__ |