Skip to main content

Integrating Tensor flow API into ASP.net Web applications for Image detection

Introduction

Tensor flow provides advanced Machine Learning API. For the example here we will provide a solution for the Image recognition. The same can be applied to other use cases such as Text recognition or any other data set that needs to solve the problems of AI and Machine Learning such as:
  1. Predictive Analytics
  2. Cognitive Processes and its Automation e.g. NLP
  3. Virtual Agents (Bot’s)
  4. Camera Image detection and processing e.g. Industrial Robotics and Drones
  5. Text Knowledge Analytics

Application Development Steps

In the first step we create an ASP.NET application for connecting the camera feed or input data.
In the next step Install Tensor flow as per instructions on the website –> Click here
To begin using Tensor flow we need to decide on the model to use for processing input data – There is an option to use either ready-made models or develop on own depending on the problem at hand. For simplicity we will use ready-made model called a deep convolutional neural network.  It can achieve reasonable performance on hard visual recognition tasks.
These model repo’s can be downloaded from the TensorFlow models repo from GitHub.
The steps for loading the model are as shown below:
  1. Load the data that is already trained from source URL
  2. Converts integer node ID’s to human readable labels
  3. Loads a human readable English name for each softmax node
  4. Loads mapping from string UID to human-readable string
  5. Loads mapping from string UID to integer node ID
  6. Loads the final mapping of integer node ID to human-readable string
  7. Creates a graph
  8. Runs inference on an image by specifying the image file
  9. Returns the model probabilities to Application
  10. Application displays the inference. 

Results

The result of the application is as shown below with ASP Web App user interface screenshots:



Conclusion
More advanced web applications with different models can be used from Tensor Flow depending on the use case and integrated into the web application as per the requirements.

Comments

  1. can you share the source code

    ReplyDelete
  2. Its very informative blog and useful article thank you for sharing with us , keep posting learn
    .NET Online Course Hyderabad

    ReplyDelete
  3. Good job. Can i have a source code, this is my first project for the tensorflow.

    ReplyDelete
  4. valuable blog,Informative content...thanks for sharing, Waiting for the next update...
    Loadrunner Training Online
    Loadrunner Online Training

    ReplyDelete

Post a Comment

Popular posts from this blog

PyTorch vs TensorFlow — spotting the difference

In this post I want to explore some of the key similarities and differences between two popular deep learning frameworks: PyTorch and TensorFlow. Why those two and not the others? There are many deep learning frameworks and many of them are viable tools, I chose those two just because I was interested in comparing them specifically. Origins TensorFlow is developed by Google Brain and actively used at Google both for research and production needs. Its closed-source predecessor is called DistBelief. PyTorch is a cousin of lua-based Torch framework which is actively used at Facebook. However, PyTorch is not a simple set of wrappers to support popular language, it was rewritten and tailored to be fast and feel native. The best way to compare two frameworks is to code something up in both of them. I’ve written a companion jupyter notebook for this post and you can  get it here . All code will be provided in the post too. First, let’s code a simple approximator for t...

TensorFlow Serving Tutorial for Beginners

TensorFlow Serving is a flexible, high-performance serving system for machine learning models, designed for production environments. TensorFlow Serving makes it easy to deploy new algorithms and experiments, while keeping the same server architecture and APIs. Basic Serving Tutorial See the  basic tutorial  on the TensorFlow Serving site to learn how to export a trained TensorFlow model and build a server to serve the exported model. Advanced Serving Tutorial See the  advanced tutorial  on the TensorFlow Serving site to learn how to build a server that dynamically discovers and serves new versions of a trained TensorFlow model. Serving Inception Model Tutorial See the  serving inception tutorial  on the TensorFlow Serving site to learn how to serve the inception model with TensorFlow Serving and Kubernetes.