Home > FaceR

FaceR

FaceR is a project mainly written in Ruby, it's free.

Gem to mantain basical operations on face.com's API.

This Gem is a very alpha version and is provided as is without any warranty.

I coded it as a convenient and easy interface to face.com's API for a project I'm working on and I must prepone some assumption on using it:

  • you are a brave
  • you will send images with only ONE recognizable face at time
  • you expect some errors and bugs and have the bravery and patience to fix them

If those requirements are met, go on and use it. If not stop reading and trash the gem...

If you are reading this you are brave (or crazy).

A little example of usage:

linkr=Facer::Linker.new("yourapp","yourkey","yoursecret")
puts linkr.account.private_namespaces?.inspect
puts linkr.account.limits?.inspect

trainSet={
  "vanessa_paradis" => [
    "http://www.superiorpics.com/hs/vanessa_paradis/main1.jpg",
    "http://nymag.com/daily/fashion/14_paradis_lgl.jpg",
    "http://imstars.aufeminin.com/stars/fan/vanessa-paradis/vanessa-paradis-20060208-107457.jpg",
    "http://www.realbeauty.com/cm/realbeauty/images/NF/rby-hair-vanessa-paradis-5-de.jpg",
    "http://www.wallpaperweb.org/wallpaper/babes/1280x960/vanessa_paradis_20070722_0171_1280x960.jpg",
    "http://chansons-fle.wikispaces.com/file/view/vanessa_paradis_reference.jpg/59524266/vanessa_paradis_reference.jpg"
  ]
}

trainSet.each_pair do |key,value|
  succ= linkr.faces.associate_multi(value,key,"yournamespace").inspect
  puts "Associating #{key}: #{succ}"
end

puts linkr.faces.train_all("clinik").inspect

puts linkr.faces.recognize("http://static1.purepeople.com/articles/7/17/12/7/@/85769-vanessa-paradis-et-johnny-depp-637x0-1.jpg","yournamespace").inspect
puts linkr.faces.recognize("http://howzar.com/Galleries/Vanessa%20Paradis/vanessa-paradis-32.jpg","yournamespace").inspect
puts linkr.faces.recognize("http://pictures.directnews.co.uk/liveimages/Old+man+smiling_1500_19112072_0_0_7006461_300.jpg","yournamespace").inspect

Stefano Valicchia ([email protected])

Previous:excercise