Project

eyevision

0.0
No commit activity in last 3 years
No release in over 3 years
Ruby Client for the EyeEm Vision API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 1.13
~> 5.0
~> 10.0
~> 2.1.0

Runtime

~> 0.14.0
 Project Readme

Eyevision

This gem is a client to EyeEm's Vision API. It provides functionality to analyze an imageand retrieve tags, captions and an aesthetic score.

The client handles request authentication and token refreshes.

Installation

Add this line to your application's Gemfile:

gem 'eyevision'

And then execute:

$ bundle

Or install it yourself as:

$ gem install eyevision

Usage

Usage is fairly simple. You initialize the client with your API keys and then pass images by file, url or binary input:

require 'eyevision'

c = Eyevision::Client.new('CLIENT ID', 'CLIENT SECRET')

c.analyze(url: "https://cdn.eyeem.com/thumb/fa153872f1fb87d2c49f03da2e605cbdc343230d-1479466499934/1200/1200")
c.analyze(file: "image.jpg")
c.analyze(image: "binary")

By default it will retrieve tags, captions and aesthetic score but you can also request other combinations:

c.analyze(image: "binary", features: ["TAGS", "AESTHETIC_SCORE"])

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake test to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/tmacedo/eyevision.