<?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 Elvin Mirzazada on Medium]]></title>
        <description><![CDATA[Stories by Elvin Mirzazada on Medium]]></description>
        <link>https://medium.com/@mirzezadeh.elvin?source=rss-cee6ac8bb092------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*68XMgpxWZn7zMaUVK3Aq5A.jpeg</url>
            <title>Stories by Elvin Mirzazada on Medium</title>
            <link>https://medium.com/@mirzezadeh.elvin?source=rss-cee6ac8bb092------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 17:45:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mirzezadeh.elvin/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[Histopathologic Cancer Detection]]></title>
            <link>https://medium.com/@mirzezadeh.elvin/histopathologic-cancer-detection-4f8c9f565146?source=rss-cee6ac8bb092------2</link>
            <guid isPermaLink="false">https://medium.com/p/4f8c9f565146</guid>
            <category><![CDATA[cancer-detection]]></category>
            <category><![CDATA[neural-networks]]></category>
            <category><![CDATA[cnn]]></category>
            <dc:creator><![CDATA[Elvin Mirzazada]]></dc:creator>
            <pubDate>Thu, 26 May 2022 16:18:38 GMT</pubDate>
            <atom:updated>2022-05-29T10:52:23.112Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Elvin Mirzazada, Master of Computer Science, University of Tartu</blockquote><p>Breast cancer affects one out of eight females worldwide. It is diagnosed by detecting the malignancy of the cells of breast tissue. Modern <a href="https://www.sciencedirect.com/topics/computer-science/medical-image-processing">medical image processing</a> techniques work on <a href="https://www.sciencedirect.com/topics/medicine-and-dentistry/histopathology">histopathology</a> images captured by a microscope, and then analyze them by using different algorithms and methods.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/1*BkPRnbsT0NYIP0_Pp7pT_Q.png" /><figcaption><a href="https://uzalendonews.co.ke/the-4-deadly-cancer-symptoms-a-third-of-people-are-ignoring/">Breast cancer is one of the 4 deadly cancer types</a></figcaption></figure><p><strong>CONTENT</strong></p><ul><li>Introduction to Project</li><li>Introduction to Data</li><li>Data Visualization</li><li>Model</li><li>Validation and analysis</li><li>ROC &amp; AUC</li><li>Prediction and submission the results</li></ul><h3>Introduction to Project</h3><h4>Our problem?</h4><p><strong>This project is about image classification problem.</strong> My mission is to create machine learning model to identify the presence of metastases cancer in the small image patches which are taken from digital pathalogy scans of cancer cells.</p><h4>My solution will be?</h4><p><strong>Final evaluation metric is </strong><a href="http://en.wikipedia.org/wiki/Receiver_operating_characteristic"><strong>area under the ROC curve</strong></a><strong>.</strong> The ROC curve is a plot of <em>True positive rate</em> against <em>False positive rate</em> at various thresholds and the area under the curve (AUC) is equal to the probability that a classifier will rank a randomly chosen positive instance higher than a randomly chosen negative one. The best possible solution would yield an AUC of 1 which means we would classify all positive samples correctly without getting any false positives.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YSpQerVLVrGFWQZI-_0fig.png" /></figure><h4>About the domain</h4><p><strong>The histopathological images are glass slide microscope images of lymph nodes that are stained with hematoxylin and eosin (H&amp;E).</strong> This staining method is one of the most widely used in medical diagnosis and it produces blue, violet and red colors. Dark blue hematoxylin binds to negatively charged substances such as nucleic acids and pink eosin to positively charged substances like amino-acid side chains (most proteins). Typically nuclei are stained blue, whereas cytoplasm and extracellular parts in various shades of pink. <a href="https://camelyon17.grand-challenge.org/Background/">Example of a metastatic region in lymph nodes.</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*CtXWGqtnHIX0QFxkrh1aag.png" /></figure><p>Lymph nodes are small glands that filter the fluid in the lymphatic system and they are the first place a breast cancer is likely to spread. Histological assessment of lymph node metastases is part of determining the stage of breast cancer in TNM classification which is a globally recognized standard for classifying the extent of spread of cancer. The diagnostic procedure for pathologists is tedious and time-consuming as a large area of tissue has to be examined and small metastases can be easily missed.</p><p><strong>Useful links for background knowledge</strong></p><ul><li><a href="https://camelyon16.grand-challenge.org/Background/">CAMELYON16 — background</a></li><li><a href="https://camelyon17.grand-challenge.org/Background/">CAMELYON17 — background</a></li><li><a href="https://github.com/basveeling/pcam">Patch Camelyon (PCam)</a></li><li><a href="https://www.uicc.org/resources/tnm">TNM classification</a></li><li><a href="https://www.ncbi.nlm.nih.gov/pubmed/21356829">Hematoxylin and eosin staining of tissue and cell sections</a></li><li><a href="https://academic.oup.com/gigascience/article/7/6/giy065/5026175">H&amp;E-stained sentinel lymph node sections of breast cancer patients: the CAMELYON dataset</a></li></ul><h3>Introduction to Data</h3><p><strong>Our datasets consist of 220k training images and 57k testing images.</strong> The dataset is a subset of the <a href="https://github.com/basveeling/pcam">PCam dataset</a> and the only difference between these two is that all duplicate images have been removed. The PCam’s dataset including this one uses 10x undersampling to increase the field of view, which gives the resultant pixel resolution of 2.43 microns.</p><p>According to the description of the datasets, there is a <strong>60/40 between negative and positive examples in the training set</strong>. A positive label means that there is at least one pixel of tumor tissue in the center region (32 x 32px) of the image. <strong>Tumor tissue in the outer region of the patch does not influence the label.</strong> This means that a negatively labeled image could contain metastases in the outer region. Thus, it would be a good idea to crop the images to the center region.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/215/1*uvZBmsPP1P5IzdX3jnzc6w.png" /><figcaption><strong>Image file descriptors</strong></figcaption></figure><h3>Data Visualization</h3><p>We can see below that the negative/positive ratio is 130k negatives and 90k positives. The ratio is closer to 60/40 meaning that there are 1.5 times more negative images than positives.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/460/1*Ws5RkN91OUC6j8S5xNZoHA.png" /></figure><h4>Plot some images with and without cancer tissue for comparison</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CDNtiNbprwB7grYLwx4llA.png" /></figure><h3>Preprocessing and augmentation</h3><p>There are some methods for avoid overfitting; more data, augmentation, regularization and less complex model architectures. In this project, I have used image augmentation and add them directly to our image loader function. Note that if I apply augmentation here, augmentations will also be applied when I am predicting (inference). This is called test time augmentation (TTA) and it can improve our results if I run inference multiple times for each image and average out the predictions.​</p><p><strong>The augmentations that I used:</strong></p><ul><li>random rotation</li><li>random flip (horizontal and vertical both)</li><li>random lighting</li><li>random zoom</li><li>Gaussian blur</li><li>Adding random noise</li></ul><p>I have used OpenCV with image operations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Sb3gEthmWDOhljcb_I7TdA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RKiV3WIYG7m-T21GGNU7Xw.png" /></figure><h3>Model</h3><p>In this project, I have used the Keras library that is built on tensorflow. I created a Neural Network model with several layers and implemented all required layers from the Keras library.</p><p><strong>My model structure consists of the following layers:</strong></p><ul><li>Input</li><li>[Conv2D x 2 -&gt; MaxPool2D -&gt; Dropout] x 3 → (filters = 16, 32, 64)</li><li>Flatten Layer</li><li>Dense Layer</li><li>Dropout Layer</li><li>Output (sigmoid)</li></ul><h3>Training</h3><p>In total, I have 220k entries for training and validating my ML model.</p><h4>Prepare the data and split train</h4><p>I splitted the total 220k dataset into 2 parts:</p><ul><li>90% — Train data</li><li>10% — Validation data</li></ul><p>I trained the Neural Network model on 10 epochs with a learning rate of 0.01. The final loss and accuracy of the model on the validation dataset is 0.2775 and 88.45% respectively.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/372/1*Em7Bb0OIr2JENo11T9WsCg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/384/1*_C3VHdKDi5YiayOlBewLBg.png" /></figure><h3>Validation &amp; Analysis</h3><p>Now the training is done.</p><h4>How good does the model perform technically?</h4><p>We can only get metrics from our validation set, and the final test metrics will be most likely a bit different.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/375/1*kGeMAeXsgOulZkrE871sLg.png" /></figure><h3>ROC &amp; AUC</h3><p>AUC is the metric that is used for evaluating submissions. We can calculate it here for our validation set but it will most likely differ from the final score.</p><p>ROC area is 0.958.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/386/1*ytJtcf80qUs7FM7NLWxzRg.png" /></figure><h3>Submit predictions</h3><p>We need to submit the tumor probability for each test sample in this competition. The probability ranges from 0 to 1.</p><p>After submitted the test data to the competition, the result is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*Q0O8Q2pNxsIfp8AZKQOvHg.png" /></figure><p>Notebook url:</p><h3>References</h3><p><a href="https://www.kaggle.com/competitions/histopathologic-cancer-detection">https://www.kaggle.com/competitions/histopathologic-cancer-detection</a></p><p><a href="https://betterprogramming.pub/how-to-create-a-simple-neural-network-in-python-dbf17f729fe6">https://betterprogramming.pub/how-to-create-a-simple-neural-network-in-python-dbf17f729fe6</a></p><p><a href="https://www.dummies.com/article/technology/programming-web-design/python/how-to-build-a-simple-neural-network-in-python-264888/">https://www.dummies.com/article/technology/programming-web-design/python/how-to-build-a-simple-neural-network-in-python-264888/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4f8c9f565146" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Neural Style Transfer with Deep VGG model]]></title>
            <link>https://medium.com/@mirzezadeh.elvin/neural-style-transfer-with-deep-vgg-model-26b11ea06b7e?source=rss-cee6ac8bb092------2</link>
            <guid isPermaLink="false">https://medium.com/p/26b11ea06b7e</guid>
            <category><![CDATA[neural-style-transfer]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[vgg19]]></category>
            <dc:creator><![CDATA[Elvin Mirzazada]]></dc:creator>
            <pubDate>Wed, 13 May 2020 21:59:46 GMT</pubDate>
            <atom:updated>2020-05-13T21:59:46.495Z</atom:updated>
            <content:encoded><![CDATA[<p>In this post, we’ll <em>recreate</em> a style transfer method that is outlined in the paper, <a href="https://www.cv-foundation.org/openaccess/content_cvpr_2016/papers/Gatys_Image_Style_Transfer_CVPR_2016_paper.pdf">Image Style Transfer Using Convolutional Neural Networks, by Gatys</a> in PyTorch.</p><h4><strong>What is Neural Style Transfer?</strong></h4><ul><li>Neural Style Transfer refers to a class of software algorithms that manipulate digital images, or videos, to adopt the appearance or visual style of another image.</li></ul><p><strong>In other word</strong>,</p><p>Neural style transfer is an optimization technique used to take two images — a <em>content</em> image and a <em>style reference</em> image (such as an artwork by a famous painter) — and blend them together so the output image looks like the content image, but “painted” in the style of the style reference image.</p><p>For example, let’s take an image of Baku(Azerbaijan) and painting<em>:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KqZ5yf3KrDo7klVwzgVr3g.png" /></figure><p>Now how would it look like if the painter decided to add the texture or style of his road to the image of the Baku? Something like this?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/367/1*K_t-doqh0Q3znotD6biihA.png" /></figure><p>In this article, style transfer uses the features found in the 19-layer VGG Network, which is comprised of a series of convolutional and pooling layers, and a few fully-connected layers. In the image below, the convolutional layers are named by stack and their order in the stack. Conv_1_1 is the first convolutional layer that an image is passed through, in the first stack. Conv_2_1 is the first convolutional layer in the <em>second</em> stack. The deepest convolutional layer in the network is conv_5_4.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bSseOmnGYhYjhkNCTjTqqw.png" /><figcaption>Figure 1. VGG19 architecture</figcaption></figure><h3>Separating Style and Content</h3><p>Style transfer relies on separating the content and style of an image. Given one content image and one style image, we aim to create a new, <em>target</em> image which should contain our desired content and style components:</p><ul><li>objects and their arrangement are similar to that of the <strong>content image</strong></li><li>style, colours, and textures are similar to that of the <strong>style image</strong></li></ul><p>In this notebook, we’ll use a pre-trained VGG19 Net to extract content or style features from a passed in image.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2967a9f2a080ee18636d79925eb877a6/href">https://medium.com/media/2967a9f2a080ee18636d79925eb877a6/href</a></iframe><h3>Load features in VGG19</h3><p>VGG19 <em>(Figure 1.) </em>is split into two portions:</p><ul><li>vgg19.features, which are all the convolutional and pooling layers</li><li>vgg19.classifier, which are the three linear, classifier layers at the end</li></ul><p>We only need the features portion, which we&#39;re going to load in and &quot;freeze&quot; the weights of, below.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d01cad4d5ca5f392da8112be9d672731/href">https://medium.com/media/d01cad4d5ca5f392da8112be9d672731/href</a></iframe><h4>Load in Content and Style Images</h4><p>You can load in any images you want! Below, we’ve provided a helper function for loading in any type and size of image. The load_image function also converts images to normalized Tensors.</p><p>Additionally, it will be easier to have smaller images and to squish the content and style images so that they are of the same size.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2cd0b5b89be44951debde16a982a482e/href">https://medium.com/media/2cd0b5b89be44951debde16a982a482e/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KqZ5yf3KrDo7klVwzgVr3g.png" /></figure><h3>VGG19 Layers</h3><p>To get the content and style representations of an image, we have to pass an image forward through the VGG19 network until we get to the desired layer(s) and then get the output from that layer.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fa651e6a0e1809d4499d8acc0b7bf82a/href">https://medium.com/media/fa651e6a0e1809d4499d8acc0b7bf82a/href</a></iframe><h3>Gram Matrix</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fe718uVAW3KU%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3De718uVAW3KU&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fe718uVAW3KU%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/3ea253ae0b51a160f806a43fff63ed58/href">https://medium.com/media/3ea253ae0b51a160f806a43fff63ed58/href</a></iframe><p>The output of every convolutional layer is a Tensor with dimensions associated with the batch_size, a depth, d and some height and width (h, w). The Gram matrix of a convolutional layer can be calculated as follows:</p><ul><li>Get the depth, height, and width of a tensor using batch_size, d, h, w = tensor.size()</li><li>Reshape that tensor so that the spatial dimensions are flattened</li><li>Calculate the gram matrix by multiplying the reshaped tensor by it’s transpose</li></ul><p><strong><em>Putting it all Together</em></strong></p><p>Now that we’ve written functions for extracting features and computing the gram matrix of a given convolutional layer; let’s put all these pieces together! We’ll extract our features from our images and calculate the gram matrices for each layer in our style representation.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3699916fd6c5533c188e05a3e1955e5d/href">https://medium.com/media/3699916fd6c5533c188e05a3e1955e5d/href</a></iframe><h3>Loss and Weights</h3><h4>Individual Layer Style Weights</h4><p>Below, you are given the option to weight the style representation at each relevant layer. It’s suggested that you use a range between 0–1 to weight these layers. By weighting earlier layers (conv1_1 and conv2_1) more, you can expect to get <em>larger</em> style artifacts in your resulting, target image. Should you choose to weight later layers, you&#39;ll get more emphasis on smaller features. This is because each layer is a different size and together they create a multi-scale style representation!</p><h4>Content and Style Weight</h4><p>Just like in the paper, we define an alpha (content_weight) and a beta (style_weight). This ratio will affect how <em>stylized</em> your final image is. It&#39;s recommended that you leave the content_weight = 1 and set the style_weight to achieve the ratio you want.</p><blockquote># weights for each style layer <br># weighting earlier layers more will result in *larger* style artifacts<br># notice we are excluding `conv4_2` our content representation<br>style_weights = {‘conv1_1’: 1.,<br> ‘conv2_1’: 0.8,<br> ‘conv3_1’: 0.5,<br> ‘conv4_1’: 0.3,<br> ‘conv5_1’: 0.1}</blockquote><blockquote>content_weight = 1 # alpha<br>style_weight = 1e6 # beta</blockquote><h3>Updating the Target &amp; Calculating Losses</h3><p>You’ll decide on a number of steps for which to update your image, this is similar to the training loop that you’ve seen before, only we are changing our <em>target</em> image and nothing else about VGG19 or any other image. Therefore, the number of steps is really up to you to set! I recommend using at least 2000 steps for good results. But, you may want to start out with fewer steps if you are just testing out different weight values or experimenting with different images.</p><p>Inside the iteration loop, you’ll calculate the content and style losses and update your target image, accordingly.</p><h4>Content Loss</h4><p>The content loss will be the mean squared difference between the target and content features at layer conv4_2. This can be calculated as follows:</p><pre>content_loss = torch.mean((target_features[&#39;conv4_2&#39;] - content_features[&#39;conv4_2&#39;])**2)</pre><h4>Style Loss</h4><p>The style loss is calculated in a similar way, only you have to iterate through a number of layers, specified by name in our dictionary style_weights.</p><blockquote><em>You’ll calculate the gram matrix for the target image, </em><em>target_gram and style image </em><em>style_gram at each of these layers and compare those gram matrices, calculating the </em><em>layer_style_loss. Later, you&#39;ll see that this value is normalized by the size of the layer.</em></blockquote><h4>Total Loss</h4><p>Finally, you’ll create the total loss by adding up the style and content losses and weighting them with your specified alpha and beta!</p><p>Intermittently, we’ll print out this loss; don’t be alarmed if the loss is very large. It takes some time for an image’s style to change and you should focus on the appearance of your target image rather than any loss value. Still, you should see that this loss decreases over some number of iterations.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/765a78c4e17e51467121edd4e74625fa/href">https://medium.com/media/765a78c4e17e51467121edd4e74625fa/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gCmf7kzYFNSb4wNblBfEYg.png" /><figcaption>Final output</figcaption></figure><p><strong>You can find the whole codes in my </strong><a href="https://github.com/elvinmirzazada/StyleTransfer_NerualNet"><strong>GitHub repository</strong></a><strong>.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=26b11ea06b7e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Convolutional Neural Network (AZ)]]></title>
            <link>https://medium.com/@mirzezadeh.elvin/convolutional-neural-network-az-650e7497ab45?source=rss-cee6ac8bb092------2</link>
            <guid isPermaLink="false">https://medium.com/p/650e7497ab45</guid>
            <category><![CDATA[neural-networks]]></category>
            <category><![CDATA[cnn]]></category>
            <category><![CDATA[convolutional-neural-net]]></category>
            <category><![CDATA[deep-learning]]></category>
            <dc:creator><![CDATA[Elvin Mirzazada]]></dc:creator>
            <pubDate>Mon, 22 Apr 2019 10:03:28 GMT</pubDate>
            <atom:updated>2019-12-17T06:22:58.047Z</atom:updated>
            <content:encoded><![CDATA[<h3>Convolutional Neural Network Simple Scratch(AZ)</h3><ul><li>İlk CNN modelinizi yaratmaq üçün hər şeyi bir-bir izah edəcəyəm.</li><li>Uzun və çətin paraqraflar yazmaq əvəzinə, kontenti line by line yazacam.</li><li>Bu dərsliyin sonunda, deep learning-də daha irəli getmək üçün kifayət qədər informasiyaya malik olacaqsınız.</li><li>Bəzi terminlərin öz dilimizdə qarşılığın tapmaqda çətinlik çədiyim üçün ingiliscə yazacağam.</li><li>Tam kodu bir yerdə görmək üçün məqalənin sonuna baxın.</li><li>Kontentə baxaq</li></ul><h3>Məzmun:</h3><ul><li><strong>Giriş</strong></li><li><strong>Data ilə tanış olaq</strong></li><li><strong>Model hazırlanması</strong></li><li><strong>Modelin öyrədilməsi</strong></li><li><strong>Modelin performansının yoxlanılması</strong></li><li><strong>Sonluq</strong></li><li><strong>Tam kod</strong></li></ul><h3>Giriş</h3><ul><li><strong>Deep learning:</strong> Xüsusiyyətləri(features) birbaşa məlumalardan öyrənən Machine Learning texnikalarından biridir.</li><li><strong>Niyə deep learning?:</strong> Məlumatların çəkisi artdıqca, digər machine learning texnikalari kifayət qədər yaxşı performans göstərə bilmir. Deep Learning bu hallarda daha yaxşı performans və dəqiqlik göstərir.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/1*DTaedYzAQFaCrabseXl_gA.png" /></figure><ul><li><strong>Deep learning harada istifadə olunur?:</strong> Nitqin tanınması, təsvirlərin(şəkillərin) təsnifatı, Natural Language Processing, Recommendation systems və başqaları.</li><li><strong>Deep learning və Machine learning arasındakı fərqlər nələrdi?:</strong></li><li>Machine learning deep learning-i əhatə edir.</li><li>Machine learning-də xüsusiyytələr(features) manual(əllə) olaraq verilir.</li><li>Başqa sözlə, Deep learning xüsusiyyətləri(features) birbaşa datadan öyrənir.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*W4MdLH-q6oWhnpgJSukTKA.png" /></figure><p>Datamıza baxaq.</p><h3>Data ilə tanış olaq</h3><ul><li>Biz Aerial photos of Cactus (Neobuxbaumia tetetzo) dataset-indən istifadə edəcəyik (<a href="https://www.kaggle.com/irvingvasquez/cactus-aerial-photos">buradan tanış ola bilərsiniz</a>).</li><li>Burada 17.500 şəkil var.</li><li>Şəkillərdə Kaktus olub olmadığını modelimizə öyrətməliyik.</li><li>Bunun üçün outputda 2 cür cavab olacaq(binary): 0(kaktus yoxdur) və 1(kaktus var).</li><li>Modelimizi öyrətmək üçün datalarımızı hazırlayaq. X şəkil matriksi (cactus və no-cactus) and Y cavablar matriksi (0 and 1).</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/13babd2b1ba5dec97aae5e5bb1621b00/href">https://medium.com/media/13babd2b1ba5dec97aae5e5bb1621b00/href</a></iframe><h3>Model hazırlanması</h3><ul><li>Artıq X və Y matrislərimiz hazırdır. İndi isə Convolutional Neural Şəbəkəmizi quraq.</li><li>Bunun üçün Keras kitabxanasından istifadə edəcəyik.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/759cd3953730852194010c23ad2eeaf8/href">https://medium.com/media/759cd3953730852194010c23ad2eeaf8/href</a></iframe><ul><li>Convolutional Neural Network haqqında daha dərin öyrənmək üçün <a href="https://www.youtube.com/watch?v=aircAruvnKk">bu linkdən</a> istifadə edə bilərsiniz</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/97ac7c4444c284764e00f3dc3295bc26/href">https://medium.com/media/97ac7c4444c284764e00f3dc3295bc26/href</a></iframe><ul><li>CNN-də training zamanı daha dəqiq nəticə almaq üçün Data Augmentationdan istifadə olunur.</li><li>Data Augmentation üçün ImageDataGenerator class-ından istifadə olunur.</li><li>Data augmentation haqqında ətraflı oxumaq üçün <a href="https://machinelearningmastery.com/image-augmentation-deep-learning-keras">bu linkdən</a> istifadə edin.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/35951cb9ce3e403f39e069feb1e1dc5e/href">https://medium.com/media/35951cb9ce3e403f39e069feb1e1dc5e/href</a></iframe><h3>Modelin öyrədilməsi</h3><ul><li>Modelimizi train etmək üçün Sequential class-ının <strong>fit_generator</strong> methodunundan istifadə edirik.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/16115974a21b2b3dfc9c9269b3e4bec2/href">https://medium.com/media/16115974a21b2b3dfc9c9269b3e4bec2/href</a></iframe><ul><li>Training zamani accuracy və loss functionların necə paylanmasına baxaq.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ef6c7930d8b014693cd3bd5c125379d4/href">https://medium.com/media/ef6c7930d8b014693cd3bd5c125379d4/href</a></iframe><h3>Modelin performansının yoxlanılması</h3><ul><li>Test üçün test şəkillərini oxuyub, X_test matris yaradırıq.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9fb40c9d3fd64d0c410677f8be771ce7/href">https://medium.com/media/9fb40c9d3fd64d0c410677f8be771ce7/href</a></iframe><ul><li>Train olunmuş modeldən istifadə edərək predict edək.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5b5ee0f88c1308e581307dfd92f48a2c/href">https://medium.com/media/5b5ee0f88c1308e581307dfd92f48a2c/href</a></iframe><h3>Sonluq</h3><ul><li>Aldığımız nəticəni yarışmada yoxlayanda 99.98% dəqiq nəticə göstərdiyini görürük.</li><li><a href="https://www.kaggle.com/elvinmirze/simple-deep-cnn-different-batch-size-and-epochs">https://www.kaggle.com/elvinmirze/simple-deep-cnn-different-batch-size-and-epochs</a></li><li>İlk öncə sona kimi oxuduğunuza görə təşəkkür edirəm.</li><li>Əgər hər hansı səhvlik görsəniz zəhmət olmasa xəbərdar edəsiniz.</li><li>Əgər Machine learning və ya python-dan nəyisə başa düşməsəniz aşağıdakı tutoriallardan istifadə edə bilərsiniz.</li><li>Data Science: <a href="https://www.kaggle.com/kanncaa1/data-sciencetutorial-for-beginners">https://www.kaggle.com/kanncaa1/data-sciencetutorial-for-beginners</a></li><li>Machine learning: <a href="https://www.kaggle.com/kanncaa1/machine-learning-tutorial-for-beginners">https://www.kaggle.com/kanncaa1/machine-learning-tutorial-for-beginners</a></li></ul><h3>Tam Kod</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/77c004efa4b77adcc424985a953426cc/href">https://medium.com/media/77c004efa4b77adcc424985a953426cc/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=650e7497ab45" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>