<?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 Maciej Zieniewicz on Medium]]></title>
        <description><![CDATA[Stories by Maciej Zieniewicz on Medium]]></description>
        <link>https://medium.com/@zieniewicz-m-1992?source=rss-ac5e365ab44e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*v7jUhsgzb566Aon3TLPJkQ.jpeg</url>
            <title>Stories by Maciej Zieniewicz on Medium</title>
            <link>https://medium.com/@zieniewicz-m-1992?source=rss-ac5e365ab44e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 06:05:43 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@zieniewicz-m-1992/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[Connect Colab to GCS Bucket Using gcsfuse]]></title>
            <link>https://pub.towardsai.net/connect-colab-to-gcs-bucket-using-gcsfuse-29f4f844d074?source=rss-ac5e365ab44e------2</link>
            <guid isPermaLink="false">https://medium.com/p/29f4f844d074</guid>
            <category><![CDATA[google-cloud-storage]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[colab]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <dc:creator><![CDATA[Maciej Zieniewicz]]></dc:creator>
            <pubDate>Wed, 10 Feb 2021 21:02:12 GMT</pubDate>
            <atom:updated>2021-02-17T08:52:08.236Z</atom:updated>
            <content:encoded><![CDATA[<h4>Cloud Computing</h4><figure><img alt="Image for attention" src="https://cdn-images-1.medium.com/max/1024/0*dF4nfHCmrwQTOJn0" /><figcaption>Photo by <a href="https://unsplash.com/@kelvin1987?utm_source=medium&amp;utm_medium=referral">Kelvin Ang</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Table of Contents</h3><p><a href="#cf6d">Introduction</a><br><a href="#5cb7">Step 1: Identify Yourself</a><br><a href="#8378">Step 2: Install gcsfuse</a><br><a href="#3280">Step 3: Connect Colab to GCS Bucket</a><br><a href="#1dc7">Step 4: Copy Files to Your VM</a><br><a href="#4613">Resources</a></p><h3>Introduction</h3><p>When you want to download a dataset to a Google Colab virtual machine, you usually use data placed on Google Drive. But what if your dataset is relatively large (over 15 Gb) and more people want to download it several times a day? Free G-Drive imposes limits on both disk capacity and daily data transfer. In this case, it is worth creating a bucket on Google Cloud Platform with the help of <a href="https://cloud.google.com/free/docs/gcp-free-tier#free-tier-usage-limits">a free tier or credits</a>.</p><p>The question remains, how easily connect the Google Cloud Storage bucket to the Colab VM? The proposed solution is based on the use of the <a href="https://github.com/GoogleCloudPlatform/gcsfuse">gcsfuse</a> adapter developed directly by Google. Thanks to the simple solution, even third parties to whom you provide access to data via a specific gmail will be able to download your dataset to Colab.</p><p>A Colab Notebook with code is included at the end of this article.</p><h3>Step 1: Identify Yourself</h3><pre>from google.colab import auth<br>auth.authenticate_user()</pre><p>The following command will redirect you to the Google Cloud SDK permission panel and ask for credentials for all your services connected to a particular gmail account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/593/0*M0WiXdbJ7bGbWDd7" /></figure><p>This process looks the same as connecting through authorization to the G-Drive, so let’s dig deeper.</p><h3><strong>Step 2: Install gcsfuse</strong></h3><pre>!echo &quot;deb http://packages.cloud.google.com/apt gcsfuse-bionic main&quot; &gt; /etc/apt/sources.list.d/gcsfuse.list<br>!curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -<br>!apt -qq update<br>!apt -qq install gcsfuse</pre><p>The following set of commands does a few things:</p><ol><li>Adds the gcsfuse distribution URL as a package source and imports its public key</li><li>Updates the list of available packages</li><li>Installs gcsfuse</li></ol><figure><img alt="Installation console output" src="https://cdn-images-1.medium.com/max/516/1*HE2Q2wYhXoXZueb7rEqtkg.png" /><figcaption>gscfuse installation output</figcaption></figure><p>If your console’s output is similar to the one showed above, move to the next step.</p><h3>Step 3: Connect Colab to GCS Bucket</h3><pre>!mkdir googleBucketFolder<br>!gcsfuse --implicit-dirs colab-connect-bucket googleBucketFolder</pre><p>Now you simply create a googleBucketFolder on your VM and call gcsfuse with --implicit-dirs flag to ensure all folders and files from colab-connect-bucket will be visible in Colab’s file explorer.</p><figure><img alt="Colab’s file exploere view" src="https://cdn-images-1.medium.com/max/544/1*Vnz2EfQkIcKva33jl-eOJA.png" /><figcaption>Colab’s file explorer view</figcaption></figure><h3>Step 4: Copy Files to Your VM</h3><pre>!gsutil cp /content/googleBucketFolder/cat.jpg .</pre><p>Now, you can copy (or unpack) files from your bucket and enjoy a wonderful cat 🐈 (or 30+ Gb dataset 🤖 ) on your Colab.</p><p>Viola!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yG2n-27g4NYqbwFm" /><figcaption>Photo by <a href="https://unsplash.com/@ramche?utm_source=medium&amp;utm_medium=referral">Ramiz Dedaković</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Resources</h3><p><a href="https://colab.research.google.com/github/maciej-zieniewicz/gcsfuse-for-colab/blob/main/google_storage.ipynb">Colab Notebook</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=29f4f844d074" width="1" height="1" alt=""><hr><p><a href="https://pub.towardsai.net/connect-colab-to-gcs-bucket-using-gcsfuse-29f4f844d074">Connect Colab to GCS Bucket Using gcsfuse</a> was originally published in <a href="https://pub.towardsai.net/">Towards AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Find Unauthorized Constructions Using Aerial Photography and Deep Learning with Code (Part 2)]]></title>
            <link>https://pub.towardsai.net/find-unauthorized-constructions-using-aerial-photography-and-deep-learning-with-code-part-2-b56ca80c8c99?source=rss-ac5e365ab44e------2</link>
            <guid isPermaLink="false">https://medium.com/p/b56ca80c8c99</guid>
            <category><![CDATA[segmentation]]></category>
            <category><![CDATA[satellite-imagery]]></category>
            <category><![CDATA[unet]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[object-detection]]></category>
            <dc:creator><![CDATA[Maciej Zieniewicz]]></dc:creator>
            <pubDate>Fri, 15 Jan 2021 09:39:02 GMT</pubDate>
            <atom:updated>2022-03-09T09:34:23.898Z</atom:updated>
            <content:encoded><![CDATA[<h4><a href="https://towardsai.net/p/category/machine-learning/deep-learning">Deep Learning</a></h4><figure><img alt="Example outcome of ourdetector." src="https://cdn-images-1.medium.com/max/1024/1*QG4F0YMSOjQlNYFoZ0NEvQ.png" /><figcaption>The final outcome of our Detector (Image by author)</figcaption></figure><h3><strong>Table of Contents</strong></h3><p>1. <a href="#9407">Introduction</a><br>2. <a href="#ddaa">Detailed Project Workflow</a><br>3. <a href="#d11d">U-Net Segmentation Model</a><br>4. <a href="#b20d">Results</a><br>5. <a href="#19d2">Resources and Authors</a></p><h3>Introduction</h3><p>This project aims to search for potential buildings that lack building permission. In our <a href="https://zieniewicz-m-1992.medium.com/find-unauthorized-constructions-using-aerial-photography-and-deep-learning-with-code-part-1-6d3ca7ff6fa0"><strong>previous article</strong></a>, we discussed the problem statement and the process of collecting and preprocessing data. Now, armed with over 50,000 orthophoto images and corresponding masks, we can focus on the second phase of the project — the semantic segmentation model that recognizes buildings.</p><p>To understand the course of action, you should be familiar with the basics of creating deep networks in Keras and simple data manipulation techniques in Python.</p><p>As we wish to pinpoint both transparency and privacy trade-offs, we decided not to publish our dataset. Please try to use our approach and provided code from the previous article and collect it on your own.</p><p>You can find links to the official notebook in the Resources and Authors section.</p><figure><img alt="Project flow chart" src="https://cdn-images-1.medium.com/max/1024/1*cpPtye1gqAyvmtK-19ibzQ.png" /><figcaption>Project flow chart (Image by author)</figcaption></figure><h3><strong>Detailed Project Workflow</strong></h3><p>We will try to guide you through the stages of training the Deep Learning model in a simple way, including:</p><ul><li>splitting the dataset into training and validation sets and creating a data generator with a basic data augmentation technique,</li><li>creating both a custom metric for our model’s quality control and a custom callback for saving the history of the learning curves,</li><li>creating model’s architecture and training it using Keras,</li><li>using callbacks to optimize training process and display progress in real-time,</li><li>evaluation on a test set,</li><li>displaying a few sample results.</li></ul><p>So… let’s get our hands dirty. :)</p><h3><strong>U-Net Segmentation Model</strong></h3><p>To begin with, we will focus for a moment on the concept of semantic segmentation. This approach involves assigning each pixel a probability value (ranging from 0 to 1) of the presence of a specific category, which in our case is a “building’” class.</p><p>Our semantic segmentation model will treat an orthophoto image as an input during the training, while the output will be a 2D matrix with the same height and width, with the probability values ​​of a specific class for each pixel (0 or 1). Thanks to this solution, the neural network learns how to convert an image into a mask containing the desired class and background.</p><p>It turns out that encoder-decoder deep neural networks are well suited for this task, as they first try to recognize the features of any buildings in the photo, and then decode them onto a mask with the probability values ​​of a given category. In our project, we will use the U-Net architecture, which was initially proposed in 2015 for the segmentation of medical images. You can find an excellent article about U-Net in detail <a href="https://towardsdatascience.com/understanding-semantic-segmentation-with-unet-6be4f42d4b47"><strong>here</strong></a><strong> </strong>(we found it extremely useful), while we focus on a practical approach to solve our problem.</p><figure><img alt="U-net architecture chart" src="https://cdn-images-1.medium.com/max/1024/0*DSLfJXPbHgEeeOgs" /><figcaption>U-Net model architecture (Source: official U-Net <a href="https://arxiv.org/pdf/1505.04597.pdf">publication</a>)</figcaption></figure><p>First, let’s import required tools, especially various elements from Keras, which will be used to create the model. Additionally, we will use <a href="https://p.migdal.pl/livelossplot/"><strong>livelossplot </strong></a>to visualize the learning curves after each epoch.</p><pre>import os<br>import random<br>from datetime import datetime<br><br>import numpy as np<br>import pandas as pd<br><br>import matplotlib.pyplot as plt<br>from tqdm import tqdm<br>from sklearn.model_selection import train_test_split<br>from skimage.transform import rotate<br>from tensorflow import keras<br><br>from tensorflow.keras.models import Model, load_model<br>from tensorflow.keras.layers import Input, BatchNormalization, Activation, Dense, Dropout, MaxPooling2D, GlobalMaxPool2D, Conv2D, Conv2DTranspose<br>from tensorflow.keras.layers import concatenate, add<br>from tensorflow.keras.callbacks import EarlyStopping, ModelCheckpoint, ReduceLROnPlateau<br>from tensorflow.keras.optimizers import Adam<br>from tensorflow.keras.preprocessing.image import array_to_img, img_to_array, load_img<br>from tensorflow.keras.metrics import Recall, Precision<br><br>import keras.backend as K<br><br>from livelossplot import PlotLossesKeras</pre><p>Next, we’ll set the following parameters: paths to directories with photos and masks, image shape, number of training epochs, and batch size. The settings proposed by us are adapted to the abilities of the free Google Colab setup.</p><pre># images attributes <br>img size = 256 <br> <br># training attributes<br>batch_size = 64<br>epochs = 50<br> <br># data paths<br>project_path =&quot;./&quot;<br>orto path = &quot;data/geoportal orto/&quot;<br>masks_path = project_path + &quot;data/geoportal_build_mask/&quot;<br>test_orto_path = project_path + &quot;test/geoportal_orto/&quot;<br>test_masks_path = project_path + &quot;test/geoportal_build_mask/&quot;</pre><p>Before training, let’s divide the whole dataset into a training and validation set. The test set was separated during the data-gathering phase as a set of images and masks for the one chosen city.</p><pre># list of names of all images in the given path<br>ids = sorted(os.listdir(orto_path))<br>test_ids = sorted(os.listdir(test_orto_path))<br><br># split train and valid<br>ids_train, ids_valid = train_test_split(ids, test_size=0.2, random_state=123)<br><br>print(&quot;Total images = &quot;, len(ids))<br>print(&quot;Train images = &quot;, len(ids_train))<br>print(&quot;Valid images = &quot;, len(ids_valid))<br>print(&quot;Test images = &quot;, len(test_ids))</pre><figure><img alt="Number of images in different sets" src="https://cdn-images-1.medium.com/max/748/1*7fkXVCqnd6h2RfY5tSsGEQ.png" /></figure><p>Now we will focus on creating a data generator with a simple augmentation (rotation by a multiple of 90 degrees). A customizable<strong> </strong>data generator helps us to load a batch of photos and masks to the model on the fly and depending on whether we want it or not, to use the optional <strong>rotate_image()</strong> function. In our case, we don’t use data augmentation for validation and test sets. If you need more advanced augmentation for your set of images, ImageDataGenerator built into Keras is a way to do it.</p><pre>def rotate_image(image, angle=180):<br>    &quot;&quot;&quot;Optional augumentation&quot;&quot;&quot;<br>    return rotate(image, angle, resize=True, preserve_range=True)<br><br><br>def data_gen(img_folder, mask_folder, img_ids, img_size, batch_size, random_rotate=True):<br>    &quot;&quot;&quot;Function for data generator&quot;&quot;&quot;<br>    c = 0<br>    random.shuffle(img_ids)<br><br>    while True:<br><br>        img = np.zeros((batch_size, img_size, img_size, 3)).astype(float)<br>        mask = np.zeros((batch_size, img_size, img_size, 1)).astype(float)<br><br>        for i in range(c, c+batch_size): # initially from 0 to 64, c = 0. <br><br>            # load image    <br>            img_data = img_to_array(load_img(img_folder+img_ids[i]))/255.0<br>            <br>            <br>            # load mask<br>            img_mask = img_to_array(load_img(mask_folder+img_ids[i], color_mode=&quot;grayscale&quot;))<br>            img_mask = (img_mask &gt; img_mask.min()).astype(int)<br>            # add extra dimension for parity with train_img size [img_size * img_size * 3]<br>            img_mask = img_mask.reshape(img_size, img_size, 1)<br>            <br>            if random_rotate:<br>                rotate_angle = random.choice((0, 90, 180, 270))<br>                img_data = rotate_image(img_data, rotate_angle)<br>                img_mask = rotate_image(img_mask, rotate_angle)             <br>            <br>            # add to array - img[0], img[1], and so on.<br>            img[i-c] = img_data <br>            mask[i-c] = img_mask<br><br>        c += batch_size<br>        if c+batch_size &gt;= len(img_ids):<br>            c=0<br>            random.shuffle(img_ids)<br><br>        yield img, mask<br><br># preparing data generators<br>train_gen = data_gen(orto_path, masks_path, ids_train, img_size, batch_size, random_rotate=True)<br>valid_gen = data_gen(orto_path, masks_path, ids_valid, img_size, batch_size, random_rotate=False)<br>test_gen = data_gen(test_orto_path, test_masks_path, test_ids, img_size, batch_size, random_rotate=False)</pre><p>Finally, let’s create our architecture. First, we will create an auxiliary function to build a convolutional block, which consists of two convolutional layers with a possibility to normalize their output. The activation function is ReLU.</p><pre>def conv2d_block(input_tensor, n_filters, kernel_size = 3, batchnorm = True):<br>    &quot;&quot;&quot;Function to add 2 convolutional layers with the parameters passed to it&quot;&quot;&quot;<br>    # first layer<br>    x = Conv2D(filters = n_filters, kernel_size = (kernel_size, kernel_size), kernel_initializer = &#39;he_normal&#39;, padding = &#39;same&#39;)(input_tensor)<br>    if batch norm:<br>        x = BatchNormalization()(x)<br>    x = Activation(&#39;relu&#39;)(x)<br>    <br>    # second layer<br>    x = Conv2D(filters = n_filters, kernel_size = (kernel_size, kernel_size), kernel_initializer = &#39;he_normal&#39;, padding = &#39;same&#39;)(x)<br>    if batch norm:<br>        x = BatchNormalization()(x)<br>    x = Activation(&#39;relu&#39;)(x)<br>    <br>    return x</pre><p>Now we’ll deal with the main function, which creates a model that combines contracting and expanding paths and the output is a predicted mask of segmentation within the 0.0–1.0 range. We also add a dropout to help the model generalize a little bit better.</p><pre>def get_unet(input_img, n_filters = 16, dropout = 0.1, batchnorm = True):<br>    &quot;&quot;&quot;Function to define the UNET Model&quot;&quot;&quot;<br>    # Contracting Path<br>    c1 = conv2d_block(input_img, n_filters * 1, kernel_size = 3, batchnorm = batchnorm)<br>    p1 = MaxPooling2D((2, 2))(c1)<br>    p1 = Dropout(dropout)(p1)<br>    <br>    c2 = conv2d_block(p1, n_filters * 2, kernel_size = 3, batchnorm = batchnorm)<br>    p2 = MaxPooling2D((2, 2))(c2)<br>    p2 = Dropout(dropout)(p2)<br>    <br>    c3 = conv2d_block(p2, n_filters * 4, kernel_size = 3, batchnorm = batchnorm)<br>    p3 = MaxPooling2D((2, 2))(c3)<br>    p3 = Dropout(dropout)(p3)<br>    <br>    c4 = conv2d_block(p3, n_filters * 8, kernel_size = 3, batchnorm = batchnorm)<br>    p4 = MaxPooling2D((2, 2))(c4)<br>    p4 = Dropout(dropout)(p4)<br>    <br>    c5 = conv2d_block(p4, n_filters = n_filters * 16, kernel_size = 3, batchnorm = batchnorm)<br>    <br>    # Expansive Path<br>    u6 = Conv2DTranspose(n_filters * 8, (3, 3), strides = (2, 2), padding = &#39;same&#39;)(c5)<br>    u6 = concatenate([u6, c4])<br>    u6 = Dropout(dropout)(u6)<br>    c6 = conv2d_block(u6, n_filters * 8, kernel_size = 3, batchnorm = batchnorm)<br>    <br>    u7 = Conv2DTranspose(n_filters * 4, (3, 3), strides = (2, 2), padding = &#39;same&#39;)(c6)<br>    u7 = concatenate([u7, c3])<br>    u7 = Dropout(dropout)(u7)<br>    c7 = conv2d_block(u7, n_filters * 4, kernel_size = 3, batchnorm = batchnorm)<br>    <br>    u8 = Conv2DTranspose(n_filters * 2, (3, 3), strides = (2, 2), padding = &#39;same&#39;)(c7)<br>    u8 = concatenate([u8, c2])<br>    u8 = Dropout(dropout)(u8)<br>    c8 = conv2d_block(u8, n_filters * 2, kernel_size = 3, batchnorm = batchnorm)<br>    <br>    u9 = Conv2DTranspose(n_filters * 1, (3, 3), strides = (2, 2), padding = &#39;same&#39;)(c8)<br>    u9 = concatenate([u9, c1])<br>    u9 = Dropout(dropout)(u9)<br>    c9 = conv2d_block(u9, n_filters * 1, kernel_size = 3, batchnorm = batchnorm)<br>    <br>    outputs = Conv2D(1, (1, 1), activation=&#39;sigmoid&#39;)(c9)<br>    model = Model(inputs=[input_img], outputs=[outputs])<br>    return model</pre><p>The <strong>custom_f1</strong> metric is created with the use of tensor operations as proposed in a following <a href="https://medium.com/@aakashgoel12/how-to-add-user-defined-function-get-f1-score-in-keras-metrics-3013f979ce0d">publication</a>. It will allow us to control the quality of the model through the F1 score, which is the harmonic mean of precision and recall. This way, we try to avoid a situation in which the model will move towards extreme values ​​by predicting 0 or 1 values ​​for practically the entire dataset and usually happens with such unbalanced data.</p><pre>def custom_f1(y_true, y_pred): <br>    &quot;&quot;&quot;Function to calculate F1-score&quot;&quot;&quot;<br>    true_positives = K.sum(K.round(K.clip(y_true * y_pred, 0, 1)))<br>    possible_positives = K.sum(K.round(K.clip(y_true, 0, 1)))<br>    predicted_positives = K.sum(K.round(K.clip(y_pred, 0, 1)))<br>    precision = true_positives / (predicted_positives + K.epsilon())<br>    recall = true_positives / (possible_positives + K.epsilon())<br>    f1_val = 2*(precision*recall)/(precision+recall+K.epsilon())<br>    return f1 val</pre><p>It’s time to compile our model and check its summary. We use Adam optimizer, BCE (binary cross-entropy) as the loss function, and include Accuracy, Recall, Precision, and custom_f1 as the metrics we’ll be monitoring during the training.</p><pre>input_img = Input((img_size, img_size, 3), name=&#39;img&#39;)<br>model = get_unet(input_img, n_filters=16, dropout=0.05, batchnorm=False)<br>model.compile(optimizer=Adam(lr=0.001), <br>              loss=&quot;binary_crossentropy&quot;, <br>              metrics=[ &quot;accuracy&quot;, Recall(), Precision(), custom_f1])<br>model.summary()</pre><p>The next step is to create a custom callback class to be able to save our training history as a separate file. In our example, after each epoch, we simply create pandas DataFrame with current loss and metrics values and save it as a .csv file on Google Drive.</p><pre>class HistoryCallback(keras.callbacks.Callback):<br>    def on_epoch_end(self, epoch, logs=None):<br>        &quot;&quot;&quot;Callback function at the end of each epoch&quot;&quot;&quot;      <br>        history_path = checkpoints_path + &quot;history/&quot;<br>        if not os.path.exists(history_path): <br>          os.makedirs(history_path)<br><br>        filename = history_path + model_name + &quot;_history.csv&quot;<br>        keys = list(logs.keys())<br>        values = np.array(list(logs.values()))<br>        df = pd.DataFrame(data= [values], columns=keys)<br>        df[&#39;epoch&#39;] = epoch<br>        df.reset_index(drop=True)<br>        with open(filename, &#39;a&#39;) as f: <br>          df.to_csv(f, header=f.tell()==0)<br><br>        print(f&quot;Saved history after epoch {epoch} to: {filename}&quot;)</pre><p>Now we can create a list of callbacks including:</p><ul><li>Early stopping (if the training doesn’t progress for a certain period of time),</li><li>Reducing optimizer’s learning rate when validation loss gets stuck,</li><li>Saving model with the best custom_f1() on validation set (remember to set min/max mode if you monitor custom metric),</li><li>Live plotting to see learning curves during the training process.</li></ul><pre>callbacks = [<br>    EarlyStopping(patience=10, verbose=1),<br>    ReduceLROnPlateau(factor=0.33, patience=4, min_lr=0.000001, verbose=1),<br>    ModelCheckpoint(checkpoints_path + model_name + &quot;.h5&quot;, <br>                    verbose=1, <br>                    save_best_only=True, <br>                    save_weights_only=False,<br>                    monitor=&#39;val_custom_f1&#39;,<br>                    mode = &quot;max&quot;),<br>    PlotLossesKeras(),<br>    HistoryCallback()<br>]</pre><p>Now we can at last fit our model and admire all the beautiful charts being drawn in the expected directions for a couple of hours, with loss getting lower while F1-score is going upwards (most of the time).</p><pre>results = model.fit(<br>    train_gen, <br>    steps_per_epoch=len(ids_train)//batch_size,<br>    epochs=epochs, <br>    callbacks=callbacks,<br>    validation_data=valid_gen,<br>    validation_steps=len(ids_valid)//batch_size, <br>    verbose=1<br>)</pre><h3>Results</h3><p>The basic model seems to be showing promising results with an F1-score up to 0.71 during validation (see benchmark results <a href="https://www.diva-portal.org/smash/get/diva2:1417200/FULLTEXT01.pdf">here</a>, page 42), so let’s check what it has to offer. When you check learning curves, you can see that the stagnation in the reduction of the val_loss value caused an early stopping before the epochs’ limit, while the maximum F1-score on a validation set was obtained at the beginning of the second half of the training.</p><figure><img alt="A learningu curve with loss on train and validation set" src="https://cdn-images-1.medium.com/max/504/0*MwaboefCrAmTwJdB" /></figure><figure><img alt="F1 score curve" src="https://cdn-images-1.medium.com/max/497/0*ztF40qkV8WtlRjVc" /></figure><p>Evaluation on the test set showed results slightly better than the validation set, obtaining an F1-score of 0.74.</p><pre>model.evaluate(<br>    test_gen, <br>    steps=len(test_ids)//batch_size,<br>    verbose=1<br>)</pre><figure><img alt="Evaluation metrics on test set" src="https://cdn-images-1.medium.com/max/724/1*3Z9StDWGLvw5hzJEqhsGLw.png" /><figcaption>Test set results</figcaption></figure><p>Now let’s try to see how our segmentation model really works. We will plot orthophoto images, true mask, predicted mask, and the difference between thresholded prediction and true mask side by side.</p><pre>def plot_sample(img_folder, mask_folder, img_ids, thresh=0.5, i=None):<br>    &quot;&quot;&quot;Function to plot the results&quot;&quot;&quot;<br>    if i is None:<br>        i = random.randint(0, len(img_ids))<br>    <br>    img = np.zeros((1, img_size, img_size, 3)).astype(float)<br>    mask = np.zeros((1, img_size, img_size, 1)).astype(float)<br>    <br>    # load image    <br>    img_data = img_to_array(load_img(img_folder+img_ids[i]))/255.0<br><br>    # load mask<br>    img_mask = img_to_array(load_img(mask_folder+img_ids[i], color_mode=&quot;grayscale&quot;))<br>    img_mask = (img_mask &gt; img_mask.min()).astype(int)<br>    # add extra dimension for parity with train_img size [img_size * img_size * 3]<br>    img_mask = img_mask.reshape(img_size, img_size, 1)             <br><br>    # add to array<br>    img[0] = img_data <br>    mask[0] = img_mask<br>    <br>    # print file id for reference<br>    print(img_ids[i])<br><br>    # mask prediction<br>    mask_pred = model.predict(img)[0]<br>    mask_pred_t = (mask_pred &gt; thresh).astype(np.uint8)<br><br>    # mask diff<br>    mask_diff = mask_pred_t * (img_mask&lt;1)<br><br>    fig, ax = plt.subplots(1, 5, figsize=(30, 10))<br>    ax[0].imshow(img[0])<br>    ax[0].set_title(&#39;orto rgb&#39;)<br><br>    ax[1].imshow(mask.squeeze())<br>    ax[1].set_title(&#39;mask&#39;)<br><br>    ax[2].imshow(mask_pred.squeeze())<br>    ax[2].set_title(&#39;mask predicted&#39;)<br><br>    ax[3].imshow(mask_pred_t.squeeze())<br>    ax[3].set_title(&#39;mask predicted binary&#39;)<br>    <br>    ax[4].imshow(mask_diff.squeeze())<br>    ax[4].set_title(&#39;mask predicted binary - mask&#39;);</pre><pre>plot_sample(test_orto_path, test_masks_path, img_ids=test_ids, thresh=0.5)</pre><figure><img alt="Output plot with mask and prediction" src="https://cdn-images-1.medium.com/max/1024/0*Ivq_qUi0vjt6dxii" /></figure><figure><img alt="Output plot with mask and prediction" src="https://cdn-images-1.medium.com/max/1024/0*2vdoW-q5txB0qWQP" /></figure><figure><img alt="Output plot with mask and prediction" src="https://cdn-images-1.medium.com/max/1024/0*gz9LixVMqLrRS-3f" /></figure><p>And… the model works fine. 😁</p><p><a href="https://github.com/DataWorkshop-Foundation/olsztyn-project-samowola/blob/main/about/notebooks/2_building_unet_model.ipynb"><strong>Link to the official notebook</strong></a></p><p>Meet our team:<br><a href="https://www.linkedin.com/in/martaaugustynowicz/">Marta Augustynowicz</a><br><a href="https://www.linkedin.com/in/sawaniewski/">Łukasz Sawaniewski</a><br><a href="https://www.linkedin.com/in/dtanajewski/">Dariusz Tanajewski</a><br><a href="https://www.linkedin.com/in/igor-wieczorek/">Igor Wieczorek</a><br><a href="https://www.linkedin.com/in/maciej-zieniewicz/">Maciej Zieniewicz</a></p><p>This project was carried out within the <a href="https://dataworkshop.foundation/"><strong>DataWorkshop Foundation</strong></a><strong> </strong>community.</p><figure><img alt="Dataworkshop Foundation logo" src="https://cdn-images-1.medium.com/max/191/1*8xyrYQm2fHyKZhnEZxqXDA.jpeg" /></figure><blockquote>DataWorkshop Foundation is primarily about machine learning and people. We focus on pro-social activities, using the potential of machine learning. The goal of the DataWorkshop Foundation is to disseminate knowledge about machine learning and AI through practical activity, which leads to the solution of important current problems.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b56ca80c8c99" width="1" height="1" alt=""><hr><p><a href="https://pub.towardsai.net/find-unauthorized-constructions-using-aerial-photography-and-deep-learning-with-code-part-2-b56ca80c8c99">Find Unauthorized Constructions Using Aerial Photography and Deep Learning with Code (Part 2)</a> was originally published in <a href="https://pub.towardsai.net/">Towards AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Find Unauthorized Constructions Using Aerial Photography and Deep Learning with Code (Part 1)]]></title>
            <link>https://pub.towardsai.net/find-unauthorized-constructions-using-aerial-photography-and-deep-learning-with-code-part-1-6d3ca7ff6fa0?source=rss-ac5e365ab44e------2</link>
            <guid isPermaLink="false">https://medium.com/p/6d3ca7ff6fa0</guid>
            <category><![CDATA[data-gathering]]></category>
            <category><![CDATA[segmentation]]></category>
            <category><![CDATA[satellite-imagery]]></category>
            <category><![CDATA[object-detection]]></category>
            <category><![CDATA[deep-learning]]></category>
            <dc:creator><![CDATA[Maciej Zieniewicz]]></dc:creator>
            <pubDate>Mon, 07 Dec 2020 13:04:58 GMT</pubDate>
            <atom:updated>2021-01-19T19:43:18.067Z</atom:updated>
            <content:encoded><![CDATA[<h4><a href="https://towardsai.net/p/category/machine-learning/deep-learning">Deep Learning</a></h4><figure><img alt="Orthophoto, ground truth mask with buildings and predicted outcome of DL model." src="https://cdn-images-1.medium.com/max/1024/1*QG4F0YMSOjQlNYFoZ0NEvQ.png" /><figcaption>The final outcome of our Detector.</figcaption></figure><h3>Table of Contents</h3><p>1. <a href="#7f0e">Introduction</a><br>2. <a href="#1bae">Problem Statement</a><br>3. <a href="#9d2a">Data Gathering and Preprocessing</a><br>4. <a href="#e206">What’s Next…?</a><br>5. <a href="#2639">Resources and Authors</a></p><h3>Introduction</h3><p>In this article, we will go through data gathering and a preprocessing phase. It’s an important step that needs to be done before we will jump into deep learning models.</p><p>We have developed a unique — and more importantly, automated — method of acquisition and preparation of training data. Using publicly available resources, we have collected RGB photos for over <strong>50,000 </strong>locations.</p><p>Using the <a href="https://pl.wikipedia.org/wiki/Ewidencja_grunt%C3%B3w_i_budynk%C3%B3w"><strong>Land and Buildings Register</strong></a> information and some image transformations, we prepared binary masks for each location, delimiting the area of all registered buildings.</p><p>You can find a link to the discussed notebook at the end of this article.</p><h3><strong>Problem Statement</strong></h3><p>Building permission is one of the very first steps when erecting a building. This is a necessity that everyone needs to go through. Despite severe penalties, many people decide to erect the building without it.</p><p>Is it a serious problem in Poland? In 2011, aerial photos were taken in Gliwice (an average size city in Poland), with the help of which the legal analysis of the buildings was conducted (manually!). The results are shocking — 1374 discrepancies were detected [<a href="https://www.rp.pl/artykul/723617-Zdjecia-lotnicze-ulatwiaja-wykrycie-samowoli-budowlanych.html/">link</a>].</p><p>The results of this project clearly show that the number of abnormalities detected and the official data are only a fraction of the reality.</p><p>The main reason for this divergence is the high cost of aerial / satellite imagery and the need for manual image analysis. Technical limitations and the lack of digital competences of local officials additionally make it difficult to supervise the legality of buildings and possible errors.</p><h3><strong>Data Gathering and Preprocessing</strong></h3><p>We will use a few typical packages and <a href="https://rasterio.readthedocs.io/"><strong>rasterio</strong></a><strong> </strong>for handling raster data — in our case, spatial (orthophoto) images.</p><pre><strong>from</strong> <strong>io</strong> <strong>import</strong> BytesIO<br><strong>import</strong> <strong>requests</strong><br><strong>import</strong> <strong>logging</strong><br><strong>from</strong> <strong>datetime</strong> <strong>import</strong> datetime<br><br><strong>import</strong> <strong>numpy as</strong> <strong>np</strong><br><strong>import</strong> <strong>matplotlib.pyplot</strong> <strong>as</strong> <strong>plt</strong><br><br><strong>import</strong> <strong>rasterio</strong><br><strong>from</strong> <strong>scipy</strong> <strong>import</strong> ndimage <strong>as</strong> ndi<br><strong>from</strong> <strong>skimage.transform</strong> <strong>import</strong> resize<br><strong>from</strong> <strong>skimage.segmentation</strong> <strong>import</strong> watershed<br><strong>from</strong> <strong>skimage.morphology</strong> <strong>import</strong> closing<br><br>logging.basicConfig(level=logging.INFO)</pre><p>Now we need to set up parameters for our image, including <strong>size </strong>and <strong>coordinates</strong>. You can experiment with these attributes freely, but you should follow some rules:</p><ol><li>x and y coordinates have to be placed within Polish borders (we are using a specific data source)</li><li>coordinates are based on EPSG:2180 projection (used in Poland for small scale maps) instead of a common EPSG:4326. You can find an appropriate converter <a href="https://epsg.io/transform#s_srs=4326&amp;t_srs=2180&amp;x=18.5804469&amp;y=54.4264950"><strong>here</strong></a>.</li></ol><pre><em># image resolution &quot;on the ground&quot;</em><br>meters_by_pixel = 1  <br>img_side = 256 <em># in meters</em><br>img_size = (abs(int(img_side/meters_by_pixel)), abs(int(img_side/meters_by_pixel))) <em># for comparing sources</em><br><br><em># image coordinates</em><br>x_min = 597500<br>y_min = 657450<br>x_max = x_min + img_side<br>y_max = y_min + img_side<br><br>logging.info(f&quot;image coordinates: <strong>{</strong>(x_min, y_min), (x_max, y_max)<strong>}</strong>, image size: <strong>{</strong>img_size<strong>}</strong> resolution: <strong>{</strong>img_side<strong>}</strong>/<strong>{</strong>meters_by_pixel<strong>}</strong>&quot;)</pre><p>We will use the <a href="https://mapy.geoportal.gov.pl/"><strong>official geoportal service</strong></a> to get current orthophoto images for the chosen location. The website also supports English if you want to test its capabilities.</p><p>To create requests correctly, we need to use a <strong>GetMap </strong>request from WMS (<a href="https://en.wikipedia.org/wiki/Web_Map_Service"><strong>Web Map Service</strong></a>) protocol, which is widely used to share geographic data over the internet.</p><p>Then, BytesIO helps us to handle the response’s content as it is actually a png image and rasterio retrieves the picture we are interested in as a NumPy array. Because our raw data array has a “channel-first” shape (4, 256, 256), we need to transform it into a (256, 256, 4) array and remove the unnecessary channel (alpha).</p><pre><em># GEOPORTAL ORTO</em><br><strong>def</strong> get_orto_image(aoi, resolution):<br>    x_min, y_min, x_max, y_max = aoi<br>    <br>    ORTO_WMS_URL = &quot;mapy.geoportal.gov.pl/wss/service/img/guest/ORTO/MapServer/WMSServer&quot;<br><br>    layer = &#39;Raster&#39;<br>    resolution = resolution<br>    size = (abs(int((x_min - x_max)/resolution)), abs(int((y_min - y_max)/resolution)))<br><br>    params = {<br>        &#39;request&#39;: &#39;GetMap&#39;,<br>        &#39;service&#39;: &#39;WMS&#39;,<br>        &#39;version&#39;: &#39;1.1.1&#39;,<br>        &#39;layers&#39;: layer,<br>        &#39;styles&#39;: &#39;&#39;,<br>        &#39;width&#39;: size[0],<br>        &#39;height&#39;: size[1],<br>        &#39;srs&#39;: &#39;EPSG:2180&#39;,<br>        &#39;bbox&#39;: &#39;,&#39;.join((str(x) <strong>for</strong> x <strong>in</strong> (x_min, y_min, x_max, y_max))),<br>        &#39;format&#39;: &#39;image/png&#39;,<br>        &#39;transparent&#39;: &#39;TRUE&#39;<br>    }<br><br>    parsed_url = &quot;http://&quot; + ORTO_WMS_URL + &quot;?&quot; + &quot;&amp;&quot;.join([f&quot;<strong>{</strong>k.upper()<strong>}</strong>=<strong>{</strong>v<strong>}</strong>&quot; <strong>for</strong> k,v <strong>in</strong> params.items()])<br>    <br>    logging.info(f&quot;Requesting image from get_orto_image(<strong>{</strong>aoi<strong>}</strong>, <strong>{</strong>resolution<strong>}</strong>), img_size: <strong>{</strong>size<strong>}</strong>&quot;)<br>    response = requests.get(parsed_url)<br>    <br>    <strong>if</strong> response.ok:<br><br>        img = BytesIO(response.content)<br>        <strong>with</strong> rasterio.MemoryFile(img) <strong>as</strong> memfile:<br>             <strong>with</strong> memfile.open() <strong>as</strong> dataset:<br>                    data_array = dataset.read()<br>                    data_array = np.moveaxis(data_array, 0, 2)<br><br>        <strong>return</strong> data_array[:,:,:3]<br>    <br>    logging.warning(f&quot;Could not get image from get_orto_image(<strong>{</strong>aoi<strong>}</strong>, <strong>{</strong>resolution<strong>}</strong>)&quot;)<br>    <strong>return</strong></pre><figure><img alt="Orthophoto for the chosen location from Poland" src="https://cdn-images-1.medium.com/max/475/1*JFf3_59iHw2fOmCvhPNalg.png" /><figcaption>Picture 1. Orthophoto for the chosen location (geoportal response).</figcaption></figure><p>Orthophoto images are the first part of our dataset. Now we need to find officially registered buildings for these locations using a similar function. <a href="https://integracja.gugik.gov.pl/cgi-bin/KrajowaIntegracjaEwidencjiGruntow?lang=en"><strong>Polish Office of Geodesy and Cartography</strong></a> allows us to get the necessary data.</p><pre><em># BUILDINGS</em><br><strong>def</strong> get_building_image(aoi, resolution):<br>    x_min, y_min, x_max, y_max = aoi<br>    BUILD_WMS_URL = &quot;integracja.gugik.gov.pl/cgi-bin/KrajowaIntegracjaEwidencjiGruntow&quot;<br><br>    layer = &#39;budynki&#39;<br>    resolution = resolution<br>    size = (abs(int((x_min - x_max)/resolution)), abs(int((y_min - y_max)/resolution)))<br><br>    params = {<br>        &#39;request&#39;: &#39;GetMap&#39;,<br>        &#39;service&#39;: &#39;WMS&#39;,<br>        &#39;version&#39;: &#39;1.1.1&#39;,<br>        &#39;layers&#39;: layer,<br>        &#39;styles&#39;: &#39;&#39;,<br>        &#39;width&#39;: size[0],<br>        &#39;height&#39;: size[1],<br>        &#39;srs&#39;: &#39;EPSG:2180&#39;,<br>        &#39;bbox&#39;: &#39;,&#39;.join((str(x) <strong>for</strong> x <strong>in</strong> (x_min, y_min, x_max, y_max))),<br>        &#39;format&#39;: &#39;image/png&#39;,<br>        &#39;transparent&#39;: &#39;TRUE&#39;<br>    }<br><br>    parsed_url = &quot;http://&quot; + BUILD_WMS_URL + &quot;?&quot; + &quot;&amp;&quot;.join([f&quot;<strong>{</strong>k.upper()<strong>}</strong>=<strong>{</strong>v<strong>}</strong>&quot; <strong>for</strong> k,v <strong>in</strong> params.items()])<br><br>    logging.info(f&quot;Requesting image from get_orto_image(<strong>{</strong>aoi<strong>}</strong>, <strong>{</strong>resolution<strong>}</strong>), img_size: <strong>{</strong>size<strong>}</strong>&quot;)<br>    response = requests.get(parsed_url)<br>    <br>    <strong>if</strong> response.ok:<br><br>        img = BytesIO(response.content)<br>        <strong>with</strong> rasterio.MemoryFile(img) <strong>as</strong> memfile:<br>             <strong>with</strong> memfile.open() <strong>as</strong> dataset:<br>                    data_array = dataset.read()<br>                    data_array = np.moveaxis(data_array, 0, 2)<br><br>        <strong>return</strong> data_array[:,:,:3]<br>    <br>    logging.warning(f&quot;Could not get image from get_orto_image(<strong>{</strong>aoi<strong>}</strong>, <strong>{</strong>resolution<strong>}</strong>)&quot;)<br>    <strong>return</strong></pre><figure><img alt="Contours of buildings for the same coordinates." src="https://cdn-images-1.medium.com/max/475/1*RszpJDTyiyFQYG8Ybit9fQ.png" /><figcaption>Picture 2. Contours of buildings for the same coordinates (geoportal response).</figcaption></figure><p>To effectively compare orthophotos with contours, we need to create a mask by closing and filling all the contours, both closed and opened ones. We will combine some existing solutions that skimage and scipy packages provide.</p><pre><strong>def</strong> get_building_mask(aoi, resolution):<br>    <br>    logging.info(f&quot;Generating image for get_building_mask(<strong>{</strong>aoi<strong>}</strong>, <strong>{</strong>resolution<strong>}</strong>)&quot;)<br>    data_array = get_building_image((x_min, y_min, x_max, y_max), meters_by_pixel)<br>    <br>    <strong>if</strong> data_array <strong>is</strong> <strong>not</strong> <strong>None</strong>:<br>        data_array = data_array[:,:,0] &gt; 0<br>        <br>        <em># closing contours</em><br>        data_array = closing(data_array)<br>        <br>        <em># filling contours</em><br>        data_array = ndi.binary_fill_holes(data_array)<br>        <br>        <em># filling open contours with watershed</em><br>        water_mask = watershed(data_array)<br>        water_mask = water_mask != np.bincount(water_mask.flatten()).argmax()<br>        data_array = water_mask + data_array<br><br>        <strong>return</strong> data_array<br>    <br>    logging.warning(f&quot;Could not get image for get_building_mask(<strong>{</strong>aoi<strong>}</strong>, <strong>{</strong>resolution<strong>}</strong>)&quot;)<br>    <strong>return</strong></pre><p>First, we extract only one (red) channel, then use<strong> </strong><a href="https://scikit-image.org/docs/dev/api/skimage.morphology.html#skimage.morphology.closing"><strong>closing</strong></a> transformation to fill in invisible gaps that might have left contours open. We are filling closed contours with <a href="https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.ndimage.morphology.binary_fill_holes.html"><strong>binary_fill_holes</strong></a><strong>,</strong> which brings us closer to the final solution.</p><figure><img alt="Closed countours closed with binary fill holes function" src="https://cdn-images-1.medium.com/max/475/1*qWBq0fRnIAFcKtWirxuS5w.png" /><figcaption>Picture 3. Result of the mask after using fill_binary_holes.</figcaption></figure><p>Now it’s time for a trick with a <a href="https://scikit-image.org/docs/dev/auto_examples/segmentation/plot_watershed.html"><strong>watershed</strong></a><strong> </strong>segmentation algorithm. As per this explanation:</p><p><em>The watershed transform floods an image of elevation starting from markers in order to determine the catchment basins of these markers. Watershed lines separate these catchment basins and correspond to the desired segmentation.</em> <a href="https://scikit-image.org/docs/dev/user_guide/tutorial_segmentation.html#region-based-segmentation"><strong>[link]</strong></a></p><p>In our example, the watershed recognizes empty edges as objects overlapping with the background and returns three instances: background and two buildings. The background is returned as value 1, so our objective is to grab only instances with higher numbers.</p><figure><img alt="Contours after using watershed segmentation" src="https://cdn-images-1.medium.com/max/475/1*v_2Pb0N6ch-aQEbdNUI0lw.png" /><figcaption>Picture 4. Result of the mask after using watershed segmentation.</figcaption></figure><p>Now, we simply add our closing and watershed masks together, and the final mask is ready for training purposes.</p><figure><img alt="Two previous masks added together." src="https://cdn-images-1.medium.com/max/475/1*VM4hmxVyDQrfbO4LXCSs8A.png" /><figcaption>Picture 5. The final mask of registered buildings.</figcaption></figure><h3><strong>What’s Next…?</strong></h3><p>In the next article, we will focus on training our segmentation model with the use of U-Net architecture to recognize buildings on orthophoto images.</p><h3><strong>Resources and Authors</strong></h3><p><a href="https://github.com/DataWorkshop-Foundation/olsztyn-project-samowola/blob/main/about/notebooks/1_gathering_data.ipynb"><strong>Link to the official notebook</strong></a></p><p><strong>Meet our team:</strong><br><a href="https://www.linkedin.com/in/martaaugustynowicz/">Marta Augustynowicz</a><br><a href="https://www.linkedin.com/in/sawaniewski/">Łukasz Sawaniewski</a><br><a href="https://www.linkedin.com/in/dtanajewski/">Dariusz Tanajewski</a><br><a href="https://www.linkedin.com/in/igor-wieczorek/">Igor Wieczorek</a><br><a href="https://www.linkedin.com/in/maciej-zieniewicz/">Maciej Zieniewicz</a></p><p>The project was carried out within the <a href="https://dataworkshop.foundation/"><strong>DataWorkshop Foundation</strong></a><strong> </strong>community.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/191/1*8xyrYQm2fHyKZhnEZxqXDA.jpeg" /></figure><blockquote>DataWorkshop Foundation is primarily about machine learning and people. We focus on pro-social activities, using the potential of machine learning. The goal of the DataWorkshop Foundation is to disseminate knowledge about machine learning and AI through practical activity, which leads to the solution of important current problems. As part of the foundation’s activities, we build a knowledge base and enrich the experience, thanks to that we want to use the existing machine learning techniques and tools for innovative solutions.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6d3ca7ff6fa0" width="1" height="1" alt=""><hr><p><a href="https://pub.towardsai.net/find-unauthorized-constructions-using-aerial-photography-and-deep-learning-with-code-part-1-6d3ca7ff6fa0">Find Unauthorized Constructions Using Aerial Photography and Deep Learning with Code (Part 1)</a> was originally published in <a href="https://pub.towardsai.net/">Towards AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>