Internship project progress, Nudity Detection API needed

I have been testing the SkyBiometry API for face detection, and am now working with another guy at Truly Madly who has knowledge of PHP, to integrate face detection into the system. I haven’t moved on to the face training part yet, for the celebrity images and etc.

I have started looking at nudity APIs and nude image filter filters for Truly Madly’s system. The nudity detection APIs which I found could be suitable are:-

1. on Mashape.

2. by Sphire labs posted on Mashape.


Out of these, the second one by Sphire Labs was not giving satisfactory results on the set of images flagged as nude by the Truly Madly moderators. This one was suggested to me by the SkyBiometry team, when I intimated to them the need for a nudity detection API for us.
And surprisingly, the first one, by some guy called Garry Lachman was giving pretty good results form the beginning. It was considerably very cheap too. But this API wasn’t giving us a confidence score like the previous one.

The nudity detection API by sightengine looked like the most sophisticated one. Though it looks like a little pricey, but  it is the most stable among the three, and has a clear documentation. Like SkyBiometry, it also works on a REST interface, and it’s working is also very similar. It gives an output in the form of JSON, with a confidence score along with the status of the image. The confidence scores are pretty realistic too. Thankfully, it also has a client library for PHP.

The API’s actually work on identifying skin colour in an image (this is their most basic premise, they do have other features built in to support their nudity flagging). So it occurred to me that a picture with too much skin, but no nudity could fool these APIs, like the close up of a face. They could output false positives. And that’s exactly what happened.
When I tested out this intuition of mine, it came out to be true. The two mashape API’s started showing erratic results when I tested images containing a face close-up. The sphire labs API was working a bit better than the other one. This really put me into confusion as to what to do next.
When I tested this case against the sightengine API, it too was flagging the image as nude because of the presence of too much skin colour in the image. But the difference as that, even though it was flagging the nudity as true, it was doing so with a low confidence score (<50). All it’s True positives had a pretty good confidence score. Therefore, I believe that sightengine might me the best choice for a nudity detection API we have at the moment.
My co-programmer here at Truly Madly also believes that the sightengine API will be most suitable for us.
I have passed on the results of all ny API testing work to my mentor here at Truly Madly, and also indicated the suitablity of the sightengine nudity detection API for us.

For the next few days I will be working with Arpan on integrating the SkyBiometry code for face detection into our backend in PHP, and extracting the confidence score and the no of faces detected by the API, for the JSON out generated.
Also need to negotiate pricing with the SkyBiometry team (and maybe the sightengine team thereafter). We wpuld probably need a custom account based on our need. Currently. Truly Madly sees around 5k uploads a day, which is only expected to increase as more and more users join in.



Leave a Reply

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

You are commenting using your 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