<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Cloud service of Geoportal ISDCT SB RAS for machine learning</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Yuriy V. Avramenko</string-name>
          <email>avramenko@icc.ru</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Anastasiya K. Popova</string-name>
          <email>popova@icc.ru</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Roman K. Fedorov</string-name>
          <email>fedorov@icc.ru</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Matrosov Institute for System Dynamics and Control Theory of Siberian Branch of Russian Academy of Sciences</institution>
          ,
          <addr-line>Lermontova str. 134, Irkutsk, 664033</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>The paper describes the cloud service of ISDCT SB RAS for machine learning research. The introduction discusses the relevance of creating a service. Further, the theoretical part is considered, which describes the component of the services and the principle of their interaction. Then the results of practical application and discussion are presented. In the conclusion, the results of the work are summarized.</p>
      </abstract>
      <kwd-group>
        <kwd>1 WPS</kwd>
        <kwd>remote sensing</kwd>
        <kwd>machine learning</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Researchers often choose between existing methods and the development of new ones for solving
practical problems [
        <xref ref-type="bibr" rid="ref1 ref2 ref3">1-3</xref>
        ]. In most cases, a known method is used with some modifications. This choice
is associated with both the development of the technical part and the software. This problem is
especially acute with free software, where patches and fixes are often released, and sometimes the
required library is not supported by the developers at all. There are several ways to get around this
limitation, for example, create a virtual machine or environment and then install the necessary
software, use a Docker image with preinstalled software, use cloud services with necessary software.
After choosing a suitable method, the researchers are testing the algorithms on the data given by the
method author. If the test data matches the custom data in its characteristics, then we can assume that
the method works well.
      </p>
      <p>In our work, we use machine learning methods to classify the land cover with multispectral remote
sensing images. On the remote sensing data the spectral characteristics can significantly differ from
each other, since they depend on many factors so the same algorithms can give different results.
Therefore, it is important to be able to apply the method and get the expected result on a custom
dataset.</p>
      <p>
        We tried to repeat the classification method used in work [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] to classify the south of the Irkutsk
region and got negative results - the entire territory was classified as water. This happened due to the
fact that the values of the spectral bands of the EuroSAT set, on which the training was carried out,
significantly differ from the values of the corresponding bands of the studied territory. Therefore, we
need an environment where we can flexibly customize methods for specific tasks.
      </p>
      <p>A cloud service for machine learning was created at the ISDCT SB RAS as part of an applied
digital platform. The goal is to provide technical and software base for the development of new and
testing of known methods. The service takes into account factors such as speed of deployment,
customization flexibility, user preferences and scalability.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Main idea</title>
      <p>
        In the process of the service developing, the existing approaches were studied [
        <xref ref-type="bibr" rid="ref5 ref6 ref7">5-7</xref>
        ], the
functionality for the effective and convenient work of users was determined for processing remote
sensing data with machine learning. As a result, we have defined the requirements for the services:
• automation of repetitive user actions;
• support for multi-user work;
• sharing results;
• fine tuning.
      </p>
      <p>
        Description and role of the main components of the Geoportal ISDCT cloud service [
        <xref ref-type="bibr" rid="ref10 ref8 ref9">8-10</xref>
        ]:
• JupyterHub provides JupyterLab capabilities to users groups. Contains a set of rules for
running Docker containers.
• NextCloud is a set of client-server programs for creating and using cloud storage. Provides
users with OAuth 2.0 sign-in and network storage access.
• Kubernetes is open source software for orchestrating Docker containers, to automate their
deployment, to scale and coordinate in a cluster environment. Allows to add compute
nodes and define rules for their use.
• Docker is software for automating the deployment and management of applications in
virtualized environments. Create custom images or run existing ones.
• JupyterLab is an interactive web-based Python and R code and data development
environment. Algorithm development and testing.
• PyWPS allows create and deploy custom geospatial operations (as processes) on the
server. Provides algorithms for processing remote sensing data, automatically updates the
remote sensing database.
• Compute nodes – physical or virtual machines for users.
• Network storage – contains the remote sensing database, user files.
• Interactive map displays remote sensing data, simplifies the users work withn creating a
training sample, and allows call tools for processing remote sensing.
      </p>
      <p>Figure 1 shows a general diagram of the cloud service components interaction.</p>
      <p>The cloud service is focused on the development, implementation and testing of remote sensing
