<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.9.3">Jekyll</generator><link href="https://datacrunchcentral.github.io/feed.xml" rel="self" type="application/atom+xml" /><link href="https://datacrunchcentral.github.io/" rel="alternate" type="text/html" /><updated>2023-12-14T10:47:00-05:00</updated><id>https://datacrunchcentral.github.io/feed.xml</id><title type="html">Mohammed Asif</title><subtitle>Mohammed Asif's Portfolio</subtitle><author><name>Mohammed Asif</name></author><entry><title type="html">Learn Microsoft Excel</title><link href="https://datacrunchcentral.github.io/posts/electra-spanish/" rel="alternate" type="text/html" title="Learn Microsoft Excel" /><published>2020-06-11T00:00:00-04:00</published><updated>2020-06-11T00:00:00-04:00</updated><id>https://datacrunchcentral.github.io/posts/electra-spanish</id><content type="html" xml:base="https://datacrunchcentral.github.io/posts/electra-spanish/">&lt;h2 id=&quot;1-introduction&quot;&gt;1. Introduction&lt;/h2&gt;

&lt;p class=&quot;text-justify&quot;&gt;Microsoft Excel is a powerful spreadsheet program that is part of the Microsoft Office suite. It’s widely used for various tasks such as data entry, analysis, calculation, and visualization. Here’s a brief introduction to some of its key features:&lt;/p&gt;

&lt;h2 id=&quot;11-data-entry-and-formatting&quot;&gt;1.1 Data Entry and Formatting&lt;/h2&gt;

&lt;p&gt;Excel provides a grid of cells for entering data, making it easy to organize information in rows and columns.
You can format cells to change the appearance of data, apply styles, and use conditional formatting to highlight specific values.&lt;/p&gt;

&lt;h2 id=&quot;12-formulas-and-functions&quot;&gt;1.2 Formulas and Functions&lt;/h2&gt;
&lt;p&gt;Excel supports a vast array of formulas and functions for performing calculations. Formulas can range from basic arithmetic operations like addition and subtraction to complex calculations involving statistical, mathematical, and financial functions.&lt;/p&gt;

&lt;h2 id=&quot;13-data-cleaning-and-manipulation&quot;&gt;1.3 Data Cleaning and Manipulation&lt;/h2&gt;
&lt;p&gt;Excel is instrumental for cleaning and manipulating data. Its sorting and filtering capabilities allow users to organize data efficiently. Text functions like CONCATENATE, LEFT, RIGHT, and LEN help clean and transform text-based data.&lt;/p&gt;

&lt;h2 id=&quot;14-charts-and-graphs&quot;&gt;1.4 Charts and Graphs&lt;/h2&gt;
&lt;p&gt;Creating charts and graphs in Excel is a key feature for visualizing data trends. Users can choose from various chart types such as bar charts, pie charts, line charts, and scatter plots. This visual representation enhances data analysis and presentation.&lt;/p&gt;

&lt;h2 id=&quot;15-data-analysis&quot;&gt;1.5 Data Analysis&lt;/h2&gt;
&lt;p&gt;Excel includes tools like PivotTables that simplify data analysis and summarization. Users can quickly generate insights by arranging and summarizing large datasets. The Analysis ToolPak adds advanced statistical and engineering analysis capabilities.&lt;/p&gt;

&lt;h2 id=&quot;16-dashboards-and-visualization&quot;&gt;1.6 Dashboards and Visualization&lt;/h2&gt;
&lt;p&gt;Excel is widely used for creating interactive dashboards. Users can combine charts, graphs, and other visual elements to provide a comprehensive overview of complex datasets. Sparklines offer in-cell mini-charts for quick trend analysis.&lt;/p&gt;

&lt;h2 id=&quot;17-collaboration&quot;&gt;1.7 Collaboration&lt;/h2&gt;
&lt;p&gt;Excel supports collaboration features, allowing multiple users to work on the same workbook simultaneously. Users can track changes, add comments, and share workbooks seamlessly, enhancing team productivity.&lt;/p&gt;

&lt;h2 id=&quot;18-automation-with-macros&quot;&gt;1.8 Automation with Macros&lt;/h2&gt;
&lt;p&gt;Excel’s macro feature enables users to automate repetitive tasks by recording and playing back sequences of actions. This boosts efficiency and reduces the time spent on routine operations.&lt;/p&gt;

&lt;h2 id=&quot;19-importing-and-exporting-data&quot;&gt;1.9 Importing and Exporting Data:&lt;/h2&gt;
&lt;p&gt;Excel facilitates the import of data from external sources, including databases, text files, and online services. The ability to export data to various formats enhances compatibility with other software applications.&lt;/p&gt;

&lt;h2 id=&quot;110-conditional-formatting&quot;&gt;1.10 Conditional Formatting&lt;/h2&gt;
&lt;p&gt;Conditional formatting is a powerful feature that allows users to highlight cells based on specific conditions. This visual enhancement makes it easier to identify patterns, trends, or outliers in the data.&lt;/p&gt;

&lt;p&gt;Whether you’re an Excel beginner or an advanced user, these features collectively make Excel a versatile and indispensable tool for various tasks, from basic calculations to complex data analysis and reporting.&lt;/p&gt;

&lt;h2 id=&quot;references&quot;&gt;References&lt;/h2&gt;
&lt;ul&gt;
  &lt;li&gt;[1] &lt;a href=&quot;https://excel-practice-online.com&quot;&gt;Excel practice&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content><author><name>Mohammed Asif</name></author><category term="posts" /><category term="ms office" /><category term="excel" /><category term="functions" /><summary type="html">MS Excel is one of the most important tool which is used to convert the raw data to understandable insights.</summary></entry><entry><title type="html">Visual Recognition for Vietnamese Foods</title><link href="https://datacrunchcentral.github.io/posts/vn-food-classifier/" rel="alternate" type="text/html" title="Visual Recognition for Vietnamese Foods" /><published>2020-05-26T00:00:00-04:00</published><updated>2020-05-26T00:00:00-04:00</updated><id>https://datacrunchcentral.github.io/posts/vn-food-classifier</id><content type="html" xml:base="https://datacrunchcentral.github.io/posts/vn-food-classifier/">&lt;p&gt;&lt;a href=&quot;https://github.com/chriskhanhtran/vn-food-app&quot;&gt;&lt;img src=&quot;https://img.shields.io/badge/GitHub-View_Repository-blue?logo=GitHub&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Imagine that you are a world traveller and are traveling to a country famous for its street foods. Walking in a night market street full of food trucks with many delicious-looking options, you have no idea what these foods are and whether they contain any ingredient you are allergic to. You want to ask the local but you don’t know the language. You wish that you have an app on your phone that allows you to take a picture of that food you want to have and will return all the information you need to know about it.&lt;/p&gt;

