<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>AI &#8211; Sibeesh Passion</title>
	<atom:link href="https://www.sibeeshpassion.com/tag/ai/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.sibeeshpassion.com</link>
	<description>My passion towards life</description>
	<lastBuildDate>Mon, 22 Apr 2019 12:56:43 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>/wp-content/uploads/2017/04/Sibeesh_Passion_Logo_Small.png</url>
	<title>AI &#8211; Sibeesh Passion</title>
	<link>https://www.sibeeshpassion.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Using Azure Cognitive Service Computer Vision AI to read text from an image</title>
		<link>https://www.sibeeshpassion.com/using-azure-cognitive-service-computer-vision-ai-to-read-text-from-an-image/</link>
					<comments>https://www.sibeeshpassion.com/using-azure-cognitive-service-computer-vision-ai-to-read-text-from-an-image/#disqus_thread</comments>
		
		<dc:creator><![CDATA[SibeeshVenu]]></dc:creator>
		<pubDate>Thu, 04 Apr 2019 07:50:15 +0000</pubDate>
				<category><![CDATA[Angular]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[Cognitive Services]]></category>
		<category><![CDATA[AI]]></category>
		<category><![CDATA[Azure AI]]></category>
		<category><![CDATA[Azure Cognitive Services]]></category>
		<category><![CDATA[Computer Vision]]></category>
		<category><![CDATA[Image to Text]]></category>
		<guid isPermaLink="false">https://sibeeshpassion.com/?p=13604</guid>

					<description><![CDATA[[toc] Introduction The Microsoft Azure has a lot to offer when it comes to Cognitive Services, trying out them is really fun. Here in this article, we are going to see how we can detect and read texts from an image and show it in the display using the Cognitive Service Computer Vision AI. The service Computer Vision has it&#8217;s own machine language running which helps us to do our task in an easy and effective manner. It uses the technology Optical Character Recognition and extracts the words or text to a readable format. All we have to do is, [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>[toc]</p>



<h2 class="wp-block-heading">Introduction</h2>



<p>The Microsoft Azure has a lot to offer when it comes to Cognitive Services, trying out them is really fun. Here in this article, we are going to see how we can detect and read texts from an image and show it in the display using the Cognitive Service Computer Vision AI. The service Computer Vision has it&#8217;s own machine language running which helps us to do our task in an easy and effective manner. It uses the technology Optical Character Recognition and extracts the words or text to a readable format. All we have to do is, using the service and write some custom codes as per our requirement. Sounds good?  If yes, let&#8217;s just skip the introduction and jump on to the real fun. </p>



<h2 class="wp-block-heading">Background</h2>



<p>I love quotes, and I strongly believe that a single quote can do an impact in your life sometimes. One of my hobbies is collecting the images which contain quotes in it. Now, with the help of Azure Computer Vision cognitive service, I thought of creating an application which can get the quotes from the image and save it. You can easily think of many other usages of this service, below are some of them.</p>



<ol class="wp-block-list"><li>Using the translator, which scan the image, read the text and translate</li><li>Document creation from the images, which will be useful to save hours</li><li>A Google Glass, which capture what you see and translate the content to your native language</li><li>A digital medical prescription from the actual one</li></ol>



<p>Imagine that you need to create a solution which can save all of your medical prescription contents in a table in a database, so that you can easily sort/filter and show them in a UI. You can even create a mobile application to do that. The possibilities are countless. Now let&#8217;s build one of them.</p>



<h2 class="wp-block-heading">Prerequisites</h2>



<p>Before we start, we should have the following things in our hand. </p>



<ol class="wp-block-list"><li>A valid Azure Subscription </li><li>A good Code editor, I prefer VSCode or Visual Studio</li></ol>



<h2 class="wp-block-heading">Source Code</h2>



<p>The source code be downloaded from <a href="https://github.com/SibeeshVenu/Azure-AI-Image-Text-Reader">here</a>.</p>



<h2 class="wp-block-heading">Let Us Start</h2>



<p>As I mentioned earlier, we will be using an Azure service to build our application. Azure is a cloud computing service created by Microsoft, for the last few years there are significant growth in Azure. The services provided in Azure can be found <a href="https://docs.microsoft.com/en-us/azure/index#pivot=products&amp;panel=all">here</a>. </p>



<h3 class="wp-block-heading">Create the Computer Vision Resource in Azure</h3>



<p>To create the Azure resource, login to the Azure portal and click on the +Create a resource menu. Once the window loads, you can search for the resource Computer Vision as shown in the preceding image.</p>



<figure class="wp-block-image"><img fetchpriority="high" decoding="async" width="651" height="224" src="https://sibeeshpassion.com/wp-content/uploads/2019/02/Computer-Vision-Azure-Resource.png" alt="" class="wp-image-13606" srcset="/wp-content/uploads/2019/02/Computer-Vision-Azure-Resource.png 651w, /wp-content/uploads/2019/02/Computer-Vision-Azure-Resource-300x103.png 300w, /wp-content/uploads/2019/02/Computer-Vision-Azure-Resource-400x138.png 400w" sizes="(max-width: 651px) 100vw, 651px" /><figcaption>Computer Vision Azure Resource</figcaption></figure>



<p>Now, click on the create button and fill the form.</p>



<div class="wp-block-image"><figure class="aligncenter"><img decoding="async" width="299" height="355" src="https://sibeeshpassion.com/wp-content/uploads/2019/02/Create-Resource.png" alt="" class="wp-image-13607" srcset="/wp-content/uploads/2019/02/Create-Resource.png 299w, /wp-content/uploads/2019/02/Create-Resource-253x300.png 253w" sizes="(max-width: 299px) 100vw, 299px" /><figcaption>Create Resource</figcaption></figure></div>



<p>It may take a few minutes to finish the development of the resource. Once it is finished, we can go to the resource and get our keys from the Keys section under Resource Management. Save those keys somewhere as we need them while we create our applications.</p>



<h3 class="wp-block-heading">Develop the Angular Client Application</h3>



<p>Here, we will be creating an Angular application with the help of Angular CLI and to create the application we are going to use the command <em>ng new Azure-AI-Image-Text-Reader</em> where the last parameter is our application name. You should also be given a chance to select your CSS and routing option. Please be noted that you can add them later as well. </p>



<p>Once the application is ready, we can create our own Angular service. </p>



<h4 class="wp-block-heading">detection.service.ts</h4>



<p>To create the service, let&#8217;s use the preceding command.</p>



<script src="https://gist.github.com/SibeeshVenu/d0dc3b759e2b124adc710562a07b39ae.js"></script>



<p>Here the name &#8216;detection&#8217; is our service name. Now we can edit the service code as preceding.</p>



<script src="https://gist.github.com/SibeeshVenu/70bee412d05aa30f9c000c6aec7ee17d.js"></script>



<p>As you can see that we are creating an HttpClient call to our baseUrl which is been configured in our config.ts file. To call the Computer Vision AI service, it is mandatory to pass the subscription key, the one we have created in the Azure portal, to the request by using the header Ocp-Apim-Subscription-Key. </p>



<h4 class="wp-block-heading">config.ts</h4>



<script src="https://gist.github.com/SibeeshVenu/378bc41c350e21ba7e9c52a78dbbe086.js"></script>



<p>Please remember to change the baseUrl and apiKey before you run the application.</p>



<h4 class="wp-block-heading">home.component.ts</h4>



<p>As our service is ready, let&#8217;s create our component now using the command below.</p>



<script src="https://gist.github.com/SibeeshVenu/fa5b288459ff0219a4da636b4406dc1d.js"></script>



<p>Once the component is created, let&#8217;s go to the file home.component.ts and edit our code.</p>



<script src="https://gist.github.com/SibeeshVenu/5d80e48e599b406348e2a9c08fdefbcc.js"></script>



<p>Once the component is loaded in the screen, the user will be able to type or paste the URL of an image and submit the same. Before submitting the request, we are validating the input using the FormControl, we are using the required validator and pattern validator which uses to find whether the given url is valid or not. Once the request is been made we are calling our detection service with a post request and once we get the result from the Azure service, we are looping through the result and formatting the data accordingly.  </p>



<h4 class="wp-block-heading">home.component.html</h4>



<p>As we have our component logic ready in hand, now it is time to edit our component template. Let&#8217;s edit our home.component.html file as follows.</p>



<script src="https://gist.github.com/SibeeshVenu/3758ad77c5164deb3eee3bcbaa8cbaf0.js"></script>



<p>We use Angular Material design to develop our Angular application, the material component mat-card is a card component which can act as a container, apart from the mat-card we are using the components mat-form-field, matInput, mat-error, mat-card-image in our home component. You can use the command <em>npm install &#8211;save @angular/material @angular/cdk @angular/animations</em> to install the material in your application.</p>



<p>Once the component loads, we are giving an option to submit a valid image URL, if the URL provided is not valid, we are disabling the submit button. Once the user submit the request, then we are calling our detection service. Sounds good?</p>



<h2 class="wp-block-heading">Output</h2>



<p>Below are the screen print of our application.</p>



<figure class="wp-block-image"><img decoding="async" width="1024" height="389" src="https://sibeeshpassion.com/wp-content/uploads/2019/02/Start-Screen-1024x389.png" alt="" class="wp-image-13609" srcset="/wp-content/uploads/2019/02/Start-Screen-1024x389.png 1024w, /wp-content/uploads/2019/02/Start-Screen-300x114.png 300w, /wp-content/uploads/2019/02/Start-Screen-768x291.png 768w, /wp-content/uploads/2019/02/Start-Screen-400x152.png 400w, /wp-content/uploads/2019/02/Start-Screen.png 1228w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Now we can test this application by giving the URL of the below image.</p>



<figure class="wp-block-image"><img decoding="async" width="741" height="118" src="https://sibeeshpassion.com/wp-content/uploads/2019/02/quote.png" alt="" class="wp-image-13610" srcset="/wp-content/uploads/2019/02/quote.png 741w, /wp-content/uploads/2019/02/quote-300x48.png 300w, /wp-content/uploads/2019/02/quote-400x64.png 400w" sizes="(max-width: 741px) 100vw, 741px" /></figure>



<p>Once you submit the URL, you should be able to see an output as below.</p>



<figure class="wp-block-image"><img decoding="async" width="650" height="342" src="https://sibeeshpassion.com/wp-content/uploads/2019/02/Result-with-Image-and-Text.png" alt="" class="wp-image-13611" srcset="/wp-content/uploads/2019/02/Result-with-Image-and-Text.png 650w, /wp-content/uploads/2019/02/Result-with-Image-and-Text-300x158.png 300w, /wp-content/uploads/2019/02/Result-with-Image-and-Text-600x315.png 600w, /wp-content/uploads/2019/02/Result-with-Image-and-Text-400x210.png 400w" sizes="(max-width: 650px) 100vw, 650px" /></figure>



<h2 class="wp-block-heading">Demo</h2>



<p>The application demo can be viewed <a href="https://sibeeshvenu.com/Azure-AI-Image-Text-Reader/">here</a>.</p>



<h2 class="wp-block-heading">Conclusion</h2>



<p>Wow!. Now we have learned, what is Azure Computer Vision AI and how to create Azure Computer Vision Cognitive Service. We also learned to create an Angular application which reads the text from images. I hope you found this article useful. I can&#8217;t wait to see what you are going to build with Azure Computer Vision AI. You can also check out the other options we have in Microsoft Azure Computer Vision AI <a href="https://azure.microsoft.com/en-us/services/cognitive-services/computer-vision/">here</a>, I am sure you will love playing with it. </p>



<h2 class="wp-block-heading">Your turn. What do you think?</h2>



<p>Thanks a lot for reading. Did I miss anything that you may think which is needed in this article? Could you find this post as useful? Kindly do not forget to share me your feedback.</p>



<p>Kindest Regards<br>Sibeesh Venu</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sibeeshpassion.com/using-azure-cognitive-service-computer-vision-ai-to-read-text-from-an-image/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Custom Vision AI &#8211; Building Your Own Custom Model and Train</title>
		<link>https://www.sibeeshpassion.com/custom-vision-ai-building-your-own-custom-model-and-train/</link>
					<comments>https://www.sibeeshpassion.com/custom-vision-ai-building-your-own-custom-model-and-train/#disqus_thread</comments>
		
		<dc:creator><![CDATA[SibeeshVenu]]></dc:creator>
		<pubDate>Sun, 25 Nov 2018 20:53:42 +0000</pubDate>
				<category><![CDATA[Azure]]></category>
		<category><![CDATA[Cognitive Services]]></category>
		<category><![CDATA[AI]]></category>
		<category><![CDATA[Artificial Intelligence]]></category>
		<category><![CDATA[Custom Vision AI]]></category>
		<category><![CDATA[Machine Learning]]></category>
		<guid isPermaLink="false">https://sibeeshpassion.com/?p=13403</guid>

					<description><![CDATA[[toc] Introduction The Cognitive services are always a great topic to consider writing, especially when there is a mix of Machine Learning. If you are totally new to the Cognitive services, consider reading my posts wouldn&#8217;t be a bad idea. Here in this article, we are going to use the Microsoft Custom Vision AI, which is a cognitive AI service. With the help of Custom Vision AI, we can easily do the below things. Upload image Tag the images Train the model Evaluate the result The Custom Vision service uses the machine learning to classify the images we are uploading. The [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>[toc]</p>
<h2>Introduction</h2>
<p>The Cognitive services are always a great topic to consider writing, especially when there is a mix of Machine Learning. If you are totally new to the Cognitive services, consider <a href="https://sibeeshpassion.com/?s=cognitive">reading my posts</a> wouldn&#8217;t be a bad idea. Here in this article, we are going to use the Microsoft Custom Vision AI, which is a cognitive AI service. With the help of Custom Vision AI, we can easily do the below things.</p>
<ol>
<li>Upload image</li>
<li>Tag the images</li>
<li>Train the model</li>
<li>Evaluate the result</li>
</ol>
<p>The Custom Vision service uses the machine learning to classify the images we are uploading. The only thing we are required to do is, just specifying the correct tag for each image, you can also tag thousands of images at a time. The AI algorithm is super powerful to give us better accuracy and once the model is trained, use the same to classify new images according to the needs of your app. Let&#8217;s skip the introduction and start doing some amazing things. Let&#8217;s just start then.</p>
<h2>Background</h2>
<p>I have a habit of writing article about the things I learn, though I had worked with Cognitive Services before, recently I had a chance to work with Custom Vision AI service, so thought of building something with that. Here in this article, we are going to create an Azure Custom Vision AI which can,</p>
<ul>
<li>Scan for real objects</li>
<li>Identify whether the object is a car or not</li>
<li>If that is a car, then check which is the car manufacturer</li>
</ul>
<p>We will be creating a Custom Vision AI model, which we will train with thousands of images. I hope it helps.</p>
<h2>Prerequisites</h2>
<p>To do the wonderful things, we always need some prerequisites.</p>
<ol>
<li>Account with Custom Vision AI, you can either use the free subscription or your Azure account</li>
<li>A database of images for training the model, the same can be downloaded from <a href="https://ai.stanford.edu/~jkrause/cars/car_dataset.html">here</a></li>
<li>Good internet connection, as you will have to upload thousands of images</li>
<li>I have already collected a large dataset, which is more than enough to get started, you can download it from OneDrive <a href="https://1drv.ms/u/s!AvC5O6UaF3OFkheGQZ9B31J4Oxak">here</a></li>
</ol>
<h2>Creating Your Custom Vision AI Model</h2>
<p>I assume that you had already gone through the Prerequisites and followed the instructions. If not, please check again.</p>
<p>To get started here, please go to the <a href="https://customvision.ai/">https://customvision.ai/</a> and,</p>
<ol>
<li>Log in with your credentials</li>
<li>Creating your project</li>
<li>Add as many relevant images possible and tag them appropriately</li>
<li>Once you tag them properly, you can train your model, if everything goes well, you should see an output as below.</li>
</ol>
<p><div id="attachment_13404" style="width: 660px" class="wp-caption aligncenter"><a href="https://sibeeshpassion.com/wp-content/uploads/2018/11/Custom-Vision-AI-Train-Output.png"><img decoding="async" aria-describedby="caption-attachment-13404" class="size-full wp-image-13404" src="https://sibeeshpassion.com/wp-content/uploads/2018/11/Custom-Vision-AI-Train-Output.png" alt="Custom Vision AI Train Output" width="650" height="358" srcset="/wp-content/uploads/2018/11/Custom-Vision-AI-Train-Output.png 650w, /wp-content/uploads/2018/11/Custom-Vision-AI-Train-Output-300x165.png 300w, /wp-content/uploads/2018/11/Custom-Vision-AI-Train-Output-400x220.png 400w" sizes="(max-width: 650px) 100vw, 650px" /></a><p id="caption-attachment-13404" class="wp-caption-text">Custom Vision AI Train Output</p></div></p>
<p>Please make sure that you are checking the precision, if it is a good number, then you are good to go. As many images you upload and train them with the correct tag, the precision value get increased.  So feel free to add images and see the output yourself.  Below is the count of the images which I trained to my model.</p>
<p><a href="https://sibeeshpassion.com/wp-content/uploads/2018/11/Trained-Image-Count.png"><img decoding="async" class="size-full wp-image-13408 aligncenter" src="https://sibeeshpassion.com/wp-content/uploads/2018/11/Trained-Image-Count.png" alt="" width="500" height="903" srcset="/wp-content/uploads/2018/11/Trained-Image-Count.png 500w, /wp-content/uploads/2018/11/Trained-Image-Count-166x300.png 166w, /wp-content/uploads/2018/11/Trained-Image-Count-400x722.png 400w, /wp-content/uploads/2018/11/Trained-Image-Count-332x600.png 332w" sizes="(max-width: 500px) 100vw, 500px" /></a></p>
<p>When you train again with the new data, you can see that a new iteration is getting created which is really handy if you need to go back to the previous state, if the precision value is getting decreased.</p>
<p>You can also do a quick test with the UI provided. Please click on the Quick test button and upload an image, let&#8217;s upload an image of a bedroom.</p>
<p><div id="attachment_13405" style="width: 661px" class="wp-caption aligncenter"><a href="https://sibeeshpassion.com/wp-content/uploads/2018/11/Bedroom-Test.png"><img decoding="async" aria-describedby="caption-attachment-13405" class="size-full wp-image-13405" src="https://sibeeshpassion.com/wp-content/uploads/2018/11/Bedroom-Test.png" alt="Bedroom Test" width="651" height="398" srcset="/wp-content/uploads/2018/11/Bedroom-Test.png 651w, /wp-content/uploads/2018/11/Bedroom-Test-300x183.png 300w, /wp-content/uploads/2018/11/Bedroom-Test-400x245.png 400w" sizes="(max-width: 651px) 100vw, 651px" /></a><p id="caption-attachment-13405" class="wp-caption-text">Bedroom Test</p></div></p>
<p>Well, that was easy. Now let&#8217;s upload an image of a Porsche car.</p>
<p><div id="attachment_13406" style="width: 660px" class="wp-caption aligncenter"><a href="https://sibeeshpassion.com/wp-content/uploads/2018/11/Porsche-Car-Result.png"><img decoding="async" aria-describedby="caption-attachment-13406" class="size-full wp-image-13406" src="https://sibeeshpassion.com/wp-content/uploads/2018/11/Porsche-Car-Result.png" alt="Porsche Car Result" width="650" height="315" srcset="/wp-content/uploads/2018/11/Porsche-Car-Result.png 650w, /wp-content/uploads/2018/11/Porsche-Car-Result-300x145.png 300w, /wp-content/uploads/2018/11/Porsche-Car-Result-400x194.png 400w" sizes="(max-width: 650px) 100vw, 650px" /></a><p id="caption-attachment-13406" class="wp-caption-text">Porsche Car Result</p></div></p>
<p>Have you noticed the values returned? The custom vision API is saying that the image is 99.8% is a car and 99.3% is a Porsche car, which is really impressive. Now, what about BMW?</p>
<p><div id="attachment_13407" style="width: 660px" class="wp-caption aligncenter"><a href="https://sibeeshpassion.com/wp-content/uploads/2018/11/BMW-Result.png"><img decoding="async" aria-describedby="caption-attachment-13407" class="size-full wp-image-13407" src="https://sibeeshpassion.com/wp-content/uploads/2018/11/BMW-Result.png" alt="BMW Result" width="650" height="376" srcset="/wp-content/uploads/2018/11/BMW-Result.png 650w, /wp-content/uploads/2018/11/BMW-Result-300x174.png 300w, /wp-content/uploads/2018/11/BMW-Result-400x231.png 400w" sizes="(max-width: 650px) 100vw, 650px" /></a><p id="caption-attachment-13407" class="wp-caption-text">BMW Result</p></div></p>
<p>As our Custom Vision AI is working as expected, now we can go ahead and grab our keys which are needed when you create an application to use this Custom Vision AI. Please click on the setting symbol on the right side of the page, and note down your project id and prediction key. You will also need a prediction URL, which you can get from the Performance tab.</p>
<h2>Conclusion</h2>
<p>The possibilities of cognitive services and machine learning are limitless, you can think of using this in many of our real-life scenarios. If possible, please share me your thoughts on where are all the places we can use this Custom Vision AI service. In this article, we have learned,</p>
<ul>
<li>What is Custom Vision AI Service</li>
<li>How to work with Custom Vision AI service</li>
<li>How to train and test our Custom Vision AI model</li>
</ul>
<p>Is that all? No, in the next article we will create an application which can be used to test it in real time.</p>
<h2><span id="your-turn-what-do-you-think">Your turn. What do you think?</span></h2>
<p>Thanks a lot for reading. Did I miss anything that you may think which is needed in this article? Could you find this post as useful? Kindly do not forget to share me your feedback. What are you waiting for? create your model and train.</p>
<p>Kindest Regards<br />
Sibeesh Venu</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sibeeshpassion.com/custom-vision-ai-building-your-own-custom-model-and-train/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
