I update this gem when I have time. Would love to see some pull requests.
Ruby gem for the Kairos facial recognition API - https://developer.kairos.io/
Add this line to your application's Gemfile:
gem 'kairos-api'
And then execute:
$ bundle
Or install it yourself as:
$ gem install kairos-api
https://developer.kairos.io/docs
- Kairos::Client.enroll(:url => 'https://some.url.com/to_some.jpg', :subject_id => 'gemtest', :gallery_name => 'testgallery'):
Takes an image and stores it as a face template into a gallery you define
$ require 'kairos'
$ client = Kairos::Client.new(:app_id => '1234', :app_key => 'abcde1234')
$ client.enroll(:url => 'https://some.url.com/to_some.jpg', :subject_id => 'gemtest', :gallery_name => 'testgallery')
- Kairos::Client.recognize(:url => 'https://some.image.url/123abc.jpg', :gallery_name => 'randomgallery', :threshold => '.2', :max_num_results => '5'):
- Takes an image and tries to match it against the already enrolled images in a gallery you define
- Kairos::Client.detect(:url => 'https://some.url.com/to_some.jpg', :selector => 'FULL'):
- Takes an image and returns the facial features found within it
- Kairos::Client.gallery_list_all:
- Lists out all the galleries you have subjects enrolled in
- Kairos::Client.gallery_view(:gallery_name => 'testgallery'):
- Lists out all the subjects you have enrolled in a specified gallery
- Kairos::Client.gallery_remove_subject(:gallery_name => 'randomgallery', :subject_id => 'image123abc'):
- Removes a subject from a specified gallery
-
Trim unnessary gem dependencies
-
Expand documentation
-
Expand test specs to cover more scenarios and edge cases
-
DRY up code where possible
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Thank you to gregmoreno for creating this api template - https://github.com/gregmoreno/awesome