&lt;p&gt;It’s one simple application of computer vision that can make our life better, besides many other applications being implemented in autonomous driving or cancer detection.&lt;/p&gt;

&lt;p&gt;Today we are going to build a world-class image classifier using the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;fastai&lt;/code&gt; library to classify 11 popular Vietnamese dishes. The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;fastai&lt;/code&gt; library is built on top of &lt;a href=&quot;https://pytorch.org/&quot;&gt;PyTorch&lt;/a&gt; and allows us to quickly and easily build the latest neural networks and train our models to receive state-of-the-art results.&lt;/p&gt;

&lt;p&gt;Before we begin, let’s load packages that we are going to use in this project.&lt;/p&gt;

&lt;div class=&quot;language-python highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;reload_ext&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;autoreload&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;autoreload&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;matplotlib&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;inline&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-python highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;os&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;numpy&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;np&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;urllib.request&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;fastai.vision&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;fastai.metrics&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;error_rate&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;PIL&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Image&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ImageFile&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;ImageFile&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LOAD_TRUNCATED_IMAGES&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;True&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;looking-at-the-data&quot;&gt;Looking at the data&lt;/h2&gt;

&lt;p&gt;I have built an image dataset of popular Vietnamese dishes using the Bing Image Search API by following &lt;a href=&quot;https://www.pyimagesearch.com/2018/04/09/how-to-quickly-build-a-deep-learning-image-dataset/&quot;&gt;PyImageSearch’s tutorial&lt;/a&gt;. We can directly download this dataset from Google Drive.&lt;/p&gt;

&lt;div class=&quot;language-python highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;o&quot;&gt;%%&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;time&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# Download and unzip
&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;os&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;exists&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;data&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;err&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;wget&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;O&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;dataset.zip&quot;&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;https://www.googleapis.com/drive/v3/files/13GD8pcwHJPiAPbPtm6KeC20Qw1zm9xdy?alt=media&amp;amp;key=AIzaSyCmo6sAQ37OK8DK4wnT94PoLx5lx-7VTDE&quot;&lt;/span&gt;
    &lt;span class=&quot;err&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;unzip&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dataset&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;zip&lt;/span&gt;
    &lt;span class=&quot;err&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;rm&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dataset&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;zip&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Each class is stored in a seperate folder in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;data&lt;/code&gt; and we can use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ImageDataBunch.from_folder&lt;/code&gt; to quickly load our dataset. In addition, we resize our images to 224 x 224 pixel and use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;get_transforms&lt;/code&gt; to flip, rotate, zoom, warp, adjust lighting our original images (which is called data augmentation, a strategy that enables practitioners to significantly increase the diversity of data available for training models, without actually collecting new data). We also &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;normalize&lt;/code&gt; the images using statistics from ImageNet dataset.&lt;/p&gt;

&lt;div class=&quot;language-python highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;path&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;./data/&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;np&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;random&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;seed&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;42&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;data&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ImageDataBunch&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;from_folder&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;train&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'.'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ds_tfms&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;get_transforms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(),&lt;/span&gt;
                                  &lt;span class=&quot;n&quot;&gt;valid_pct&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;0.2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;bs&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;64&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;size&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;224&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;normalize&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;imagenet_stats&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The dataset has more than 6k images and we use 20% of them as a validation set.&lt;/p&gt;

&lt;div class=&quot;language-python highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;train_ds&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;valid_ds&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;(4959, 1239)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Let’s look at some samples:&lt;/p&gt;

&lt;div class=&quot;language-python highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;show_batch&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;rows&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;figsize&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/vn-food-classifier/output_12_0.png&quot; alt=&quot;png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The dataset has a total of 11 classes. They are:&lt;/p&gt;

&lt;div class=&quot;language-python highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Number of classes: &quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;classes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Classes: &quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;classes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Number of classes:  11
Classes:  ['banh-mi', 'banh-xeo', 'bubble-tea', 'bun-bo-hue', 'bun-bo-nam-bo', 'bun-cha', 'bun-dau-mam-tom', 'che', 'hu-tieu', 'pho', 'spring-rolls']
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;training-resnet-50&quot;&gt;Training: ResNet-50&lt;/h2&gt;

&lt;p&gt;Now we will finetune a ResNet-50 model on our customized dataset. ResNet is from the paper &lt;a href=&quot;https://arxiv.org/pdf/1512.03385.pdf&quot;&gt;Deep Residual Learning for Image Recognition&lt;/a&gt; and is the best default model for computer vision. This ResNet-34 model is trained on ImageNet with 1000 classes, so first we need to initialize a new head for the model to be adapted to the number of classes in our dataset. The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cnn_learner&lt;/code&gt; method will do this for us (Read &lt;a href=&quot;https://docs.fast.ai/vision.learner.html#cnn_learner&quot;&gt;documentation&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Then we will train the model in two stages:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;first we freeze the body weights and only train the head,&lt;/li&gt;
  &lt;li&gt;then we unfreeze the layers of the backbone and fine-tune the whole model.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;stage-1-finetune-the-top-layers-only&quot;&gt;Stage 1: Finetune the top layers only&lt;/h3&gt;

&lt;div class=&quot;language-python highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;learn&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cnn_learner&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;models&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;resnet50&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;metrics&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;error_rate&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pretrained&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;True&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;We will train the model for 20 epoches following the 1cycle policy. The number of epoches we need to train depends on how different the dataset is from ImageNet. Basically, we train the model until the validation loss stops decrease. The default learning rate here is 3e-3.&lt;/p&gt;

