0
votes

I'm trying to implement Microsoft Cognitive Services Computer Vision API "Recognize Domain Specific Content" feature and seem to be encountering some difficulties.

No matter how I try to submit the photos (even cropping them to show only the face using Computer Vision API Get Thumbnail first), I don't get any celebrities in the result at all. :-( I tried submitting the images by uploading an image (by writing a Java testlet) and specifying an image URL. None worked.

However, when I use the same photos on http://www.celebslike.me, it does indeed show celebrities as the result.

(I even used some of the samples taken from http://www.celebslike.me itself and while it does show results on the http://www.celebslike.me site, it showed nothing when I tried to call the API manually.)

I always get a result like this:

{
"requestId": "278d8ed0-79dc-4817-8329-b8440c650f9b",
"metadata": {
"width": 250,
"height": 250,
"format": "Jpeg"
},
"result": {
"celebrities": []
}
}

... ' "celebrities": [] ' - no celebrities in the list, even though the same photo would have some celebrities on http://www.celebslike.me.

So, are they are steps I'm missing? Do I need to "pre-process" the photos first?

As per this page: [https://www.microsoft.com/cognitive-services/en-us/computer-vision-api/documentation#Domain-Specific], it says:

Option One - Scoped Analysis

Analyze only a chosen model, by invoking an HTTP POST call. For this option, if you know which model you want to use, you just specify the model’s name, and you only get information relevant to that model. For example, you can use this option to only look for celebrity-recognition; the response will contain a list of potential matching celebrities, accompanied by their confidence scores.

Option Two - Enhanced Analysis

Analyze to provide additional details related to categories from one of the 86-category taxonomy. This option is available for use in applications where users want to get generic image analysis in addition to details from one or more domain-specific models. When this method is invoked, the 86-category taxonomy classifier is called first. If any of the categories match that of known/matching models, a second pass of classifier invocations will follow. For example, if “details=all” or "details" include “celebrities”, the method will call the celebrity classifier after the 86-category classifier is called and the result includes “object_people_celebrities”.

But how do I use that?

1

1 Answers

1
votes

This may surprise you, but this is working as intended. The Cognitive Services celebrity recognizer is tuned to reduce false positives and therefore performs poorly in a 'like-me' type of scenario.

As far as the two options for invoking the service, they are largely the same. Option one is for "find some properties of this image and if there are any celebrities, tell me" and the other is for "tell me the celebrities in this image, I'm not interested in any other properties." As you might imagine, the latter is slightly more efficient.