Project

kairos-api

0.01
No commit activity in last 3 years
No release in over 3 years
Ruby gem for the Kairos facial recognition API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
>= 0
~> 2.6
>= 0
~> 1.6

Runtime

~> 0.8.0
~> 1.2.0
 Project Readme

I update this gem when I have time. Would love to see some pull requests.

Kairos-Api

Ruby gem for the Kairos facial recognition API - https://developer.kairos.io/

Installation

Add this line to your application's Gemfile:

gem 'kairos-api'

And then execute:

$ bundle

Or install it yourself as:

$ gem install kairos-api

Usage

https://developer.kairos.io/docs

  1. 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')
  1. 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
  1. Kairos::Client.detect(:url => 'https://some.url.com/to_some.jpg', :selector => 'FULL'):
  • Takes an image and returns the facial features found within it
  1. Kairos::Client.gallery_list_all:
  • Lists out all the galleries you have subjects enrolled in
  1. Kairos::Client.gallery_view(:gallery_name => 'testgallery'):
  • Lists out all the subjects you have enrolled in a specified gallery
  1. Kairos::Client.gallery_remove_subject(:gallery_name => 'randomgallery', :subject_id => 'image123abc'):
  • Removes a subject from a specified gallery

To Do List

  1. Trim unnessary gem dependencies

  2. Expand documentation

  3. Expand test specs to cover more scenarios and edge cases

  4. DRY up code where possible

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

References

Thank you to gregmoreno for creating this api template - https://github.com/gregmoreno/awesome