&lt;div class=&quot;language-python highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;learn&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fit_one_cycle&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;table border=&quot;1&quot; class=&quot;dataframe&quot;&gt;
  &lt;thead&gt;
    &lt;tr style=&quot;text-align: left;&quot;&gt;
      &lt;th&gt;epoch&lt;/th&gt;
      &lt;th&gt;train_loss&lt;/th&gt;
      &lt;th&gt;valid_loss&lt;/th&gt;
      &lt;th&gt;error_rate&lt;/th&gt;
      &lt;th&gt;time&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;0&lt;/td&gt;
      &lt;td&gt;1.356109&lt;/td&gt;
      &lt;td&gt;0.657256&lt;/td&gt;
      &lt;td&gt;0.206618&lt;/td&gt;
      &lt;td&gt;01:31&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;1&lt;/td&gt;
      &lt;td&gt;0.870719&lt;/td&gt;
      &lt;td&gt;0.560793&lt;/td&gt;
      &lt;td&gt;0.167070&lt;/td&gt;
      &lt;td&gt;01:27&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;2&lt;/td&gt;
      &lt;td&gt;0.687549&lt;/td&gt;
      &lt;td&gt;0.526645&lt;/td&gt;
      &lt;td&gt;0.167877&lt;/td&gt;
      &lt;td&gt;01:32&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;3&lt;/td&gt;
      &lt;td&gt;0.621711&lt;/td&gt;
      &lt;td&gt;0.444908&lt;/td&gt;
      &lt;td&gt;0.143664&lt;/td&gt;
      &lt;td&gt;01:27&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;4&lt;/td&gt;
      &lt;td&gt;0.493342&lt;/td&gt;
      &lt;td&gt;0.397156&lt;/td&gt;
      &lt;td&gt;0.126715&lt;/td&gt;
      &lt;td&gt;01:28&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;5&lt;/td&gt;
      &lt;td&gt;0.435479&lt;/td&gt;
      &lt;td&gt;0.381771&lt;/td&gt;
      &lt;td&gt;0.123487&lt;/td&gt;
      &lt;td&gt;01:27&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;6&lt;/td&gt;
      &lt;td&gt;0.373893&lt;/td&gt;
      &lt;td&gt;0.389900&lt;/td&gt;
      &lt;td&gt;0.121065&lt;/td&gt;
      &lt;td&gt;01:28&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;7&lt;/td&gt;
      &lt;td&gt;0.325564&lt;/td&gt;
      &lt;td&gt;0.371386&lt;/td&gt;
      &lt;td&gt;0.112994&lt;/td&gt;
      &lt;td&gt;01:28&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;8&lt;/td&gt;
      &lt;td&gt;0.295842&lt;/td&gt;
      &lt;td&gt;0.349679&lt;/td&gt;
      &lt;td&gt;0.106538&lt;/td&gt;
      &lt;td&gt;01:29&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;9&lt;/td&gt;
      &lt;td&gt;0.271255&lt;/td&gt;
      &lt;td&gt;0.348150&lt;/td&gt;
      &lt;td&gt;0.098467&lt;/td&gt;
      &lt;td&gt;01:28&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;10&lt;/td&gt;
      &lt;td&gt;0.233799&lt;/td&gt;
      &lt;td&gt;0.317944&lt;/td&gt;
      &lt;td&gt;0.091203&lt;/td&gt;
      &lt;td&gt;01:28&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;11&lt;/td&gt;
      &lt;td&gt;0.205257&lt;/td&gt;
      &lt;td&gt;0.306772&lt;/td&gt;
      &lt;td&gt;0.086360&lt;/td&gt;
      &lt;td&gt;01:27&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;12&lt;/td&gt;
      &lt;td&gt;0.171645&lt;/td&gt;
      &lt;td&gt;0.310830&lt;/td&gt;
      &lt;td&gt;0.084746&lt;/td&gt;
      &lt;td&gt;01:28&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;13&lt;/td&gt;
      &lt;td&gt;0.159442&lt;/td&gt;
      &lt;td&gt;0.293081&lt;/td&gt;
      &lt;td&gt;0.078289&lt;/td&gt;
      &lt;td&gt;01:27&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;14&lt;/td&gt;
      &lt;td&gt;0.137362&lt;/td&gt;
      &lt;td&gt;0.295972&lt;/td&gt;
      &lt;td&gt;0.083939&lt;/td&gt;
      &lt;td&gt;01:29&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;15&lt;/td&gt;
      &lt;td&gt;0.112108&lt;/td&gt;
      &lt;td&gt;0.289382&lt;/td&gt;
      &lt;td&gt;0.084746&lt;/td&gt;
      &lt;td&gt;01:26&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;16&lt;/td&gt;
      &lt;td&gt;0.093431&lt;/td&gt;
      &lt;td&gt;0.279121&lt;/td&gt;
      &lt;td&gt;0.083939&lt;/td&gt;
      &lt;td&gt;01:30&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;17&lt;/td&gt;
      &lt;td&gt;0.094814&lt;/td&gt;
      &lt;td&gt;0.281516&lt;/td&gt;
      &lt;td&gt;0.079903&lt;/td&gt;
      &lt;td&gt;01:29&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;18&lt;/td&gt;
      &lt;td&gt;0.083980&lt;/td&gt;
      &lt;td&gt;0.277226&lt;/td&gt;
      &lt;td&gt;0.073446&lt;/td&gt;
      &lt;td&gt;01:33&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;19&lt;/td&gt;
      &lt;td&gt;0.090189&lt;/td&gt;
      &lt;td&gt;0.274643&lt;/td&gt;
      &lt;td&gt;0.081517&lt;/td&gt;
      &lt;td&gt;01:28&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;div class=&quot;language-python highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;learn&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;save&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'resnes50-stage-1'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;stage-2-unfreeze-and-finetune-the-entire-networks&quot;&gt;Stage 2: Unfreeze and finetune the entire networks&lt;/h3&gt;

&lt;p&gt;At this stage we will unfreeze the whole model and finetune it with smaller learning rates. The code below will help us find the learning rate for this stage.&lt;/p&gt;

