{"id":24054,"date":"2021-06-16T06:58:00","date_gmt":"2021-06-16T13:58:00","guid":{"rendered":"https:\/\/www.springboard.com\/blog\/?p=24054"},"modified":"2023-06-25T23:07:13","modified_gmt":"2023-06-26T06:07:13","slug":"convolutional-neural-networks","status":"publish","type":"post","link":"https:\/\/www.springboard.com\/blog\/data-science\/convolutional-neural-networks\/","title":{"rendered":"What are Convolutional Neural Networks? A One-Stop Guide"},"content":{"rendered":"\n<p>Convolutional Neural Networks are a type of neural networks that are majorly used for image recognition and classification. While simple neural networks can classify an image, if the image has large pixels it will increase the number of parameters for the neural network which will indirectly increase the processing time and slow down the network.&nbsp;This is exactly where Convolutional Neural Networks can come to the rescue. CNNs are a form of specialised neural networks that help in processing data that has an input shape, like a 2D matrix or images. In this article, we\u2019ll discuss what graph convolutional networks really are and how they work.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What are Convolutional Neural Networks?<\/h2>\n\n\n\n<p>Convolutional Neural Networks (also known as CNN or ConvNets) are deep learning algorithms that take images as input, assign importance to the various features or aspects of the image, and differentiates one image from the other. While initially, filters have to be manually set by programmers, with adequate training, CNNs can learn the filters and unique image characteristics on their own.&nbsp;Convolutional Neural Networks are majorly used for image classification, image recognition, object detection, edge detection, semantic segmentation, object tracking, and video classification.<\/p>\n\n\n\n<p><em><strong>Related Read:<\/strong> <a href=\"https:\/\/www.springboard.com\/blog\/data-science\/data-science-definition\/\" data-type=\"post\" data-id=\"2291\">What is Data Science?<\/a><\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How do Convolutional Neural Networks Work?<\/h2>\n\n\n\n<p>Just like other deep learning algorithms, the architecture of CNN is also based on the human brain, visual cortex to be specific. Every time we see something through our eyes, numerous layers of neurons get activated. Every layer is responsible for detecting a certain set of features like edges and lines. The combined output of these layers is what helps us recognise what we see. CNN works pretty similarly with different layers identifying different aspects of the input image. <\/p>\n\n\n\n<p>The architecture of the convolutional neural networks includes the following layers:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. Convolution Layer<\/h3>\n\n\n\n<p>The main goal of the convolution layer is to extract features like colours, corners, and edges from the input. As we go deeper, the algorithm will be able to identify complex features like digits and shapes. It creates a dot product between two matrices &#8211; one matrix includes the restricted portion of the image and the other matrix includes a kernel or filter (A matrix with a set of learnable parameters).<\/p>\n\n\n\n<p>After the input has passed through the entire convolution layer, we will have a featured matrix with much lesser dimensions or parameters than the input image. It will also have more clearer features. Furthermore, after every convolution operation, an additional non-linear operation called ReLU (Rectified Linear Unit) is used in order to introduce non-linearity. The reason behind using ReLU is that in the real-world data we want CNN to learn. Since CNN is also non-linear but the convolution layer performs the linear operation by default.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. Pooling Layer<\/h3>\n\n\n\n<p>The pooling layer is responsible for reducing the number of parameters when the image is still too large. It decreases the overall dimensions of the featured matrix while still extracting dominant features. This process of reducing dimensionality and retaining important information is called spatial pooling. The reason behind the reduction is to decrease the overall computational power and time taken to process each image.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3. Fully Connected Layer<\/h3>\n\n\n\n<p>In this step, we flatten the matrix received from the pooling layer and feed it into a fully connected layer, just like any other neural network. We combine the different features of the image to create a model and classify the image into different categories.<\/p>\n\n\n\n<p><em><strong>Related Read:<\/strong> <a href=\"https:\/\/www.springboard.com\/blog\/data-science\/data-scientist-job-description\/\" data-type=\"post\" data-id=\"2371\">Data Scientist Job Description<\/a><\/em><\/p>\n\n\n<div class=\"bg-leaf-50 p-4 my-3\"><h4 class=\"fw-bold text-center\">Get To Know Other\tData Science Students<\/h4><div class=\"row row-cols-1 row-cols-lg-3\"><div class=\"col\"><div class=\"card success-story-card h-100 d-flex justify-content-between mb-0\"><div class=\"flex-grow-1 text-center\"><a class=\"d-inline-block rounded-circle\" href=\"\/success\/diana-xie\" style=\"width:125px;height:125px;overflow:hidden\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/res.cloudinary.com\/springboard-images\/image\/upload\/v1629203192\/Student%20Success\/Diana_Xie_125x125.png\" alt=\"Diana Xie\" style=\"object-fit:contain;max-width:170px;height:125px\" \/><\/a><p class=\"fw-bold mb-0\">Diana Xie<\/p><p class=\"text-muted lh-1\">Machine Learning Engineer at IQVIA<\/p><\/div><div class=\"w-100 d-block d-md-none mt-3\"><\/div><p class=\"mb-0 mx-auto text-center\"><a class=\"btn btn-primary mx-auto\" href=\"\/success\/diana-xie\">Read Story<\/a><\/p><\/div><\/div><div class=\"col d-none d-md-block\"><div class=\"card success-story-card h-100 d-flex justify-content-between mb-0\"><div class=\"flex-grow-1 text-center\"><a class=\"d-inline-block rounded-circle\" href=\"\/success\/cassie-gong\" style=\"width:125px;height:125px;overflow:hidden\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/res.cloudinary.com\/springboard-images\/image\/upload\/v1629203193\/Student%20Success\/Cassie_Gong_125x125.png\" alt=\"Mengqin (Cassie) Gong\" style=\"object-fit:contain;max-width:170px;height:125px\" \/><\/a><p class=\"fw-bold mb-0\">Mengqin (Cassie) Gong<\/p><p class=\"text-muted lh-1\">Data Scientist at Whatsapp<\/p><\/div><p class=\"mb-0 mx-auto text-center\"><a class=\"btn btn-primary mx-auto\" href=\"\/success\/cassie-gong\">Read Story<\/a><\/p><\/div><\/div><div class=\"col d-none d-md-block\"><div class=\"card success-story-card h-100 d-flex justify-content-between mb-0\"><div class=\"flex-grow-1 text-center\"><a class=\"d-inline-block rounded-circle\" href=\"\/success\/jonathan-king\" style=\"width:125px;height:125px;overflow:hidden\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/res.cloudinary.com\/springboard-images\/image\/upload\/v1629203191\/Student%20Success\/Jonathan_King_125x125.png\" alt=\"Jonathan King\" style=\"object-fit:contain;max-width:170px;height:125px\" \/><\/a><p class=\"fw-bold mb-0\">Jonathan King<\/p><p class=\"text-muted lh-1\">Sr. Healthcare Analyst at IBM<\/p><\/div><p class=\"mb-0 mx-auto text-center\"><a class=\"btn btn-primary mx-auto\" href=\"\/success\/jonathan-king\">Read Story<\/a><\/p><\/div><\/div><\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Why CNN Over Feed-Forward Neural Networks?<\/h2>\n\n\n\n<p>The most common question when it comes to CNNs is &#8212; Why are we even using them over normal feed-forward <a href=\"https:\/\/www.springboard.com\/blog\/data-science\/beginners-guide-neural-network-in-python-scikit-learn-0-18\/\" target=\"_blank\" data-type=\"URL\" data-id=\"https:\/\/www.springboard.com\/blog\/data-science\/beginners-guide-neural-network-in-python-scikit-learn-0-18\/\" rel=\"noreferrer noopener\">neural networks<\/a>? Why can\u2019t we just flatten an image and feed it directly to the network?&nbsp;That\u2019s because simple neural networks might show some precision when classifying basic binary images, but they will have little to no accuracy when handling complex images with pixel dependencies. Moreover, they don\u2019t have the computational power to handle images with large pixels.<\/p>\n\n\n\n<p>With a CNN, it becomes possible to successfully identify temporal and spatial dependencies in the images by applying important filters. The reduction in the total number of parameters and the reusability factor of weights also helps create a more fitting image dataset.&nbsp;In simpler words, CNN can be trained easily to understand even the most complex of images.<\/p>\n\n\n\n<p>Now that you know what convolutional neural networks are and <a aria-label=\"what goes inside CNNs (opens in a new tab)\" href=\"https:\/\/www.youtube.com\/watch?v=hWlZB7H-0mc&amp;t=153s\" target=\"_blank\" rel=\"noreferrer noopener\">what goes inside CNNs<\/a>, you\u2019ll know that CNNs are working in the background when you see an image recognising and detecting algorithm.&nbsp;To get a better understanding of CNNs and neural networks in general, it\u2019s always best to start from the basics &#8212; machine learning.<\/p>\n\n\n\n<p class=\"rm has-background\" style=\"background-color:#efeff6\"><strong>Since you\u2019re here\u2026<br><\/strong>Curious about a career in data science? Experiment with our <a rel=\"noreferrer noopener\" href=\"https:\/\/www.springboard.com\/resources\/guides\/data-science-process\/\" target=\"_blank\">free data science learning path<\/a>, or join our <a rel=\"noreferrer noopener\" href=\"https:\/\/www.springboard.com\/courses\/data-science-career-track\/\" target=\"_blank\">Data Science Bootcamp<\/a>, where you\u2019ll get your tuition back if you don&#8217;t land a job after graduating. We\u2019re confident because our courses work \u2013 check out our <a rel=\"noreferrer noopener\" href=\"https:\/\/www.springboard.com\/success\/\" target=\"_blank\">student success stories<\/a> to get inspired.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Convolutional Neural Networks are a type of neural networks that are majorly used for image recognition and classification. While simple neural networks can classify an image, if the image has large pixels it will increase the number of parameters for the neural network which will indirectly increase the processing time and slow down the network.&nbsp;This [&hellip;]<\/p>\n","protected":false},"author":100,"featured_media":24055,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_eb_attr":"","_eb_data_table":"","footnotes":""},"categories":[67],"tags":[],"marketing_tags":[],"class_list":{"0":"post-24054","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-data-science"},"acf":[],"_links":{"self":[{"href":"https:\/\/www.springboard.com\/blog\/wp-json\/wp\/v2\/posts\/24054"}],"collection":[{"href":"https:\/\/www.springboard.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.springboard.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.springboard.com\/blog\/wp-json\/wp\/v2\/users\/100"}],"replies":[{"embeddable":true,"href":"https:\/\/www.springboard.com\/blog\/wp-json\/wp\/v2\/comments?post=24054"}],"version-history":[{"count":3,"href":"https:\/\/www.springboard.com\/blog\/wp-json\/wp\/v2\/posts\/24054\/revisions"}],"predecessor-version":[{"id":46220,"href":"https:\/\/www.springboard.com\/blog\/wp-json\/wp\/v2\/posts\/24054\/revisions\/46220"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.springboard.com\/blog\/wp-json\/wp\/v2\/media\/24055"}],"wp:attachment":[{"href":"https:\/\/www.springboard.com\/blog\/wp-json\/wp\/v2\/media?parent=24054"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.springboard.com\/blog\/wp-json\/wp\/v2\/categories?post=24054"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.springboard.com\/blog\/wp-json\/wp\/v2\/tags?post=24054"},{"taxonomy":"marketing_tags","embeddable":true,"href":"https:\/\/www.springboard.com\/blog\/wp-json\/wp\/v2\/marketing_tags?post=24054"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}