<?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>deep learning Archives - Ger Inberg</title>
	<atom:link href="https://gerinberg.com/category/deep-learning/feed/" rel="self" type="application/rss+xml" />
	<link>https://gerinberg.com/category/deep-learning/</link>
	<description>data science developer</description>
	<lastBuildDate>Thu, 24 Dec 2020 11:51:06 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.1</generator>

<image>
	<url>https://gerinberg.com/wp-content/uploads/2017/05/favicon-150x150.jpg</url>
	<title>deep learning Archives - Ger Inberg</title>
	<link>https://gerinberg.com/category/deep-learning/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Image recognition Shiny App using Keras</title>
		<link>https://gerinberg.com/2019/12/10/image-recognition-keras/</link>
					<comments>https://gerinberg.com/2019/12/10/image-recognition-keras/#comments</comments>
		
		<dc:creator><![CDATA[Ger]]></dc:creator>
		<pubDate>Tue, 10 Dec 2019 09:41:00 +0000</pubDate>
				<category><![CDATA[deep learning]]></category>
		<category><![CDATA[shiny]]></category>
		<category><![CDATA[image recognition]]></category>
		<category><![CDATA[keras]]></category>
		<guid isPermaLink="false">http://gerinberg.com/?p=1180</guid>

					<description><![CDATA[<p>Many people use the Python language to do Image recognition and other AI tasks. There has been a huge improvement lately in order to make some popular frameworks available in R. Of course, it&#8217;s possible to run Python code inside R (using reticulate) but it&#8217;s [&#8230;]</p>
<p>The post <a href="https://gerinberg.com/2019/12/10/image-recognition-keras/">Image recognition Shiny App using Keras</a> appeared first on <a href="https://gerinberg.com">Ger Inberg</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Many people use the Python language to do Image recognition and other AI tasks. There has been a huge improvement lately in order to make some popular frameworks available in R. Of course, it&#8217;s possible to run Python code inside R (using <a href="https://github.com/rstudio/reticulate" target="_blank" rel="noreferrer noopener" aria-label="reticulate (opens in a new tab)">reticulate</a>) but it&#8217;s simpler to code in just one language. Keras is a popular framework which is build on top of Tensorflow. It is available in R package <em>keras</em> (<a rel="noreferrer noopener" aria-label="Rstudio documentation (opens in a new tab)" href="https://tensorflow.rstudio.com/keras/" target="_blank">Rstudio documentation</a>). this blog, I will show how I have build a Shiny application to recognize objects in an image.</p>



<h4 class="wp-block-heading" id="app">Shiny app</h4>



<p>The functionality of the application looks like this:</p>



<ol class="wp-block-list"><li>Upload an image to Shiny App</li><li>Perform image recognition using Keras</li><li>Plot detected objects in a Wordcloud and show scores in a table.</li></ol>



<p>I will explain more about task 2, since that is the main functionality. Keras has a number of pretrained models for image classification. They are trained on a large dataset called <a rel="noreferrer noopener" href="http://www.image-net.org/" target="_blank">ImageNet</a>.  I am using the RESNET 50 model since it&#8217;s simple to use. </p>



<h4 class="wp-block-heading">Resnet 50</h4>



<p>RESNET 50 is a <strong>Residual Network</strong> with 50 layers. As the name of the network indicates, this network uses residual learning. In general, in a deep convolutional neural network, several layers are stacked and are trained to the task at hand. The network learns several low/mid/high level features at the end of its layers. In residual learning, instead of trying to learn some features, we try to learn some residual. This residual can be simply understood as subtraction of feature learned from input of that layer. It has proved that training this form of networks is easier than training simple deep convolutional neural networks. Also the accuracy is better when adding more layers,compared to a standard neural network.</p>



<p>The steps needed to perform the image recognition:</p>



<ul class="wp-block-list"><li>Load the image into memory and convert the size to 224&#215;224, since that is the default size of RESNET 50.</li><li>Convert the image to a 3D array representation</li><li>Reshape the image array</li><li>Preprocess the image array</li><li>Predict the object &amp; scores using the RESNET 50 model</li><li>Decode the predictions to a data frame format</li></ul>



<p>The model performs quite good on average, the object with the highest score should be right in about 75% of all uploaded images. The performance of the RESNET 50 model and other models can be found on the <a rel="noreferrer noopener" aria-label="Keras website (opens in a new tab)" href="https://keras.io/applications/#resnet50" target="_blank">Keras website</a>.</p>



<p>Have a look at the application by clicking on the (animated) screenshot below or live at <a href="https://ginberg.shinyapps.io/image_recognition">shinyapps.io</a></p>



<div class="wp-block-envira-envira-gallery"><div class="envira-gallery-feed-output"><img decoding="async" class="envira-gallery-feed-image" src="https://gerinberg.com/wp-content/uploads/2018/12/image_recognition_app-1024x528-640x480.gif" title="image_recognition_app" alt="Image recognition" /></div></div>
<p>The post <a href="https://gerinberg.com/2019/12/10/image-recognition-keras/">Image recognition Shiny App using Keras</a> appeared first on <a href="https://gerinberg.com">Ger Inberg</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://gerinberg.com/2019/12/10/image-recognition-keras/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
	</channel>
</rss>
