Simplifying Cognitive Services App Development using Portable Class Libraries

This hands-on lab guides you through creating an intelligent console application from end-to-end using Cognitive Services (specifically the Computer Vision API). We use the ImageProcessing portable class library (PCL), discussing its contents and how to use it in your own applications.

Objectives

In this workshop, you will:

While there is a focus on Cognitive Services, you will also leverage the following technologies:

Prerequisites

This workshop is meant for an AI Developer on Azure. Since this is only a short workshop, there are certain things you need before you arrive.

Firstly, you should have experience with Visual Studio. We will be using it for everything we are building in the workshop, so you should be familiar with how to use it to create applications. Additionally, this is not a class where we teach you how to code or develop applications. We assume you have some familiarity with C# (you can learn here), but you do not know how to implement solutions with Cognitive Services.

Secondly, you should have experience with the portal and be able to create resources (and spend money) on Azure.

Finally, before arriving at the workshop, we expect you to have completed 1_Setup.

Introduction

We’re going to build an end-to-end application that allows you to pull in your own pictures, use Cognitive Services to obtain a caption and some tags about the images, and then store that information in Cosmos DB. In later labs, we will use the NoSQL Store (Cosmos DB) to populate an Azure Search index, and then build a Bot Framework bot using LUIS to allow easy, targeted querying.

Architecture

We will build a simple C# application that allows you to ingest pictures from your local drive, then invoke the Computer Vision API to analyze the images and obtain tags and a description.

Once we have this data, we process it to pull out the details we need, and store it all into Cosmos DB, our NoSQL PaaS offering.

In the continuation of this lab throughout the workshop, we’ll build an Azure Search Index (Azure Search is our PaaS offering for faceted, fault-tolerant search - think Elastic Search without the management overhead) on top of Cosmos DB. We’ll show you how to query your data, and then build a Bot Framework bot to query it. Finally, we’ll extend this bot with LUIS to automatically derive intent from your queries and use those to direct your searches intelligently.

Architecture Diagram

This lab was modified from this Cognitive Services Tutorial.

There are several directories in the resources folder:

This workshop has been broken down into five sections:

Continue to 1_Setup