Page 30 - MSDN Magazine, May 2017
P. 30
Figure 9 The Content Moderator Review Tool with Pictures and Unselected Tags
destination for various APIs. When you navigate to the Connectors tab in the review UI, you can see the currently available connectors. You can activate these connectors by entering the corresponding subscription keys. The case for PhotoDNA is easy to make. If your product gets any sort of user con- tent, you want to make sure that no child exploitation images are being shared. Hooking this up to an existing workflow is easy once you’ve signed up for the service. It surely beats having to call the REST APIs separately. At the time of this writing, the Text Analytics API and the Face Detection API are avail- able as connectors. For those you
with, for example, the Optical Character Recognition (OCR) Text from Images and Face detection APIs. The tool also allows you to declare a callback endpoint for a review. If you specify a callback in the CallBackEndpoint to the Job API, as well as here, the one in the workflow overrides the CallBackEndpoint.
Now, when you call the Review Job API and specify this work- flow, you’ll get a JobId back, just like when you called the default workflow. Depending on the racy score of your picture (between 0.7 and 0.9 in our case), Content Moderator will again create a review and you’ll see those images in the Content Moderator review UI.
There are two final notes about workflows. First, if the picture doesn’t qualify for a review in the initial Job callback, we still must find out whether the picture was on the high end and needs to be blocked, or on the low end and is allowed. To do this, you must duplicate the logic a bit, and that means things can get out of sync. Fortunately, the review tool exposes the workflow as JSON. Even better, there’s a Workflow REST API you can use to submit the workflows to the Content Moderator API. With a bit of plumbing you can use the same JSON to keep your bot’s logic and the Review UI tool in sync.
A second note concerning the workflows relates to their extensi- bility. A focal point for the team is to make the review tool a common
Figure 10 Results of the Review Callback
can go to the Azure Portal, create a Cognitive Service as we did ear- lier and enter the subscription key in the Content Moderator UI.
Wrapping Up
There are other advanced features we didn’t have space to dig into. For example, you can create your own Tags under Settings to use in your workflows. We created a “pt” tag for tagging profanity in text. We’ll use this in a workflow that’s set up for text content mod- eration. Additionally, workflows have alternate inputs to handle situations where the input format doesn’t match a qualifier. For example, when you need to detect text profanity in an image through OCR. You can sign up for Video Moderation, which is currently in private preview. Finally, you can expect more con- nectors to show up in the portal that you’ll be able to use to build and extend your workflows.
Using Content Moderator allows you to scale out your content moderation capabilities to all media formats across large vol- umes. Content Moderator is a platform—APIs and solutions that we’re building specifically for the content moderation vertical. Using it, you can scale and transition into other media formats and new content moderation capabilities as they become avail- able. Content Moderator uses the best machine learning-based classifiers and other technologies that are getting better all the time. Improvements in the classifiers will automatically improve your results. n
Maarten van de Bospoort is a principal software development engineer in Devel- oper Experience at Microsoft in Redmond. He works with developers and architects from large consumer ISVs to facilitate adoption of Microsoft technologies such as bots, cognitive services and occasionally a Universal Windows Platform app.
sanjeev jagtap is a senior product manager in the Content Moderator team at Microsoft in Redmond. He is passionate about customers, Microsoft technologies and Hackathons.
thanks to the following Microsoft technical expert for reviewing this article: Christopher Harrison and Sudipto Rakshit
{
"ReviewId": "201703367f430472074c1fb18651a04750448c", "ModifiedOn": "2017-03-07T18:34:17.9436621Z", "ModifiedBy": "Bob",
"CallBackType": "Review",
"ContentId": "67c21785-fb0a-4676-acf6-ccba82776f9a", "ContentType": "Image",
"Metadata": {
"adultscore": "0.465", "isadult": "False", "racyscore": "0.854", "isracy": "True"
}, "ReviewerResultTags": {
"a": "True", "r": "True", "pt": "False"
} }
26 msdn magazine
Cognitive Services