methods. Distinctive features of the service from existing analogues are:
• unlimited working time;
• increased data storage;
• interaction of an interactive map with the development environment;
• the ability to run custom Docker images.</p>
      <p>
        In the course of practical experiments, the algorithms for the land cover classification from [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]
were repeated. The main difficulties in reproducing the results were conflicts between versions of the
libraries and operating system, the way of reading the data. We tested Ubuntu versions 16 and 18. The
versions of the data processing libraries were selected in two ways, based on the existing build in
Google Colab and by comparing the release date.
      </p>
      <p>On the technical side, the method is demanding on computational resources, so two Docker images
were created: a regular one for writing algorithms and a high-performance one with support for
CUDA technology, which is necessary for neural networks training. Switching between images
occurs with KubeSpawner, a plug-in for Kubernetes integration in JupyterHub. KubeSpawner allows
determine the number of processor cores, the amount of RAM, access to video cards and other
parameters. Next, Kubernetes looks for a suitable node to run the image. The resulting images are
used to solve machine learning tasks. Next, we consider the developed and implemented algorithms
for solve the machine learning tasks.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Practical application</title>
      <p>Training sample balancing algorithm. The algorithm input is the path to the data divided by classes
in various directories. Each directory contains N files - containers for training data. First, a list of pairs
is formed (file name, sample serial number). Next, a list of characteristics for clustering is built (the
arithmetic mean and standard deviation of the sample pixels for each band). Clustering is performed
based on the list of characteristics. The result is ordered in ascending order of the number of elements
in the cluster. After that, samples are taken from each cluster according to the rule – if number of
cluster elements are less than a specified threshold value, then we take everything, otherwise with a
certain step. This approach guarantees that rare samples will definitely be included in the training set,
and frequent ones will be thinned out. Figure 2-3 shows results of the algorithm work.</p>
      <p>Classification quality control algorithm. The algorithm input is two files, the result of the
classification and the labeled dataset. Since it is not possible for a specialist to completely label the
whole image, the check is carried out only in the areas corresponding to the markup. The PyCM
library is used to calculate statistics. PyCM is a multi-class confusion matrix library written in Python
that supports both input data vectors and direct matrix, and a proper tool for post-classification model
evaluation that supports most classes and overall statistics parameters. ACC (Accuracy), PPV
(Precision or positive predictive value) indicators were used as the main criteria. As a result of the
check, it became possible to compare two versions of the method and choose the best one. The error
matrix for each version of the method is shown in Figure 4.</p>
      <p>
        The result of applying adapted method from work [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] is shown in Figure 5.
      </p>
    </sec>
    <sec id="sec-4">
      <title>4. Conclusion</title>
      <p>The purpose of this study is to create a cloud service for the ISDCT SB RAS Geoportal for
machine learning tasks. We took into account the needs of users and the features of the tasks to be
solved during the design stage. This service allows users to apply data processing methods to solve
practical problems, develop and implement new methods. Unlike existing services, the proposed one
has the following advantages: unlimited working time; increased data storage; connection of the
interactive map with the development environment; the ability to run custom Docker images. During
testing, we gained experience in adapting methods for specific tasks, taking into account the specifics
of the processed data, repeating the method close to the original in the software part and partly in the
technical one in the shortest possible time.</p>
    </sec>
    <sec id="sec-5">
      <title>5. Acknowledgements</title>
      <p>The results were obtained within the framework of the State Assignment of the Ministry of
