Class: Findface::Utility
- Inherits:
-
Object
- Object
- Findface::Utility
- Defined in:
- lib/findface/utility.rb
Class Method Summary collapse
-
.detect(options) ⇒ Object
Endpoint: api.findface.pro/v0/detect/ (POST) | Usage: FindFace::Utility.detect Output: A list of rectangles (bounding boxes) for the detected faces.
-
.identify(options) ⇒ Object
Endpoint: api.findface.pro/v0/identify/ (POST) | Usage: FindFace::Utility.identify Output: A map with - Detected or provided face bounding boxes, as keys, Arrays of matching Face objects along with match confidence, as values.
-
.identify_in_gallery(name, options) ⇒ Object
Endpoint: api.findface.pro/v0/faces/gallery/:galley_name/identify/ (POST) | Usage: FindFace::Utility.identify_in_gallery Output: Same as identification alogorithm, but it is applied on datasets which belongs to particular gallery.
-
.list_faces_from_gallery(name, pages = nil) ⇒ Object
Endpoint: api.findface.pro/v0/faces/gallery/:gallery_name/ (GET) | Usage: FindFace::Utility.list_faces_from_gallery Output: Returns list of faces data which belongs to particular gallery.
-
.list_faces_from_gallery_by_meta(name, meta_string, pages = nil) ⇒ Object
Endpoint: api.findface.pro/v0/face/gallery/:gallery_name/meta/:meta_string (GET) | Usage: FindFace::Utility.list_faces_from_gallery_by_meta Output: Retuns list of faces which belongs to particular gallery by meta information provided.
-
.list_meta_for_gallery(name) ⇒ Object
Endpoint: api.findface.pro/v0/meta/gallery/:gallery_name/ (GET) | Usage: FindFace::Utility.list_meta_for_gallery Output: Returns meta information of faces belongs to particular gallery.
-
.verify(options) ⇒ Object
Endpoint: api.findface.pro/v0/verify/ (POST) | Usage: FindFace::Utility.verify Output: Binary verification result of two images provided.
Class Method Details
.detect(options) ⇒ Object
Endpoint: api.findface.pro/v0/detect/ (POST) | Usage: FindFace::Utility.detect
Output: A list of rectangles (bounding boxes) for the detected faces.
8 9 10 |
# File 'lib/findface/utility.rb', line 8 def detect API::request(:post, 'detect', ) end |
.identify(options) ⇒ Object
Endpoint: api.findface.pro/v0/identify/ (POST) | Usage: FindFace::Utility.identify
Output: A map with - Detected or provided face bounding boxes, as keys,
Arrays of matching Face objects along with match confidence, as values.
23 24 25 |
# File 'lib/findface/utility.rb', line 23 def identify API::request(:post, 'identify', ) end |
.identify_in_gallery(name, options) ⇒ Object
Endpoint: api.findface.pro/v0/faces/gallery/:galley_name/identify/ (POST) | Usage: FindFace::Utility.identify_in_gallery
Output: Same as identification alogorithm, but it is applied on datasets which belongs to particular gallery
30 31 32 |
# File 'lib/findface/utility.rb', line 30 def identify_in_gallery name, API::request(:post, "faces/gallery/#{name}/identify", ) end |
.list_faces_from_gallery(name, pages = nil) ⇒ Object
Endpoint: api.findface.pro/v0/faces/gallery/:gallery_name/ (GET) | Usage: FindFace::Utility.list_faces_from_gallery
Output: Returns list of faces data which belongs to particular gallery
37 38 39 |
# File 'lib/findface/utility.rb', line 37 def list_faces_from_gallery name, pages = nil Findface.get_list "faces/gallery/#{name}/", pages end |
.list_faces_from_gallery_by_meta(name, meta_string, pages = nil) ⇒ Object
Endpoint: api.findface.pro/v0/face/gallery/:gallery_name/meta/:meta_string (GET) | Usage: FindFace::Utility.list_faces_from_gallery_by_meta
Output: Retuns list of faces which belongs to particular gallery by meta information provided
44 45 46 |
# File 'lib/findface/utility.rb', line 44 def name, , pages = nil Findface.get_list "faces/gallery/#{name}/meta/#{Findface.()}", pages end |
.list_meta_for_gallery(name) ⇒ Object
Endpoint: api.findface.pro/v0/meta/gallery/:gallery_name/ (GET) | Usage: FindFace::Utility.list_meta_for_gallery
Output: Returns meta information of faces belongs to particular gallery
51 52 53 |
# File 'lib/findface/utility.rb', line 51 def name API::request(:get, "meta/gallery/#{name}/") end |
.verify(options) ⇒ Object
Endpoint: api.findface.pro/v0/verify/ (POST) | Usage: FindFace::Utility.verify
Output: Binary verification result of two images provided.
15 16 17 |
# File 'lib/findface/utility.rb', line 15 def verify API::request(:post, 'verify', ) end |