/
recognition.rb
30 lines (26 loc) · 1019 Bytes
/
recognition.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
module Face
module Client
module Recognition
def faces_detect(opts={})
opts.assert_valid_keys(:urls, :file, :detector, :attributes, :callback, :callback_url)
make_request(:faces_detect, opts)
end
def faces_group(opts={})
opts.assert_valid_keys(:urls, :file, :detector, :attributes, :callback, :callback_url)
make_request(:faces_group, opts)
end
def faces_recognize(opts={})
opts.assert_valid_keys(:uids, :file, :urls, :namespace, :detector, :attributes, :callback, :callback_url)
make_request(:faces_recognize, opts.merge(user_auth_param))
end
def faces_train(opts={})
opts.assert_valid_keys(:uids, :namespace, :callback, :callback_url)
make_request(:faces_train, opts.merge(user_auth_param))
end
def faces_status(opts={})
opts.assert_valid_keys(:uids, :namespace, :callback, :callback_url)
make_request(:faces_status, opts.merge(user_auth_param))
end
end
end
end