Education and Science of the Russian Federation for the project "Methods and technologies of
cloud⁠based service-⁠oriented platform for collecting, storing and processing large volumes of multi-⁠format
interdisciplinary data and knowledge based upon the use of artificial intelligence, model-⁠guided
approach and machine learning" (state registration number 121030500071-⁠2). Results are achieved
using the Centre of collective usage «Integrated information network of Irkutsk scientific educational
complex».</p>
    </sec>
    <sec id="sec-6">
      <title>6. References</title>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>M.</given-names>
            <surname>Martini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Mazzia</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Khaliq</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Chiaberge</surname>
          </string-name>
          ,
          <article-title>Domain-adversarial training of self-attention based networks for land cover classification using multi-temporal sentinel-2 satellite imagery</article-title>
          .
          <source>Computer Vision</source>
          and Pattern Recognition,
          <year>p20</year>
          , (
          <year>2021</year>
          ) arXiv:
          <fpage>2104</fpage>
          .
          <fpage>00564</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>L.</given-names>
            <surname>Alonso</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Picos</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J.</given-names>
            <surname>Armesto</surname>
          </string-name>
          ,
          <article-title>Forest Land Cover Mapping at a Regional Scale Using Multi-Temporal Sentinel-2 Imagery and</article-title>
          RF Models,
          <source>Remote Sens</source>
          , Volume
          <volume>13</volume>
          ,
          <source>Issue</source>
          <volume>12</volume>
          (
          <year>2021</year>
          ). doi:
          <volume>10</volume>
          .3390/rs13122237.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Klaudia</given-names>
            <surname>Weronika</surname>
          </string-name>
          <string-name>
            <surname>Pałas</surname>
          </string-name>
          ,
          <source>Jarosław Zawadzki. Sentinel-2 Imagery Processing for Tree Logging Observations on the Białowieża Forest World Heritage Site. Forests. Volume 11, Issue</source>
          <volume>8</volume>
          (
          <year>2020</year>
          ). doi:
          <volume>10</volume>
          .3390/f11080857.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>T.</given-names>
            <surname>Chambon</surname>
          </string-name>
          ,
          <article-title>Fighting Hunger through Open Satellite Data: A New State of the Art for Land Use Classification</article-title>
          ,
          <year>2019</year>
          . URL: https://medium.com/omdena/fighting
          <article-title>-hunger-through-open-satellitedata-a-new-state-of-the-art-for-land-use-classification-f57f20b7294b.</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>Google</given-names>
            <surname>Earth Engine</surname>
          </string-name>
          <article-title>Homepage</article-title>
          . URL: https://earthengine.google.com/.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>Earth</given-names>
            <surname>Observing System</surname>
          </string-name>
          <article-title>Homepage</article-title>
          . URL: https://eos.com/.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>Sentinel</given-names>
            <surname>Hub</surname>
          </string-name>
          <article-title>Homepage</article-title>
          .
          <article-title>URL: ww.sentinel-hub</article-title>
          .com/.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>J.</given-names>
            <surname>Shah</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Dubaria</surname>
          </string-name>
          ,
          <article-title>Building modern clouds: Using docker, kubernetes google cloud platform</article-title>
          .
          <source>2019 IEEE 9th Annu. Comput. Commun. Work. Conf. CCWC</source>
          (
          <year>2019</year>
          ) doi: 10.1109/CCWC.
          <year>2019</year>
          .
          <volume>8666479</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>D.</given-names>
            <surname>Bernstein</surname>
          </string-name>
          ,
          <article-title>Containers and cloud: From LXC to docker to kubernetes</article-title>
          .
          <source>IEEE Cloud Comput</source>
          (
          <year>2014</year>
          ) doi:10.1109/
          <string-name>
            <surname>MCC</surname>
          </string-name>
          .
          <year>2014</year>
          .
          <volume>51</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>A.</given-names>
            <surname>Poniszewska-Marańda</surname>
          </string-name>
          , E. Czechowska,
          <article-title>Kubernetes cluster for automating software production environment</article-title>
          .
          <source>Sensors</source>
          ,
          <volume>21</volume>
          (
          <issue>5</issue>
          ):
          <year>1910</year>
          (
          <year>2021</year>
          ) doi: 10.3390/s21051910.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>