<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Akhil Haridasan on Medium]]></title>
        <description><![CDATA[Stories by Akhil Haridasan on Medium]]></description>
        <link>https://medium.com/@akhilh05?source=rss-d323350bd2e5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*SekVKh_ykM3oqgp0A3KVSg.jpeg</url>
            <title>Stories by Akhil Haridasan on Medium</title>
            <link>https://medium.com/@akhilh05?source=rss-d323350bd2e5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 12:18:54 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@akhilh05/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Image Recognition Using ML (CNN)]]></title>
            <link>https://medium.com/swlh/image-recognition-using-ml-cnn-b7e4993d5059?source=rss-d323350bd2e5------2</link>
            <guid isPermaLink="false">https://medium.com/p/b7e4993d5059</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[image-recognition]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Akhil Haridasan]]></dc:creator>
            <pubDate>Wed, 07 Oct 2020 20:09:42 GMT</pubDate>
            <atom:updated>2020-10-10T08:48:41.375Z</atom:updated>
            <content:encoded><![CDATA[<h3>Image Recognition Using ML (CNN) for Beginners</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uOLUK8g5nT_Eya_kipGWNw.png" /></figure><p>Image Recognition, Image Processing, Computer vision are some of the hottest topics in the tech industry these days. There are various inventions that have been developed using these technologies. Out of which, Face Recognition, Gesture Recognition, Driverless-cars, etc, are some of the coolest creations of computer vision and image recognition. And, the core or the foundation of all these creations is “<strong>Image Recognition</strong>”.</p><p>In this article, we will try to understand how <a href="https://towardsdatascience.com/a-comprehensive-guide-to-convolutional-neural-networks-the-eli5-way-3bd2b1164a53">Convolutional Neural Network</a> (a type of Deep Learning algorithm) can be used for image classification. This article is basically designed for <strong>beginners</strong> or those who are interested in learning Image Recognition and Machine Learning. (Again one of the easiest that is out there)</p><p><strong>Agenda</strong>:</p><ol><li>Fashion MNIST (FMNIST) Clothing Classification</li><li>Creating a better Dataset</li><li>How to Define/Use a Model</li><li>Evaluate the Model</li><li>Make Predictions</li></ol><p><strong>Pre-requisite:</strong></p><ol><li>Python 3.6 (preferred 3.6.10)</li><li>Tensorflow 2.1.0 and Keras 2.3.1(as we are going to work with Deep Learning models and Keras)</li><li>Google Colab/PyCharm/Jupyter Notebook (I prefer Colab because there is free GPU support🤣)</li></ol><h3>1. FMNIST Clothing Classification</h3><p><strong><em>Why FMNIST dataset?</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*tfOWcxFQTpks4aqL26PmQg.jpeg" /></figure><p>Firstly, Fashion MNIST is the most widely used image dataset and it can be a useful starting point for beginners to develop and learn image classification using convolutional neural networks. Second, this dataset already has a well-defined training and testing dataset that can be used without any hassle.</p><p>This dataset consists of 60,000 small 28x28 <a href="https://www.techopedia.com/definition/24012/pixel">pixel</a> grayscale images of 10 different types that include, shoes, t-shirts, dresses, bags, etc with labels assigned to them as follows:</p><ul><li>0: T-shirt/top</li><li>1: Trouser</li><li>2: Pullover</li><li>3: Dress</li><li>4: Coat</li><li>5: Sandal</li><li>6: Shirt</li><li>7: Sneaker</li><li>8: Bag</li><li>9: Ankle boot</li></ul><p>Let us load this FMNIST dataset and see how it exactly looks.</p><pre>from keras.datasets import fashion_mnist<br>from matplotlib import pyplot<br>from keras.utils import to_categorical</pre><pre>(trainX, trainy), (testX, testy) = fashion_mnist.load_data()</pre><pre>#summarize loaded dataset</pre><pre>print(&#39;Train: X=%s, y=%s&#39; % (trainX.shape, trainy.shape))<br>print(&#39;Test: X=%s, y=%s&#39; % (testX.shape, testy.shape))</pre><pre>#plot first 9 images in the training dataset</pre><pre>for i in range(9):<br>pyplot.subplot(330 + 1 + i)     #define subplot<br>pyplot.imshow(trainX[i], cmap=pyplot.get_cmap(&#39;gray&#39;))<br>pyplot.show()     #plot raw pixel data</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/314/1*mRlF6j0OZSCtTbz_TpEw1A.jpeg" /></figure><p>We can see that there are 60,000 examples in the training dataset and 10,000 in the test dataset.</p><h3>2. Creating a better Dataset</h3><p>This step is divided into two:</p><p>a. Loading of the dataset</p><p>Here, we know that our image is pre-segmented (i.e. every image in our dataset is assigned a digit that ranges from 0–9, which indicates that if it’s a shoe then it has number 0 and so on). All our images are of size 28x28 and they are all grayscaled images.</p><p>But to confirm or to be precise, we will reshape all the images in our dataset to 28x28 pixel with a monotonous color. So, that even if there are some images that don’t follow the pixel and color convention, it can be turned into one that follows our convention.</p><pre>#load dataset</pre><pre>(trainX, trainY), (testX, testY) = fashion_mnist.load_data()</pre><pre>#reshape dataset to have a single channel</pre><pre>trainX = trainX.reshape((trainX.shape[0], 28, 28, 1))<br>testX = testX.reshape((testX.shape[0], 28, 28, 1))</pre><p>Now, because we know that our images are assigned a particular integer value, we will be using a technique called “<a href="https://www.geeksforgeeks.org/ml-one-hot-encoding-of-datasets-in-python/"><strong>one-hot encoding</strong></a>” to convert these integers into binary vectors.</p><pre>#one hot encode target values</pre><pre>trainY = to_categorical(trainY)<br>testY = to_categorical(testY)</pre><p>We will now create a single function to perform all these three steps together.</p><pre>def load_dataset():</pre><pre>    #load dataset<br>    (trainX, trainY), (testX, testY) = fashion_mnist.load_data()</pre><pre>    #reshape dataset to have a single channel</pre><pre>    trainX = trainX.reshape((trainX.shape[0], 28, 28, 1))<br>    testX = testX.reshape((testX.shape[0], 28, 28, 1))</pre><pre>    #one hot encode target values</pre><pre>    trainY = to_categorical(trainY)<br>    testY = to_categorical(testY)</pre><pre>    return trainX, trainY, testX, testY</pre><p>b. Preparation of the dataset</p><p>Every image has a pixel value/or we can say that every image is represented using a pixel value that ranges from 0 and 255, where 0 means black and 255 means white</p><p>Now, we need to convert this 0–255 pixel to a range 0–1 for a better result. So, basically, we are re-scaling our images to a range[0,1]. We will do that by converting these pixel data to float values and then divide these values by 255 (which is our maximum pixel value)</p><pre>def prepare_pixels(train, test):</pre><pre>    #convert from integers to floats</pre><pre>    train_norm = train.astype(&#39;float32&#39;)<br>    test_norm = test.astype(&#39;float32&#39;)</pre><pre>    #normalize to range 0-1</pre><pre>    train_norm = train_norm / 255.0<br>    test_norm = test_norm / 255.0</pre><pre>    #return normalized images</pre><pre>    return train_norm, test_norm</pre><h3>3. Creating/Using a Model</h3><p>We will now create our baseline model.</p><p>We will create a basic model for our dataset which can work no matter how we change the current dataset (like adding new photos, changing the color of photos, etc). This model will be our base model, and then it can be improved based on the accuracy and other parameters.</p><p><strong>ML Model — Convolutional Neural Network</strong></p><p>It is a type of ML algorithm that has been developed to recognize underlying relationships in a set of data through a process that mimics the way the human brain operates.</p><p>CNN is one of the main categories to do image recognition, image classification, object detection, facial recognition, etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PQAsNY_7UI4mfFXjbs0tMA.png" /></figure><p><strong><em>Why is CNN preferred for image datasets?</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*0o_qGsgUdvzXEwRepXjqZQ.png" /></figure><p>In CNN, every image is read in parts than as a whole image. For instance, let say we have a 300x300 pixel image, then CNN will divide the image into smaller images of 4x4 matrices and then deal with these small matrices one-by-one. And then, features are extracted from those smaller image matrix.</p><p>Any CNN model will have two main aspects:</p><ol><li>Feature extraction — Performed using convolutional and pooling layers</li><li>Classifier — that will make a prediction.</li></ol><p><strong>How will our CNN model be?</strong></p><ol><li>We will start with a single convolutional layer with a small filter size (3,3) and a modest number of filters (32) followed by a <a href="https://medium.com/technologymadeeasy/the-best-explanation-of-convolutional-neural-networks-on-the-internet-fbb8b1ad5df8#:~:text=A%20pooling%20layer%20is%20another%20building%20block%20of%20a%20CNN.&amp;text=Its%20function%20is%20to%20progressively,in%20pooling%20is%20max%20pooling.">max-pooling layer</a>.</li><li>We know that here we have to categorize the data into 10 different classes, right? So this will be called a multi-class classification problem. Let me ask you a question, based on the images that we have seen. What do you think would be the number of output layers? 10!! (come on that was obvious).</li><li>We will require an <a href="https://www.geeksforgeeks.org/activation-functions-neural-networks/">activation function</a> (AF). An AF is responsible for transforming the summed weighted input into an output.</li><li>We will also add Dense layers between the feature extractor and the output layer to interpret the features. Let us add 100 nodes and see how it goes.</li><li>We will use a <a href="https://machinelearningmastery.com/rectified-linear-activation-function-for-deep-learning-neural-networks/">RELU Activation function</a> and <a href="https://medium.com/@prateekvishnu/xavier-and-he-normal-he-et-al-initialization-8e3d7a087528">he</a> weight initialization scheme (best practice). RELU is a kind of AF that looks at the output of the activation function, if the output is positive then mark the end result as 1 otherwise mark the end result as zero.</li><li>We will then use a <a href="https://www.geeksforgeeks.org/ml-stochastic-gradient-descent-sgd/#:~:text=Hence%2C%20in%20most%20scenarios%2C%20SGD,for%20optimizing%20a%20learning%20algorithm.&amp;text=This%20cycle%20of%20taking%20the,function%20is%20called%20back%2Dpropagation.">stochastic gradient descent</a> (SGD) optimizer to optimize our learning algorithm. Our SGD will have a learning rate of 0.01 and a momentum of 0.9. (<em>Try changing learning rates to see the differences in accuracy values</em>)</li><li>Finally, we will compile the model with a <a href="https://machinelearningmastery.com/how-to-choose-loss-functions-when-training-deep-learning-neural-networks/">categorical cross-entropy loss function</a> along with our SGD (considered suitable for multi-class classification), and we will monitor our classification accuracy.</li></ol><pre>#define our CNN model</pre><pre>def cnn_model():</pre><pre>    model = Sequential()<br>    model.add(Conv2D(32, (3, 3), activation=&#39;relu&#39;, kernel_initializer=&#39;he_uniform&#39;, input_shape=(28, 28, 1)))<br>    model.add(MaxPooling2D((2, 2)))<br>    model.add(Flatten())<br>    model.add(Dense(100, activation=&#39;relu&#39;, kernel_initializer=&#39;he_uniform&#39;))<br>    model.add(Dense(10, activation=&#39;softmax&#39;))</pre><pre>    #compile model</pre><pre>    opt = SGD(lr=0.01, momentum=0.9)<br>    model.compile(optimizer=opt, loss=&#39;categorical_crossentropy&#39;, metrics=[&#39;accuracy&#39;])</pre><pre>    return model</pre><h3>4. Evaluate the Model</h3><p>Once we are ready with our model, the next step is to evaluate our model for accuracy.</p><p><strong>Evaluation Metrix — K-fold cross-validation</strong></p><p>We will evaluate our model using a <a href="https://machinelearningmastery.com/k-fold-cross-validation/#:~:text=Cross%2Dvalidation%20is%20a%20resampling,is%20to%20be%20split%20into.">K-fold cross-validation</a> metrix. Here, try to choose your k value in such a way that it’s not too large. Eventually, it will help us avoid long running time and evaluate our model repeatedly.</p><p>The training dataset is shuffled before the split. Sample shuffling is performed each time so that any model we evaluate will have the same train and test datasets in each fold.</p><p>We will train the model with 10 epochs and a default batch size of 32 examples. For every epoch, our test set for k folds will be used to evaluate the model. This will help us to create a learning curve to identify the performance of the model.</p><pre>def evaluate_model(dataX, dataY, n_folds=5):</pre><pre>    scores, histories = list(), list()</pre><pre>    #prepare cross validation</pre><pre>    kfold = KFold(n_folds, shuffle=True, random_state=1)</pre><pre>    #enumerate splits</pre><pre>for train_ix, test_ix in kfold.split(dataX):<br>        model = cnn_model()<br>        trainX, trainY, testX, testY = dataX[train_ix], dataY[train_ix], dataX[test_ix], dataY[test_ix]<br>        history = model.fit(trainX, trainY, epochs=10, batch_size=32, validation_data=(testX, testY), verbose=0)<br>        _, acc = model.evaluate(testX, testY, verbose=0)<br>        print(&#39;&gt; %.3f&#39; % (acc * 100.0))<br>        scores.append(acc)<br>        histories.append(history)<br>        model.save(&#39;final_model.h5&#39;)  #save the model for future use</pre><pre>    return scores, histories</pre><p><strong>Result of Evaluation</strong></p><p>We will be presenting two aspects of the results. First, the accuracy diagnosis and second, the loss between training and testing dataset.</p><pre>def accuracy_summary(histories):</pre><pre>    for i in range(len(histories)):<br>        pyplot.subplot(222)<br>        pyplot.title(&#39;Classification Accuracy&#39;)<br>        pyplot.plot(histories[i].history[&#39;accuracy&#39;], color=&#39;blue&#39;, label=&#39;train&#39;)<br>        pyplot.plot(histories[i].history[&#39;val_accuracy&#39;], color=&#39;orange&#39;, label=&#39;test&#39;)</pre><pre>    pyplot.show()<br></pre><pre>def loss_summary(histories):</pre><pre>    for i in range(len(histories)):<br>        pyplot.subplot(211)<br>        pyplot.title(&#39;Loss&#39;)<br>        pyplot.plot(histories[i].history[&#39;loss&#39;], color=&#39;blue&#39;, label=&#39;train&#39;)<br>        pyplot.plot(histories[i].history[&#39;val_loss&#39;], color=&#39;orange&#39;, label=&#39;test&#39;)</pre><pre>    pyplot.show()</pre><p>Now, a final function to call all the above-defined functions.</p><pre>def final():</pre><pre>    trainX, trainY, testX, testY = load_dataset()<br>    trainX, testX = prepare_pixels(trainX, testX)</pre><pre>    scores, histories = evaluate_model(trainX, trainY)<br>    accuracy_summary(histories)<br>    loss_summary(histories)</pre><pre>final()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/363/1*yyz-VP7wINbtISOxV6Yi8A.png" /></figure><p>The above image shows the result for accuracy values for each fold of the cross-validation process. The results may vary with the stochastic nature of the algorithm on running it multiple times.</p><p>Blue lines in the graph indicate model performance on train dataset and orange lines indicate performance on test dataset. Additionally, we can see that the model is able to achieve a good fit with train and test learning curves converging.</p><h3>5. Make Predictions</h3><p>An important thing to keep in mind is that when making predictions, we need to have a grayscale image for prediction. As we have trained our model on grayscale images. Another workaround for this could be an addition of a new function that converts an RGB image into a grayscale image. For now, I will use one of the images from the test dataset and predict the class of that image.</p><pre># make a prediction for a new image.</pre><pre>%pylab inline<br>import matplotlib.pyplot as plt<br>import matplotlib.image as mpimg<br>from keras.preprocessing.image import load_img<br>from keras.preprocessing.image import img_to_array<br>from keras.models import load_model</pre><pre>def load_image(filename):</pre><pre>    #load the image<br>    img = load_img(filename, grayscale=True, target_size=(28, 28))</pre><pre>    #convert to array<br>    img = img_to_array(img)</pre><pre>    #reshape into a single sample with 1 channel<br>    img = img.reshape(1, 28, 28, 1)</pre><pre>    #prepare pixel data<br>    -img = img.astype(&#39;float32&#39;)<br>    img = img / 255.0</pre><pre>    return img</pre><p>Use the saved model to predict the class to which it falls. I have created if-else conditions to make it more clear for you guys to understand the exact category.</p><pre>img1 = mpimg.imread(&#39;/content/sample_data/sample_image.png&#39;)<br>imgplot = plt.imshow(img1)<br>plt.show()</pre><pre>img = load_image(&quot;/content/sample_data/sample_image.png&quot;)<br>model = load_model(&#39;/content/final_model.h5&#39;)</pre><pre># predict the class<br>result = model.predict_classes(img)</pre><pre>if result[0] == 0:<br>    print(&quot;Top&quot;)<br>elif result[0] == 1:<br>    print(&quot;Trouser&quot;)<br>elif result[0] == 2:<br>    print(&quot;Pullover&quot;)<br>elif result[0] == 3:<br>    print(&quot;Dress&quot;)<br>elif result[0] == 4:<br>    print(&quot;Coat&quot;)<br>elif result[0] == 5:<br>    print(&quot;Sandal&quot;)<br>elif result[0] == 6:<br>    print(&quot;Shirt&quot;)<br>elif result[0] == 7:<br>    print(&quot;Sneaker&quot;)<br>elif result[0] == 8:<br>    print(&quot;Bag&quot;)<br>elif result[0] == 9:<br>    print(&quot;Ankle Boot&quot;)<br>else:<br>    print(&quot;Not in the list&quot;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/350/1*587t2DxDQEDv0O5MgFXg3w.jpeg" /></figure><p>From the above image, you can see that the image that has been passed on to our model was that of a pullover and it did predict the image as a “<em>pullover</em>”. You can also try using a different image and check for your own.</p><p><strong>Some additional FYI thing</strong></p><p><strong>How this model can be further improvised</strong></p><ol><li>By padding convolution — helps more features to contribute to the output</li><li>By increasing filters — helps in extracting simple features from the input images</li></ol><p>If you are facing any issue pertaining to Deep Learning models / ML models. You can contact me via <a href="https://www.linkedin.com/in/akhil-haridasan-0640a1b4/">LinkedIn</a> or <a href="https://www.facebook.com/akhil.haridasan/">Facebook</a>. Or else comment here itself, feedbacks are always a good way to improve.</p><p>I will be posting something interesting again with easy steps soon. Till then Enjoy coding !! <strong>👍</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b7e4993d5059" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/image-recognition-using-ml-cnn-b7e4993d5059">Image Recognition Using ML (CNN)</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Developing Deep Learning API using Django]]></title>
            <link>https://medium.com/analytics-vidhya/developing-deep-learning-api-using-django-3b9eb6689c14?source=rss-d323350bd2e5------2</link>
            <guid isPermaLink="false">https://medium.com/p/3b9eb6689c14</guid>
            <category><![CDATA[django]]></category>
            <category><![CDATA[django-rest-framework]]></category>
            <category><![CDATA[postman]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Akhil Haridasan]]></dc:creator>
            <pubDate>Fri, 26 Jun 2020 21:13:48 GMT</pubDate>
            <atom:updated>2020-06-28T15:26:43.929Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jT6a5X2Yvpq0wf92JsTxxA.jpeg" /></figure><p>I hope you guys found my last post (<a href="https://medium.com/@akhilh05/deploying-deep-learning-django-app-to-google-cloud-platform-70bab374704c">Deploying Deep Learning Django app to Google Cloud Platform</a>) useful. In this post, we will learn about developing a Deep Learning application using Django REST Framework. If you would like to explore more on Django then you can find all the details <a href="https://www.django-rest-framework.org/">here</a>.</p><p>In this post, we will again consider a Deep Learning model for application development, the reason being there is hardly anything on developing a Deep Learning application using Django. I am using my video emotion DL model that I have developed to predict the emotions from a video.</p><p><strong><em>You can find n number of ways on Google to develop your app using DJANGO (don’t get confused). However, do keep in mind Django has no limits. You can mostly put anything anywhere </em>😂 <em>But it’s always a good practice to maintain the structure and naming conventions (No?)</em></strong></p><p>Again, this is one of the techniques (simplest one) for developing an app using the Django REST Framework on Windows system.</p><p><strong>Pre-requisite for Deploying a Deep Learning model:</strong></p><ol><li>Python 3.6 (preferred 3.6.10)</li><li>Tensorflow 2.1.0 and Keras 2.3.1(as we are going to work with Deep Learning models and Keras)</li><li>PyCharm/VS IDE (I prefer PyCharm, works like a charm <strong>😬</strong>)</li></ol><h3>Step 1:</h3><p><strong>Creating a directory and installing Django</strong></p><ol><li>Go to cmd (command prompt) and create a new project, let’s say “test”.</li><li>Navigate to test folder/directory through cmd and install Django in it.</li></ol><pre>&gt; mkdir test<br>&gt; cd test<br>&gt; pip install django</pre><h3>Step 2:</h3><p><strong>Creating a Django project</strong></p><ol><li>Create a Django project inside the test directory as follows.</li></ol><pre>&gt; django-admin startproject video_emotion</pre><p><em>This code will help create a Django-project named “</em><strong><em>video_emotion</em></strong><em>” with some auto-generated setting files for an instance of Django, including database configuration, Django-specific options, and other application-specific files as shown below.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/205/1*ugbSfr1EEpWDdEbJTvpyeA.png" /></figure><p><strong>Significance of each file:</strong></p><ul><li><strong>manage.py</strong>: A command-line utility that lets us interact with this Django project in various ways.</li><li><strong>video_emotion/</strong>: directory contains all the necessary files like settings.py, urls.py, wsgi.py, etc.</li><li><strong>settings.py</strong>: Settings/configuration for the Django project.</li><li><strong>urls.py</strong>: The URL declarations for this Django project.</li><li><strong>wsgi.py</strong>: An entry-point for WSGI-compatible web servers to serve our project.</li></ul><h3>Step 3:</h3><p><strong>Creating a basic Django application</strong></p><ol><li>Navigate to <strong>video_emotion </strong>folder and create a Django application inside our Django project “<strong>video_emotion</strong>” as follows.</li></ol><pre>&gt; cd video_emotion<br>&gt; python manage.py startapp video_app</pre><p><em>The above command will powerup the machine learning behind our API and creates multiple files inside our app “</em><strong><em>video_app</em></strong><em>” folder as shown below. Several of these files aren’t even needed and hence, we can ignore those files. Django has a utility that will help us focus on coding than arranging directories for deployment </em>😛.<em> (</em><strong><em>Best thing about Django — I personally feel</em></strong><em>)</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/331/1*kJfOeun0z_rQ8V4NNavtBg.jpeg" /></figure><p><strong>Significance of each file:</strong></p><ul><li><strong>apps.py</strong>: We will create our config class inside this file. This code will not run every time a request is made but runs only once. hence, we’ll place the code to load our models here.</li><li><strong>views.py</strong> will contain the actual code that runs on every request. So we will place the functions and important codes that we have used apart from model configuration here.</li></ul><h3>Step 4:</h3><p><strong>Test your Django application</strong></p><ol><li>To test our code so far, we will run the following commands.</li></ol><pre>&gt; python manage.py makemigrations<br>&gt; python manage.py migrate<br>&gt; python manage.py runserver</pre><ul><li><strong><em>makemigrations </em></strong><em>will help us in identifying any changes made to our app.</em></li><li><strong><em>migrate </em></strong><em>will help in applying all the changes that have been identified.</em></li><li><strong><em>runserver </em></strong><em>will help in running the server with all the changes that have been applied.</em></li></ul><p>Now copy the localhost url (which should look like: <a href="http://127.0.0.1:8000/">http://127.0.0.1:8000/</a>) and paste that to your browser. You should see something like below on a successful build.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sIjF5i8gcg-J4IO27EuzOg.jpeg" /></figure><p><strong>TADAAAA !!!!! </strong>Initial milestone achieved. ✌️✌️✌️✌️ Let’s move on to developing our Deep Learning application.</p><h3>Step 5:</h3><p><strong>Make changes in Django app to accommodate ML changes</strong></p><p>1. Making changes in <strong>“settings.py”</strong></p><p>Search for <strong>INSTALLED_APPS</strong> and write the below mentioned.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/365/1*5Aiky_lUr1iAuLkAT6yYWw.jpeg" /></figure><p><em>Add </em><strong><em>rest_framework</em></strong><em> and </em><strong><em>video_app</em></strong><em> (name of the app) to “</em><strong><em>settings.py”</em></strong><em>.</em></p><p>Add the path to your models in <strong>“settings.py”</strong>. I have saved mine under <em>models</em> directory/folder (i.e. my model.h5 and other useful xml files). This variable “MODEL” is going to be used in <strong>“apps.py” </strong>for linking model weights. (This is only applicable for an ML/DL model development, where you have weights stored in .h5 or .hdf5 formats)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/1*mpIY39jW3B2g6hwbMR_2RQ.jpeg" /></figure><p>2. Making changes in <strong>“views.py”</strong></p><p>Firstly, copy all the additional functions that you have used for your Deep Learning model (For instance, in my case, I have one function for extracting face features, one for detecting face, one for getting frames from video, etc) apart from the pre-trained models and paste that inside “<strong>views.py”</strong> as shown below. Keep in mind that there is no function to train your model included here because I am assuming that you’ve already trained your models and saved their weights to load them here in the application and directly link and use it here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1UDcAV_xBt5gZj6FE6bgzQ.jpeg" /></figure><p>Now, we will create a function to get the request from user (in this case it would be a video url). And, hence, we will be using a POST method. There are two ways of getting the request, GET and POST. GET is used to access the website/localhost and get a JSON response from the server, but no user input is passed. Whereas in POST method, user can pass the input to the website/localhost and get a JSON response from the server.</p><pre>from django.shortcuts import render<br>from django.http import JsonResponse<br><strong>from django.conf import settings </strong> <strong><br>from .apps import VideoAppConfig   </strong>//for linking apps.py - model weights<br><strong>from rest_framework.decorators import api_view</strong></pre><pre>import os<br>import cv2<br>import numpy as np<br>import pandas as pd<br>import time<br>import glob<br>import requests<br>from scipy import ndimage<br>from scipy.ndimage import zoom</pre><pre><strong>@api_view([&quot;POST&quot;]) </strong>//recieve the request<strong><br></strong><br>def check_result(request):<br>    <em>#Get video file url<br>    </em><strong>url = request.POST.get(&#39;url&#39;) </strong>//we are using form-data (key-value) format to store the request<br>    head, tail = os.path.split(url)<br><br>    r = requests.get(url, allow_redirects=True)<br>    open(&quot;resume/&quot; + tail, &#39;wb&#39;).write(r.content)<br><br>    video_path = &quot;resume/&quot;<br>    files = []<br>    for i in os.listdir(video_path):<br>        if i.endswith(&#39;.mp4&#39;):<br>            files.append(i)<br>    for j in files:<br>        vidcap = cv2.VideoCapture(&quot;resume/&quot; + j)<br>        sec = 0<br>        count = 1<br>        frameRate = 5<br>        success = getFrame(vidcap, sec, count)<br><br>        while success:<br>            count = count + 1<br>            sec = sec + frameRate<br>            sec = round(sec, 2)  <em># it will capture image every 2 second<br>            </em>success = getFrame(vidcap, sec, count)<br><br>    img_path = glob.glob(&quot;frames/*.jpg&quot;)<br>    data = []<br>    for image1 in img_path:<br>        n = cv2.imread(image1)<br>        image_emo = emotion_extract(n)<br>        data.append(image_emo)<br><br>    emo_data = freq_persona(data)<br>    print(emo_data)<br><br>    <em># setting emotional values to its respective labels<br>    </em>emo_data.loc[emo_data[&#39;Emotion&#39;] == 0, &#39;Emotion_Label&#39;] = &#39;Angry&#39;<br>    emo_data.loc[emo_data[&#39;Emotion&#39;] == 1, &#39;Emotion_Label&#39;] = &#39;Disgust&#39;<br>    emo_data.loc[emo_data[&#39;Emotion&#39;] == 2, &#39;Emotion_Label&#39;] = &#39;Nervous&#39;<br>    emo_data.loc[emo_data[&#39;Emotion&#39;] == 3, &#39;Emotion_Label&#39;] = &#39;Happy&#39;<br>    emo_data.loc[emo_data[&#39;Emotion&#39;] == 4, &#39;Emotion_Label&#39;] = &#39;Sad&#39;<br>    emo_data.loc[emo_data[&#39;Emotion&#39;] == 5, &#39;Emotion_Label&#39;] = &#39;Surprise&#39;<br>    emo_data.loc[emo_data[&#39;Emotion&#39;] == 6, &#39;Emotion_Label&#39;] = &#39;Neutral&#39;<br><br>    emo_data = emo_data[emo_data[&#39;Count&#39;].notna()]<br>    emo_data = emo_data[emo_data[&#39;Emotion&#39;].notna()]<br>    emo_disp = emo_data[[&#39;Emotion_Label&#39;, &#39;Count&#39;]]<br><br>    emo_jso = emo_disp.to_json(orient=&#39;values&#39;) //convert dataframe to json format<br><br>    <strong>return JsonResponse(emo_jso, safe=False) </strong></pre><p><em>The highlighted commands are necessary commands to run your code. Hence, no messing with those commands.</em></p><p><em>Tips:</em></p><ul><li><em>Do import all the libraries that are required to run your code. (I have mentioned some of mine for your understanding)</em></li><li><em>Convert dataframes to JSON format, as they are not going to work otherwise when you are returning a JSON response.</em></li></ul><p>3. Making changes in <strong>“apps.py”</strong></p><p>Before moving ahead, create a folder named <strong>models </strong>or however you wanna name it. And put all your model weights under that directory.</p><p>Now let’s make changes in <strong>“apps.py”. </strong>I prefer putting all my model weights in <strong>apps.py</strong>. Hence, the next step is to add your model load commands here as follows.</p><pre><strong>import os<br>import keras<br>import tensorflow</strong><br>from django.apps import AppConfig<br>from django.conf import settings<br><strong>from tensorflow.keras.models import model_from_json</strong><br><br>class VideoAppConfig(AppConfig):<br>    name = <strong>&#39;video_app&#39;  </strong>//name of your app<strong><br><br>    </strong><em>#load your models and model weights here and these are linked      &quot;MODELS&quot; variable that we mentioned in &quot;settings.py&quot;<br>    </em>path = os.path.join(settings.MODELS, <strong>&quot;your_model.h5&quot;</strong>) <br>    path1 = os.path.join(settings.MODELS, <strong>&#39;your_model.json&#39;</strong>)<br><br>    json_file = open(path1, &#39;r&#39;)<br>    loaded_model_json = json_file.read()<br>    json_file.close()<br>    loaded_model = model_from_json(loaded_model_json)<br>    loaded_model.load_weights(path)</pre><p><em>Again reminding you guys, do import all your libraries that are required to load your model weights. If you are not using a JSON formatted model weights then it’s absolutely fine. Just load model weights and you are good to go </em>😬</p><p>4. Making changes in <strong>“urls.py”</strong></p><p>Our last milestone to success would be to make changes here. (lol kidding !) But yes, this is our last step. Provide a url path to your application. For example, I have my application path set here as <em>videos/. </em>If I would like to make a call to my application then I would use something like <a href="http://127.0.0.1:8000/video/">http://127.0.0.1:8000/video/</a> (where the IP address is my localhost).</p><pre>from django.contrib import admin<br>from django.urls import path<br><strong>from video_app import views</strong><br><br>urlpatterns = [<br>    path(&#39;admin/&#39;, admin.site.urls),<br>    path(<strong>&#39;video/&#39;</strong>, views.check_result)<br>]</pre><p><em>Also, keep in mind that you need to import your views from the app (highlighted import) to link urls with the </em><strong><em>“views.py”</em></strong><em> file.</em></p><h3>Step 6:</h3><p><strong>Run and test your application</strong></p><p>Run <strong><em>migrations </em></strong>and then <strong><em>runserver </em></strong>commands to initialize your application on your IDE (PyCharm or any other).</p><pre>&gt; python manage.py makemigrations<br>&gt; python manage.py migrate<br>&gt; python manage.py runserver</pre><p>When you don’t have an API (HTML) ready with you to test. “<em>Postman”</em> tool to the rescue. Yaayyyyyy !!! If you guys would like to have a read on what Postman tool is here is the <a href="https://www.postman.com/">link</a>. Download the software and run your DJANGO application as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*bKIv3bSzySNXbKsVTlPftA.jpeg" /></figure><p>And there you go !! That’s it guys. Peace out !!!!!!!!!!!!!</p><p><strong>Some additional FYI thing</strong></p><p><a href="https://www.mlq.ai/django-machine-learning/">Django is one of the most desirable skills in the technology industry these days.</a> It’s time to show off guys 😉</p><p><strong>Advantages of using Django over Flask?</strong></p><ol><li>Structured project — Conventional layout that will help you save time during development</li><li>Navigation — There is a specific naming convention. Each file has names that will help a third person understand what these files are and where to look for at the time of issues.</li><li>Swiftness — Django is created to support complex and large apps. On top of that, it has high scalability and reliability.</li><li>Multiple URL formats — It has a toolkit that supports multiple URL formats and thus makes it less onerous for us. Formats can be: <strong>(<em>abc.com/v1/test/, v1.abc.com/test/, or abc.com/test/?version=v1)</em></strong><em>.</em></li></ol><p><strong>Libraries, dependencies and versions check is a mandate. Do keep in mind all the pre-requisites.</strong></p><p>I know it was a bit lengthy but worth trying and I am sure you are gonna yield what you were looking for. If there are any issues do let me know. Or if you are facing any issue pertaining to Deep Learning models / ML models. You can contact me via <a href="https://www.linkedin.com/in/akhil-haridasan-0640a1b4/">LinkedIn</a> or <a href="https://www.facebook.com/akhil.haridasan/">Facebook</a>. Or else comment here itself, feedbacks are always a good way to improve.</p><p>I will be posting something interesting again with easy steps soon. Till then Enjoy coding !! <strong>👍</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3b9eb6689c14" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/developing-deep-learning-api-using-django-3b9eb6689c14">Developing Deep Learning API using Django</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying Deep Learning Django app to Google Cloud Platform]]></title>
            <link>https://medium.com/analytics-vidhya/deploying-deep-learning-django-app-to-google-cloud-platform-70bab374704c?source=rss-d323350bd2e5------2</link>
            <guid isPermaLink="false">https://medium.com/p/70bab374704c</guid>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[django]]></category>
            <category><![CDATA[tensorflow]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[gcp]]></category>
            <dc:creator><![CDATA[Akhil Haridasan]]></dc:creator>
            <pubDate>Wed, 17 Jun 2020 09:11:53 GMT</pubDate>
            <atom:updated>2020-06-21T15:34:44.644Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HUp6xX2uEbaEb_EU70S7wQ.jpeg" /></figure><p>Deploying a simple Django application may seem easy on a publicly (free) available hosting website, which to some extent is true. However, the struggle begins when you are working on a deep learning-based application. I have deployed multiple models on free hosting website (Heroku) but I had to pull an all-nighter to finally understand that it’s impossible to host a TensorFlow (<strong>not the lite ones</strong>) based model to these freely available hosting websites due to the limitation of slug size (500 MB - upload size/compressed file size). Hence, I have decided to write a post on how to host a Tensorflow based app to Google Cloud Platform using a few easy steps.</p><p>Link to the issue that I’ve faced with slug size and its possible solution can be found <a href="https://stackoverflow.com/questions/62114302/compiled-slug-size-578-1m-is-too-large-max-is-500m?noredirect=1#comment109902541_62114302">here</a>.</p><p>This is one of the techniques (probably the simplest one) of hosting your Django application to GCP.</p><h3><strong>Step 1:</strong></h3><p><strong>Creating a Virtual Machine on Google Cloud Platform</strong></p><ol><li>Assuming that you don’t have a Google Cloud account, <a href="https://cloud.google.com/">here</a> is the link to create one.</li><li>Once you’re ready with the account, click on “Go to Console”.</li><li>Use the existing project (named - My First Project) or create a new project.</li><li>Now you will see a left navigation bar with a lot of available options. Hover over “Compute Engine” to see all the available options, then click on “VM instances”.</li><li>Click on “CREATE INSTANCE”.</li><li>Provide a name to your instance in the <strong>Name</strong> field and keep the rest of the fields as it is (i.e. <strong>Region, Zone, Machine Configuration </strong>and <strong>Container</strong>).</li><li>The next important step is to select <strong>Boot Disk</strong>. (Whenever you are working with a deep learning model, keep in mind there is a facility for Deep Learning support on Google Cloud Platform, one of the best things among others). Select <strong>Operating System </strong>as “Deep Learning on Linux” and <strong>Version </strong>as “Debian GNU/Linux 10 Buster + TF 2–1”, as I am working with <strong>Tensorflow version 2.1.0</strong>. You can increase the <strong>Disk Size </strong>if you want, but 10 GB is more than enough.</li><li>Under <strong>Firewall </strong>section, allow both https and https traffic and finally click on “Create”<strong>.</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/468/1*QCZzh-gWLVqyuD3VUass4g.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*XRamMOHD5f9lLuRdZ5dqhA.jpeg" /></figure><h3>Step 2:</h3><p><strong>Installing necessary packages (Python3, pip, wget, etc)</strong></p><ol><li>Once you create an instance, the next step is to click on “SSH”.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/883/1*-2DpLG8YC6bAq6sa0rwHjA.jpeg" /></figure><ol><li>Now, we will install all our packages. A very important step to keep in mind is the version compatibility. When you are working with Tensorflow 2.1.0, it is preferred to have Python 3.6 (recommended version - Python 3.6.10). Or else there is a high possibility that you may encounter the tensor/graph/other unwanted issues.</li><li>Install <strong>Python3.6</strong> as follows</li></ol><pre>$ <strong>apt</strong> update &amp;&amp; <strong>apt</strong> upgrade -y</pre><ol><li>Installing fresh Python on a Linux/Ubuntu machine requires us to install a bunch of prerequisite libraries as a part of dependencies. I’m honestly not sure what half of these do but yes, I have faced a lot of issues because of the absence of these libraries. Hence, trust me, you won’t regret doing this.</li></ol><pre>$ <strong>sudo</strong> <strong>apt-get</strong> <strong>install</strong> build-essential checkinstall<br>$ <strong>sudo</strong> <strong>apt-get</strong> <strong>install</strong> libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev</pre><ol><li>Install your <strong>Python</strong> version by downloading and building the required version from <em>source</em> instead of installing it using “<strong>apt-get install</strong>”, as it’s easy to do it this way.</li></ol><pre>$ cd /opt<br>$ <strong>sudo</strong> <strong>wget</strong> https://www.python.org/ftp/python/3.6.10/Python-3.6.10.tgz<br>$ <strong>sudo</strong> <strong>tar</strong> xzf Python-3.6.10.tgz</pre><pre>$ cd Python-3.6.10<br>$ <strong>sudo</strong> ./configure --enable-optimizations<br>$ <strong>sudo</strong> <strong>make</strong> altinstall</pre><p><strong><em>“make altinstall”</em></strong><em> will help us install additional versions of Python on our OS.</em></p><p>2. Check the version if it’s properly installed or not.</p><pre>$ python3 --version<br>Python <strong>3.6</strong>.10</pre><p>3. Set your Python version to Python 3.6.10 with priority as 1 as follows:</p><pre>$ update-alternatives --install /usr/bin/python python /usr/bin/python3.6 <strong>1</strong></pre><p><em>Sometimes it might happen that your Python version is installed in a different folder (most of the times in your /usr/local/lib directory). To set the current python version to Python 3.6 from that directory, use the below command.</em></p><pre>$ update-alternatives --install /usr/bin/python python /usr/local/lib/python3.6 <strong>1</strong></pre><p>4. Set Python 3.6.10 to auto mode to use this as default python version</p><pre>$ update-alternatives --config python</pre><pre>There are <strong>2</strong> choices <strong>for</strong> the alternative python (providing /usr/bin/python).<br><br>  Selection    Path                      Priority   Status<br>------------------------------------------------------------<br>* <strong>0</strong>            /usr/local/bin/python3.7   <strong>2</strong>         auto mode<br>  <strong>1</strong>            /usr/bin/python3.6         <strong>1</strong>         manual mode<br>  <strong>2</strong>            /usr/local/bin/python3.7   <strong>2</strong>         manual mode<br><br>Press &lt;enter&gt; to keep the current choice[*], or type selection number:</pre><p><em>Enter </em><strong><em>Selection </em></strong><em>as 1 to set 3.6 as your default Python version.</em></p><p>5. Now install <strong>pip </strong>and <strong>wget </strong>as follows:</p><pre>$ <strong>sudo apt</strong> <strong>install</strong> python-pip<br>$ <strong>sudo apt</strong> <strong>install</strong> wget OR <strong>sudo apt-get install</strong> wget</pre><p><em>Upgrade pip if required or else you can also use the default installed version.</em></p><h3>Step 3:</h3><p><strong>Preparing your Django app for hosting</strong></p><ol><li>Navigate to your Django project, find <strong>settings.py </strong>file and either add the external IP of your VM instance to your allowed hosts (ALLOWED_HOST = [xxx.xxx.xxx.xxx]) or add a ‘*’ to your allowed host (ALLOWED_HOST = [‘*’]) to allow all kinds of traffic.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/883/1*tw4em9KiQtJVuhghrOjUAA.jpeg" /></figure><ol><li>Add a requirements.txt (if not already present) to your Django Project with all the required libraries/dependencies to run your project. Make sure that your requirements.txt is under root directory and not sub-directories or else cloud won’t be able to read and install it.</li><li>Now push your project to Github or create a new repository and copy-paste all your files to that project in Github.</li><li>Once you are ready with your project on Github, next step is to clone that to your VM instance.</li></ol><pre>$ <strong>sudo </strong>git clone<strong> </strong>https://github.com/name_of_your_repository.git</pre><p>4. Change your directory to the cloned project</p><pre>$ cd name_of_your_repository</pre><p>5. Now, install requirements.txt from your project</p><pre>$ <strong>sudo</strong> pip install -r requirements.txt</pre><p><em>It’s gonna take some time to install all the dependencies (mainly your Tensorflow==2.1.0 (421 MB) </em>😛 <em>Patience is the key guys </em>✌️<em>).</em></p><p>6. Finally, run your server on the instance as follows:</p><pre>$<strong> sudo nohup</strong> python manage.py runserver 0.0.0.0:80 |tee &amp;</pre><p><strong><em>nohup</em></strong><em> command will help you keep your server running even if you close the terminal, whereas </em><strong><em>|tee &amp; </em></strong><em>will</em><strong><em> </em></strong><em>keep the server running</em><strong><em> </em></strong><em>in the background while disconnecting from stdout. Hence, there won’t be any unnecessary output generated which will use your space. However, if you are experiencing any issues and would like to check the error then use the below command:</em></p><pre>$<strong> sudo </strong>python manage.py runserver 0.0.0.0:80</pre><p><em>This will print all the errors to your terminal.</em></p><p>Congratulations ! You have successfully deployed your Deep Learning-based Django project to GCP.</p><p>If you want to access your website then that can be done using the external IP address of your VM instance. For example, if you are using <a href="https://www.postman.com/"><strong>Postman</strong></a><strong> </strong>to test your website, put the following as url — <a href="http://35.226.121.118/"><strong>http://x</strong></a><strong>xx.xxx.xxxx.xxx </strong>(xxx is your external IP). If there is an extension to your url you can use — <a href="http://35.226.121.118/"><strong>http://x</strong></a><strong>xx.xxx.xxxx.xxx/extension.</strong></p><p><strong>Some additional FYI thing</strong></p><ol><li>If you are facing issues like “<strong><em>port already in use</em></strong>”, try this:</li></ol><pre>$<strong> </strong>netstat -tulnap<br>$ kill -9 <strong>portpid</strong></pre><p><strong><em>portpid</em></strong><em> is a unique number (23/234/4567/12446) assigned to http (80) port, which you can figure out from netstat command.</em></p><p>2. If you face issues related to installing Tensorflow or any other large libraries due to size, as all the installation is done at cache level for the first time. Use this:</p><pre>$<strong> </strong>sudo pip install --no-cache-dir tensorflow==2.1.0</pre><p>3. If you would like to check the size metrics for your VM machine, use this:</p><pre>$<strong> </strong>df -h</pre><p><em>This will help you keep track of disk space (used and available), cache, and other memory-related stuffs.</em></p><p>This is my first ever post here. If there are any issues do let me know. Or if you are facing any issue pertaining to Deep Learning models / ML models. You can contact me via <a href="https://www.linkedin.com/in/akhil-haridasan-0640a1b4/">LinkedIn</a> or <a href="https://www.facebook.com/akhil.haridasan/">Facebook</a>. Or else comment here itself, feedbacks are always a good way to improve.</p><p>I will be posting on how to develop a Django application with easy steps soon. Till then Enjoy coding !! <strong>👍</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=70bab374704c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/deploying-deep-learning-django-app-to-google-cloud-platform-70bab374704c">Deploying Deep Learning Django app to Google Cloud Platform</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>