<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Deep-Learning on Yoke Keong</title><link>https://yokekeong.com/blog/deep-learning/</link><description>Recent content in Deep-Learning on Yoke Keong</description><generator>Hugo</generator><language>en</language><lastBuildDate>Thu, 15 Aug 2019 12:00:52 +0000</lastBuildDate><atom:link href="https://yokekeong.com/blog/deep-learning/index.xml" rel="self" type="application/rss+xml"/><item><title>Dim Sum Classifier – from Data to App part 2</title><link>https://yokekeong.com/dim-sum-classifier-from-data-to-app-part-2/</link><pubDate>Thu, 15 Aug 2019 12:00:52 +0000</pubDate><guid>https://yokekeong.com/dim-sum-classifier-from-data-to-app-part-2/</guid><description>&lt;p&gt;&lt;em&gt;Picture Credits&lt;/em&gt; &lt;a href="https://www.wallpaperflare.com/vibrant-shot-of-feasting-on-chinese-steamed-and-fried-dim-sum-wallpaper-aaubx"&gt;&lt;em&gt;here&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;In the previous &lt;a href="https://yokekeong.com/dim-sum-classifier-from-data-to-app-part-1"&gt;post&lt;/a&gt;, we see how we can acquire data, process, clean and train an Image Classifier to identify some yummy dim sums.&lt;/p&gt;&#10;&lt;p&gt;In this post, we shall look at completing the loop by developing the web app using &lt;a href="https://www.starlette.io/"&gt;starlette&lt;/a&gt; (a framework similar to that of flask but supports asynchronous IO), setting up and automating deployment of our web app with Github, Docker contanier and &lt;a href="https://render.com/"&gt;Render&lt;/a&gt;.&lt;/p&gt;&#10;&lt;p&gt;The very helpful &lt;a href="https://course.fast.ai/"&gt;fast.ai course&lt;/a&gt; team and community has given us a quick start with the following resources:&lt;/p&gt;</description></item><item><title>Dim Sum Classifier - from Data to App part 1</title><link>https://yokekeong.com/dim-sum-classifier-from-data-to-app-part-1/</link><pubDate>Tue, 13 Aug 2019 12:00:07 +0000</pubDate><guid>https://yokekeong.com/dim-sum-classifier-from-data-to-app-part-1/</guid><description>&lt;p&gt;&lt;em&gt;Picture Credits&lt;/em&gt; &lt;a href="https://www.wallpaperflare.com/vibrant-shot-of-feasting-on-chinese-steamed-and-fried-dim-sum-wallpaper-aaubx"&gt;&lt;em&gt;here&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;In a typically machine learning lifecycle, we will need to acquire data, process data, train and validate/test models and finally deploy the trained models in applications/services. In this first part of two post, inspired by fast.ai 2019 &lt;a href="https://github.com/fastai/course-v3/blob/master/nbs/dl1/lesson2-download.ipynb"&gt;lesson 2&lt;/a&gt;, we shall build a &lt;a href="https://en.wikipedia.org/wiki/Dim_sum"&gt;Dim Sum&lt;/a&gt; (a Cantonese bite-size style of cuisine with many yummy choices) classifier application by leveraging on Google Images as a data source.&lt;/p&gt;&#10;&lt;p&gt;Due to the wide variety of choices, we shall focus on 5 common dim sum dishes below, with links for your interest:&lt;/p&gt;</description></item><item><title>Rock, paper, scissors - vision transfer learning with fast.ai</title><link>https://yokekeong.com/rock-paper-scissors-vision-transfer-learning-with-fast-ai/</link><pubDate>Wed, 07 Aug 2019 12:00:00 +0000</pubDate><guid>https://yokekeong.com/rock-paper-scissors-vision-transfer-learning-with-fast-ai/</guid><description>&lt;p&gt;&lt;em&gt;Picture Credits:&lt;/em&gt; &lt;a href="https://en.wikipedia.org/wiki/Rock_paper_scissors"&gt;&lt;em&gt;Wikipedia&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;In the previous &lt;a href="https://yokekeong.com/serving-rock-paper-scissors-image-classifier-app-built-with-tensorflow-2-keras-and-flask"&gt;post&lt;/a&gt;, we used the Rock, Paper Scissors &lt;a href="https://github.com/yoke2/rps_tf2_flask_app/blob/master/misc/notebook/rock_paper_scissors_tf2b_colab.ipynb"&gt;notebook&lt;/a&gt; that trained a custom image classification model from scratch.&lt;/p&gt;&#10;&lt;p&gt;While the notebook is demonstrates building custom layers, for such a task, we can also leverage on Transfer Learning using models trained on similar image classification tasks that can often reduce time in training and experimentation and yet achieve results fairly good results, which will be shown here using the &lt;a href="https://github.com/fastai/fastai"&gt;fastai v1&lt;/a&gt; library as demonstrated by Jeremy Howard in his awesome &lt;a href="https://course.fast.ai/"&gt;Practical Deep Learning for Coders&lt;/a&gt; 2019 course.&lt;/p&gt;</description></item><item><title>Serving Rock, Paper, Scissors Image Classifier App built with Tensorflow 2, Keras and Flask</title><link>https://yokekeong.com/serving-rock-paper-scissors-image-classifier-app-built-with-tensorflow-2-keras-and-flask/</link><pubDate>Mon, 05 Aug 2019 12:00:00 +0000</pubDate><guid>https://yokekeong.com/serving-rock-paper-scissors-image-classifier-app-built-with-tensorflow-2-keras-and-flask/</guid><description>&lt;p&gt;&lt;em&gt;Picture Credits:&lt;/em&gt; &lt;a href="https://pixabay.com/vectors/interface-internet-program-browser-3614766/"&gt;&lt;em&gt;Pixabay&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;In this post, we shall be looking at serving a Tensorflow 2 Keras image classification model with a Flask app.&lt;/p&gt;&#10;&lt;p&gt;We shall be leveraging on the &lt;a href="https://github.com/lmoroney/io19/blob/master/Zero%20to%20Hero/Rock-Paper-Scissors.ipynb"&gt;Rock Paper Scissors Tensorflow 2 Notebook&lt;/a&gt; created by &lt;a href="http://laurencemoroney.com/"&gt;Laurence Moroney&lt;/a&gt; and built on the Image Classifier App template provided by &lt;a href="https://github.com/mtobeiyf"&gt;Fing&lt;/a&gt; on the Github repository &lt;a href="https://github.com/mtobeiyf/keras-flask-deploy-webapp"&gt;here&lt;/a&gt;.&lt;/p&gt;&#10;&lt;h3 id="training-and-saving-the-model-in-google-colab"&gt;Training and saving the Model in Google Colab&lt;/h3&gt;&#10;&lt;p&gt;To train the model, we can run the aforementioned Jupyter Notebook on &lt;a href="https://colab.research.google.com/"&gt;Google Colab&lt;/a&gt;. To train the model successfully, we will need to ensure that Tensorflow 2 beta is installed with the following command:&lt;/p&gt;</description></item></channel></rss>