Visit LEDU token page

How to integrate Facial Recognition into any DotNet App

How to integrate Facial Recognition into any DotNet App

  • English
  • Artificial Intelligence
  • Computer VisionComputer Vision
  • (4984)
  • Project length: 22h 26m

NOTE: Weekly Scheduled Casting has been interrupted due to internet issues. Please contact me directly at [email protected] with any questions. I'm looking to post the last recorded stream and the final code soon. Thank you for your understanding and patience. Let's take an in depth look at Microsoft Cognitive services and Computer Vision in general. What we are going to do is interface with a USB Camera, take a picture, store the picture, and send it off to the service for analysis, from there we will take in the result and do something interesting with it. [NOTE: As a conditional weighted response we can set a range, and produce an effect in our code or in devices services or nearly anything your imagination can come up with. The only limitation is your ability to program the response.] While I cast, please feel free to fill out the feedback form. feel free to talk about anything you'd like to mention with regards to my cast it can be found


While I cast, please feel free to fill out the feedback form. Feel free to talk about anything you'd like to mention with regards to my cast it can be found

Tutorial Overview

Lets build a face recognition application!

Microsoft Cognitive Services


Lets explore the Facial recognition process of the online service : Microsoft Cognitive Services ( as we explore what it takes to setup a desktop application to interface with the online service. I hope to be able to address the online services portion and with enough time explore offline OpenCV (Computer Vision)

Our primary focus is to make an application to "Test" our libraries we will use in other projects to provide facial recognition and conditions (Events/Actions) using Microsoft services. the design is also "Updatable" to allow integration with other Third Party libraries and services for

What are the requirements?

  • Windows 10 or Visual Studio Compatible Operating system : Visual Studio Code will work but I am unable to support questions. Please still submit them but I'll need to forward those questions on to Visual Studio Code's Support.
  • Intermediate C# or VB Experience (Any DotNet CLI(Managed) Language will work)
  • SQL Database (if you want to store information, it's not a requirement for processing)
  • NuGet access

What is the target audience?

  • Any DotNet CLI Language Developer: Only the Debug is tied to an application type, you can make a headless application to intake and process images (example: a windows service that monitors and notifies you of who is sitting at your computer, if it is anyone but you, you'll get an email)
  • Examples of some things we will be using and going over (without depth)
    1. Understanding Interfacing and Abstraction, how, when and why to use which
    2. Ability to add, and remove debug information
    3. Build and Deploy a project to remote computers for testing and debugging.


  • My Suggested level of knowledge is : Intermediate DotNet C# developer (Application Type is not specific) Restrictions are based on your input, and your expected conditions (output)
  • C# Hobbyist may struggle to keep up with the syntax and layout of the project.
  • A great example project for this code is:
    1. IOT Device to gain access.
    2. Windows Hello Style Login Processing

When are the streaming sessions (streaming schedule)?

Currently Planned for Weekly 2pm EST Wednesday

Next 5 Events

Next Five Scheduled Events

Ask Me about my Auto updating Schedule Image [email protected]

Project Outline


  • When I am live:
  • View My Current Presentation here
  • THIS LINK WILL CHANGE WEEK TO WEEK!!! DO NOT BOOKMARK unless you want to view the presentation again.

Please submit all questions in chat AND/OR to [email protected] if i'm able during the stream I'll answer your question, but to ensure you have a proper reply and record submitting questions through email is the best way to get a follow up and thorough answer.

Here's what we will be going over, (this list is incomplete and more information will be added as we continue through the project.)

  1. Setup
  2. Accounts signup and configuration
  3. Lets Look at the camera - Take a picture/video
  4. Let's send your image/video to MCServices.
  5. Analyze the Response

Session Details

Session 0: Setting-up the Programming Environment

Here we are going to discus what you'll need to follow along, how i setup things and where you may need to differ.

NOTE: I'm using a VM, dedicated to this project. if your able i would suggest you also create a VM for development though not many are able, I take this into account when separating the codebase and using extensions. i cannot support all configurations and setups but I'll be happy to take your questions, if I don't have the answer I will use Twitter, and my resources to get answers to your questions.

(Stored in Session 1 Document Named : WhatYouNeed.docx)

  • Which Windows OS to use and lets talk about their limitations
  • Visual Studio Community vs Pro vs Enterprise
  • Code Storage - Local Storage
  • Code Storage - Source Control
  • NuGet
  • Toolsets - Visual Studio Extensions
  • Code Analyzers
  • Local Database - Development Environments
  • TSQL - Not A Primer

(Additional documentation is included in each session update. I cannot guarantee this portion is up to date with the available documentation within the archive.)

Session 2: Setting up the Accounts, API Environments and configurations

Let's talk about all the services we are going to use in our application and how we are going to setup a secure one way encrypted Application Configuration file. We will also discuss storing information in memory in a secure way.

  • VSTS Account signup
  • Azure Account signup
  • Microsoft Cognitive services setup
  • App.Config setup
  • ConfigurationManager.AppSettings setup
  • SecureString setup

Session 3: Create an Image from your camera

We apply our knowledge of USB interfaces and image capture from our device and generate a live feed, capture an image, and store that image.

  • Interface with your camera in Windows 10 (should we use a NuGet Package?)
  • Output Camera to Desktop Application.
  • Record an image to your hard drive from your camera
  • Store that image in your database
  • Send an email of your image to yourself
  • Send the image to an API Service

Session 4: Send your Image to Microsoft Cognitive Services.

Create a payload in a way that is reusable not only in this application but in other applications you may want to use with the same configuration. Create Error handling. and record responses and trace information for review.

  • Create a Package (Send and Receive) Class (Not Provided in the Framework)
  • Store Package Classes in the Database (not a required step)
  • Error Check / Error Response
  • Send the Package to the MCS(Microsoft Cognitive Services) API
  • Store Response in the database

Session 5: Analyze the response

Lets look at what we sent, what we recieved and how to make our package handle more than just one type of request through extending the interface, and applying abstraction technics.

  • Did we get a complete Response
  • Convert JSON to Object Class (NewtonSoft JSON)
  • Create Conditions for Expected API Response
  • BasePackage | BaseItem
  • Red Light / Green Light
  • Open the Door or Report the Attempt.

Session 6: Refining your Settings

Lets take a look at thresholds, API Settings and how to "Tweek" your application to get a more refined and "Known" Pass Fail to your application

  • Thresholds
  • API Options (if Any)
  • Setting up API Collections for processing

More Session information to come

We will be adding the following Sessions:

  • Face Detection
  • Identity Detection

These are possible addtions based on interest and expressed or implied interest :) I'll be making a Poll for these soon.

  • Computer vision
  • Emotion API
  • A Conversation : Online Services vs OpenCV


Average rating

5(4984 Reviews)
  • Avatar


    2 years ago

    Just finished setup now facing this problem: "The media could not be loaded, either because the server or network failed or because the format is not supported.",

  • Avatar


    2 years ago

    Can't even play the first video for this tutorial series. Error in browser: "The media could not be loaded, either because the server or network failed or because the format is not supported.",