&lt;div class=&quot;language-python highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;learn&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;load&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'resnes50-stage-1'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;learn&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;lr_find&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;learn&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;recorder&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;plot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/vn-food-classifier/output_24_2.png&quot; alt=&quot;png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;When finetuning the model at state 2, we will use different learning rates for different layers. The top layers will be update at greater rates than the bottom layers. As a rule of thumb, we use learning rates between (a, b), in which:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;a is taken from the LR Finder above where the loss starts to decrease for a while,&lt;/li&gt;
  &lt;li&gt;b is 5 to 10 times smaller than the default rate we used in stage 1.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this case, the learning rate we will use is from 3e-6 to 3e-4 We continnue to train the model until the validation loss stops decreasing.&lt;/p&gt;

&lt;div class=&quot;language-python highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;learn&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;unfreeze&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;learn&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fit_one_cycle&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;max_lr&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;slice&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;3e-6&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;3e-4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;table border=&quot;1&quot; class=&quot;dataframe&quot;&gt;
  &lt;thead&gt;
    &lt;tr style=&quot;text-align: left;&quot;&gt;
      &lt;th&gt;epoch&lt;/th&gt;
      &lt;th&gt;train_loss&lt;/th&gt;
      &lt;th&gt;valid_loss&lt;/th&gt;
      &lt;th&gt;error_rate&lt;/th&gt;
      &lt;th&gt;time&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;0&lt;/td&gt;
      &lt;td&gt;0.077156&lt;/td&gt;
      &lt;td&gt;0.277789&lt;/td&gt;
      &lt;td&gt;0.079903&lt;/td&gt;
      &lt;td&gt;01:30&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;1&lt;/td&gt;
      &lt;td&gt;0.089096&lt;/td&gt;
      &lt;td&gt;0.269736&lt;/td&gt;
      &lt;td&gt;0.075061&lt;/td&gt;
      &lt;td&gt;01:30&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;2&lt;/td&gt;
      &lt;td&gt;0.092252&lt;/td&gt;
      &lt;td&gt;0.282279&lt;/td&gt;
      &lt;td&gt;0.079096&lt;/td&gt;
      &lt;td&gt;01:29&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;3&lt;/td&gt;
      &lt;td&gt;0.074603&lt;/td&gt;
      &lt;td&gt;0.265167&lt;/td&gt;
      &lt;td&gt;0.067797&lt;/td&gt;
      &lt;td&gt;01:31&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;4&lt;/td&gt;
      &lt;td&gt;0.071408&lt;/td&gt;
      &lt;td&gt;0.278237&lt;/td&gt;
      &lt;td&gt;0.074253&lt;/td&gt;
      &lt;td&gt;01:33&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;5&lt;/td&gt;
      &lt;td&gt;0.047503&lt;/td&gt;
      &lt;td&gt;0.250248&lt;/td&gt;
      &lt;td&gt;0.065375&lt;/td&gt;
      &lt;td&gt;01:29&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;6&lt;/td&gt;
      &lt;td&gt;0.037788&lt;/td&gt;
      &lt;td&gt;0.249852&lt;/td&gt;
      &lt;td&gt;0.070218&lt;/td&gt;
      &lt;td&gt;01:30&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;7&lt;/td&gt;
      &lt;td&gt;0.035603&lt;/td&gt;
      &lt;td&gt;0.251429&lt;/td&gt;
      &lt;td&gt;0.066990&lt;/td&gt;
      &lt;td&gt;01:29&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;After two stages, the error rate on the validation set is about 6% and the accuracy for our dataset with 11 classes is 94%. That’s a pretty accurate model. It’s a good practice to save the current stage of the model in case we want to train it for more epoches.&lt;/p&gt;

&lt;div class=&quot;language-python highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;learn&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;save&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'resnes50-stage-2'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;evaluation&quot;&gt;Evaluation&lt;/h2&gt;

&lt;p&gt;Now let’s look on the model’s predictions. Specifically, we will look at examples where the model makes wrong predictions. Below are 9 examples with the top losses, meaning on these examples the model gives the actual class a very low score.&lt;/p&gt;

&lt;div class=&quot;language-python highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;learn&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;load&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'resnes50-stage-2'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;interp&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ClassificationInterpretation&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;from_learner&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;learn&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;losses&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;idxs&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;interp&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;top_losses&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;interp&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;plot_top_losses&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;figsize&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;15&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;11&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/vn-food-classifier/output_31_1.png&quot; alt=&quot;png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The confusion matrix below will us a big picture of which pair of dishes make our model confused. The number of wrong predictions are quite low.&lt;/p&gt;

&lt;div class=&quot;language-python highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;interp&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;plot_confusion_matrix&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;figsize&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;12&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;12&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dpi&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;60&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/vn-food-classifier/output_33_0.png&quot; alt=&quot;png&quot; /&gt;&lt;/p&gt;

&lt;div class=&quot;language-python highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;interp&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;most_confused&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;min_val&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;[('pho', 'hu-tieu', 11),
 ('bun-bo-nam-bo', 'bun-cha', 5),
 ('hu-tieu', 'bun-bo-nam-bo', 5),
 ('pho', 'bun-bo-hue', 5),
 ('bun-bo-hue', 'pho', 4),
 ('hu-tieu', 'bun-cha', 4),
 ('bun-bo-hue', 'hu-tieu', 3),
 ('bun-cha', 'bun-bo-nam-bo', 3),
 ('hu-tieu', 'bun-bo-hue', 3),
 ('hu-tieu', 'pho', 3)]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;production&quot;&gt;Production&lt;/h2&gt;

&lt;p&gt;After being satisfied with our model, we can save it to disk and use it to classify new data. We can also deploy it into a magical app that I described at the beginning of the notebook.&lt;/p&gt;

&lt;div class=&quot;language-python highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;# Export model
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;learn&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;export&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;For inference, we also want to run the model on CPU instead of GPU.&lt;/p&gt;

&lt;div class=&quot;language-python highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;defaults&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;device&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;torch&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;device&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'cpu'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The functions below will download an image from an URL and use the model to make prediction for that image.&lt;/p&gt;

