Salesforce Content + Microsoft Cognitive API = Happy Customers :)

I cannot hold myself writing a blog on a most amazing video demonstration of cognitive api from Microsoft at https://www.youtube.com/watch?v=R2mC-NUAmMk. This video shows a blind person who is getting assisted with emotions through a cognitive api.

Wow!! first of all hats off to this thinking. I bet whoever is seeing this is having the same impression as I have.

They say innovation triggers innovation, and here it is. After watching this amazing video I went through the Microsoft cognitive api at https://www.microsoft.com/cognitive-services/

This to me is a goldmine to solve many real life problems.

The problem that I am focussed now is on driving topic suggestion out of generated thumbnail preview in chatter file post. The idea is as soon as the chatter post with file attachment is made, based on preview thumbnail generation, the salesforce user should be able to see the topics recommendation/suggestion.

Following step helped me to bring out a partial story around this. (I say partial as still I am trying to bridge the gap between salesforce rendition image url and microsoft's cognitive api.)

1. Signup to Microsoft cognitive api https://www.microsoft.com/cognitive-services/ Register for the free edition

2. After successful registration, click on "My Account" and make a note of key1

3. Follow the instructions at https://www.npmjs.com/package/crmtest and install crmtest by executing the following 
npm install crmtest

4. Observe crmtestclient.js and note the cognitive api calls in the bottom
//Suggest topics in preview image
console.log("-------------------------------------------------------------");
console.log("-----Suggest Topics in generated file preview----------------")
console.log("-------------------------------------------------------------");
response = crmtest.suggesttopicsinimage("<<image url>>", "<<cognitive api key>>");
console.log(response+'\n');

//Analyze preview image
console.log("-------------------------------------------------------------");
console.log("-----------Analyze the generated file preview----------------")
console.log("-------------------------------------------------------------");
response = crmtest.analyzeimage("<<image url>>", "<<cognitive api key>>");
console.log(response+'\n');

5. Note the first call is for getting the suggested topics from cognitive api, and the second call is for getting an analysis on the caption of the image .



First impression for a human eye will be what?

Execution time

This is a group of people standing in front of a building and watching an object. Sounds reasonable for me. When I executed the following script I was amazed to see the analysis.


var crmtest = require('./crmtest.js');

//Suggest topics in preview image
console.log("-------------------------------------------------------------");
console.log("-----Suggest Topics in generated file preview----------------")
console.log("-------------------------------------------------------------");
response = crmtest.suggesttopicsinimage("<<image url>>", "<<cognitive api key>>");
console.log(response+'\n');

//Analyze preview image
console.log("-------------------------------------------------------------");
console.log("-----------Analyze the generated file preview----------------")
console.log("-------------------------------------------------------------");
response = crmtest.analyzeimage("<<image url>>", "<<cognitive api key>>");
console.log(response+'\n');

Here is the output


-------------------------------------------------------------
-----Suggest Topics in generated file preview----------------
-------------------------------------------------------------
Topic Name: outdoor
Topic Name: road
Topic Name: building
Topic Name: street
Topic Name: front
Topic Name: large
Topic Name: man
Topic Name: riding
Topic Name: walking
Topic Name: people
Topic Name: sidewalk
Topic Name: city
Topic Name: standing
Topic Name: table
Topic Name: group
Topic Name: bus
Topic Name: train
Topic Name: holding
Topic Name: air
Topic Name: parked
Topic Name: board
Topic Name: track
Topic Name: trick
Topic Name: doing
Topic Name: white


-------------------------------------------------------------
-----------Analyze the generated file preview----------------
-------------------------------------------------------------
Category: building_ Confidence Value: 0.38671875
Category: others_ Confidence Value: 0.0078125
Category: outdoor_ Confidence Value: 0.01953125

Whoever eager to contribute to this framework, please note the github link for the develop branch is at https://github.com/Nabarun/CrmTest/tree/develop. Will really look forward for innovative enthusiast for contribution.

Life is not accumulation, it is about contribution.-Stephen Covey

Continued at http://nabaruns.blogspot.com/2016/04/salesforce-rendition-microsoft.html

Comments

  1. Im no expert, but I believe you just made an excellent You certainly understand what youre speaking about, and I can truly get behind that.
    Regards,
    Salesforce Training in Chennai

    ReplyDelete

Post a Comment

Popular posts from this blog

Firebase authentication with Ionic creator

Big Data - SWOT Analysis

LINKEDIN api call using NODE.JS OAUTH module