Face API Similar Face Searching Using ASP.Net MVC, AngularJS

In this tutorial, we will learn about Face API and create a simple ASP.Net MVC application to search similar face from collection of face by using Face API.

Contents already Discussed:

  • What is Cognitive Services?
  • What is Face API?
  • Sign Up for Face API
  • Create ASP.Net MVC Sample Application
    • Add AngularJS
    • Install & Configure the Face API

Please follow the below link to get all those questions in my previous post: http://shashangka.com/2017/01/08/face-api-using-asp-net-mvc

Contents to Focused:

  • Upload Multiple Candidate Face
  • List Detected Faces
  • Query Face
  • Summary


Open existing sample application> Right Click > Controller > Add Controller > Controller > FaceSimilarController

MVC Controller: This is where we are performing our main operation. First of all get FaceServiceKey Value from web.config by ConfigurationManager.AppSettings.

private static string ServiceKey = ConfigurationManager.AppSettings[“FaceServiceKey”];

Here in MVC Controller we have two main method to performing the face detection operation. One is HttpPost method, which is using for uploading the image file to folder and the other one is HttpGet method is using to get uploaded image and detecting faces by calling API Service.

Both methods are getting called from client script while uploading image to detect faces. Let’s get explained in steps.

Multiple Face Upload: This method is responsible for uploading multiple face image.

Face Detection: This method is responsible for detecting the faces from uploaded images.

Find Similar Faces: This method is responsible for find similar faces from facelist.


Finally Full MVC Controller:

MVC View:

Angular Controller:


Summary: You have just seen how to call Face API to detect & find faces in FaceList. Hope this will help to make application more smart and intelligent.



2 Replies to “Face API Similar Face Searching Using ASP.Net MVC, AngularJS”

  1. vmFindSimilarResult() sir i cannot manage the defination of this class plz u provide the code of this class ???????
    i am so confuse ..!!!!

Leave a Reply

Your email address will not be published. Required fields are marked *