&lt;div class=&quot;language-python highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;open_image_url&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;s&quot;&gt;&quot;&quot;&quot;Download image from URL, return fastai image and PIL image.&quot;&quot;&quot;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;urllib&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;urlretrieve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;./img/test.jpg&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;open_image&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;./img/test.jpg&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Image&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;open&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;./img/test.jpg&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;predict&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;s&quot;&gt;&quot;&quot;&quot;Make prediction for image from url, show image and predicted probability.&quot;&quot;&quot;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pil_img&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;open_image_url&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;pred_class&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pred_idx&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;outputs&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;learn&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;predict&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Predicted Class: &quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pred_class&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sa&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Probability: &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;outputs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pred_idx&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;numpy&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;%&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    
    &lt;span class=&quot;n&quot;&gt;plt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;figure&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;figsize&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;15&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;# Show image
&lt;/span&gt;    &lt;span class=&quot;n&quot;&gt;plt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;subplot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;plt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;imshow&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pil_img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;plt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;axis&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'off'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;plt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'Image'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    
    &lt;span class=&quot;c1&quot;&gt;# Plot Probabilities
&lt;/span&gt;    &lt;span class=&quot;n&quot;&gt;plt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;subplot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;pd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Series&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;outputs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;classes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sort_values&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;().&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;plot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;kind&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'barh'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;plt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;xlabel&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Class&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;plt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Probability&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-python highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;# Load model
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;learn&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;load_learner&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-python highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;# Make prediction from URL
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;str&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;input&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;URL: &quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;predict&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;URL:  https://i.pinimg.com/originals/9b/63/d7/9b63d76a44be020e03eeaec0a1134e95.jpg


Predicted Class:  bun-bo-hue
Probability: 99.99%
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/vn-food-classifier/output_43_2.png&quot; alt=&quot;png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I have also built a web app for this model. Check it out below:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://vietnamese-food.herokuapp.com/&quot;&gt;&lt;img src=&quot;https://img.shields.io/badge/Heroku-Open_Web_App-blue?logo=Heroku&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://github.com/chriskhanhtran/vn-food-app/blob/master/img/vn-food-app.gif?raw=true&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;We have walked through the whole pipeline to finetune a ResNet-50 model on our customized dataset, evaluate its strengths and weaknesses and deploy the model for production. With the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;fastai&lt;/code&gt; library, we can quickly achieve state-of-the-art results with very neat and clean codes.&lt;/p&gt;

&lt;p&gt;In this project, we built a classifier for only 11 popular Vietnamese dishes, but we can easily scale up the model by collecting more data for hundreds or thounsands of classes following this &lt;a href=&quot;https://www.pyimagesearch.com/2018/04/09/how-to-quickly-build-a-deep-learning-image-dataset/&quot;&gt;PyImageSearch’s tutorial&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I have seen many interesting ideas using computer vision, such as &lt;a href=&quot;https://play.google.com/store/apps/details?id=com.peat.GartenBank&amp;amp;hl=en_US&quot;&gt;Plantix&lt;/a&gt;, a plant doctor app which can tell what diseases your plants might have from a single photo and how you should take care of them. And yes, with some software engineering skills, some data and an idea, you can build your own impactful computer vision application. I look forwards to seeing these applications make the world a better place in all directions.&lt;/p&gt;

&lt;h2 id=&quot;reference&quot;&gt;Reference&lt;/h2&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/fastai/course-v3/blob/master/nbs/dl1/lesson1-pets.ipynb&quot;&gt;Fast AI: Lesson 1 - What’s your pet&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/fastai/course-v3/blob/master/nbs/dl1/lesson2-download.ipynb&quot;&gt;Fast AI: Lesson 2 - Creating your own dataset from Google Images&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.pyimagesearch.com/2018/04/09/how-to-quickly-build-a-deep-learning-image-dataset/&quot;&gt;PyImageSearch: How to (quickly) build a deep learning image dataset&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content><author><name>Mohammed Asif</name></author><category term="posts" /><category term="cv" /><category term="deep learning" /><summary type="html">We are going to build a world-class image classifier using the fastai library to classify 11 popular Vietnamese dishes.</summary></entry><entry><title type="html">Create a Minimalism GitHub Page for Your Data Science Portfolio in 30 Minutes</title><link href="https://datacrunchcentral.github.io/posts/portfolio-tutorial/" rel="alternate" type="text/html" title="Create a Minimalism GitHub Page for Your Data Science Portfolio in 30 Minutes" /><published>2020-01-13T00:00:00-05:00</published><updated>2020-01-13T00:00:00-05:00</updated><id>https://datacrunchcentral.github.io/posts/portfolio-tutorial</id><content type="html" xml:base="https://datacrunchcentral.github.io/posts/portfolio-tutorial/">&lt;p&gt;In the early days of my journey in data science a year ago, I spent most of my time reading articles on Towards Data Science to create my own Data Science roadmap. The opinions are different in the knowledge one needs to acquire to become a Data Scientist and how to get there, but there is one thing in common: at a point in that journey, one should have a portfolio where she can host her Data Science projects.&lt;/p&gt;

&lt;p&gt;I created my first portfolio about 6 months after I wrote my first line of Python, when I completed the &lt;a href=&quot;https://www.udemy.com/course/python-for-data-science-and-machine-learning-bootcamp/&quot;&gt;Python for Data Science and Machine Learning Bootcamp&lt;/a&gt; on Udemy, to host simple projects I had done during the course. Since then, building and maintaining my portforlio is one of my favorite things to do. I enjoy organizing my ideas, writing them down, explaining things and make them neat.&lt;/p&gt;

&lt;p&gt;Having a portforlio encourages me to seriously document any projects I work on. For job search, I usually bring an iPad with my portfolio opened to career events and interviews so when I share about my projects, I can guide interviewers through my codes and visualizations. It is a very efficient way to build impression and maintain the conversations.&lt;/p&gt;

&lt;p&gt;In this tutorial, we will step-by-step learn how to build a simple but powerful GitHub page to host your Data Science projects. The whole process will take about 30 minutes. Let’s get started!&lt;/p&gt;

&lt;h2 id=&quot;step-1-create-a-github-account&quot;&gt;Step 1: Create a GitHub Account&lt;/h2&gt;

