Testing SkyBiometry API

I have been exploring the various image detection API’s that we can integrate in our system as mentioned by me in the prevous post. Work has been slow.

The two best API’s on the market I believe are, Project Oxford (http://www.projectoxford.ai/) and SkyBiometry API (https://www.skybiometry.com/). I was exploring these two with Shashwat sir (my mentor) yesterday, we decided to use the SkyBiometry API finally. So I have been testing the SkyBiometry API on the database of Truly Madly images and on other images from else where.

SkyBiometry documentation – https://www.skybiometry.com/Documentation

SkyBiometry is giving delightfully good results on the set of approved images by the Truly Madly moderators. It’s the set of rejected images, that SkyBiometry is failing on somethimes. To successfully test the API on the set of rejected messages, I had to first go through the set of rejected images and divide them into groups for the reason they had been rejected.
I came up with the following reasons for the rejection of images:-

  1. Multiple People in the images – SkyBiometry can detect multiple faces in the image. And it can be flagged for moderation throufh the faces/detect function that SkyBiometry provides.
  2. Not a person/face – SkyBiometry works good on these.
  3. Face not visible/clear – SkyBiometry gives varied results in this case.
  4. Special Effects in the image/ Text on images – I don’t know why Truly Madly rejects images with even little special effects. SkyBiometry may or may not detect a face in it depending upon face clarity
  5. Nudity in pictures – SkyBiometry does not have a nudity detection feature. It only detects a face. We need a nudity detection filter as well, as mentioned by me initially.
  6. Celebrity images – A lot of users tend to uplaod celebrity images on their profile. SkyBiometry provides us with a faces/save, faces/train and faces/recongize function, in which we can upload our set of images to match to on their database. They will probably train a classifier or something on those images and we will call their function every time a user uploads a photo to check if it belongs to one of the pictures in the database we have created on SkyBiometry.
  7. Baby pictures – A lot of users also tend to upload baby pictures on their profile. SkyBiometry faces/detect function currently detects the face in those images, but we can allow that. I’m not too sure on how to go about creating a filter for baby images. It could be done like training on a database of celebrity pictures, or through some age detection technique. SkyBiometry has  an age detection feature, but it is still in beta phases. I tested it but it wasn’t working too well.

SkyBiometry function calls return the output in JSON or XML format. The key element it returns is a confidence score of the operation performed. I wish to create a threshold for the confidence score, based on the performance of the API on our set of images. If the confidence score for a particular operation will come out to be less than the threshold, I will put it in a queue for our moderators to check. Else, the image can be rejected. Along with this, the image containing multiple faces will not be approved as a profile picture, but it can be uploaded by the user on his profile.

The best thing about SkyBiometry is that it uses a REST API (https://en.wikipedia.org/wiki/Representational_state_transfer   http://www.restapitutorial.com/lessons/whatisrest.html        http://stackoverflow.com/questions/671118/what-exactly-is-restful-programming). An API that adheres to the principles of REST does not require the client to know anything about the structure of the API. Rather it is the server which has to provide information to the client so that he can interact with the API. So the face detection system of SkyBiometry works on the basis of https calls to their server, in the format – http://api.skybiometry.com/fc/{API method}.{response format}?api_key=…&api_secret=…&{other parameters}. The API method here being faces/detect, the response format could be JSON or XML, and api_key and api_secret are generated when a user creates an account on their website. In the other parameters, the user can give the URL of the image it wishes to test.  Since SkyBiometry operation can be initiated through an HTTPS call to their server, their API is not programming language specific. This gives us a lot of flexibility to call for their services from any programming environment.

For the purpose of directly using their functions without the help of a browser, they also have their client libraries hosten on github. (Don’t be too excited about that, it still requires an api_key and api_secret to call the functions.) Instead to using the browser again and again, I have cloned their python client library to my local system. I wrote a short python script to test for the various images in my machine itself, without the need for a browser.
Later on, we might use their PHP client library to work on our backend.
I am in constant touch with the SkyBiometry team via email.

I think the SkyBiometry face detection part is well suitable for Truly Madly’s system. I’ll continue testing more images and functions in the coming days.

~jigsaw

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s