{"id":469,"date":"2018-03-16T12:24:10","date_gmt":"2018-03-16T05:24:10","guid":{"rendered":"http:\/\/research.binus.ac.id\/airnd\/?p=469"},"modified":"2020-11-24T11:25:53","modified_gmt":"2020-11-24T04:25:53","slug":"deep-learning-for-image-classification-with-keras-step-by-step-tutorial","status":"publish","type":"post","link":"https:\/\/research.binus.ac.id\/airdc\/2018\/03\/deep-learning-for-image-classification-with-keras-step-by-step-tutorial\/","title":{"rendered":"Deep Learning for Image Classification with Keras: Step by Step Tutorial"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p style=\"text-align: justify\">This is a step by step tutorial for building your first deep learning image classification application using Keras framework. This tutorial aims to introduce you the quickest way to build your first deep learning application. For this reason, we will not cover all the details you need to know to understand deep learning completely. However, we will provide you links to available online material to learn all of those details.<\/p>\n<h2>Prerequisite Knowledge<\/h2>\n<p style=\"text-align: justify\">In order to fully understand all of the codes in this tutorial, we encourage you to take a look at these online materials:<\/p>\n<ol>\n<li><a href=\"https:\/\/elitedatascience.com\/learn-machine-learning\">Basic Machine Learning<\/a><\/li>\n<li><a href=\"https:\/\/www.youtube.com\/watch?v=bNb2fEVKeEo&amp;index=5&amp;t=19s&amp;list=PL3FW7Lu3i5JvHM8ljYj-zLfQRF3EO8sYv\">Basic Deep Learning for Visual Recognition (Convolutional Neural Network)<\/a><\/li>\n<li><a href=\"https:\/\/elitedatascience.com\/learn-python-for-data-science\">Python for Data Science<\/a><\/li>\n<li><a href=\"https:\/\/keras.io\/\">Keras Documentation<\/a><\/li>\n<\/ol>\n<p style=\"text-align: justify\">We will specifically build a Convolutional Neural Network (CNN) in this tutorial. CNN is a deep learning algorithm used for image data.<\/p>\n<h2>System and Hardware<\/h2>\n<p style=\"text-align: justify\">This tutorial assumes you work on a computer with Ubuntu 16.04 operating system. If you are a Windows user, please refer to this <a href=\"https:\/\/www.tecmint.com\/install-ubuntu-16-04-alongside-with-windows-10-or-8-in-dual-boot\/\">guide<\/a> for installing Ubuntu alongside with Windows. For building a deep learning application, we suggest you to use a computer equipped with a <a href=\"https:\/\/developer.nvidia.com\/cuda-gpus\">CUDA GPU<\/a>. You are able to run a deep learning application without GPU, but it would be very slow.<\/p>\n<h2>Tutorial Outline<\/h2>\n<p>Here are the outline of this tutorial:<strong><br \/>\n<\/strong><\/p>\n<ol>\n<li>Environment Installation<\/li>\n<li>Import Numpy and Keras Library<\/li>\n<li>Load and Preprocess MNIST Data<\/li>\n<li>Design CNN Architecture<\/li>\n<li>Compile and Train Model<\/li>\n<li>Print result<\/li>\n<\/ol>\n<h2>Step 1: Environment Installation<\/h2>\n<p style=\"text-align: justify\">In order to run the codes in this tutorial, we need to make sure that these plugins have been installed:<\/p>\n<ol>\n<li>Python 2.7 or Python 3<\/li>\n<li>Numpy<\/li>\n<li>Tensorflow<\/li>\n<li>Keras<\/li>\n<\/ol>\n<p style=\"text-align: justify\">When you install Ubuntu 16.04, Python 2.7 will also be automatically installed. You can check the installation by running this command in your Ubuntu terminal:<\/p>\n<div style=\"background-color: #50b8f7;padding-right: 2px\" align=\"right\">Terminal<\/div>\n<div style=\"border-style: solid;border-width: 1px;padding-left: 2px\">\n<pre style=\"background-color: #eff0f1\"><code>$ python<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p>If Python 2.7 has been installed, you will see a view similar to this image:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-471\" src=\"https:\/\/research.binus.ac.id\/airnd\/wp-content\/uploads\/sites\/12\/2018\/03\/Screenshot-from-2018-03-13-10-28-39-640x98.png\" alt=\"\" width=\"640\" height=\"98\" srcset=\"https:\/\/research.binus.ac.id\/airdc\/wp-content\/uploads\/sites\/18\/2018\/03\/Screenshot-from-2018-03-13-10-28-39-640x98.png 640w, https:\/\/research.binus.ac.id\/airdc\/wp-content\/uploads\/sites\/18\/2018\/03\/Screenshot-from-2018-03-13-10-28-39-720x111.png 720w, https:\/\/research.binus.ac.id\/airdc\/wp-content\/uploads\/sites\/18\/2018\/03\/Screenshot-from-2018-03-13-10-28-39.png 725w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>Type <span style=\"background-color: #eff0f1\">exit()<\/span> to return.<\/p>\n<p>In case that it is not installed, you can run these commands in your terminal:<\/p>\n<div style=\"background-color: #50b8f7;padding-right: 2px\" align=\"right\">Terminal<\/div>\n<div style=\"border-style: solid;border-width: 1px;padding-left: 2px\">\n<pre style=\"background-color: #eff0f1\"><code>$ sudo apt-get update\r\n$ sudo apt-get install python-pip python-dev\r\n<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p>To install numpy, run this command in terminal:<\/p>\n<div style=\"background-color: #50b8f7;padding-right: 2px\" align=\"right\">Terminal<\/div>\n<div style=\"border-style: solid;border-width: 1px;padding-left: 2px\">\n<pre style=\"background-color: #eff0f1\"><code>$ pip install numpy<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Next, we will install Tensorflow, a deep learning framework developed by Google. Tensorflow comes with two version depending on whether you want to use GPU to accelerate Tensorflow or not. If your computer is equipped with GPU, run this command to install Tensorflow with GPU support:<\/p>\n<div style=\"background-color: #50b8f7;padding-right: 2px\" align=\"right\">Terminal<\/div>\n<div style=\"border-style: solid;border-width: 1px;padding-left: 2px\">\n<pre style=\"background-color: #eff0f1\"><code>$ pip install tensorflow-gpu<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p>Else, run this command:<\/p>\n<div style=\"background-color: #50b8f7;padding-right: 2px\" align=\"right\">Terminal<\/div>\n<div style=\"border-style: solid;border-width: 1px;padding-left: 2px\">\n<pre style=\"background-color: #eff0f1\"><code>$ pip install tensorflow<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p>Finally, we will install Keras, a high-level deep learning framework built on top of Tensorflow. To install it, run this command:<\/p>\n<div style=\"background-color: #50b8f7;padding-right: 2px\" align=\"right\">Terminal<\/div>\n<div style=\"border-style: solid;border-width: 1px;padding-left: 2px\">\n<pre style=\"background-color: #eff0f1\"><code>$ pip install keras<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<h2>Step 2: Import Numpy and Keras Library<\/h2>\n<p style=\"text-align: justify\">Starting from this step, we will start to build the deep learning application using Python. To run the application, you can create a new file named as mnist.py, save it to your home directory, add all the given codes below, and execute the following command in your terminal:<\/p>\n<div style=\"background-color: #50b8f7;padding-right: 2px\" align=\"right\">Terminal<\/div>\n<div style=\"border-style: solid;border-width: 1px;padding-left: 2px\">\n<pre style=\"background-color: #eff0f1\"><code>$ python mnist.py<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">To build our deep learning application, we need to import Numpy and Keras library to our python codes. You can import the necessary libraries by adding the following codes to mnist.py file:<\/p>\n<div style=\"background-color: #50b8f7;padding-right: 2px\" align=\"right\">Python<\/div>\n<div style=\"border-style: solid;border-width: 1px;padding-left: 2px\">\n<pre style=\"background-color: #eff0f1\"><code>#Step 2: Import Numpy and Keras \r\nimport numpy as np\r\n\r\nimport keras\r\nfrom keras.models import Model\r\nfrom keras.layers import Input\r\nfrom keras.layers import Dense\r\nfrom keras.layers import Conv2D\r\nfrom keras.layers import MaxPooling2D\r\nfrom keras.layers import Flatten\r\nfrom keras.layers import Dropout\r\n<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<h2>Step 3: Load and Preprocess MNIST Data<\/h2>\n<p style=\"text-align: justify\">In this tutorial, we will use MNIST dataset. MNIST is a publicly available dataset of handwritten digits image. You can see the details of the dataset <a href=\"http:\/\/yann.lecun.com\/exdb\/mnist\/\">here<\/a>. Below are samples of image in MNIST dataset:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-547\" src=\"https:\/\/research.binus.ac.id\/airdc\/wp-content\/uploads\/sites\/18\/2018\/03\/mnist.jpg\" alt=\"\" width=\"338\" height=\"143\" \/><\/p>\n<p style=\"text-align: justify\">In this tutorial, we will use a pre-loaded MNIST dataset in Keras. To load MNIST, add these following codes to mnist.py file:<\/p>\n<div style=\"background-color: #50b8f7;padding-right: 2px\" align=\"right\">Python<\/div>\n<div style=\"border-style: solid;border-width: 1px;padding-left: 2px\">\n<pre style=\"background-color: #eff0f1\"><code>#Step 3: Load and Preprocess MNIST data\r\nfrom keras.datasets import mnist\r\n(X_train, y_train), (X_test, y_test) = mnist.load_data()\r\n<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">The loaded data consists of 4 parts: X_train, y_train, X_test, and y_test. X_train contains image data to be used for training CNN model in the form of matrix. y_train contains labels of the image (0 to 9). X_test and y_test are the image data and labels to be used for testing our CNN model performance.<\/p>\n<p style=\"text-align: justify\">To use the data in our deep learning application, we need to have some adjustments to the data. We will have 3 adjustments: (1) add 1 more dimension to the image data, (2) normalize the data to value range between -1 to 1, and (3) convert the labels to one-hot vector format. We need to add 1 more dimension the image data because CNN model usually deals with RGB image, which shape defined as (width x height x channel) in its matrix format. The shape of pre-loaded MNIST dataset in Keras is only defined as (width x height), so we need to add 1 more dimension as channel. The following codes will reshape the image data to\u00a0 (width x height x channel):<\/p>\n<div style=\"background-color: #50b8f7;padding-right: 2px\" align=\"right\">Python<\/div>\n<div style=\"border-style: solid;border-width: 1px;padding-left: 2px\">\n<pre style=\"background-color: #eff0f1\"><code>X_train = X_train.reshape(X_train.shape[0], 28, 28, 1)\r\nX_test = X_test.reshape(X_test.shape[0], 28, 28, 1)\r\n<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">We also need to normalize the data to value between -1 to 1, as deep learning model usually easier to learn from this input value range. You can normalze the data by adding these following codes:<\/p>\n<div style=\"background-color: #50b8f7;padding-right: 2px\" align=\"right\">Python<\/div>\n<div style=\"border-style: solid;border-width: 1px;padding-left: 2px\">\n<pre style=\"background-color: #eff0f1\"><code>X_train = (X_train\/255) - 0.5\r\nX_test = (X_test\/255) - 0.5\r\n<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Finally, you need to convert the format of labels to one-hot vector format. One-hot vector is a vector which value consists only 0 and 1. To convert the labels, add these following codes to mnist.py file:<\/p>\n<div style=\"background-color: #50b8f7;padding-right: 2px\" align=\"right\">Python<\/div>\n<div style=\"border-style: solid;border-width: 1px;padding-left: 2px\">\n<pre style=\"background-color: #eff0f1\"><code>num_classes = 10\r\ny_train = keras.utils.to_categorical(y_train, num_classes)\r\ny_test = keras.utils.to_categorical(y_test, num_classes)\r\n<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<h2>Step 4: Design CNN Architecture<\/h2>\n<p style=\"text-align: justify\">Now, we can start to design our CNN architecture that learns from the loaded MNIST data. The CNN architecture we use in this tutorial is similar to the visualization below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-553 size-medium\" src=\"https:\/\/research.binus.ac.id\/airnd\/wp-content\/uploads\/sites\/12\/2018\/03\/ConvNet-1-640x288.png\" alt=\"\" width=\"640\" height=\"288\" srcset=\"https:\/\/research.binus.ac.id\/airdc\/wp-content\/uploads\/sites\/18\/2018\/03\/ConvNet-1-640x288.png 640w, https:\/\/research.binus.ac.id\/airdc\/wp-content\/uploads\/sites\/18\/2018\/03\/ConvNet-1-768x346.png 768w, https:\/\/research.binus.ac.id\/airdc\/wp-content\/uploads\/sites\/18\/2018\/03\/ConvNet-1-720x323.png 720w, https:\/\/research.binus.ac.id\/airdc\/wp-content\/uploads\/sites\/18\/2018\/03\/ConvNet-1-330x148.png 330w, https:\/\/research.binus.ac.id\/airdc\/wp-content\/uploads\/sites\/18\/2018\/03\/ConvNet-1-747x335.png 747w, https:\/\/research.binus.ac.id\/airdc\/wp-content\/uploads\/sites\/18\/2018\/03\/ConvNet-1-415x186.png 415w, https:\/\/research.binus.ac.id\/airdc\/wp-content\/uploads\/sites\/18\/2018\/03\/ConvNet-1.png 1200w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p style=\"text-align: justify\">This architecture is inspired from LeNet [1], the original CNN model published in 1989. We use 2 set of Convolutional &#8211; Max Pooling layers in the model. Each of the Convolutional layer uses 3&#215;3 kernel and 1 stride. The Max Pooling layers each uses 2&#215;2 pool size. On top of these two layer set, we will add\u00a0 a fully connected (dense) layer with 128 neurons. The output layer consists of 10 neurons, which each neuron output a probability of the data belongs to class 0 to 9. You can learn more about the detailed operations of each layer in <a href=\"https:\/\/www.youtube.com\/watch?v=bNb2fEVKeEo&amp;t=0s&amp;index=5&amp;list=PL3FW7Lu3i5JvHM8ljYj-zLfQRF3EO8sYv\">here<\/a>. To use this design into our application, you can add the following codes in our mnist.py file:<\/p>\n<div style=\"background-color: #50b8f7;padding-right: 2px\" align=\"right\">Python<\/div>\n<div style=\"border-style: solid;border-width: 1px;padding-left: 2px\">\n<pre style=\"background-color: #eff0f1\"><code>#Step 4: Design CNN Architecture\r\ninp = Input(shape=(28,28,1))\r\ni = Conv2D(32, kernel_size=(3,3), activation='relu', name='conv1')(inp)\r\ni = MaxPooling2D(pool_size=(2,2))(i)\r\ni = Conv2D(32, kernel_size=(3,3), activation='relu', name='conv2')(i)    \r\ni = MaxPooling2D(pool_size=(2,2))(i)\r\ni = Flatten()(i)\r\ni = Dense(128, activation='relu', name='dense_1')(i)  \r\npredictions = Dense(num_classes, activation='softmax', name='dense_last')(i)    \r\n\r\nmodel = Model(inputs=inp, outputs=predictions)\r\n<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<h2>Step 5: Compile and Train CNN Model<\/h2>\n<p style=\"text-align: justify\">After adding the CNN architecture, we can now compile it to form a CNN model and train the model to do image classification. To compile the architecture, add the following code:<\/p>\n<div style=\"background-color: #50b8f7;padding-right: 2px\" align=\"right\">Python<\/div>\n<div style=\"border-style: solid;border-width: 1px;padding-left: 2px\">\n<pre style=\"background-color: #eff0f1\"><code>#Step 5: Compile and Train The Model\r\nmodel.compile(optimizer='adam', loss='categorical_crossentropy', metrics=['accuracy'])\r\n<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">In this tutorial, we use Adam optimizer [2] and categorical cross-entropy loss. Keras has different optimizer and loss options that can be chosen. You can learn more about Keras optimizers and losses <a href=\"https:\/\/keras.io\/optimizers\/\">here<\/a> and <a href=\"https:\/\/keras.io\/losses\/\">here<\/a>.<\/p>\n<p>Finally, we can train our CNN model to do image classification. Add this code to train it:<\/p>\n<div style=\"background-color: #50b8f7;padding-right: 2px\" align=\"right\">Python<\/div>\n<div style=\"border-style: solid;border-width: 1px;padding-left: 2px\">\n<pre style=\"background-color: #eff0f1\"><code>history = model.fit(X_train, y_train, epochs=10, batch_size=32)\r\n<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">In this tutorial, we set the maximum epochs of our CNN model to 10 and batch size to 32. You can learn more about epoch and batch size <a href=\"https:\/\/stackoverflow.com\/questions\/31155388\/meaning-of-an-epoch-in-neural-networks-training\/44666835\">here<\/a> and <a href=\"https:\/\/www.youtube.com\/watch?v=U4WB9p6ODjM\">here<\/a>. When you run mnist.py later, you will see a view similar to the below image when the above code is executed. The acc number in the image means that your CNN model able to classify images in the training set with 99.21%\u00a0 accuracy.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-526\" src=\"https:\/\/research.binus.ac.id\/airnd\/wp-content\/uploads\/sites\/12\/2018\/03\/Screenshot-from-2018-03-14-14-26-10-640x98.png\" alt=\"\" width=\"640\" height=\"98\" srcset=\"https:\/\/research.binus.ac.id\/airdc\/wp-content\/uploads\/sites\/18\/2018\/03\/Screenshot-from-2018-03-14-14-26-10-640x98.png 640w, https:\/\/research.binus.ac.id\/airdc\/wp-content\/uploads\/sites\/18\/2018\/03\/Screenshot-from-2018-03-14-14-26-10-768x118.png 768w, https:\/\/research.binus.ac.id\/airdc\/wp-content\/uploads\/sites\/18\/2018\/03\/Screenshot-from-2018-03-14-14-26-10.png 820w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<h2>Step 6: Print Result<\/h2>\n<p style=\"text-align: justify\">After we have trained the CNN model, we can test its performance using a test dataset. Add the following code to print the accuracy of the model in test dataset:<\/p>\n<div style=\"background-color: #50b8f7;padding-right: 2px\" align=\"right\">Python<\/div>\n<div style=\"border-style: solid;border-width: 1px;padding-left: 2px\">\n<pre style=\"background-color: #eff0f1\"><code>#Step 6: Print Result\r\nscores = model.evaluate(X_test, y_test, verbose=0)\r\nprint(\"Test Accuracy: %.2f%%\" % (scores[1]*100))\r\n<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<h2>Run The Application<\/h2>\n<p>If you follow step 2 to step 6, your mnist.py file should look like this:<\/p>\n<div style=\"background-color: #50b8f7;padding-right: 2px\" align=\"right\">Python<\/div>\n<div style=\"border-style: solid;border-width: 1px;padding-left: 2px\">\n<pre style=\"background-color: #eff0f1\"><code>#Step 2: Import Numpy and Keras \r\nimport numpy as np\r\n\r\nimport keras\r\nfrom keras.models import Model\r\nfrom keras.layers import Input\r\nfrom keras.layers import Dense\r\nfrom keras.layers import Conv2D\r\nfrom keras.layers import MaxPooling2D\r\nfrom keras.layers import Flatten\r\nfrom keras.layers import Dropout\r\n\r\n#Step 3: Load and Preprocess MNIST data\r\nfrom keras.datasets import mnist\r\n(X_train, y_train), (X_test, y_test) = mnist.load_data()\r\n\r\nX_train = X_train.reshape(X_train.shape[0], 28, 28, 1)\r\nX_test = X_test.reshape(X_test.shape[0], 28, 28, 1)\r\n\r\nX_train = (X_train\/255) - 0.5\r\nX_test = (X_test\/255) - 0.5\r\n\r\nnum_classes = 10\r\ny_train = keras.utils.to_categorical(y_train, num_classes)\r\ny_test = keras.utils.to_categorical(y_test, num_classes)\r\n\r\n#Step 4: Design CNN Architecture\r\ninp = Input(shape=(28,28,1))\r\ni = Conv2D(32, kernel_size=(3,3), activation='relu', name='conv1')(inp)\r\ni = MaxPooling2D(pool_size=(2,2))(i)\r\ni = Conv2D(32, kernel_size=(3,3), activation='relu', name='conv2')(i)    \r\ni = MaxPooling2D(pool_size=(2,2))(i)\r\ni = Flatten()(i)\r\ni = Dense(128, activation='relu', name='dense_1')(i)  \r\npredictions = Dense(num_classes, activation='softmax', name='dense_last')(i)    \r\n\r\nmodel = Model(inputs=inp, outputs=predictions)\r\n\r\n#Step 5: Compile and Train The Model\r\nmodel.compile(optimizer='adam', loss='categorical_crossentropy', metrics=['accuracy'])\r\nhistory = model.fit(X_train, y_train, epochs=10, batch_size=32)\r\n\r\n#Step 6: Print Result\r\nscores = model.evaluate(X_test, y_test, verbose=0)\r\nprint(\"Test Accuracy: %.2f%%\" % (scores[1]*100))\r\n<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p>To run your mnist.py file, execute this command in your terminal:<\/p>\n<div style=\"background-color: #50b8f7;padding-right: 2px\" align=\"right\">Terminal<\/div>\n<div style=\"border-style: solid;border-width: 1px;padding-left: 2px\">\n<pre style=\"background-color: #eff0f1\"><code>$ python mnist.py\r\n<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p>You should see a similar view to the following image after you run your application:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-533\" src=\"https:\/\/research.binus.ac.id\/airnd\/wp-content\/uploads\/sites\/12\/2018\/03\/Screenshot-from-2018-03-14-14-55-12-640x319.png\" alt=\"\" width=\"640\" height=\"319\" srcset=\"https:\/\/research.binus.ac.id\/airdc\/wp-content\/uploads\/sites\/18\/2018\/03\/Screenshot-from-2018-03-14-14-55-12-640x319.png 640w, https:\/\/research.binus.ac.id\/airdc\/wp-content\/uploads\/sites\/18\/2018\/03\/Screenshot-from-2018-03-14-14-55-12-768x383.png 768w, https:\/\/research.binus.ac.id\/airdc\/wp-content\/uploads\/sites\/18\/2018\/03\/Screenshot-from-2018-03-14-14-55-12.png 824w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p style=\"text-align: justify\">Congratulations, you have already built your first application of Deep Learning for Image Classification! To continue your study, we recommend you to learn the theory behind deep learning more. These <a href=\"https:\/\/www.youtube.com\/playlist?list=PL3FW7Lu3i5JvHM8ljYj-zLfQRF3EO8sYv\">online videos<\/a> from Stanford University courses should be a good start for you.<\/p>\n<h2>References<\/h2>\n<p style=\"text-align: justify\">[1] Y. LeCun <em>et al.<\/em>, \u201cBackpropagation Applied to Handwritten Zip Code Recognition,\u201d <em>Neural Computation<\/em>, vol. 1, no. 4. pp. 541\u2013551, 1989.<\/p>\n<p style=\"text-align: justify\">[2] D. P. Kingma and J. Ba, \u201cAdam: A Method for Stochastic Optimization,\u201d <em>Int. Conf. Learn. Represent. 2015<\/em>, pp. 1\u201315, Dec. 2014.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction This is a step by step tutorial for building your first deep learning image classification application using Keras framework. This tutorial aims to introduce you the quickest way to build your first deep learning application. For this reason, we will not cover all the details you need to know to understand deep learning completely. [&hellip;]<\/p>\n","protected":false},"author":14,"featured_media":1689,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[18,19,20,21,22],"class_list":["post-469","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorial","tag-deep-learning","tag-image-classification","tag-keras","tag-mnist","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/research.binus.ac.id\/airdc\/wp-json\/wp\/v2\/posts\/469","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/research.binus.ac.id\/airdc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/research.binus.ac.id\/airdc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/research.binus.ac.id\/airdc\/wp-json\/wp\/v2\/users\/14"}],"replies":[{"embeddable":true,"href":"https:\/\/research.binus.ac.id\/airdc\/wp-json\/wp\/v2\/comments?post=469"}],"version-history":[{"count":1,"href":"https:\/\/research.binus.ac.id\/airdc\/wp-json\/wp\/v2\/posts\/469\/revisions"}],"predecessor-version":[{"id":1572,"href":"https:\/\/research.binus.ac.id\/airdc\/wp-json\/wp\/v2\/posts\/469\/revisions\/1572"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/research.binus.ac.id\/airdc\/wp-json\/wp\/v2\/media\/1689"}],"wp:attachment":[{"href":"https:\/\/research.binus.ac.id\/airdc\/wp-json\/wp\/v2\/media?parent=469"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/research.binus.ac.id\/airdc\/wp-json\/wp\/v2\/categories?post=469"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/research.binus.ac.id\/airdc\/wp-json\/wp\/v2\/tags?post=469"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}