&lt;p&gt;First, we need to sign up a GitHub account at &lt;a href=&quot;https://github.com/&quot;&gt;https://github.com/&lt;/a&gt;.&lt;/p&gt;

&lt;center&gt;&lt;img src=&quot;https://github.com/chriskhanhtran/portfolio-tutorial/blob/master/images/1.PNG?raw=true&quot; /&gt;&lt;/center&gt;

&lt;p&gt;After signing up, we will log in and move to Step 2.&lt;/p&gt;

&lt;h2 id=&quot;step-2-create-a-repository-named-user-namegithubio&quot;&gt;Step 2: Create a Repository Named &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;user-name.github.io&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;After all steps in this tutorial are completed, our GitHub page can be accessed at &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;https://user-name.github.io&lt;/code&gt;. In this step, we will create a repository named &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;user-name.github.io&lt;/code&gt; where &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;user-name&lt;/code&gt; is the user name we use to log into GitHub. My user name is &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ktran3-simon&lt;/code&gt; so I will create a repository name &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ktran3-simon.github.io&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;To create a new repository, we click on the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;+&lt;/code&gt; sign at the top right of the screen, next to our profile picture, and select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;New repository&lt;/code&gt;.&lt;/p&gt;

&lt;center&gt;&lt;img src=&quot;https://github.com/chriskhanhtran/portfolio-tutorial/blob/master/images/2.PNG?raw=true&quot; /&gt;&lt;/center&gt;

&lt;p&gt;We fill the repository name with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;user-name.github.io&lt;/code&gt;, select &lt;strong&gt;Public&lt;/strong&gt; and then click &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Create repository&lt;/code&gt;.&lt;/p&gt;

&lt;center&gt;&lt;img src=&quot;https://github.com/chriskhanhtran/portfolio-tutorial/blob/master/images/3.PNG?raw=true&quot; /&gt;&lt;/center&gt;

&lt;p&gt;Next, we will upload the theme to this repository. The theme we will use is the &lt;a href=&quot;https://github.com/pages-themes/minimal&quot;&gt;&lt;strong&gt;Jekyll Minimal theme&lt;/strong&gt;&lt;/a&gt;. This GitHub &lt;a href=&quot;https://github.com/pages-themes/minimal&quot;&gt;repository&lt;/a&gt; has a more concise version of the theme.&lt;/p&gt;

&lt;center&gt;&lt;img src=&quot;https://github.com/ktran3-simon/quick-portfolio/raw/master/images/demo.gif?raw=true&quot; /&gt;&lt;/center&gt;

&lt;p&gt;To download the theme, we go to &lt;a href=&quot;https://github.com/evanca/quick-portfolio&quot;&gt;https://github.com/evanca/quick-portfolio&lt;/a&gt;, click &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Clone or download&lt;/code&gt; and select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Download ZIP&lt;/code&gt;.&lt;/p&gt;

&lt;center&gt;&lt;img src=&quot;https://github.com/chriskhanhtran/portfolio-tutorial/blob/master/images/4.PNG?raw=true&quot; /&gt;&lt;/center&gt;

&lt;p&gt;Now, let’s open our newly created repository, which is still empty. We will click &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;uploading an existing file&lt;/code&gt;. After downloading the theme, we unzip the file and upload these files into our repository. After the uploading is complete, we click &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Commit changes&lt;/code&gt;.&lt;/p&gt;

&lt;center&gt;&lt;img src=&quot;https://github.com/chriskhanhtran/portfolio-tutorial/blob/master/images/5.PNG?raw=true&quot; /&gt;&lt;/center&gt;

&lt;p&gt;Now, by going to &lt;a href=&quot;https://ktran3-simon.github.io/&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;user-name.github.io&lt;/code&gt;&lt;/a&gt;, we can already see our website! In the next step, we will go through some instructions to customize our portfolio.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;(Optional)&lt;/strong&gt; A faster way to complete this step is to simply click the &lt;strong&gt;Fork&lt;/strong&gt; button to copy the entire repository to our GitHub account and then change the repository’s name to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;user-name.github.io&lt;/code&gt;. However I think the above explanation is friendlier for first-time GitHub users.&lt;/p&gt;

&lt;h2 id=&quot;step-3-customize-our-portfolio&quot;&gt;Step 3: Customize Our Portfolio&lt;/h2&gt;

&lt;p&gt;Our GitHub page has a two-column layout. On the left is our profile picture and some description, and on the right is the main page where we present our projects. I really like this design because of its simplicity yet efficiency.&lt;/p&gt;

&lt;center&gt;&lt;img src=&quot;https://github.com/chriskhanhtran/portfolio-tutorial/blob/master/images/6.PNG?raw=true&quot; /&gt;&lt;/center&gt;

&lt;p&gt;To customize the sidebar (the left part), we will edit the file &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_config.yml&lt;/code&gt; in our repository. We can also add Google Analytics ID to track and analyze traffic to our page.&lt;/p&gt;

&lt;center&gt;&lt;img src=&quot;https://github.com/chriskhanhtran/portfolio-tutorial/blob/master/images/7.PNG?raw=true&quot; /&gt;&lt;/center&gt;

&lt;p&gt;To customize the main page (the right part), where we display our projects, we will need to edit &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;index.md&lt;/code&gt;. This file is written in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Markdown&lt;/code&gt;. If you frequently work with Jupyter Notebook, you must be very familiar with this language. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Markdown&lt;/code&gt; is very easy to use. Here is a helpful &lt;a href=&quot;https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet&quot;&gt;Markdown Cheatsheet&lt;/a&gt; that I often refer to.&lt;/p&gt;

&lt;center&gt;&lt;img src=&quot;https://github.com/chriskhanhtran/portfolio-tutorial/blob/master/images/8.PNG?raw=true&quot; /&gt;&lt;/center&gt;

&lt;p&gt;&lt;strong&gt;(Optional) More Customizations&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As we customize the sidebar, we will see that we cannot edit the last two lines by editting &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_config.yml&lt;/code&gt;:&lt;/p&gt;

