<?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 Dev Parikh on Medium]]></title>
        <description><![CDATA[Stories by Dev Parikh on Medium]]></description>
        <link>https://medium.com/@devparikh21?source=rss-18a58b939384------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*T3bmPgXFsB1ZoBEjntDBrg.jpeg</url>
            <title>Stories by Dev Parikh on Medium</title>
            <link>https://medium.com/@devparikh21?source=rss-18a58b939384------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 23:33:59 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@devparikh21/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[Synthesizing Realistic Audio using WaveGANs]]></title>
            <link>https://devparikh21.medium.com/synthesizing-realistic-audio-using-wavegans-49ec42a80340?source=rss-18a58b939384------2</link>
            <guid isPermaLink="false">https://medium.com/p/49ec42a80340</guid>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[generative-model]]></category>
            <dc:creator><![CDATA[Dev Parikh]]></dc:creator>
            <pubDate>Mon, 08 Aug 2022 00:57:22 GMT</pubDate>
            <atom:updated>2022-08-28T16:06:00.875Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*FHVcmF6HGKK_fYQa.jpg" /><figcaption>An image of an audio waveform.</figcaption></figure><p>Audio is one of the most complicated forms of representing information. It has so many different levels of sound, different lengths, and intervals. Audio is also one of the most important forms of communication around the world, mainly through speech but also through music. As Machine Learning progresses at a rapid rate making advancements in Natural Language Processing to understand the text and in Computer Vision to understand visual data, it&#39;s important that we also create ML models to understand and create audio.</p><p>That’s exactly what I am going to talk about in this article, a project that can synthesize audio using a variation of Deep Convolutional Generative Adversarial Networks(DCGANs) known as WaveGANs.</p><h3>Understanding what GANs are and how they function:</h3><p>GANs are known as Generative Adversarial Networks and have 2 networks in them; the Generator and Discriminator. The Generator is a model that takes in an input(I will explain what the input is later) and attempts to replicate the real dataset that is passed to the Discriminator which attempts to differentiate between the output from the Generator and the real data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/445/0*U6IlWxHIf_ft3arF.png" /><figcaption>A representation of what a GAN looks like.</figcaption></figure><p>The random input vector comes from a set of latent vectors from a certain probability distribution. In the case of WaveGAN that distribution was a uniform distribution of [-1, 1]. These latent vectors are sampled from this space, and throughout the training process through feedback from the loss functions the distribution of where noise vectors are sampled changes.</p><p>This is because <em>WGAN-GP</em>(the loss function used by WaveGAN) uses Wasserstein Distance aiming to minimize the distance between the generated data distribution and the real data distribution.</p><p>The Generator’s goal is to create outputs that can fool the Discriminator into thinking it&#39;s real data, and the Discriminator’s goal is to differentiate between real data and generated data really well.</p><p>As the name suggests, the 2 networks are competing with each other in a zero-sum game both trying to become better than the others. Each network’s loss functions have been designed to make one of the networks better than the other.</p><h4>How does the training process for GANs work:</h4><p>GANs are trained in an unsupervised manner, which means that there aren’t any labels for the training data for the model. The Generator and Discriminator both learn through iterations, and optimization is done to the models to make them improve throughout this process.</p><p>The process of training the Generator and Discriminator is slightly different according to specific implementations. It’s important that this training process remains as stable as possible because the networks have been designed so that if there is an imbalance in the accuracies of any of the networks then the model will collapse.</p><p>In the image above, it shows that there is an update to the Discriminator when the Generator is also updated. But, in a lot of different variations of GANs that can be 5 updates for the Discriminator for every update to the Generator. This is the parameter that WaveGAN uses.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/247/1*4r8WaOsuiXgskIlV9aEYLQ.png" /><figcaption>The parameter on the # of updates for D(Discriminator) for every G(Generator) update.</figcaption></figure><p>You might think that this would cause an imbalance in the accuracies of the networks, but due to the model using the Wasserstein GAN + Gradient Penalty a better Discriminator(more updates=better predictions) leads to a better Generator because the Discriminator provides more gradient information critical for the Generator to create accurate predictions.</p><h3>Why did I use WaveGAN specifically to synthesize audio?</h3><p>WaveGANs are not the only model that allows us to do audio synthesis. There are lots of other models in the Generative Models field but also in Natural Language Processing.</p><p>For example, <a href="https://arxiv.org/pdf/2201.02490.pdf">this</a> paper suggests the use of VQ-VAEs(Variational Autoencoders) and compares them to another type of GAN for music synthesis called GANSynth.</p><p>The main reason for doing this project was not specifically for the WaveGAN model, but rather for learning about Generative Models and the capabilities that they have.</p><p>Most basic implementations in this space were mainly just with images, like generating images of fake celebrities, generating fake art, or generating fake rooms of homes. I didn’t want to do something as common as those projects, and wanted to work with a new type of data; audio.</p><p>Throughout the process of building this project, I realized that Generative Models are very good at solving certain types of problems specifically problems that are related to creating a “realistic” copy of the information.</p><p>GANs are not only interesting in this space, but so are other models like VAEs(Variational Autoencoders) which are very good at learning latent representations of information, and Diffusion Models that can retrieve information from an image that is suppressed under Gaussian noise.</p><p>Now that we understand how GANs work, let’s understand how Deep Generative Adversarial Networks(DCGANs) work which are the backbones of WaveGAN.</p><h3>Understanding Deep Convolutional Generative Adversarial Networks:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/0*iAZ1mzhrChrJS1Oc.png" /><figcaption>An image of DCGAN’s Generator.</figcaption></figure><p>This is an image of a Deep Convolutional Generative Adversarial Network Generator. You might have noticed that the network is completely comprised of Convolutional Layers or in the case of the Generator, Transposed Convolutional Layers.</p><p>This means that DCGANs by design is created for applications where the data is visual, which is most commonly images.</p><p>One of the most famous datasets, MNIST Handwritten Digits is a set of handwritten digits from 0–9 and DCGANs have been implemented to generate those handwritten digits.</p><p>DCGANs have also been implemented for generating accurate(decently accurate) images of human faces as you can see below.</p><p>By far the most common implementation of DCGANs is in generating abstract art, which produces outstanding results when the model is engineered well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qUOoJBzFAix3PUpe.png" /><figcaption>Images of applications of DCGANs.</figcaption></figure><h4>Architecture Details of DCGANs:</h4><p><strong><em>Here is the architecture of the Generator:</em></strong></p><p><strong>Layer 1</strong><em>: Input Layer — </em>Takes a latent vector as input</p><p><strong>Layer 2</strong><em>: Dense Layer</em></p><p><strong>Layer 3</strong><em>: Reshape Layer </em>— Reshapes the data from the input layer</p><p><strong>Layer 4:</strong><em> ReLU Activation Function</em></p><p><strong>Layer 5:</strong><em> Transposed Convolutional Layer</em>(Stride of 2, and Convolutional filters of 5x5 pixels)</p><p><strong>Layer 6:</strong><em> ReLU Activation Function</em></p><p><strong>Layer 7:</strong><em> Batch Normalization</em></p><p><strong>Layer 8:</strong><em> Transposed Convolutional Layer 2D</em>(Stride of 2, and Convolutional filters of 5x5 pixels)</p><p><strong>Layer 9:</strong><em> ReLU Activation Function</em></p><p><strong>Layer 10: </strong><em>Batch Normalization</em></p><p><strong>Layer 11:</strong><em> Transposed Convolutional Layer 2D</em>(Stride of 2, and Convolutional filters of 5x5 pixels)</p><p><strong>Layer 12:</strong><em> ReLU Activation Function</em></p><p><strong>Layer 13:</strong><em> Batch Normalization</em></p><p><strong>Layer 14: </strong><em>Transposed Convolutional Layer 2D</em>(Stride of 2, and Convolutional filters of 5x5 pixels)</p><p><strong>Layer 15:</strong><em> ReLU Activation Function</em></p><p><strong>Layer 16:</strong><em> Batch Normalization</em></p><p><strong>Layer 17: </strong><em>Tahn Activation Function</em>(Output layer)</p><p><strong><em>Here is the architecture of the Discriminator:</em></strong></p><p><strong><em>Layer 1</em></strong><em>: Input Layer </em>— Takes in real data or generated data</p><p><strong><em>Layer 2</em></strong><em>: Convolutional 2D layer</em>(Stride=4 and filter size=5x5 pixels)</p><p><strong><em>Layer 3</em></strong><em>: LeakyReLU Activation Function</em></p><p><strong><em>Layer 4</em></strong><em>: Batch Normalization</em></p><p><strong><em>Layer 5</em></strong><em>: Convolutional 2D layer</em>(Stride=4 and filter size=5x5 pixels)</p><p><strong><em>Layer 6</em></strong><em>: LeakyReLU Activation Function</em></p><p><strong><em>Layer 7</em></strong><em>: Batch Normalization</em></p><p><strong><em>Layer 8</em></strong><em>: Convolutional 2D layer</em>(Stride=4 and filter size=5x5 pixels)</p><p><strong><em>Layer 9</em></strong><em>: LeakyReLU Activation Function</em></p><p><strong><em>Layer 10</em></strong><em>: Batch Normalization</em></p><p><strong><em>Layer 11</em></strong><em>: Convolutional 2D layer</em>(Stride=4 and filter size=5x5 pixels)</p><p><strong><em>Layer 12</em></strong><em>: LeakyReLU Activation Function</em></p><p><strong><em>Layer 13</em></strong><em>: Batch Normalization</em></p><p><strong><em>Layer 14</em></strong><em>: Convolutional 2D layer</em>(Stride=4 and filter size=5x5 pixels)</p><p><strong><em>Layer 18</em></strong><em>: LeakyReLU Activation Function</em></p><p><strong><em>Layer 19</em></strong><em>: Reshape Layer</em></p><p><strong><em>Layer 20</em></strong><em>: Dense Layer</em>(Output Layer)</p><p>The main difference between traditional GANs and DCGANs is that pooling layers are replaced by strided convolutional(in Discriminator) and fractional-strided(in Generator). Batch Normalization is used throughout the Generator and Discriminator. Replacing fully connected hidden layers for Convolutional and Transposed Convolutional 2D layers. Using ReLU activation throughout the Generator except for the output layer which is Tanh. LeakyReLU is used as the</p><p>Knowing the architecture of DCGAN and its difference from traditional GANs will help to build a good understanding of how WaveGANs work and their architecture.</p><h3>Understanding WaveGAN:</h3><p>As I mentioned before, WaveGANs are based on DCGANs and 90% of the architecture remains the same. Although, specific details of the model have been changed to be better designed for audio data.</p><p>In DCGAN’s Generator, there are Transposed Convolutional 2D layers that iteratively upsample an input vector into a high-resolution image. They have a stride of 2 and a filter size of 5x5 pixels.</p><p>In WaveGANs, the Generator uses Transposed Convolutional 1D layers because audio is single-dimensional just audio samples/time and because of that it has a one-dimensional 25-pixel filter(instead of a 5x5 two-dimensional filter) giving it a larger receptive field allowing it to process audio more efficiently. The number of strides happening between the transposed convolutional layers doubled from 2 to 4.</p><p>The image below shows a comparison between the details of the convolutional layers of DCGAN and WaveGAN.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EkBz3twSR3DsOn8P.png" /></figure><p>The WaveGAN architecture does not include batch normalization in the Generator or Discriminator as that has proven to cause instability when training according to the <a href="https://arxiv.org/pdf/1802.04208.pdf">paper</a>.</p><p>The model uses a loss function that has proven to train more successfully than the traditional <em>binary_crossentropy</em> loss function used in vanilla GANs, instead using Wasserstein GAN + Gradient Penalty(WGAN-GP). In the next section, I will explain how this loss function is better than the traditional binary loss function and why it&#39;s popularly used in GANs.</p><p>The authors found that an algorithm known as Phase Shuffle solves a major problem in real data that can affect the Discriminator’s ability to differentiate between generated and real data. In audio data, it&#39;s common to find periodic patterns happening at certain phases and it&#39;s perceived as pitched noise with frequency commonplaces throughout the audio.</p><p>Due to this flaw, the Discriminator would discriminate against generated data that would not have those periodic patterns as the Generator can manipulate phases as the latent vector is upscaled into a waveform.</p><p>Phase Shuffle randomly manipulates the phase of the feature map at every convolutional layer in the Discriminator by hyperparameter <em>n </em>which is used to create audio samples in a uniform distribution [<em>-n</em>, <em>n</em>] to fill in missing samples by reflecting the samples from the opposite side.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/0*d1w8YFE071o_rIg6.png" /><figcaption>This is an image that shows how Phase Shuffle works.</figcaption></figure><h4>Model Architecture of WaveGAN:</h4><p><strong>Generator Architecture:</strong></p><p>Layer 1:<em> Input Layer </em>— Takes in a latent vector in uniform distribution (-1,1)</p><p>Layer 2: <em>Dense Layer</em></p><p>Layer 3: <em>Reshape Layer</em></p><p>Layer 4: <em>ReLU Activation Function</em></p><p>Layer 5: T<em>ransposed Convolutional 1D layer</em>(Stride=4, Kernel Size=25 pixels)</p><p>Layer 4: <em>ReLU Activation Function</em></p><p>Layer 5: <em>Transposed Convolutional 1D layer</em>(Stride=4, Kernel Size=25 pixels)</p><p>Layer 4:<em> ReLU Activation Function</em></p><p>Layer 5: <em>Transposed Convolutional 1D layer</em>(Stride=4, Kernel Size=25 pixels)</p><p>Layer 4: <em>ReLU Activation Function</em></p><p>Layer 5: <em>Transposed Convolutional 1D layer</em>(Stride=4, Kernel Size=25 pixels)</p><p>Layer 4: <em>ReLU Activation Function</em></p><p>Layer 5: <em>Transposed Convolutional 1D layer</em>(Stride=4, Kernel Size=25 pixels)</p><p>Layer 4: <em>Tanh Activation Function</em>(Output Layer)</p><p><strong>Discriminator Architecture:</strong></p><p>Layer 1: <em>Input Layer </em>— Takes as input generated data from Generator or real data</p><p>Layer 2: <em>Convolutional 1D Layer</em>(Stride=4, Kernel Size=25 pixel)</p><p>Layer 3: <em>LeakyReLU Activation Function</em></p><p>Layer 4: <em>Phase Shuffle(n=2)</em></p><p>Layer 5: <em>Convolutional 1D Layer</em>(Stride=4, Kernel Size=25 pixel)</p><p>Layer 6: <em>LeakyReLU Activation Function</em></p><p>Layer 7: <em>Phase Shuffle</em>(n=2)</p><p>Layer 8:<em> Convolutional 1D Layer</em>(Stride=4, Kernel Size=25 pixel)</p><p>Layer 9: <em>LeakyReLU Activation Function</em></p><p>Layer 10: <em>Phase Shuffle</em>(n=2)</p><p>Layer 11: <em>Convolutional 1D Layer</em>(Stride=4, Kernel Size=25 pixel)</p><p>Layer 12: <em>LeakyReLU Activation Function</em></p><p>Layer 13: <em>Phase Shuffle</em>(n=2)</p><p>Layer 14: <em>Convolutional 1D Layer</em>(Stride=4, Kernel Size=25 pixel)</p><p>Layer 15: <em>LeakyReLU Activation Function</em></p><p>Layer 16: <em>Reshape Layer</em></p><p>Layer 17: <em>Dense Layer</em>(Output layer)</p><p>The input of the Generator is a latent vector from a uniform distribution(-1, 1) of the different audio samples from our training data. The training data I used for my implementation is called <a href="https://www.kaggle.com/datasets/rahulbhalley/sc09-spoken-numbers">SC09</a> which is an audio dataset of people saying digits between 0 and 9.</p><p>The output of the Generator is audio waveforms upsampled from the input latent vectors. These waveforms are saved and played back by audio software.</p><p>The input of the Discriminator is either a batch of generated data or a batch of training data. The output of the network is 2 values that represent the <em>realness </em>of the given data<em>.</em></p><h3><strong>How WaveGAN’s loss functions work:</strong></h3><p>WaveGAN’s original paper recommends that WGAN or Wasserstein GAN is used as the model’s loss function.</p><p>Before I explain how WGAN works and how it&#39;s better than WGAN, I need to explain how DCGAN’s loss functions work, its shortcomings and how WGAN improved on them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*10ByGRJhnNSHqkzB.png" /><figcaption>A graph that visually and mathematically represents the Kullback–Leibler Divergence.</figcaption></figure><p>The image above is known as the Jensen-Shannon Divergence which is the difference between the probability distributions P and Q.</p><p>The Jensen-Shannon Divergence is used as a metric for GANs loss functions and is used to perform backpropagation on the Discriminator and Generator.</p><p>The Discriminator predicts a probability between 0 and 1 for a given piece of data coming from the real dataset. For a given fake sample in <em>G(z), z</em> ∼ P<em>z(z) </em>where <em>z</em> comes from <em>Pz</em>(the generated data distribution placed on <em>z</em>) from the Discriminator’s loss function 𝔼<em>x</em>∼p<em>r(x)</em>[log(D(X)]. <em>X</em>, which is the real data is taken from the uniform distribution p<em>r(</em>the real data distribution over <em>x</em>) and then calculated as the logarithm of real data passed to the Discriminator.</p><p>The Generator is trained to predict a high probability for a generated sample, aiming to minimize the function 𝔼<em>x</em>∼p<em>r(x)</em>[log(1- D(G(z)].</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/993/1*k-_1rdZUJL0oZsp4FyVPqA.png" /><figcaption>A min-max function represents the interactions between the Generator and Discriminator loss functions.</figcaption></figure><p>The loss functions of the Discriminator and Generator can be described as a min-max function with the goal of minimizing and maximizing certain functions as I explained above.</p><p>Since both networks have loss functions that compete with each other in a zero-sum game, there is a significant threat of a large imbalance in the accuracy of the networks.</p><p>This problem would become even worse with how Jensen-Shannon Divergence works in that fewer probability distributions P and Q overlap, the less gradient information is given to the Generator by the Discriminator which restricts the number of improvements made to the network to output results in a distribution closer to the real distribution which is what the loss function is attempting to maximize.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_THWfdP2uWS7Z_Kk.png" /></figure><p>As you can see in the image above, after a certain point in a vanilla GAN the gradients hit 0 completely vanishing and giving no important information to the Generator.</p><p>Eventually, as this problem persists, the model would end up collapsing or a mode collapse would happen where the Generator outputs the same data every time.</p><p>Hyperparameter tuning is the best way to solve this imbalance in the Generator and Discriminator’s accuracy, because if the model &amp; loss function configurations are right then the model will have more equilibrium. The problems are first that this process is very time consuming and takes lots of computing power to perform many experiments.</p><p>Hyperparameter tuning might not be the most effective approach for creating stability in the model because of major flaws in the design of the loss functions, and can’t be fixed unless new loss functions are used.</p><h4>Introducing Wasserstein GANs</h4><p>Wasserstein GANs are GANs that use Wasserstein Distance instead of Jensen-Shannon Divergence as the loss functions. The Wasserstein distance is different than the JS Divergence in that it measures the effort that is required to transform one distribution into the other.</p><p>An intuitive way to think about it is that a distribution is a certain amount of earth(soil) piled on <em>M</em> land and the minimum cost of moving that pile of soil to the other pile(distribution) would be the amount of soil being moved multiplied by the mean distance between both piles.</p><p>This example is used to visualize how Wasserstein Distance works, that’s why it&#39;s also referred to as Earth Mover’s distance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/493/0*qcwg093OKzm-0-Y3.jpg" /></figure><p>This function above represents the Wasserstein Distance where the nth Wasserstein distance between 2 probability distributions in the metric space of P<em>p</em>(<em>M</em>).</p><p>The fundamental difference between how JS Divergence was it measured the overlap between 2 probability distributions and Wasserstein distance which measures the effort it takes to move distribution to the other affects the stability of training of GANs and the performance of the Generator and Discriminator.</p><p>When using Wasserstein distance-based loss functions there is more gradient information for both the Discriminator and Generator. So, even if one of the models is not performing as well as the other, it gets important information from the gradients which it can use to backpropagate to improve the network.</p><p>For example, if the Generator starts to create samples in a distribution further from the real data distribution then the Discriminator would return large gradients back to the Generator so it can change weights and biases in the network. As the Generator improves in creating data that is closer to the data in the real distribution, the model will get smaller gradients from the Discriminator. But, in that case, the Discriminator would get larger gradients due to the mistakes its makes in differentiating between real and generated data.</p><h4>How the Discriminator and Generator loss functions work:</h4><p>The difference between a traditional GAN Generator and WGAN Generator is that in the traditional GAN Generator the model is attempting to predict a probability between 0 and 1 of given data being real. Instead, the WGAN Generator measures the <em>realness</em> of data giving a higher(or lower depending on implementation) score to real data and a lower(or higher) score for generated data.</p><p>The Generator loss function is: <strong><em>D(G(Z))</em></strong></p><p>The Discriminator loss function is: <strong><em>D(X) — D(G(Z))</em></strong></p><p>The Generator’s loss function is attempting to maximize/minimize the average realness score given to generated data by the Discriminator denoted by <em>D(G(Z)</em>. The goal is to penalize the Generator weighted on the average realness score of the generated data to the realness score of the real data.</p><p>The Discriminator’s loss function takes the mean realness scores for real data denoted by<em> D(X)</em> &amp; fake data denoted by <em>D(G(Z)</em> from the model attempting to maximize the realness score given to real data and minimize the realness score given to generated data.</p><p>The average scores are collected for the data because for every epoch in training, <em>x</em> amount of latent vectors are created which generate data and<em> x </em>amount of real data is sampled from the training set. X denotes the batch size which is variable according to the implementation.</p><blockquote>By design, when the Discriminator loss is smaller, the Generator loss would be larger, and when the Discriminator loss is larger the Generator loss is smaller.</blockquote><p>When one network gets a larger loss, it gets larger gradients allowing it to create larger changes allowing it to improve substantially compared to the other network which would get a smaller change allowing it to improve slightly. In the next epoch, the network with the larger loss in the previous epoch would likely have a higher accuracy causing it to have a smaller loss and the other network to have a higher loss.</p><p>This process would continue to occur throughout training whereas one network performs better than the other in an epoch, in the next epoch the other network would likely outperform the network due to the changes made during backpropagation.</p><h3>Explanation of the code for this project:</h3><p>If you want to see a full explanation of the code behind my implementation check my <a href="https://youtu.be/puyfWSUd60E?t=441">video </a>on this project.</p><p>That was my article on synthesizing audio through WaveGANs! I learned a lot throughout the process of building this, not just about WaveGAN but about Generative Modelling as a whole and the loss functions used to train them(probably the deepest I have ever gone into loss functions).</p><p><em>Stay on the lookout for further reads on the book </em><a href="https://d2l.ai/index.html"><em>Dive into Deep Learning</em></a><em>, I am currently going through the textbook which builds from fundamentals and explains DL concepts in low-level.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=49ec42a80340" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an Automatic Image Captioner with Deep Learning]]></title>
            <link>https://devparikh21.medium.com/building-an-automatic-image-captioner-with-deep-learning-5d88280ffa52?source=rss-18a58b939384------2</link>
            <guid isPermaLink="false">https://medium.com/p/5d88280ffa52</guid>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[deep-learning]]></category>
            <dc:creator><![CDATA[Dev Parikh]]></dc:creator>
            <pubDate>Thu, 17 Mar 2022 20:15:27 GMT</pubDate>
            <atom:updated>2022-03-17T20:15:27.669Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*h_M4wsOXRHHOTpaY.png" /><figcaption>Images with their corresponding captions.</figcaption></figure><p>When you look at the image above, what is the first thought that comes to your mind? Well, I am sure that you think of an image that consists of 3 different images with their corresponding captions. Even though most of us don’t think about it consciously, it&#39;s absolutely amazing how our brains are able to look at an image in a single glance and be able to summarize the main points in just a couple of sentences! Curiously, I wondered if I could get a computer to be able to captions images like we do! This problem seemed interesting to me as it combined the areas of Natural Language Processing and Computer Vision, which are 2 areas that I am super interested in. In this article, I am going to talk about what Automatic Image Captioning is, how it works, an explanation of the code for this project, and lessons that I learned from this project!</p><h3>What are the implications of Automatic Image Captioning?</h3><p>Before we get into how Automatic Image Captioning works, let’s take a step back, and look at what the implications of Automatic Image Captioning are, and how it is useful. Automatic Image Captioning can simplify the process of extracting important data from images or videos, as the information is summarized into text which is much easier to parse through.</p><p>That might seem like a very minor improvement in efficiency compared to getting a human to look at the image and then summarize it, and you’re right about that. The problem though is that when there is more data the efficiency of manually captioning images becomes extremely laborious, and having a system that can automatically caption images will be exponentially more effective.</p><p>According to The Atlantic, <strong>657 Billion </strong>new images are uploaded to the internet every year. At this rate of growing image/video data on the internet, <strong>multiple lifetimes</strong> would be required to parse through it and derive meaningful information. A Deep Learning-based system would be able to parse through the same amount of data in <strong>minutes</strong>.</p><h3>How does Automatic Image Captioning actually work?</h3><p>By now, you’re probably like “Dev, enough talk on why Automatic Image Captioning is useful, talk about how a Machine Learning model actually performs Image Captioning?”. Well, the answer is a <strong>Sequence-Sequence Encoder-Decoder Architecture</strong>, and this architecture has been the backbone for state-of-the-art models that are being used today.</p><p>I am sure that most people reading this article don’t know what a Sequence-Sequence Encoder-Decoder Architecture is. So, let&#39;s break it down and first look at what Encoder-Decoder Architecture is!</p><h4>Encoder-Decoder Architecture:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/691/0*yErtW7p_3P4oNJrE.png" /><figcaption>A simple diagram of an Encoder-Decoder Architecture.</figcaption></figure><p>The diagram above explains at a high level what an Encoder-Decoder network is. In essence, the encoding part of the architecture is responsible for taking in the input(<em>images, text, etc</em>), and passing this input data through a series of layers that extract important information. The encoder network is also responsible for representing this information in a format that can be understood by the decoder.</p><p>The Decoder is responsible for fetching the output of the Encoder and decoding the information from the encoder. Once the information is decoded, it would be used to help produce the desired output of this model is according to the task that it is being used for.</p><p>I know I know, you are probably still confused by what exactly an Encoder-Decoder model is, as I gave a very general explanation of what it does. To understand this concept better, let’s assume that we want to create a model that can translate our input sentence(in English) to an output sentence(in French).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*D8sYIsD46wO7lh-S.png" /></figure><p>As you can see in the image above, the model takes in an English sentence “I dream of old McDonald every night” and then passes it through the encoder(in this case that&#39;s an LSTM/RNN). What the encoder will do is take important words from this sentence like<em> old</em>, <em>McDonald</em>, <em>night</em>, and <em>dream</em> giving them a larger weight(importance) than other words in the sentence like <em>I</em>, <em>of</em>, and <em>every</em>. The encoder would encode this information into an intermediate representation also known as <strong>hidden states</strong>, which would be passed as input to the decoder.</p><p>The decoder is able to decode the information from this intermediate representation from the encoder. It would understand the important words in the sentence, and their positions in the sentence to understand the meaning. This information would help the decoder to create an accurate translation in French that has a very similar/same meaning as the English version.</p><h4><strong>Sequence-Sequence Encoder-Decoder Architecture:</strong></h4><p>In the last section, we got a pretty good understanding of what Encoder-Decoder models are, and how they work. Now, let’s look at how a Sequence-Sequence Encoder-Decoder model works, and why I used it for Image Captioning!</p><p>But…. before we get into how a Sequence-Sequence Encoder-Decoder model works, let&#39;s answer the question of why there are different types of Encoder-Decoder models and why we need a Sequence-Sequence Encoder-Decoder.</p><p>Encoder-Decoder models are used throughout different areas of Machine Learning mainly in the areas of Computer Vision and Natural Language Processing. For example, model architectures that performed <strong>Semantic Segmentation</strong> used an Encoder-Decoder approach, check out my article on using <a href="https://studentsxstudents.com/using-semantic-segmentation-to-give-a-self-driving-car-the-ability-to-see-6c97425ec562">UNET to perform Semantic Segmentation</a> if you want to learn more about that! We need to have an Encoder-Decoder model that is specifically made to perform Image Captioning.</p><p>Image Captioning is considered as a Sequence-to-Sequence problem, meaning that the input is a sequence of words, characters, numbers, etc and the output is another sequence of words, characters, numbers, etc. In the context of Image Captioning, the input is an image(aka sequences of numbers) and the output is a sentence(aka sequences of words). This is why we need a Sequence-Sequence Encoder-Decoder model!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7FGwFu7qyfwyFDKv.png" /><figcaption>An example of what a Sequence-Sequence Encoder-Decoder model would look like for Automatic Image Captioning.</figcaption></figure><p>The diagram above shows at a high-level a model architecture that would be used to perform Image Captioning would look like. In the first part of the model, images would be passed as input to a CNN which in this case is pre-trained on ImageNet. The CNN would be the Encoder in this model, as it would extract the most important features from the image and output a feature vector/map containing this information.</p><p>This feature map would be used by the LSTM(Decoder) as shown below, to understand the objects in the image, interactions happening between them, and other important information from the image which would help the LSTM create a textual representation of the image(output).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*ftAs573qX-eacyudDPAl_w.png" /></figure><h4>What are some variations/additions of Sequence-Sequence-based Encoder-Decoders that increase accuracies?</h4><p>Sequence-Sequence-based Encoder-Decoders had been the state-of-the-art in performing Image Captioning until <strong>Attention-Mechanism</strong> was found to have a significantly increased accuracy of predictions. Over the years, researchers have also found that using an Object Detection-based Encoder instead of a conventional causes improvements in the accuracy of predictions.</p><p>There are hundreds of papers on how Attention-Mechanism and Object-Detection can be applied to Image Captioning, some creating new networks which incorporated these techniques which lead to better results when performing Image Captioning. Since I didn’t actually implement any of these techniques, I won’t be going super deep into them. But, I thought that it would be worth mentioning some papers + a TLDR of what some of these papers are about!</p><p><strong>Here are some papers that I read while researching more into this area:</strong></p><p><a href="https://proceedings.neurips.cc/paper/2019/file/680390c55bbd9ce416d1d69a9ab4760d-Paper.pdf">https://proceedings.neurips.cc/paper/2019/file/680390c55bbd9ce416d1d69a9ab4760d-Paper.pdf</a> — <em>This was an interesting paper I read on a new Image Captioning model that used Object Detection as an encoder, I also ended up getting to talk to one of the authors of this paper!</em></p><p><a href="https://arxiv.org/ftp/arxiv/papers/1706/1706.02430.pdf">https://arxiv.org/ftp/arxiv/papers/1706/1706.02430.pdf</a> — <em>Image Captioning with Object Detection and Localization</em></p><p><a href="https://openaccess.thecvf.com/content_ICCV_2017/papers/Pedersoli_Areas_of_Attention_ICCV_2017_paper.pdf">https://openaccess.thecvf.com/content_ICCV_2017/papers/Pedersoli_Areas_of_Attention_ICCV_2017_paper.pdf</a> — <em>How Attention-Mechanism can be applied to Image Captioning</em></p><p>From some of the papers and articles that I read around Attention-Mechanism and Object-Detection, I found that Object Detection and Attention-Mechanism both did a great job at localizing different objects and their interactions much better than previous approaches. The image below describes a network that was proposed by the first research paper that I linked above, that combined a Transformer(which is a state-of-the-art model used for Natural Language Processing Tasks) with an Object Detector.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/833/1*IzsYovMQyTOoB1F6LdKv8Q.png" /><figcaption>This is a proposed model architecture called Object Relation Transformer to perform Image Captioning.</figcaption></figure><p>Object Detectors create bounding boxes(boxes around objects that it detects in an image), which means that not only can it classify what the object is, but it can also figure out where the object is. When captioning images that have complicated interactions happening between objects and lots of objects in the image, localizing them will make the captions more descriptive.</p><p>Attention-Mechanism also replicates human behavior of focusing on a certain area of an object at a time to make more accurate predictions on what the object is + its characteristics. In the context of Image Captioning, focusing on certain parts of the image, and classifying and localizing objects in that region also lead to significant increases in the accuracy of captions.</p><h3>Understanding the code for Automatic Image Captioning 💻</h3><p>In this article, we have just talked about what Automatic Image Captioning is and how it works at a theoretical level, but we actually haven’t looked at any of the code that I wrote for it.</p><p>I truly believe that building is one of the best ways to learn, so it would be valuable for me to explain what exactly I built, and its purpose. It’s a way for me to test my knowledge and a good way for you to better understand how this project works.</p><p>So, without any further ado, let’s get into the code!</p><h4>Step 1: Importing Dependencies:</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/35dfb366c667da9871fc8ec94a3055d5/href">https://medium.com/media/35dfb366c667da9871fc8ec94a3055d5/href</a></iframe><p>The first step of the project is quite simple, we are just importing all of the libraries that we need for the project like <strong>Tensorflow</strong>, <strong>Tensorflow Addons</strong>, <strong>Tensorflow Hub</strong>, <strong>Keras</strong>, <strong>OpenCV</strong>, <strong>Pandas</strong>, <strong>Numpy</strong>, and more. After importing the libraries, we are importing the images and also initializing the <em>image_size</em>, <em>batch_size</em>, and <em>epochs</em>. The last 2 variables — <em>num_distinct_words </em>which is the length of the text and <em>embedding_dim </em>which is a parameter that will be passed to the model<em>.</em></p><h4>Step 2: Loading in the images:</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9f4cbabd4e93fceaf1ba43890a85841c/href">https://medium.com/media/9f4cbabd4e93fceaf1ba43890a85841c/href</a></iframe><p>The second step of the project is using the <strong>OS</strong> library to iterate over every image in the directory that contains the image dataset. After we read this image, were are going to perform data preprocessing on it like; <strong>resizing the image</strong>,<strong> adding a blur to the image</strong>, <strong>normalizing the image,</strong> etc. Lastly, after performing all of the data preprocessing, we will save the images to the <em>image_dataset</em> list.</p><h4>Step 3: <strong>Loading in the Captions:</strong></h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/61728ad76eafef1a39662cee74e88f77/href">https://medium.com/media/61728ad76eafef1a39662cee74e88f77/href</a></iframe><p>The third step in this project is loading in the captions, which is similar to what we did in the previous step. The for loop above iterates over all of the captions in <em>captions.txt </em>and then stores them in<em> caption_set</em>. Then, I applied text preprocessing techniques like <strong>removing stop words and characters</strong> from the text, <strong>performing lemmatization</strong>, <strong>contracting words,</strong> and <strong>performing tokenization</strong>.</p><h4>Step 4: Train, Test, Validation Splitting:</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/89839550416643e4e7ca556ae977ce09/href">https://medium.com/media/89839550416643e4e7ca556ae977ce09/href</a></iframe><p>The fourth step in this project is training, testing, and validation splitting. Since this dataset doesn’t come with training, testing, and validation set, I had to split up the dataset into chunks for training, testing, and validation. First I had to zip the caption dataset and the image dataset together so that I can make splits on the entire dataset and then split these individual zipped sets of images and captions. That’s what I did, splitting the original dataset into 80% training and 20% validation sets. From the validation set, I took out 10 images for the testing set, which would be used to test the model after it’s trained.</p><h4>Step 5: Splitting Training, Testing, and Validation datasets into Caption datasets and Image datasets:</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0b79885a83192b5822dd00ee4a2dc6b4/href">https://medium.com/media/0b79885a83192b5822dd00ee4a2dc6b4/href</a></iframe><p>The fifth step in this project is taking all of the datasets, and splitting them into their caption sets and image sets respectively. Here we have a function <em>image_caption_separation </em>that performs this<em>, </em>taking as input the unzipped versions of training, testing, and validation image + caption sets, and 2 empty lists for the images and captions to go after the output of the function. Lastly, I converted the lists containing images and captions to NumPy arrays, so they are in the right format to be used by the model.</p><h4>Step 6: Getting predictions from the Encoder for the training images</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d0cb301e71627333c3b4e3fd543bff22/href">https://medium.com/media/d0cb301e71627333c3b4e3fd543bff22/href</a></iframe><p>The sixth step of this project is passing the training images through the Encoder which is the <strong>VGG-16 </strong>pre-trained CNN(Convolutional Neural Network). Its job is to extract the most important information from the image and create a feature map containing that. The model is imported from <strong>tensorflow_hub, </strong>and then created a model with it called <em>image_feature_model</em><strong>.</strong></p><p>Once the model is ready, the next step was to batch the training dataset as it has too many images to get a prediction from when using the <strong>predict</strong><em> </em>function<strong>. </strong>After passing in all of the training dataset batches through the predict function, I combined all of them using <em>np.concatenate </em>which concatenates all output batches together from the predict function and converts them to a NumPy array<em>.</em></p><h4>Step 7: Getting predictions from the Encoder for the testing and validation images</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/32c1c8bf99e277f378ca8959c4829342/href">https://medium.com/media/32c1c8bf99e277f378ca8959c4829342/href</a></iframe><p>In the seventh step of the project, this step is quite similar compared to the last. In this step, I am passing the testing and validation steps through the model using the predict function. The validation and testing sets are not as large as the training, I can pass the entirety of both sets to the predict function. After storing the output from the model in <em>feature_maps_validation</em> or <em>feature_maps_testing, </em>a for loop is going to iterate over every feature map in each set, convert it to an array, and then concatenate it with other feature maps in the set of the feature maps. Lastly, we are reshaping the training and validation arrays into a format that the model accepts.</p><h4>The final step: Training of the Decoder(LSTM)</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9a25954a76836d232e5278dab154ebba/href">https://medium.com/media/9a25954a76836d232e5278dab154ebba/href</a></iframe><p>The final step of this project is creating and training the Decoder of the Sequence-Sequence Model(LSTM). The type of model that I will be using is known as an <strong>LSTM</strong>(Long Short Term Memory) which is a type of <strong>RNN</strong>(Recurrent Neural Network).</p><p>I won’t go super deep into what an LSTM is and how it works as it’s out of the scope in the context of understanding the code. In essence, an LSTM is able to take a sequence as input(text, images, etc), which it then uses to output another sequence. If you want to learn more about LSTMs and how they work, then take a look at the resources that I post at the end of the article.</p><p>From the code snippet above, you probably noticed that there is a layer above the Stacked LSTM layers, known as the <strong>Embedding </strong>layer. The Embedding layer is responsible for converting the input sequences of tokens(words that have been <em>tokenized</em>) to a vector that represents each word and links that to a token. It’s an alternative to using other word embedding algorithms like <strong>word2vec</strong> or <strong>bag-of-words</strong> which create sparse vectors to represent words, often containing lots of zeros, making them more memory intensive.</p><p>After the LSTM layers, there is a <strong>Dense layer</strong>(output layer) with the number of words in every sequence as the number of neurons for the layer. The activation for the layer is <strong>Softmax</strong>, which creates a probability distribution for all possible words in a sequence, and the word with the highest probability would be used as the next word in the output sequence.</p><p>After the LSTM is compiled with an optimizer of <strong>Adam</strong>, a loss of <strong>Categorial CrossEntropy</strong>, and metrics of <strong>accuracy</strong>. Lastly, we train the model using the <em>fit</em> function with the <em>training images</em>, <em>training captions</em>, <em>validation images</em>, and <em>validation_captions</em>.</p><h3>Failures &amp; Lessons learned from the project 🧠:</h3><p>I have been only talking about what automatic image captioning is, why its important, how it works, the code behind it, but I didn’t talk about the lessons that I learned from building this project and my failures throughout the project.</p><h4>Lesson #1: Having a First-Principles Mindset is 🔑</h4><p>The first thing that I failed at in this project was understanding what type of models/architectures would perform automatic image captioning. I had read articles on what a basic model architecture would look like for image captioning, but still didn’t truly understand the purpose of that.</p><p>When I was reading papers on object detectors for automatic image captioning some used <strong>Faster R-CNN</strong>, while others used <strong>VGG-16</strong> or <strong>InceptionV3</strong> which are image classifiers. I ended up spending over a week figuring out what type of object detector/image classifier to use. The problem was that I didn’t completely understand what an object detection system would do in the context of image captioning vs what an image classifier would do.</p><p>After I realized that the purpose of an object detector or image classifier is to extract the important information from images and pass that to the Decoder(LSTM). An image classifier would identify 1 object in an image, whereas object detection would detect multiple objects plus localize them as well which is better for captioning more complex images.</p><p>Having the <em>First-Principles </em>mindset is very important when coding and understanding the project at hand better because it allows you to think about the purpose of something and understand how it works. If I had a good understanding of how object Detectors and image classifiers would work in Image Captioning, then I could have saved 1 week of time and also spend less time understanding how these systems would integrate into the sequence-sequence model architecture.</p><p>My approach whenever I build projects, is to look at what other implementations have used and try to replicate that. Although, after this project, I realized that understanding the different aspects of a project really effectively is key if you want to implement it.</p><h4>Lesson #2: Research Papers are🔑to getting a deep understanding of a project</h4><p>Throughout the process of building this project, I had only read 2 research papers. I didn’t completely read through them, and mostly just skimmed over the paper to get a better understanding of different model architectures used for automatic image captioning.</p><p><em>So, why did I not properly read through lots of research papers?</em></p><p>I gave up reading those research papers because of how complicated they were, or at least <strong>I </strong>thought that they were. I would read research papers to get a deeper understanding of certain concepts, but the moment complicated explanations came up or math came up, I would just quit. Instead, I resorted to youtube videos and medium articles which were much easier to understand. But, the problem was that the explanations were super high-level and explanations could vary depending on which sources you go to.</p><p>Research Papers generally solve all of the problems when relying on secondary sources to understand concepts like Youtube or Medium. Admittedly, they are much harder to understand than secondary sources, but they provide a very in-depth explanation making your understanding of the concept extremely well and getting all of the details you need from one source.</p><h4>Lesson #3: Knowing how to use Stack Overflow correctly is a superpower 🚀</h4><p>Ever since I have been coding, I have been using Stack Overflow to help me solve errors in my code. But, after building this project I realized how to properly use Stack Overflow to effectively and efficiently solve problems in code.</p><p>You are probably wondering,<em> “How do you properly use Stack Overflow, and what did I do wrong in previous projects?”</em></p><p>Any errors that I would encounter that I wasn’t able to solve, I would just Stack Overflow it and look at what the different solutions are for the problem. I would just try all of the solutions, and see which ones worked and which didn’t. But, as I started to work on more complex machine learning projects like<em> YOLO</em>, <em>Semantic Segmentation</em>, <em>Text Summarization</em>, and now Automatic Image Captioning the trial-error strategy doesn’t work and is very inefficient.</p><p>This strategy has been the cause of hours of frustration while building some of the projects above. Instead of doing the trial-error strategy, the first step to solving a complicated error would be to try to understand it as well as possible.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/623/0*8KXBQuBclpKhOFJd.png" /><figcaption>An example of a Python Script having multiple errors.</figcaption></figure><p>If we look at the example above, the error seems to be that one of the lines of code has a variable whose value is negative and isn’t supported by the function it’s being used in.</p><p>The second step is to use Stack Overflow to understand the error better and understand the root cause of the error. The last step would be to solve the root cause of the error and use Stack Overflow to look at what other solutions are that people have created. After this process, 90% of the problems that I encounter will be solved with this technique.</p><h4>Lesson #4: Being Intention for any project is 🔑</h4><p>For most ML and coding projects that I have worked on, my intention always was primarily to learn about new concepts in Machine Learning or Computer Science. The problem with that intention is that it’s very vague; you can learn in different ways, learn different things, and learn new things at varying degrees.</p><p>Since I didn’t have a clear and specific intention for what I wanted to get out of building this project, I didn’t know if I wanted to spend more time understanding concepts like<strong> Bahdanau </strong>and <strong>Luong Attention Mechanism</strong> or just finish the project and move on. I should have spent more time understanding these concepts to go deeper into NLP, as that an area that I want to focus my work on. My intention should have been to get a deeper understanding of NLP concepts through this project, which would have made the project more valuable.</p><h3>Conclusion:</h3><p>In conclusion, I learned some very valuable lessons from this project and also got to learn about new concepts, model architectures, and ML models in Computer Vision and Natural Language Processing. If you want to learn more about the process of building this project from doing research for the project to reading articles on certain concepts to coding out the project you can check out a <a href="https://www.youtube.com/channel/UCeXu5vQ4uZ5ZwtaYCiLS5Aw">video</a> on this that I made.</p><p>Here are some resources that you can use to learn more about some concepts talked about in this article:</p><p><a href="https://towardsdatascience.com/lstm-networks-a-detailed-explanation-8fae6aefc7f9">https://towardsdatascience.com/lstm-networks-a-detailed-explanation-8fae6aefc7f9</a> — A Detailed Explanation of LSTM Networks</p><p><a href="https://www.analyticsvidhya.com/blog/2021/01/understanding-architecture-of-lstm/">https://www.analyticsvidhya.com/blog/2021/01/understanding-architecture-of-lstm</a> — Understanding the architecture of LSTMs</p><p><a href="https://towardsdatascience.com/understanding-fast-r-cnn-and-faster-r-cnn-for-object-detection-adbb55653d97">https://towardsdatascience.com/understanding-fast-r-cnn-and-faster-r-cnn-for-object-detection-adbb55653d97</a> — Understanding Fast R-CNNs and Faster-RCNNs</p><p><a href="https://www.kaggle.com/blurredmachine/vggnet-16-architecture-a-complete-guide">https://www.kaggle.com/blurredmachine/vggnet-16-architecture-a-complete-guide</a> — Explanation of the VGG-16 Architecture</p><p><a href="https://medium.com/@AnasBrital98/inception-v3-cnn-architecture-explained-691cfb7bba08">https://medium.com/@AnasBrital98/inception-v3-cnn-architecture-explained-691cfb7bba08</a> — Explanation of the InceptionV3 Architecture</p><p><a href="https://www.analyticsvidhya.com/blog/2020/08/a-simple-introduction-to-sequence-to-sequence-models/">https://www.analyticsvidhya.com/blog/2020/08/a-simple-introduction-to-sequence-to-sequence-models/</a> — Introduction to Sequence-Sequence Models</p><p><strong>That’s it for this article, if you liked this article and got learn something new, it would be great if you can give it a few claps! Otherwise, I hope to see you in my future articles talking about the new ML projects I made!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5d88280ffa52" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Deep Learning has completely changed the entire self-driving car industry ]]></title>
            <link>https://studentsxstudents.com/how-deep-learning-has-completely-changed-the-entire-self-driving-car-industry-fcbe5629b3e3?source=rss-18a58b939384------2</link>
            <guid isPermaLink="false">https://medium.com/p/fcbe5629b3e3</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[enjoy-writing]]></category>
            <category><![CDATA[self-driving-cars]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[deep-learning]]></category>
            <dc:creator><![CDATA[Dev Parikh]]></dc:creator>
            <pubDate>Thu, 11 Nov 2021 03:38:49 GMT</pubDate>
            <atom:updated>2021-11-21T16:00:18.558Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rdojBblNJQlmGI7w.jpg" /></figure><p>When you look at the image above, what do you think of? You probably think that it’s an image of a <strong>normal</strong> car that is being used for a car race. Well, what if I was to tell you that this is one of the first self-driving cars built for the <strong>DARPA Grand Challenge</strong> where contestants have to build a self-driving car that can successfully get through the entire course without getting into <strong>any</strong> accidents! I know that you must be thinking, this looks <strong>nothing </strong>like a self-driving car that we see being tested around the world today. So, let&#39;s look at how AI (more specifically Deep Learning) has completely changed the field of Self-Driving cars and has allowed us to go from the car above to the one below 🚗!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JYFXtwODww57hnGz.jpg" /></figure><p>Before we dive into the article, let&#39;s quickly look at the breakdown of the article, so you know all of the different sections of the article!</p><h3>Here’s a Breakdown of this article:</h3><p>Across this article I’ll cover 3 main topics:</p><ul><li><strong>How the self-driving car industry looked like 15–20 years ago</strong></li><li><strong>How Deep Learning had completely changed the entire industry</strong></li><li><strong>A company spotlight </strong>💡 <strong>talking about a company</strong> <strong>that is leveraging the power of Deep Learning to effectively trains self-driving cars</strong></li></ul><p><strong>Note:</strong> <em>Before we move along, I want to ensure that you have a basic understanding of the different types of neural networks and how they work as they are going to be fundamental to understanding the content in the latter parts of the article.</em></p><p>If you don’t know how neural networks work and you want to learn more about them, then you can check these out:</p><p><a href="https://www.youtube.com/watch?v=aircAruvnKk&amp;t=1s">https://www.youtube.com/watch?v=aircAruvnKk&amp;t=1s</a> — A great video that explains what Neural Networks are</p><p><a href="https://towardsdatascience.com/an-introduction-to-convolutional-neural-networks-eb0b60b58fd7">https://towardsdatascience.com/an-introduction-to-convolutional-neural-networks-eb0b60b58fd7</a> — An introduction to Convolutional Neural Networks</p><p><a href="https://www.mathworks.com/discovery/machine-learning.html">https://www.mathworks.com/discovery/machine-learning.html</a> — A good introductory article on how Machine Learning works</p><p>So now, without any further ado let’s dive into the how the self-driving car industry looked like 15–20 years ago!</p><h3>How the self-driving industry has completely changed in the last 2 decades 🤯</h3><p>Unless you are living under a rock, you probably know that the self-driving car industry has become one of the hottest industries in the last 5–10 years. Some of the world’s biggest companies like Google, Tesla, GM are working on self-driving cars.</p><p>These companies have spent more than billions of dollars on self-driving car R&amp;D over the last few years alone! The CEOs of these companies are saying that they are on the verge of creating the driverless cars that we all imagine when we think about our future cities (the ones where you can just fall asleep in to get the extra hour of sleep 😀). We already see self-driving cars that are being tested on our roads today, with some self-driving cars that are able to reach <strong>Level 4 Autonomy</strong> in certain areas. For context here are all of the different levels of autonomy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ESnGlcgxZdR1mvCg.png" /><figcaption>This is an image that talks about the 6 levels of autonomy and the differences between them.</figcaption></figure><p>Although, this industry is <strong>very</strong> different if you go back just <strong>15–20 years </strong>from now. The industry was not booming at all, and only a few companies were working in self-driving cars (these companies are now major players in the area). In fact, the majority of the general population was <strong>completely </strong>doubting the idea of self-driving cars and believed that self-driving cars would be too dangerous to sit in.</p><p>The investment in R&amp;D for self-driving cars was at a fraction of the current investment, as not many investors believed in this technology. In fact, self-driving cars spent upwards of <strong>16 billion</strong> dollars spent on R&amp;D for the development of fully self-driving cars in 2019 alone!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*I2aZqPzj5H_jjRzt" /><figcaption>Here is a graph that shows the <strong>minimum </strong>total spending of self-driving car companies in 2019 alone on fully self-driving cars R&amp;D<strong>.</strong></figcaption></figure><p>But, today a lot of us are ready to sit in a self-driving car as the public is taking note of the accuracy and reliability of self-driving cars. <strong>What had changed in the last 15–20 years?</strong> <strong>Why are people now believing in this technology more than ever before? Why are we making so much more progress now compared to before?</strong></p><h3>What did the self-driving car industry look like 15–20 years ago?</h3><p>To understand how the self-driving car industry looked like 15–20 years ago, let&#39;s go back to a major milestone in the self-driving car industry; the DARPA Grand Challenge. The DARPA Grand Challenge happened in 2004, where 15 self-driving cars were developed by researchers/innovators from Stanford who had to navigate a 228 KM course in Nevada.</p><p>None of the teams was able to successfully complete this challenge due to technological challenges and a <strong>very</strong> difficult terrain to navigate in. But, this got researchers and innovators excited about making significant advancements in this area with the goal of creating a functioning self-driving car that can take us<strong> anywhere</strong>, at <strong>any time</strong>, during <strong>any weather condition</strong>.</p><p>In the next <strong>5–10 years</strong>, a lot of these teams of researchers started companies like Waymo to pioneer the self-driving car industry. Although, these companies used traditional machine learning techniques for tasks like Perception (systems that act as the eyes of self-driving cars 👀!).</p><p><strong>Note:</strong> The reason why I am going to be focusing on Perception as it&#39;s an area that I have been diving deeper into for the last few months. There are many other areas in the self-driving car software stack that Deep Learning had made a big impact on.</p><h4>Methods that were used to solve problems that self-driving cars were facing before the use of Deep Learning in Perception:</h4><p>For a lot of years, researchers and engineers continued to work on the problem of self-driving and managed to make some progress, using older machine learning systems for tasks that we have pretty much mastered today.</p><p>Examples of methods that use conventional non-deep learning methods are Object Detection and 3D reconstruction. Object Detection is about recognizing all of the different objects in the self-driving car&#39;s environment and 3D reconstruction is reconstruct images of 2-D images taken by the self-driving cars into a 3-D representation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/0*6-u59-NAgIzHgKk9.png" /><figcaption>Traditional Machine Learning approach to Object Detection.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*aGV1MtCwtUjQESoP.gif" /><figcaption>This is an example of how 3D reconstruction was performed using the 3 images above.</figcaption></figure><p>The reason why 3D reconstruction is useful for self-driving cars is that self-driving cars need to be able to understand the entire environment around them from any angle and in all 3 dimensions in order for them to safely navigate the world. Think of it as closing one of our eyes and walking into the streets with busy traffic, it would be much harder to safely navigate it.</p><p>Object Detection systems are very <strong>vital</strong> systems for self-driving because it needs to be able to understand their environment with almost <strong>100% certainty </strong>or it could be fatal!</p><p>3D reconstruction was performed manually performed by taking many different images from different angles from the car of the surrounding environments and then combining them to get a 3-D representation of the environment. This process was <strong>extremely</strong> laborious and time-consuming.</p><p>Object Detection was performed by using well-established<strong> </strong>techniques such as <strong>feature extractors </strong>which take different features from images. Then,<strong> feature descriptors</strong> take these features and form a definition for them to try to understand the larger context of the image and every single object in the image.</p><h4>The problems with the traditional Machine Learning-based systems used for self-driving cars:</h4><p>The methods that were used to be able to perform such machine learning- techniques require <strong>lots </strong>of <strong>manual rules-based </strong>classification to detect certain types of groups of pixel arrangement. This is because pixels are the base units of images, and a certain arrangement of pixels would create a certain feature in an image.</p><p>The problem was that these rules are very <strong>tedious</strong> to create, and they are <strong>rigid </strong>which made them very hard to improve/alter in any way. A basic rotation, flip, or change in the size of the image would mess up the entire prediction of the model. This made this system not very robust, and programmers had to decide a lot of times to make those manual rules.</p><p>This would be a major problem when implementing these traditional machine learning-based systems for problems that self-driving cars would face. On the road, there are <strong>SO</strong> many differences when you are just looking at one specific object. For example, there are so many different types of traffic signs; all with different colors, shapes, and sizes. Having a rigid model wouldn’t be able to classify all of these different traffic signs correctly, as programmers have programmed to look for certain features which many of the traffic signs might not have.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/0*-NpWe3yXLaUrBnMH.png" /><figcaption>How a traditional computer vision-based model would perform classification.</figcaption></figure><p>Thus, engineers would have to make a lot of different models that are built specifically for every single type of traffic sign. This is <strong>way </strong>more time-consuming and also <strong>very</strong> capital intensive. So, researchers can’t spend as much time and money on other problems they are facing or to research other areas in the autonomous vehicle space.</p><h3>How Deep Learning completely changed the industry of self-driving cars!</h3><h4>What is Deep Learning?</h4><p>Let me guess what is going on in your head right now, you are probably like what is <strong>Deep Learning </strong>and what is all of this fuss around it anyways<strong>.</strong></p><p>Let’s use the image below to help us visualize how deep learning came to be and what it really is!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gPfvY0WNEt4es49c.png" /><figcaption>A timeline of how the field of Deep Learning emerged from the larger subset of Machine Learning.</figcaption></figure><p>I am sure that many of you have heard of machine learning and how it is pretty much impacting every single area of our life from predicting the stock market using RNNs to getting a perfect recommendation for delicious treats for your dog 😆.</p><p>But, you probably didn’t know that one of the most important subsets of machine learning; <strong>deep learning</strong>, is playing a major role in making ML a really impactful technology.</p><p>So, how did deep learning-based systems become so much more advanced than traditional machine learning systems?</p><p>Machine Learning emerged as a <strong>new</strong>, <strong>state-of-the-art</strong> subset in artificial intelligence in the early 2000s. This is when computers started to become a lot more mainstream and had become powerful enough to be able to run these machine-learning models.</p><p>These systems had become state-of-the-art at that time because these machine-learning systems were very <strong>intelligent</strong> systems and their ways of learning mimicked the way that humans learned at a high level.</p><p>They can take a certain amount of data, iteratively learn from it by itself without any or minimal human assistance to be able to perform a task with <strong>high accuracy</strong> automatically.</p><p>These models were much more <strong>cost-effective</strong> as companies didn’t have to hire programmers to make systems that can perform these tasks. Machine Learning systems were also much less time-consuming to create and gave these companies more time to focus on other problems they were facing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/0*OqjzskY7w6wt3aMx.png" /><figcaption>This is an example of what a simple machine learning model would look like and this will help us understand one of the major differences between traditional ML and Deep Learning.</figcaption></figure><p>But, from the early 2010s, deep learning had now become a very exciting and <strong>booming</strong> area in machine learning. Deep Learning-based models have a <strong>better accurac</strong>y and <strong>training times are much lower</strong>. They can also<strong> generalize a lot better</strong> on a variety of different datasets and not just perform well on one dataset.</p><p>Deep Learning had a few reasons why it is able to perform better than traditional methods using machine learning. The first reason is that the deep learning models are <strong>much deeper</strong>, meaning that they have a lot more layers in them.</p><p>Originally, simple neural networks would have; 1 <strong>input layer </strong>(responsible for inputting the data + adding the <strong><em>w</em></strong>(weights) and <strong><em>b</em></strong>(bias) to the data), the <strong>hidden layers</strong>(computational layers), and an <strong>output layer</strong> (a layer that takes in all of the previous data to make a prediction). The image below is an example of such a neural network.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2p1j8Z9l5bCLnt-2.png" /></figure><p>Deep neural networks have a similar structure but they can have a lot more<strong> </strong>hidden layers sometimes <strong>millions </strong>or even <strong>BILLIONS</strong>! This gives them <strong>unparallel</strong> amounts of layers to be able to deeply understand the data and be able to deal with data that is very <strong>high dimensional</strong> data like images when compared to normal neural networks.</p><figure><img alt="The Artificial Neural Networks Handbook: Part 1 - DZone AI" src="https://cdn-images-1.medium.com/proxy/1*ZB6H4HuF58VcMOWbdpcRxQ.png" /><figcaption>This is an image of a Deep Neural Network which has a lot more connections between the neurons and there are 2 hidden layers in this specific neural network.</figcaption></figure><p>The second reason why deep learning is able to perform better than traditional machine learning techniques is that deep learning neural networks are much more <strong>data-driven</strong>, which means that the more the data the better they will train.</p><p>In the age where there is an <strong>exponential growth</strong> in the amount of data that we have on the internet. It is easier than ever before to get a large training dataset for deep-learning models, which will substantially increase performance. Traditional machine learning techniques don’t see such an increase in performance when given the same amount when compared to deep learning-based methods.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/0*ZqS903nkjom9x6FL.png" /><figcaption>It&#39;s insane to see how much better the deep learning algorithms perform compared to the traditional machine learning algorithms🤯 !</figcaption></figure><p>Now that we understand a few of the reasons why deep learning is much better than traditional machine learning techniques, let&#39;s look at how it was able to create much better systems for self-driving cars and how it allowed for a lot more progress to be made in this industry!</p><h3>The impact that Deep Learning has made:</h3><p>Deep Learning has had a <strong>tremendous impact</strong> on a few different areas in the Autonomous Vehicle stack(pretty much is all of the different areas in Autonomous Vehicles) — Perception, Prediction, and Path Planning. Although, I am going to be focusing on Perception as that is the area that I have been learning about!</p><p>In the last section, we talked about the main challenges that the systems used to perform tasks like 3D reconstruction and object detection were facing. So, in this section let&#39;s talk about how these same tasks are performed using deep learning and the benefits that it brings to self-driving car companies, and how that has helped to turn the industry into one of the <strong>hottest </strong>industries today.</p><p>3D reconstruction was performed manually using many different images to create a 3-dimensional representation of the environment. Now, 3D reconstruction is performed using a CNNs(Convolutional Neural Networks) that takes in a couple of 2D images through the encoder part of the model that takes all of this information and forms it into its internal representation and then converts this representation into a 3D representation through the decoder part of the CNN.</p><p>This method completely throws the older method out of the water! With more and more data being collected on the surroundings of self-driving cars will iterative get better and better without needing to manually perform this task, making this whole process so much more scaleable.</p><p>Object Detection is also performed much more differently before they used techniques to extract features from an image and define them to get an understanding of the smaller objects in the image and the bigger picture as well. Now, we can use the power of Convolutional Neural Networks like YOLO or FasterCNN that you import and train on your own dataset, and can achieve state-of-the-art results. YOLO is a method that is very accurate sometimes even a jaw-dropping <strong>99%</strong> for some objects 🤯, and understands the global context of the image at a much deeper level!</p><p>YOLO and other state-of-the-art object detection systems are able to understand a lot more about these images as they are much more complex neural networks compared to traditional methods and are much more reliable as they came to be implemented in real-time which is vital for self-driving.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/0*JnRQu_9SJnrDX7A8.png" /><figcaption>YOLO in action!</figcaption></figure><p>With these rapid advancements caused by Deep Learning, companies that are working in this industry that are using these techniques are able to scale up these solutions in a much easier way, its much more cost-effective as they don’t need as many programmers doing manual work instead the model can self-learn, and since these models can understand more complex data they can understand a lot more about the image.</p><p>This will be more cost-effective, take up less attention/effort required from engineers/researchers, and will have the company a lot of time. So that all of these resources can be put towards problems that are really difficult to solve and make good progress.</p><h3>A company that will make a big impact in the self-driving car industry in the 5–10 years — Waabi 👀</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/0*02OY4jBc1_9ctsvP.png" /></figure><p>Waabi is a new startup in the self-driving car space whose aim is to <strong>completely change</strong> the way that we train our self-driving cars. They have created an <strong><em>“AI-first”</em></strong> approach for training self-driving cars using the power of deep learning! The traditional way to train a self-driving car is to send it out on the road, although most of the time the car will encounter situations that it has already been trained on well. This won’t help it be very robust so that it can deal with any sort of situation that could happen on our roads.</p><p>This company is definitely a company to watch for in the next few years as they will make a lot of impact in the self-driving car space and solve one of the major problems that the industry is facing! Here is their website if you want to learn more about them!</p><p><a href="https://waabi.ai/">Waabi - The next generation of self-driving technology starts here.</a></p><p><em>That’s it for my article, I hoped you enjoyed it and learned about the past, present, and future of the self-driving car industry and how Deep Learning has shaped it!</em></p><p><em>If you have any feedback for this article, then feel free to leave that in the comments of this article. Other than that, I hope to see you in my next article!</em> 👋</p><p><strong>We’re providing opportunities for the next generation of student thinkers, inventors, and learners, to publish their thoughts, ideas, and innovation through writing.</strong><br>Our writers span from all areas of topics — from <a href="https://studentsxstudents.com/">Growth to Tech, all the way to Future and World</a>. So if you feel like you’re about to jump into a rabbit hole of reading these incredible articles, don’t worry, we feel the same way. ;)<br>That’s why students x students is the place for getting your voice heard!<br>Sounds interesting? <a href="https://studentsxstudents.com/for-students-by-students-becoming-a-contributor-and-expanding-your-impact-f6da9189fa78">Why not join us on this epic journey</a>?</p><p><a href="https://studentsxstudents.com/">students x students</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fcbe5629b3e3" width="1" height="1" alt=""><hr><p><a href="https://studentsxstudents.com/how-deep-learning-has-completely-changed-the-entire-self-driving-car-industry-fcbe5629b3e3">How Deep Learning has completely changed the entire self-driving car industry 🚗</a> was originally published in <a href="https://studentsxstudents.com/">students x students</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Semantic Segmentation to give a Self-Driving Car the ability to see]]></title>
            <link>https://studentsxstudents.com/using-semantic-segmentation-to-give-a-self-driving-car-the-ability-to-see-6c97425ec562?source=rss-18a58b939384------2</link>
            <guid isPermaLink="false">https://medium.com/p/6c97425ec562</guid>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[enjoy-writing]]></category>
            <dc:creator><![CDATA[Dev Parikh]]></dc:creator>
            <pubDate>Mon, 24 May 2021 02:01:04 GMT</pubDate>
            <atom:updated>2021-08-09T20:05:16.583Z</atom:updated>
            <content:encoded><![CDATA[<p>Every year <strong>1.35 million</strong> people die due to car accidents 😲! That is more deaths than the number of deaths that occur due to heart disease in the US 🤯! The most common reason why this happens is that drivers are drunk, distracted and do not have fast reaction times. These are things that can easily be mitigated and will save those 1.35 million lives per year! There is a similar story where Sebastian Thrun the former head of the Google Self-Driving car team was going with this friend in the car when he was 18 years old. Due to his friend’s mistake of being distracted for a <strong>fraction of a second</strong>, the cost of that mistake cost him his <strong>friend’s life</strong>. There are<strong> thousands</strong> of other stories where small mistakes led to the loss of lives on the road. We know that this is a<strong> big </strong>problem and we need an answer to this problem. You may ask what is the solution to the problem and the answer is—<strong><em> self-driving cars</em></strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4b5s7vK4Tk4UWTI2.jpg" /><figcaption><a href="https://www.automotiveplastics.com/mobility-trends/autonomy/">Source</a></figcaption></figure><h4>The importance of self-driving cars:</h4><p>Before we talk about why I decided to build this project I would like to talk about the importance of having self-driving cars and how they can actually make a<strong> big impact</strong> in the transportation sector in the future. From small things that would greatly improve our lives or save millions of lives per year self-driving cars have can change our lifestyle.</p><p>Using self-driving cars we can make our commute from work to home a lot more productive, as we can do work or do anything that we desire as you do not have to drive cars. This can make commuting a lot more productive where people can take a nap in the car to get some more sleep or get ahead on some work during the car ride.</p><p>You are probably thinking that I only spend 1 hour driving a day, how does that have a big impact on my life. Well, it turns out the on average Americans spend around <strong>37,935 hours </strong>in their lifetime driving which is insane, that is the same as <strong>1 year</strong> of your life driving to work 🤯!!! Just think about all of the amazing things that you could do if you had 1 more year of your life that you can spend on things you enjoy doing.</p><p>Not only that but commuting itself would become a lot more efficient as self-driving cars are able to communicate with each other and create a flow of traffic that does not create traffic jams😊 ! This would greatly reduce the time that we spend travelling in our cars and give us more time on our priorities.</p><p>But out of all of these benefits of self-driving cars, the most important is using self-driving cars over human drivers will save the <strong>13.5 million </strong>people that die every decade due to car crashes🤯! We can create a future where we stop tearing families apart due to these car crashes that require small errors leading to big consequences and creating safer roads for us and the coming generations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/0*QVYwVpz7PV6pSoCf.jpg" /><figcaption><a href="https://bics.com/connectivity-cars-and-the-road-to-monetisation/">Source</a></figcaption></figure><h4><strong>The intention for this building this project:</strong></h4><p>This project that I built can actually be used in real-life and can be deployed once the software is enhanced we can deploy it to self-driving cars and be able to understand and navigate through the world better.</p><p>Before we look into why I decided to build this project, let&#39;s look at how important perception is to us, humans. Our eyes are such an important tool to us that it allows us to do everything in our daily lives and navigate that world that we live in. Without our eyes, life would be <strong>very difficult</strong> and we would not be able to do the things that we are able to do on a daily basis.</p><p>This goes to show the importance of perception not only for us humans but for any other machine that is trying to navigate the world that we live in. This is why perception is so vital in the way that self-driving car interacts with other cars and also being able to safely and efficiently go from point A to point B.</p><p>You can think of perception for self-driving cars as a part of a set of things that are essential for self-driving cars, perception can be compared to how important water is to us. So with that in mind, using Semantic Segmentation we can help train self-driving cars to see the world and drive safely and save those 1.35 million lives that die due to car crashes.</p><p>With Semantic Segmentation, the algorithm analyses each pixel of the image and then puts it in a certain class. This means that the data that is outputted from the network that does the semantic segmentation has precise information on the location of other objects, with other object detector algorithms this is not the case. This higher level of precision will allow the self-driving car to be able to safely navigate from A to B. This is just one of the reasons why I am using semantic segmentation over other state-of-the-art systems.</p><p>Using Semantic Segmentation you can also be able to calculate a more<strong> </strong>precise distance from the vehicle to the object that is being detected. Semantic Segmentation can also be paired up with features like detecting the distance between the vehicle and objects, this can help us create a trajectory for the car that is safe and efficient.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WCg2G3SbI_BsGDc0.gif" /><figcaption>Semantic Segmentation in real-time.</figcaption></figure><h4>The technologies that are used in this project:</h4><p>In this project the technology that I used is AI and to be more specific I used a subset of AI called Machine Learning. For those who are unfamiliar with Machine Learning, it is basically a method for a computer to be able to learn to do a certain task similar to that of a human in that it can learn based on experiences.</p><p>That task may be differentiating between dogs and cats or detecting skin cancer. Recently, a subset of Machine Learning called Deep Learning has been used in a lot more machine learning projects due to the ability for deep neural networks to be able to make more complex predictions and also the creation of different types of neural networks for different tasks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*jbCr8VGfS-bUGgZW.jpeg" /><figcaption>An image of the layers of a CNN.</figcaption></figure><p>For Computer Vision tasks like object detection, we use a special type of Neural Network called a Convolutional Neural Network or CNN. Convolutional Neural Networks are really good at analyzing images to help them do the task that they are doing by extracting important information from the given data. In a CNN the some of the layers slowly make the images smaller and ensure that they contain only important information. This can make it easier for the CNN to be able to process the data and be able to make predictions on it.</p><p>This was not a very detailed explanation of how CNNs work, but if you would like to learn more about them here is a good resource that starts from the basics and goes into more complicated topics about CNNs. <a href="https://towardsdatascience.com/an-introduction-to-convolutional-neural-networks-eb0b60b58fd7">https://towardsdatascience.com/an-introduction-to-convolutional-neural-networks-eb0b60b58fd7</a></p><p>To do Semantic Segmentation there is a certain type of CNN that is used. The CNN that is used for Semantic Segmentation is called a Fully-Connected-Network(FCN), which is a network that does not contain any dense layers, which are layers that act as the brains of CNNs. The model architecture that I am using for this project is called the U-Net architecture which takes in as an input image or video and outputs a segmented map of the input. I will be explaining these in more depth in later parts of the article.</p><h4><strong>How does Semantic Segmentation work and its benefits?</strong></h4><p>You may be wondering while reading this article on how Semantic Segmenation actually works. So, in this section, I will be talking about how Semantic Segmentation actually works and some of the benefits it has over other object detectors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PW_qJ53JoKtPvv8Z.png" /><figcaption>This is an example of what semantic segmentation would look like when an input image is given.</figcaption></figure><p>Now, to start off we should understand what segmentation is. Segmentation is when something is divided into different sections and that is the core of semantic segmentation. The semantic segmentation algorithm divided the image into different segments that correspond to different objects. They do this by looking at each pixel of the image and classifying it into a certain class, if it is part of a certain object it will be in that segment that contains that object.</p><p>The semantic part of semantic segmentation is the use of different colours to show the different segmented parts of the image. For example, the algorithm may give the colour blue for all of the cars in an image. This is the detection part of the algorithm as it gives the information that every single object with a certain colour can be classified with the class that they correspond to. This is how Semantic Segmentation works and what the algorithms do.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/0*Zaa4aAm_MtHjmGh0.png" /><figcaption>This is object detection with the YOLO algorithm.</figcaption></figure><p>Like I mentioned before there are a few advantages of using semantic segmentation over using other state-of-the-art detection systems like YOLO. In semantic segmentation, each pixel of the image is classified into a category which makes the object’s location on the image/video more accurate than YOLO as seen in the image above.</p><p>This is because YOLO puts a bounding box around the object that it sees which does not have the location of the object as precise compared to semantic segmentation. As you can see in the image above with bounding boxes, some objects can be overlapped and it may be harder to localize these objects.</p><p>This can be considered important when a miss calculation of the path due to an error in the location of the object could lead to a fatal accident. Not only this, but we can also use this more precise information to find the distance between our vehicle and other objects to help create a trajectory that is safe and efficient. So, to make self-driving cars safe we can use semantic segmentation instead of such a state-of-the-art system.</p><p>Now that we have talked about how we can actually perform Semantic Segmentation. Like I mentioned before that we would use a certain type of model architecture called the U-Net architecture which performs semantic segmentation on the input images. Now the U-Net model is a model that is U-shaped and has 3 main components — the contraction section, the bottleneck section and the expanding section. These sections have a very important role in being able to segment the image.</p><p>The contraction section is the section where we apply a lot of Convolutional + Maxpooling layers to get the most important pieces of data from the input image. Then, the bottleneck section is the bridge between the contraction and expansion section. The expansion section does the opposite of what the contraction section did, and taking the most important features of the image and upsample from there to get to the target image size for the output but this time it&#39;s a segmented map.</p><h4>Conclusion:</h4><p>This is how I built my project that uses Semantic Segmentation to detect different objects in an Autonomous Vehicle’s environment and the intention for building this project. In this article, I gave an overview of my project, the importance of it and how semantic segmentation works. But I didn’t even touch a single line of code!</p><p>So, if you want to see the code for this project, then take a look at part 2 which is coming out in a few days… 👀! In part 2 I talk more about the technical part of this project, and whoever is interested can check that article out. I will link the article here when it is posted. Other than that, I will see you in another article!</p><blockquote>Feel like you’re about to jump into a rabbit-hole of reading these incredible articles?<br>Don’t worry, we feel the same way.<br>Not only can you jump into the rabbit hole with us, but we’ve got more than enough articles that’ll help you jump out ;)<br>For some of the best ideas on Medium from the youngest minds of the generation, visit <em>students x students.</em></blockquote><p><a href="https://studentsxstudents.com/">students x students</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6c97425ec562" width="1" height="1" alt=""><hr><p><a href="https://studentsxstudents.com/using-semantic-segmentation-to-give-a-self-driving-car-the-ability-to-see-6c97425ec562">Using Semantic Segmentation to give a Self-Driving Car the ability to see</a> was originally published in <a href="https://studentsxstudents.com/">students x students</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Learning Algebra I as a 12-year-old]]></title>
            <link>https://devparikh21.medium.com/learning-algebra-i-as-a-12-year-old-18e9db4d160a?source=rss-18a58b939384------2</link>
            <guid isPermaLink="false">https://medium.com/p/18e9db4d160a</guid>
            <category><![CDATA[mathematics]]></category>
            <category><![CDATA[algebra]]></category>
            <category><![CDATA[learning]]></category>
            <dc:creator><![CDATA[Dev Parikh]]></dc:creator>
            <pubDate>Fri, 30 Apr 2021 23:31:35 GMT</pubDate>
            <atom:updated>2021-04-30T23:31:35.168Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZT30jpV4xBf8fKsv.jpg" /><figcaption><a href="https://www.mometrix.com/academy/algebra-i/">Source</a></figcaption></figure><p>As many of you may know from my previous articles, that I am <strong>really</strong> interested in AI! I have been investing a lot of time into learning more about this technology to become legitimate in the area. To do this I needed to not only know to have the technical understanding to build Machine Learning projects but also understand the theory behind different Machine Learning concepts and algorithms. But, I learnt that to understand the theory behind Machine Learning you need to have a really good understanding of <strong>math</strong>! Now, to actually be able to understand the math behind these concepts I needed to have an understanding of <strong>Linear Algebra</strong> and <strong>Calculus</strong>!</p><p>Since I am still in Grade 7 I did not have an understanding of these concepts that were <strong>really important </strong>in Machine Learning(school didn’t come in use this time 😊). So, to be able to learn a lot of these concepts I had to learn the fundamentals which were Algebra. I did have experience with Pre-Algebra and basic algebra from school, although this course mostly had concepts that I had never learned about before. In this article, I want to talk about how I was able to learn Algebra I in 1 month with more than <strong><em>60 hours of learning</em></strong> the material and talking about my journey in learning Algebra I.</p><p><strong>Here is a breakdown of the article for easier navigation:</strong></p><p>1. Introduction</p><p>2. The technique that I had while approaching some of these concepts in Algebra I</p><p>3. Failures/Learnings from this experience</p><p>4. Conclusion</p><h3>Introduction:</h3><p>To start I want to mention that before learning Algebra I, I used a textbook to help me review Pre-Algebra before starting Algebra I. The book that I used is called <em>Basic Math and Pre-Algebra For Dummies </em>and it gives me a refresher on the fundamentals needed for Algebra.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DKC97dz-ToD4E5nQ.jpg" /><figcaption>Here is the book that I use to learn Pre-Algebra.</figcaption></figure><p>After finishing this book I started to learn Algebra I at Khan Academy which contains about 14 different sections on different Algebra concepts like Linear Equations, Systems of Equations, Quadratics, Functions and more! The course started with basic concepts of Algebra and even some review for Pre-Algebra. This part was quite easy to be able to understand as it was a review for me. But, as I progressed into the course the concepts that I started to learn got more <strong>difficult</strong> like Linear equations, Systems of Equations which were concepts that I was unfamiliar with although after watching the videos multiple times and doing the exercise I was able to grasp some of these concepts. Although, is I progressed to ending of the course some of the concepts were <strong><em>really</em> difficult</strong> like Quadratics: Multiplying and factoring and Quadratics: Functions and Equations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*75aabc5LHSuCZIPPFvyZZQ.png" /></figure><h3>The techniques I used to approach these units:</h3><p>There were a few techniques that I used that would allow me to learn a lot of these concepts efficiently and also with a good understanding. Some of the techniques that I used, a lot of them I learnt while doing the course.</p><p>Here are some of the techniques:</p><ol><li>Take notes on things that are difficult and important to know, don&#39;t take notes on <strong>everything</strong> that you learn.</li><li>Give <strong>100%</strong> of your attention to the videos/material to understand it well.</li><li>You can learn a lot from just doing.</li><li>Don’t care about your score for the exercises that you do, <strong>focus on understanding</strong>.</li><li>If you don&#39;t understand the concept rewatch the videos that cover the material and take a look at a solution they have done to understand how to do the question.</li></ol><p>The first technique is a really important technique that allowed me to learn concepts effectively. If you take notes on everything that you learn about, then it would take you <strong>really long</strong> to learn about different concepts. Instead, just take notes on something new that you have learned about or some important detail.</p><p>The second technique is having a lot of focus when you are learning the material, and if you give it all of your attention then you will be able to understand the material really<strong><em> </em></strong>really<em> </em>well. This will give you a really good understanding of the material, and you will be able to speed through the exercise without any problem! I learnt this when I was distracted for a few minutes while watching one of the videos and I wasn&#39;t able to get a good understand of the concept that was taught. This will also allow you to be a lot more efficient as well.</p><p>The third technique is what it says, you can learn a lot from just doing. You might think that after watching the videos or learning the material you understand the concept, but there is a chance that once you do the exercises then you might not be understanding how to solve such problems. A good technique is to do a lot of these exercises until you feel like you have learned a pattern or a trick to doing these problems and you can do a lot of the problems correctly. This tells you that you really have a good understanding of the concept!</p><p>The fourth technique is something a lot of people don’t really understand. A lot of people want to just get a perfect on the exercises and the tests. But, what I believe is more important is having a really good understanding of the concept. So, I would generally do and even re-do some of the exercises until I can get most of the questions right and I feel like I have understood how to answer the questions well.</p><p>The fifth technique that I used was something that I learnt later on when doing the exercises for difficult concepts(I told you I learnt a lot from the experience😂). When learning a lot of these difficult concepts, I would not be able to do the questions for that concept. So, I would keep trying to the questions over and over. It would literally take hours(I am not kidding seriously 😲)! One thing that I learnt is that after doing a lot of practice questions if you still can’t do the questions then you may need to re-watch the video a few times to get a better understanding of the concept.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/0*Mdi8XdGi1P0YhqoN.jpg" /><figcaption><a href="https://elearningindustry.com/how-design-thinking-transforming-learning-experience-free-ebook">Source</a></figcaption></figure><h3>Failures/Learnings from this experience:</h3><p>I had a lot of failures from this journey of doing the course, and these failures created lots of room for improvement for the next math courses that I do or any other time when I am learning something new! One thing that I learned is that I really need to have 100% of my attention during the times that I am watching videos or looking at the material this is because sometimes I would be distracted and I would not be able to understand the material as well. This would also save me time as I would not have to go back and look at the material again. This would also allow me to effectively and efficiently complete the exercises and quizzes the course had. If I had 100% of my attention on some of the material, then I would be able to learn a <strong>lot</strong> faster!</p><p>I learnt is that you should always take notes on material after you have done going over it! The reason why you may want to do this so that you can get a good understand of the material and actually learn the concepts. While watching the videos I would try to take notes at the same time, but actually, that was distracting me and I wasn’t able to understand the material as well. So, if you go back to the material and take notes than that would then you will be able to learn a lot of the concepts effectively. After learning about this, I was able to understand the concepts much better and also have good notes on the concept!</p><p>Another really important thing that I learnt is that you need to give yourself a reasonable amount of time and material to work through every day. This really depends on what your schedule looks like and how much time you can commit to doing this math course. I gave myself 2 hours to work on this course per day, and also a good chunk of the unit to work on that day. The problem is, is that especially once you get to more advanced units you want to give yourself more time to learn the concepts as they are more difficult. I would get a little stressed out about how I would do all of the parts that I planned for on a certain day. If I had given a reasonable amount of time for learning the concepts, then even if it took longer I would get an even better understand of the units.</p><h3>Conclusion:</h3><p>Overall, I enjoyed doing this course even though it was difficult and I am confident that with my Algebra knowledge, it will be easier for me to be able to learn more about Machine Learning especially the theory behind it!</p><p>If you are interested in also doing the Khan Academy Algebra I course then you can use this link to find the course: <a href="https://www.khanacademy.org/math/algebra">https://www.khanacademy.org/math/algebra</a></p><p><strong><em>Well, you have made it to the end of the article👋. If you liked this article and got some insight from it, it would be great if you can give it a few claps! Other than I hope to see you in my future articles!</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=18e9db4d160a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Convolutional Neural Networks to diagnose Brain Cancer]]></title>
            <link>https://studentsxstudents.com/using-convolutional-neural-networks-to-diagnose-brain-cancer-938c897c7ce?source=rss-18a58b939384------2</link>
            <guid isPermaLink="false">https://medium.com/p/938c897c7ce</guid>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[enjoy-writing]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Dev Parikh]]></dc:creator>
            <pubDate>Thu, 08 Apr 2021 22:47:39 GMT</pubDate>
            <atom:updated>2021-09-14T13:58:51.221Z</atom:updated>
            <content:encoded><![CDATA[<p>Here is the video that explains how I built this project, some learnings, failures and a breakdown of the code! <a href="https://www.youtube.com/watch?v=RTWGWcrpmog">https://www.youtube.com/watch?v=RTWGWcrpmog</a></p><p>Over the past few months, I have been diving deeper into the area of <strong>AI</strong> and <strong>Machine Learning. </strong>So, I spend a lot of my time learning about different areas in AI and some of the uses of AI in the real world. After talking to people and learning more about some of these implications, I got very curious and as someone who is super passionate about AI, I wanted to take the challenge and build this project. I wanted to make a project that uses Machine Learning that can make a real impact in the world! So, I chose to create a Machine Learning Model that uses a <strong>Neural Network</strong> called a <strong>Convolutional Neural Network</strong> to predict 4 different types of Brain Tumors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*avswt_e_6CkzAOfj.jpeg" /><figcaption>This is the model architecture of a Convolutional Neural Network.</figcaption></figure><h3><strong>Motivation:</strong></h3><p>Now, before building this project I had to build a few projects; a model that can classify different types of flowers and some <strong>algorithms</strong> that can predict if a certain person onboard the titanic will survive or not. These projects did give me the basic knowledge and skills that would allow me to make more complex projects in the future. I knew that I wanted to make a project that has the potential to make an actual impact in the world, I mean classifying flowers is not going to make a <strong>massive impact</strong> in the world. Not only that, but I also was hungry to learn more about <strong>Computer Vision</strong> and go deeper into this area. After doing this project, I got to learn a lot more about Convolutional Neural Networks(CNNs) and also I got to learn about how to do special preprocessing. I will be talking more about that in the learning part of this article😉!</p><h3><strong>Understanding how my project works:</strong></h3><p>I know, I know many of you are probably like “what are Neural Networks, and how are they different from CNNs and how does the model exactly detect brain cancer?”. Now, to keep this article to the point, I am not going to be explaining what CNNs are, what Neural Networks are and more. If you want to learn about these topics, then here are some resources that you can use to learn more about CNNs, Neural Networks and also what Computer Vision is.</p><p>This is a video that explains neural networks:</p><p><a href="https://www.youtube.com/watch?v=aircAruvnKk&amp;t=1s">https://www.youtube.com/watch?v=aircAruvnKk&amp;t=1s</a></p><p>This is an article that explains Convolutional Neural Networks from the basics:</p><p><a href="https://towardsdatascience.com/an-introduction-to-convolutional-neural-networks-eb0b60b58fd7">An introduction to Convolutional Neural Networks</a></p><p>This is an article that gives an introduction to computer vision:</p><p><a href="https://machinelearningmastery.com/what-is-computer-vision/#:~:text=The%20goal%20of%20computer%20vision%20is,the%20content%20of%20digital%20images.&amp;text=Computer%20vision%20is%20the%20automated,groupi">A Gentle Introduction to Computer Vision - Machine Learning Mastery</a></p><p>Now we can get into how this project actually works. Like I mentioned before I created a model that uses a Convolutional Neural Network to be able to classify 4 different types of brain tumours; glioma tumours, meningioma tumours, no tumours, and pituitary tumours. Before I get into explaining some of the code, I want to first mention that I actually did some special preprocessing so that CNN can correctly classify these different brain tumours. The reason why I did this is that my model was performing quite poorly on the training data and after doing this special preprocessing I got a lot better results for my training set. I will be explaining this preprocessing along with the code later.</p><p>Let’s get into the code!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OPr-C63sbme34C8ut_nnng.png" /></figure><p>Here is the first snippet of code that I have, the code here is very straightforward, so what I did is that I imported all of the dependencies that I needed, gave an image size the number of epochs and the Batch Size. Now when looking at the dependencies most of them are related to Tensorflow, which I will be talking about shortly. The other’s like os are used for navigating to the path where the data is located, cv2(OpenCV) is an imaging library so it allows me to do image-related tasks and I used NumPy to convert lists into arrays. After all of that, I just added the path where the training data is located and where is testing data is located with train_path and test_path.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/758/1*P78bwVuY7aRTWkNxZgnrPg.png" /></figure><p>If we look at the top part of this section we can see that we are defining empty lists and the reason why we are doing this is that these lists are going to be used in the function I wrote below. Now, below I wrote a function that can do this preprocessing for both the training set and testing set when I use it. When we look inside the function we see that there are loops now the reason why I have the first loop is that in this loop we can add the extension of the subdirectory into the path that will allow us to access all of the images in that subdirectory. And we need to do this recursively for all of the categories which is 4.</p><p>Then what we do is now create another loop that recursively looks for all of the images in that specific subdirectory. For every single image, we read it in and save it as an image so that we can do preprocessing on it. Notice that I don’t say train_data or test_data because we are going to be using this function for the preprocessing of both sets so we would have to just do the image. Then, we do a Gaussian Blur which basically removes noise from the image and it&#39;s easier for the computer to look for useful information that is crucial for diagnosing brain cancer. Then what we did is that we created a replica of the image and saved that as image_gray as we converted it to grayscale and then thresholded it between 50 and 255. Now what this does is that it segments the brain part of the image from the rest of the image make it easier for the model to find the important information. After that, we are finding contours in the image and then drawing a contour in the image with a purple line. Then, we are going one-hot encoding for every single class that we have so that for every image in that class we can give it a label. Then, lastly, we are going to add all of the images to the new list that will contain the images.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*oxus-pT2voz-xCGIfo2IgA.png" /></figure><p>Similar to the last part, this part is a bit longer and also a little harder to digest, but bare with me because I will try my best to explain this to you at a basic level! Starting at the top we can see that we are assigning training_data which contains our image data as a list and we use Numpy to convert it to a Numpy array by using the array method. We do the same with the labels list. Now, we are going to use Numpy to reshape our training_data so that it has the one at the end so that it comes to a 4-dimensional array and not only that but that 1 symbolizes that it is a grayscale image and that is needed for the model as the input shape is the image size, image size and then 1(grayscale). Now, the next part is the model itself it is the architecture of the Convolutional Neural Network! For this next part, I am going to assume that you are familiar with all of the different layers of a CNN but I will briefly go over them.</p><p>The first part of the CNN is just model = sequential which is basically setting the model as a certain type of CNN known as a sequential model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/464/0*6r7gvDrXBAGxagUV.jpg" /><figcaption>This is an image that shows how downsampling works.</figcaption></figure><p>The first layer of the network is a convolutional layer which basically downsamples the image(extracts the important information from the image) so that it is easier for the model to analyze, this is done through a convolutional kernel. The 32 that is passed as a parameter is the number of convoluted images that we want this layer to output which are the new images that are downsampled. In the image above we can see that every pixel in a certain area of the entire image is multiplied by the number on the kernel and then the total sum of all of these pixels and the kernel values are taking and added to create a single value that is added to the convoluted image. The (3,3) parameter is the parameter that indicates the size of the convolutional kernel, which in this case is 3x3. There is also a parameter known as the input shape which makes sure that the input shape for the dataset that is being passed into the model has a certain shape, in this case, that is the image_size, image_size and then 1(grayscale). Next is the Activation Function that is relu(rectified linear unit) which will be used for these convolutional layers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/0*F0mEI2BL3TwklzqG.png" /><figcaption>An example of what a MaxPooling Layer would do.</figcaption></figure><p>Then we have a MaxPooling layer that takes the convoluted images and does further downsampling by using a kernel to find the highest value in a certain area, in our case that is 3x3 pixels(the kernel size) and adds that value to the new image. The image above is a good representation of what a max-pooling layer would do. In the parameters, we have the strides which are how many pixels the kernel should move, in the image above that is 2x2.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/513/0*iiPpWzrp6G5dTiFU.png" /><figcaption>An example of what Dropout would do in a layer.</figcaption></figure><p>After that a layer that we haven’t talked about is Dropout, and what Dropout does is that it randomly sets a certain number of the neurons in a layer to 0 which makes some of the other neurons work harder. This is important if your model is overfitting which is when the model is memorizing the data that it has been given, rather than actually learning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/0*TxG5stZ-BYDma2qc.png" /></figure><p>When we look at the end of the network there are 2 Dense layers and these layers and take all of the input from the previous layers and pass that to its neurons. This is what is shown in the image above, where the data is first flattened which turns multi-dimensional arrays into a single vector and then takes the input and puts it through its neurons. In the first dense layer, there are about 512 Neurons, and in the second which is the output, the layer has 4 as there are 4 classes that we have.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1015/1*Fj8mCm8z6UevIi02j9M-UQ.png" /></figure><p>This is the last part of the code and it’s not too complicated to understand. The first function that we see is a function called compile and what it does is gives the model a loss, an optimizer and metrics. There are different types of losses, like binary_crossentropy which is used for binary classification and then there are categorical_crossentropy that are used for multi-categorical data.</p><p>This is similar to optimizers where there are different optimizers and what optimizers do is that tune the weights and biases of the neural network to the optimizer for either accuracy or loss. The most popular optimizer is Adam, but there are others like SGD and rmsprop. The metrics are metrics that we want to optimize for, and you can do 2 metrics either accuracy or loss. What that means is that, if your matrics is accuracy then the optimizer will try to maximize accuracy and if your matrics are lost then it will try to minimize loss.</p><p>The next function is the model.fit now this is a function that takes in the training data and the testing data and also takes in the number of epochs(the number of iterations where data is passed through the neural network) and the batch size. The batch size is the number of images that the model takes for every iteration that occurs.</p><p>Lastly, there is the model.save function whose function is in the name, it just saves the model so that we can use it for live predictions!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*e8TI4BzYRNqANOyX.png" /></figure><h3><strong>Learnings/Key Takeaways from this project:</strong></h3><p>I had a lot of learnings this past month working on this project, and I think that some of these things are extremely valuable and can not just be helpful in machine learning, but in other areas of life too. During my time working on this project, I got to learn a lot about tackling different errors and how to keep on persisting even though I would fail a lot of times. I remember during the beginning of my building this project, I got this error that took me almost 1 week to figure out. During that time my head was literally exploding 🤯! I tried so many different things and spent a lot of time debugging the error. Eventually, I found out that the problem was in the version of Tensorflow that I was using. Experiences like these made me a lot more resilient and I started to persevere and have patience whenever I started to tackle errors that were coming.</p><p>I got to learn how to use OpenCV which is a really good imaging library used in Machine Learning quite often, and I used Gaussian Blurs to blur my images so the noise can be removed so the model can focus on the important details. I also learned about contouring and how to do it contouring on an image which was something that I never learned about, and this tough me the basics of how to segment an image which can be useful when doing segmentation projects. Not only that but I also got a deeper understanding of different functions that I didn’t know too much about like ImageDataGenerator or FlowFromDirectory.</p><p>At the end of this project, I got to learn about the importance of having good data as my testing data performed very very poorly on the testing data, and I believe that the reason for this is because of a fault in the training data😞. I think that there was not enough data for the model to be able to extract key features from the data, as the model is not able to find the details that are related to having that specific tumour. I think that if I want to achieve higher accuracies I am going to have to implement different ways of extracting these features using <strong>different techniques </strong>and rather than doing classification I can do brain cancer detection through segmentation.</p><p>Overall, I think that this month has definitely been a ride, and I had a lot of learning curves and I think that a lot of these failures are now fueling me to work on my next project.</p><h3><strong>Failures:</strong></h3><p>Like I mentioned before I failed<strong> A LOT</strong> of times during this project. Over the last month, I probably had the most failures in one month in my entire life 🤯! So, in this section, I want to briefly talk about my failures during building this project and what I would do differently next time when building a similar project. Going back to the beginning of this project I build the most of project in about 4–5 hours with the data being imported, data augmentation and then the model itself. I planned to finish the model that week by working on the optimization of the model and also implementing it on the command line. But, little did I know that this one error was coming about to take me over 2 weeks to solve 😥! These 2 weeks were rough, I mean I had to keep going even though pretty much nothing I did solve the error. Then, after one week I took a different approach as I realized that the error might be due to different packages and so for a week I worked on figuring out how to download my TensorFlow version(which didn’t work for some reason). Now, I did eventually find out why this error actually happens, and I finally got the model to work on google colab! Now, I had another issue which is that the training and testing accuracies where the model were less than 50% which is pretty bad😔. After that, I looked into doing special preprocessing of the training set so that the model can learn to recognize the parts of the brain that are key to diagnose brain cancer. This is what I worked on during the making of this project and the biggest obstacles I had among other smaller ones. Now, a couple of things that I would want to keep in mind for my next project would be to become a little more patient and if there is no solution to the problem then try to think about what problem it could be so that I can start working the solution. Doing a root-cause analysis on these problems is going to be really helpful so that I get to the cause of the problem and try to solve the problem. This will save me a lot of time, especially because I spent about 3 weeks or more on this project. With the right approach, I think that I would be able to do this project in a week. I also want to become more effective at finding good resources that will help me get around an error or code out a part of my project. These are some things that I can keep in mind when I am building my next project!</p><p><strong><em>That’s my article, I hoped you enjoyed it and learned a few things! If you want to learn more about this project you can check this out: </em></strong><a href="https://github.com/devparikh/BrainCancerDetection">https://github.com/devparikh/BrainCancerDetection</a></p><p><strong>If you enjoyed this article it would be great if you can clap for it that would be great! If you have any feedback for this article, then feel free to leave that in the comments of this article. Other than that I’ll see you in another article! 👋</strong></p><blockquote>Feel like you’re about to jump into a rabbit-hole of reading these incredible articles?<br>Don’t worry, we feel the same way.<br>Not only can you jump into the rabbit hole with us, but we’ve got more than enough articles that’ll help you jump out ;)<br>For some of the best ideas on Medium from the youngest minds of the generation, visit <em>students x students.</em></blockquote><p><a href="https://studentsxstudents.com/">students x students</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=938c897c7ce" width="1" height="1" alt=""><hr><p><a href="https://studentsxstudents.com/using-convolutional-neural-networks-to-diagnose-brain-cancer-938c897c7ce">Using Convolutional Neural Networks to diagnose Brain Cancer</a> was originally published in <a href="https://studentsxstudents.com/">students x students</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How we can leverage the power of AI to help solve the problem of good health and well-being]]></title>
            <link>https://medium.datadriveninvestor.com/how-we-can-leverage-the-power-of-ai-to-help-solve-the-problem-of-good-health-and-well-being-79590592076b?source=rss-18a58b939384------2</link>
            <guid isPermaLink="false">https://medium.com/p/79590592076b</guid>
            <category><![CDATA[sgd]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Dev Parikh]]></dc:creator>
            <pubDate>Sun, 07 Feb 2021 02:42:11 GMT</pubDate>
            <atom:updated>2021-02-15T13:21:01.111Z</atom:updated>
            <content:encoded><![CDATA[<h3>The key to solving good health and well-being</h3><h4>Leveraging the power of AI to help solve good health and well-being.</h4><blockquote>How do you think that we can help solve the problem of good health and well-being globally?</blockquote><p>This question is quite tricky because there are so many factors that can adversely affect our health — the environment, what we consume, our lifestyle, and many more. These are what can make us unhealthy, but we can be unhealthy in so many ways from having severe vomiting and diarrhea to having cardiovascular diseases. How can we solve such a big problem? Well, with the help of AI(Artificial Intelligence) we can help solve this problem that affects every single one of us. Phew, at least AI won’t destroy the world like in the movies 😃!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/689/0*B_NPwbmxvEEQCz6f.jpg" /><figcaption>Sustainable Development Goal: Good Health and Well-Being</figcaption></figure><h3>Good Health and Well-Being</h3><p>We know that being healthy and fit is important if you want to live a disease-free life, yet there are millions of people that are diagnosed with <strong>deadly</strong> and rare <strong>diseases</strong>. You can split the cause of different types of diseases into 2 buckets, one of them is due to the lack of sanitization and hygiene and the other is due to lifestyle. In developed countries, the biggest risk of getting deadly diseases is through the environment that we live in. For example, research conducted by the University of Minnesota Public Health found out that a high intake of fast-food is directly linked to <strong>Heart Disease</strong>. In the US alone there are over <strong>30.03 million</strong> people are diagnosed with Heart Disease and of those <strong>657,000</strong> are killed every year(don’t eat too many pizzas <strong>😉)</strong>. Another example is the increased risk of getting Lung Cancer due to the immense amount of pollution in the air. Lung Cancer kills<strong> 433 Americans</strong> per day, which is approximately <strong>160,000 people</strong> every year! In developing countries, the biggest risk of diseases is infectious diseases. Every year there are <strong>1.3–4 million cases of Cholera</strong>, that’s about <strong>1/8 of the population of Canada</strong>! This is because, in most developing countries, most people are not aware of the health risks that come from not practicing sanitizing and hygiene. This is what allows for the creations of deadly diseases, like<strong> Cholera</strong>,<strong> E Coli</strong>, <strong>Ebola</strong>, and many more.</p><p>So, whether people live in developing countries or developed countries, you will be impacted by the problem of not being healthy at all times — physically and/or mentally. The UN believes that many problems including this problem need to be solved by the year 2030. So, they created the <strong>Sustainable Development Goals</strong>, which are the 17 goals that every country needs to achieve by 2030 for a more sustainable future. The SDG that focuses on the assurance of good health, is called <strong>Good Health and Well-Being</strong>. In the next section, I will be talking about more in-depth targets that the UN has set for this SDG goal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KrtrEcMov8BSEFZm.png" /><figcaption>The GDP growth of the poorest countries in the world — <a href="https://www.focus-economics.com/blog/the-poorest-countries-in-the-world">Source</a></figcaption></figure><h3>Why is this problem very difficult to solve</h3><p>I talked about this problem, and how many people around the world are being affected by this problem. I want to now talk about why this problem is very difficult to solve. Today, the current<strong> international poverty line</strong> is <strong>$1.90</strong> a day, and people in <strong>low-income countries</strong> earn about <strong>$1.91</strong> which is barely enough to go for them to be able to feed their families. In developing countries, many people are living under the poverty lines, which makes it very difficult for these people to be able to go to the doctors, get any sort of medicine/treatment. For example, if a farmer from Africa had to pay for an MRI scan that costs between <strong>$300</strong> and <strong>$700</strong> they would not be able to afford it. It’s like telling a middle-class person to buy a 20-million dollar mansion, they would not be able to.</p><p>In developing countries, people are not educated about the importance of sanitization and hygiene which is what allows for the spread of different diseases. <strong>Every 1 in 4 children</strong> will never read or write, which makes <strong>25%</strong> of the population of these developing countries <strong>illiterate</strong>. People will not be educated about the <strong>effects of drinking contaminated water </strong>or<strong> eating contaminated food </strong>is. This also <strong>increases</strong> the spread of many <strong>infectious diseases</strong> into the home and in the community. Cholera can take from <strong>12 hours to 5 days</strong> to spread, and symptoms don’t show up for it for a couple of days which makes it harder for members in the house to know about the infection early on!</p><p>Developing countries are these countries that do not have a very <strong>strong economy</strong>, which them from <strong>establishing</strong> a <strong>healthcare system</strong> that can be accessed by people who are <strong>living in poverty </strong>or are <strong>lower-middle-class</strong> for no-cost(similar to how Canada has free healthcare)! If we look at the graph above we can see that most of the <strong>poorest countries</strong> in the world do not have a lot of growth in their economies, which is why they are not able to establish an <strong>advanced healthcare system</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/713/0*FodWmwNKtHqwpjWe.png" /><figcaption><a href="https://i.pinimg.com/originals/f3/48/cb/f348cb8a4a2cf14cab087fdfbc637d23.png">Source</a></figcaption></figure><h3>Understanding the targets in Good Health and Well-Being</h3><p>Before we try to understand some of the targets of this SDG, let&#39;s take a look at some of them:</p><ol><li>By 2030, reduce the global <strong>mortality</strong> ratio to less than <strong>70 per 100,000 live births</strong></li><li>By 2030, end <strong>preventable diseases</strong> of newborn and children under the age of 5, with all countries aiming to reduce mortality to at least <strong>12 per 1,000 live births</strong> and under 5 births to<strong> 25 per 1,000 live births</strong></li><li>By 2030, end the epidemics of <strong>AIDS, Tuberculosis, Malaria, and tropical diseases</strong>. Also, combating <strong>hepatitis, water-borne diseases, and communicable diseases</strong>.</li></ol><p>4. By 2030, reduce by <strong>one-third premature mortality</strong> from <strong>non-communicable diseases</strong> through <strong>prevention</strong> and <strong>treatment</strong> and <strong>promote mental health and well-being</strong>.</p><p>5. Achieve universal health coverage, including financial risk protection, access to <strong>quality essential health-care services</strong>, and access to <strong>safe</strong>, <strong>effective</strong>, <strong>quality</strong>. They also need to be <strong>affordable</strong> <strong>essential medicine</strong> and vaccines for all.</p><p>If you want to learn more about the SDG and other targets you can go to the following link.</p><p><a href="https://www.globalgoals.org/3-good-health-and-well-being">Goal 3: Good Health and Well-being</a></p><p>So, these are some of the targets in this SDG goal are the most important goals. If we analyze the targets, we can see that most of them are related to ensuring that everyone is having good physical and mental health, whether that&#39;s from <strong>eradicating different diseases</strong> that cause a lot of outbreaks and epidemics in parts of the world, to promote mental health and well-being. A lot of the targets are also related to the prevention of diseases because that is what is going to allow to reduce mortality from certain diseases, or ending epidemics by ensuring that everyone around the world has access to <strong>quality</strong>, <strong>effective</strong>, <strong>safe</strong>, and <strong>affordable</strong> healthcare. So, we can conclude that by <strong>reducing</strong> and<strong> preventing</strong> the spread of diseases we will be able to achieve all of the targets for this SDG.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vMgQpKuyQLzNMqWp.png" /><figcaption>All of the branches of AI that can be used in Healthcare</figcaption></figure><h3>How would AI be able to help solve the problem of good health and well being</h3><p>AI is good at doing a wide range of tasks from being able to detect Skin Cancer from a medical image, to be able to prescribe the most effective medicine/treatments based on your condition. For example, I think that AI how can be implemented to diagnose diseases early on so that then you have a higher chance of survival. For example, in many cancers early then the chances of survival are <strong>beyond</strong> 5 years rather than detection at a later stage. This can not only be implemented with every kind of disease, but people that live in developing countries could use AI that could have <strong>better accuracy</strong> at detecting diseases <strong>better</strong> than a <strong>top doctor</strong> 🤯. AI can be able to detect most to all disease as it can learn to <strong>find</strong> <strong>patterns </strong>between the diseases and some of their <strong>symptoms</strong>, which will allow it to detect most diseases along as they are not a very <strong>rare disease</strong>.</p><p>AI could be a replacement for doctors, by using a field in AI called<strong> Natural Language Processing we can create AI that is able to talk in English to any person by chat, they are known as chatbots</strong>. I think that this is very important especially where people are able to access the internet, as they are able to get access to a chatbot that is more effective, efficient, accurate and does not cost any money(I know that&#39;s incredible)! In the US every single person spends on average <strong>$10,739</strong> per person as of 2017🤯 ! This is <strong>extremely </strong>expensive, it is very<strong> difficult</strong> for low-income people that earn at minimum wage to afford this healthcare(only 25% of American families earn more than <strong>$100,000</strong>)!</p><p>Another very important implication of AI that would benefit people is the ability for the AI to be able to predict whether a person is going to have a certain disease/illness in the future, by data from others! For example, let us say that someone in the US got Heart Disease, and right now different organizations are going to developing countries to check the health and well-being of others, they could use the data of the person from the US who got Heart Disease, to <strong>predict whether a certain person will get the disease in the future by looking at the similarities and differences between the 2 people’s information</strong>(I find it amazing to see how we can help one another by this process)!</p><p><strong>I hope you liked my article! 👋</strong></p><p><em>Well, that is the end of my article, I hope you like it! Take a look at this research paper if you would want to learn more!</em></p><p><a href="https://gh.bmj.com/content/3/4/e000798">Artificial intelligence (AI) and global health: how can AI contribute to health in resource-poor settings?</a></p><p>I hope to see you for the next article, I have a couple of ones that are going to be coming up(hint: some of them are AI-related!)<strong>😉. </strong>I would want to learn about what you think about this article and your perspective on the use of AI in good health and well-being!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=79590592076b" width="1" height="1" alt=""><hr><p><a href="https://medium.datadriveninvestor.com/how-we-can-leverage-the-power-of-ai-to-help-solve-the-problem-of-good-health-and-well-being-79590592076b">How we can leverage the power of AI to help solve the problem of good health and well-being</a> was originally published in <a href="https://medium.datadriveninvestor.com/">DataDrivenInvestor</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The advancements in AR Technology]]></title>
            <link>https://devparikh21.medium.com/the-advancements-in-ar-technology-18c53b0e7a14?source=rss-18a58b939384------2</link>
            <guid isPermaLink="false">https://medium.com/p/18c53b0e7a14</guid>
            <dc:creator><![CDATA[Dev Parikh]]></dc:creator>
            <pubDate>Sat, 14 Nov 2020 21:16:08 GMT</pubDate>
            <atom:updated>2021-03-25T01:06:18.900Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mOLhoFUtxD91gwGWGOSnUw.jpeg" /><figcaption>The Microsoft HoloLens Augmented Reality Headset</figcaption></figure><h4><strong>Introduction: What is Augmented Reality</strong></h4><p>Many of you use a device at some point in your day, because devices have become the main medium of information in the 21 century. As of February 2019 about <strong>74</strong>% of American&#39;s own a computer, it is common for us to use computers, tablets, phones and more today. There is another technology on the rise called <strong>Augmented Reality</strong>, so let me explain: you have probably used <strong>AR </strong>without you even realizing it(When you are running across streets to get the Pokémon! 😁 ). AR is interacting with reality that has been altered by computer graphics embedded in the real-world. What this mouthful means is the ability of a human to interact with non-existing objects in the real world. For example, you can use these <strong>AR headsets</strong> which let you imbed objects onto the real world, you can have a virtual TV where you can change the size of it based on whether you&#39;re watching a horror movie 👻or playing video games!</p><p><strong>I will talk about:</strong></p><ul><li>What is Augmented Reality</li><li>How Augmented Reality is Today</li><li>The Beginning in the Development in Augmented Reality Technology</li><li>How will Augmented Reality make an impact on the world</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/0*HlK_29dkm_zdIhII" /><figcaption>When a person tries to get a Pokémon but crashes into the wall! 😂</figcaption></figure><h4><strong>Introduction: How AR is today</strong></h4><p>Augmented Reality has come a long way from just being a Science-Fiction idea to becoming reality. Most designers until today were only dreaming of using AR, as it was very expensive(Microsoft HoloLens sells at $3000 😮). Today, we have cutting-edge technology that has created cheaper and more varied choices of different AR Headsets to choose from. Some AR Headsets include Microsoft HoloLens, Google Glasses, Vuzix M300, and many more. There is even AR on certain Apple products like the iPad and iPhone that let you use AR without a headset. Pioneering companies in the AR space include companies like Microsoft, Google, and Apple.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vNvwjFeUkY_5p5U3.png" /><figcaption>The percent of the market that is familiar with Augmented Reality</figcaption></figure><p>They have innovated so much in AR that they have shaped Modern AR technology, that at this rate AR will start to impact more and more industries as it will have broader use. Today, doctors are using Microsoft HoloLens Headsets to visually look at a patient&#39;s organ before surgery, this is saving lots of lives by having safe incisions. Thanks, Microsoft 😁! Before I start let me briefly explain what Augmented Reality is. Augmented Reality is the view of the real, physical world which is enhanced by computer-generated input. This is just the introduction of how AR is today, and now I would like to talk about where the AR technology started.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ebf_iqQ3YM44xsE3eGqiLQ.png" /><figcaption>A person who is simulating a Heart using Microsoft HoloLens</figcaption></figure><h4>The Beginning in the Development in AR Technology</h4><p><strong>Augmented Reality</strong> was first discovered by a cinematographer called <strong>Morton Heilig</strong> in 1955. This first device delivers sound, visuals, vibrations, and smell to the user. When <strong>AR</strong> was first invented, it was not computer-based, as computers were very new at the time(this was extremely surprising to me as <strong>AR</strong> today is computer-based!). Later, in the year 1968 Ivan Sutherland the American Computer Scientist invented the small head-mounted displays that are mainstream in <strong>AR headsets</strong>. At that time this technology was very expensive and was unused by people as a result. This is where the evolution of <strong>AR</strong> began.</p><p>In the year 1975, another breakthrough in AR technology brought out the essence of what AR can do on today’s date. <strong>Myron Kruger</strong> created the first <strong>Virtual Reality Headset</strong> that you could use to manipulate and interact with objects in your environment in real-time. 🤯 This was one of the single biggest breakthroughs in AR technology! This was the time that what we call AR today started to transform into. In the next decade, there were many advancements in AR technology with the invention of a <strong>wearable computing </strong>device. A fully functional AR headset was first created by the company <strong>USAF Armstrong’s </strong>in 1992. It used complex robotics and high-speed <strong>3D graphics </strong>that overlaid sensory to improve human productivity in workspaces.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/0*Bc6LXfB2_6H-_ZUz.jpg" /><figcaption>An old AR Headset called Magic Leap One!</figcaption></figure><p><strong>What is the future of Augmented Reality</strong></p><p>There are yet to be a lot of different advancements in <strong>AR technology</strong>, because I see the future of this technology as the next phase of computing. This means a single device that can be our TVs, Laptops, Phones and the other devices we use today. According to my research, there are still many <strong>limitations</strong> of AR to consider to be part of the next phase in <strong>computing.</strong> AR is still in its early stages of <strong>development, </strong>one of the major problems with replacing computers with AR headsets is having blue light very close to your eyes 😞. This is very bad, because this<strong> blue light</strong> can damage your eyes a lot after extensive use. Another major issue is having a huge <strong>headset</strong> and wearing that all the time could be uncomfortable for people, that is why designs like <strong>Google Glasses</strong> are good as they are <strong>lightweight</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FGFNFYbDRNexG4rH" /><figcaption>A concept of an AR device called Apple Glasses!</figcaption></figure><p><strong>How will Augmented Reality make an impact on the world</strong></p><p>One of the biggest <strong>problems</strong> that I care about is Healthcare, and AR can have a huge <strong>impact </strong>on the <strong>Healthcare Industry.</strong> AR has made significant advanced in Augmented Reality, Doctors use AR to create rich and interactive experiences with different organs of the patients. Doctors can<strong> simulate</strong> how different drugs would react with different organs 🤯. It could also be used to show treatment methods to other co-workers while doing the operation. So, how do you think that AR can make an impact in Healthcare? I think that AR has a lot of potential in the Healthcare Industry like I briefly explained above!</p><p><strong>I hope you liked my article! 👋</strong></p><p><em>Well, that is the end of my article, I hope you like it! Comment Below if you like AR and what your most favourite application is.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=18c53b0e7a14" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>