&lt;center&gt;&lt;img src=&quot;https://github.com/chriskhanhtran/portfolio-tutorial/blob/master/images/9.PNG?raw=true&quot; /&gt;&lt;/center&gt;

&lt;p&gt;To remove them, we need go to the original repository of the &lt;a href=&quot;https://github.com/pages-themes/minimal&quot;&gt;&lt;strong&gt;Jekyll Minimal theme&lt;/strong&gt;&lt;/a&gt;, and copy the content of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;default.html&lt;/code&gt; in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_layouts&lt;/code&gt;. Then we create &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_layouts/default.html&lt;/code&gt; in our repository by clicking &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Creating new file&lt;/code&gt; and typing &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_layouts/default.html&lt;/code&gt;, paste the copied content here and commit.&lt;/p&gt;

&lt;center&gt;&lt;img src=&quot;https://github.com/chriskhanhtran/portfolio-tutorial/blob/master/images/10.PNG?raw=true&quot; /&gt;&lt;/center&gt;

&lt;p&gt;Now we can remove lines 29-31 in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_layouts/default.html&lt;/code&gt; to remove &lt;strong&gt;View My GitHub Profile&lt;/strong&gt;,&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&amp;lt;p class=&quot;view&quot;&amp;gt;&amp;lt;a href=&quot;https://github.com/datacrunchcentral&quot;&amp;gt;View My GitHub Profile&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;and line 50 to remove &lt;strong&gt;Hosted on GitHub pages - Theme by orderedlist&lt;/strong&gt;.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&amp;lt;p&amp;gt;&amp;lt;small&amp;gt;Hosted on GitHub Pages &amp;amp;mdash; Theme by &amp;lt;a href=&quot;https://github.com/orderedlist&quot;&amp;gt;orderedlist&amp;lt;/a&amp;gt;&amp;lt;/small&amp;gt;&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;step-4-upload-our-projects&quot;&gt;Step 4: Upload Our Projects&lt;/h2&gt;

&lt;p&gt;After customizing the design of our GitHub page, we can start adding projects to the page by editing &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;index.md&lt;/code&gt;. There are several ways to do that, including:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Link to our GitHub repositories,&lt;/li&gt;
  &lt;li&gt;Link to our Jupyter Notebooks,&lt;/li&gt;
  &lt;li&gt;Write blog posts in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Markdown&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;My favorite way to add projects is creating a folder in the repository to save the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;html&lt;/code&gt; files of Jupyter Notebooks, and add the link &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;https://user-name.github.io/folder-name/file-name.html&lt;/code&gt; to my main page. Alternatively, we can insert &lt;strong&gt;Google Colab&lt;/strong&gt; links so that viewers can run our projects directly. &lt;strong&gt;Google Colab&lt;/strong&gt; is basically the same as &lt;strong&gt;Jupyter Notebook&lt;/strong&gt; with GPU supported by Google, which helps increase the speed of running our cells, especially in Deep Learning projects. Here is a nice &lt;a href=&quot;https://www.youtube.com/watch?v=KCCzo31Oo8U&quot;&gt;Google Colab tutorial&lt;/a&gt;. If you are an R user, you can use &lt;strong&gt;R markdown&lt;/strong&gt; in R Studio to render your projects and export them in the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;html&lt;/code&gt; format.&lt;/p&gt;

&lt;p&gt;We can also write blog posts in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Markdown&lt;/code&gt; and upload them to our repository. You can always refer to the file &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sample_page.md&lt;/code&gt; as an example.&lt;/p&gt;

&lt;h2 id=&quot;tips-and-tricks&quot;&gt;Tips and Tricks&lt;/h2&gt;
&lt;h3 id=&quot;badges-with-shieldsio&quot;&gt;Badges with Shields.io&lt;/h3&gt;
&lt;p&gt;In official repositories on GitHub, we usually see authors use badges to show the status of their project. For example:&lt;/p&gt;

&lt;center&gt;&lt;img src=&quot;https://github.com/chriskhanhtran/portfolio-tutorial/blob/master/images/11.PNG?raw=true&quot; /&gt;&lt;/center&gt;

&lt;p&gt;I really like to use these badges to embed links with call for actions, such as:&lt;/p&gt;

&lt;center&gt;&lt;img src=&quot;https://github.com/chriskhanhtran/portfolio-tutorial/blob/master/images/12.PNG?raw=true&quot; /&gt;&lt;/center&gt;

&lt;p&gt;You can go to https://shields.io/ to create your own badges. Basically, we just need to create links in a specific format and use them as image links.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Format:&lt;/strong&gt;&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;https://img.shields.io/badge/label-message-color?logo=logo_name
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;where:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;color&lt;/code&gt; could be brightgreen, green, yellowgreen, yellow, orange, red, blue, lightgrey or any HEX, RBG color codes&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;logo&lt;/code&gt;: the list of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;logo&lt;/code&gt; of popular brands and their brand color codes can be found at &lt;a href=&quot;https://simpleicons.org/&quot;&gt;simple-icons&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Visit &lt;a href=&quot;https://shields.io/&quot;&gt;shields.io&lt;/a&gt; to learn more&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Examples:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;https://img.shields.io/badge/Spotify-My_Musics-1ED760?logo=Spotify&lt;/code&gt; will give us: &lt;img src=&quot;https://img.shields.io/badge/Spotify-My_Musics-1ED760?logo=Spotify&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;https://img.shields.io/badge/PyTorch-Run_in_Colab-EE4C2C?logo=PyTorch&lt;/code&gt; will give us: &lt;img src=&quot;https://img.shields.io/badge/PyTorch-Run_in_Colab-EE4C2C?logo=PyTorch&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;To insert links with badges we created, we only need to type &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;[![](link-to-our-badge)](link-to-our-project)&lt;/code&gt;.&lt;/p&gt;

&lt;h3 id=&quot;more-themes&quot;&gt;More Themes&lt;/h3&gt;

&lt;p&gt;There are several other themes that we can utilize to be more creative with our portfolio. To use them, we can simply &lt;strong&gt;Fork&lt;/strong&gt; the repository to our account and change its name to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;user-name.github.io&lt;/code&gt;.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Cayman: &lt;a href=&quot;https://github.com/pages-themes/cayman&quot;&gt;repo&lt;/a&gt; - &lt;a href=&quot;https://pages-themes.github.io/cayman/&quot;&gt;preview&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Minimal Mistake: &lt;a href=&quot;https://github.com/mmistakes/minimal-mistakes&quot;&gt;repo&lt;/a&gt; - &lt;a href=&quot;https://mmistakes.github.io/minimal-mistakes/collection-archive/&quot;&gt;preview&lt;/a&gt;. I really like &lt;a href=&quot;https://leimao.github.io/&quot;&gt;this portfolio&lt;/a&gt; where the author uses this theme.&lt;/li&gt;
&lt;/ul&gt;

&lt;p class=&quot;text-center&quot;&gt;&lt;img src=&quot;https://github.com/chriskhanhtran/portfolio-tutorial/blob/master/images/13.PNG?raw=true&quot; alt=&quot;&quot; /&gt;
&lt;em&gt;A preview of the Minimal Mistake Theme&lt;/em&gt;&lt;/p&gt;

&lt;h3 id=&quot;content-of-your-portfolio&quot;&gt;Content of Your Portfolio&lt;/h3&gt;

&lt;p&gt;Last but also the most important thing I want to say in this tutorial, the reason I like a minimalism theme is that it took me minimal time on designing works; thus I can spend more time on the content of my projects. Ultimately, the purpose of building a Data Science portfolio is to present our Data Science project, rather than to show our web-design skills. Below are some articles that I found super helpful when I started building my first portfolio.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://towardsdatascience.com/how-to-build-a-data-science-portfolio-5f566517c79c&quot;&gt;How to Build a Data Science Portfolio&lt;/a&gt; in Towards Data Science&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.dataquest.io/blog/build-a-data-science-portfolio/&quot;&gt;Data Science Portfolios That Will Get You the Job&lt;/a&gt; in Dataquest&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.springboard.com/blog/data-science-portfolio/&quot;&gt;Building a Data Science Portfolio That Stands Out&lt;/a&gt; in Springboard Blog&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://medium.com/@dataoptimal9/5-data-science-projects-that-will-get-you-hired-in-2018-9e51525084e&quot;&gt;5 Data Science Projects That Will Get You Hired in 2018&lt;/a&gt; in Medium&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Feel free to visit my portfolio to see how I write my Data Science projects. For example, this is a detailed &lt;a href=&quot;https://chriskhanhtran.github.io/minimal-portfolio/projects/ames-house-price.html&quot;&gt;notebook&lt;/a&gt; I wrote after completing a Kaggle competition, in which I went through all important steps of a Data Science project, including &lt;strong&gt;Exploratory Data Analysis, Data Cleaning, Feature Engineering, Modeling and Evaluation&lt;/strong&gt;. Now I still often revisit this notebook to copy the cross-validation codes to reuse. I found I learn the most by reading notebooks on Kaggle and writing my own projects.&lt;/p&gt;

&lt;p&gt;I also made some changes in my portfolio compared to the original version, such as making the sidebar narrower and the main page wider. You can &lt;strong&gt;fork&lt;/strong&gt; my repo (&lt;a href=&quot;https://github.com/chriskhanhtran/minimal-portfolio&quot;&gt;https://github.com/chriskhanhtran/minimal-portfolio&lt;/a&gt;) and change the codes in the diretory &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_sass/jekyll-theme-minimal.scss&lt;/code&gt; as you like, including changing width, font size or image size. However, be careful when you do so because it might mess your page up. If so, just recover the settings by copying from the theme’s original repo.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;change &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;max-width&lt;/code&gt; in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.wrapper&lt;/code&gt; to change the width of the entire page&lt;/li&gt;
  &lt;li&gt;change &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;max-width&lt;/code&gt; in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;section&lt;/code&gt; to change the width of the main page&lt;/li&gt;
  &lt;li&gt;change &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;width&lt;/code&gt; in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;header&lt;/code&gt; to change the width of the side bar&lt;/li&gt;
&lt;/ul&gt;

&lt;p class=&quot;text-center&quot;&gt;&lt;img src=&quot;https://raw.githubusercontent.com/chriskhanhtran/portfolio-tutorial/master/images/portfolio.gif&quot; alt=&quot;&quot; /&gt;
&lt;em&gt;My GitHub Page&lt;/em&gt;&lt;/p&gt;

&lt;h3 id=&quot;last-words&quot;&gt;Last Words&lt;/h3&gt;
&lt;p&gt;Having completed your minimalism portfolio, you now can remove or modify these files in your repository:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;LICENSE&lt;/strong&gt;&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;README.md&lt;/strong&gt;: you can modify it to the description of your page.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;sample_page.md&lt;/strong&gt;: you can remove or change it to a blog post.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;pdf/sample_presentation.pdf&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can also visit the original &lt;a href=&quot;https://medium.com/@evanca/set-up-your-portfolio-website-in-less-than-10-minutes-with-github-pages-d0efa8ff56fd&quot;&gt;tutorial&lt;/a&gt; with more tips such as:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;How to create thumbnails for your project&lt;/li&gt;
  &lt;li&gt;How to create a round profile picture&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For me, I use Photoshop and Powerpoint to create pictures used in my GitHub pages.&lt;/p&gt;

&lt;p&gt;Thank you so much for staying with me to this point of my first tutorial. Don’t hesitate to reach out to me if you’ve got any questions. Please connect with me on LinkedIn and share with me your Data Science portfolio.
&lt;a href=&quot;https://www.linkedin.com/in/chriskhanhtran/&quot;&gt;&lt;img src=&quot;https://img.shields.io/badge/LinkedIn-Connect%20with%20Me-blue?logo=LinkedIn&amp;amp;style=social&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</content><author><name>Mohammed Asif</name></author><category term="posts" /><category term="data science" /><category term="tutorial" /><category term="github" /><summary type="html">In the early days of my journey in data science a year ago, I spent most of my time reading articles on Towards Data Science to create my own Data Science roadmap. The opinions are different in the knowledge one needs to acquire to become a Data Scientist and how to get there, but there is one thing in common: at a point in that journey, one should have a portfolio where she can host her Data Science projects.</summary></entry></feed>