<!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>MIRF 2.0 - a framework for distributed medical images analysis</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Angelina Chizhova</string-name>
          <email>chilina4@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Alexander Savelev</string-name>
          <email>algsavelev@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Alexandra Shvyrkova</string-name>
          <email>shvyrkova.s@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Alexey Fefelov</string-name>
          <email>fefaleksey@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Egor Ponomarev</string-name>
          <email>egorponomarev93@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Yurii Litvinov</string-name>
          <email>y.litvinov@spbu.ru</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Alexander Lomakin</string-name>
          <email>alexander.lomakin@protonmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>St. Petersburg State University</institution>
          ,
          <addr-line>Saint Petersburg</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2019</year>
      </pub-date>
      <abstract>
        <p>-MIRF is an open-source library for a convenient creation of applications which process medical data. Architectural style of that library is Pipes and Filters which means that components that process and transform data are connected together in the pipeline. In this paper we describe a new version of the library based on microservice architecture where services are deployed and maintained independently. This could solve a problem with a lack of computational resources needed for image processing. Some new applications of MIRF library are also presented, namely ECG arrhythmias diagnostics and intracranial hemorrhage detection. Implementation of the ECG processing in MIRF was especially interesting due to the fact that ECG is a signal, not an image. Detailed description of ECG processing tool and results of our experiments are also presented. Index Terms-medical images, microservices, electrocardiogram, convolutional neural network 4CVPR 16.02.2020) 5ICLR home page, URL: https://iclr.cc/ (accessed: 16.02.2020)</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>INTRODUCTION</title>
      <p>
        Medical Images Research Framework (MIRF, [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]) is an
open-source platform for rapid development of applications
for medical images processing. The project aims to fill the
gap between research in automated medical images processing
and real-world medical practice, allowing medical specialists
with basic programming skills to quickly experiment with
computer vision and machine learning algorithms. Research
in medical images processing is growing exponentially in
recent years, there are many existing libraries, such as MITK1,
international competitions in medical image analysis, such
as BraTS challenge2, conferences (MICCAI3 and topics in
CVPR4, ICLR5). And there is a very pragmatic reason for such
an interest in this field: the most interesting medical images
are MRI or CT scans, each scan consists of several dozens of
slices, and a radiologist should find an anomaly that could be
visible only in a very few slices, and should process several
slices in a day. It is a great amount of work and the lives
of patients depend on it. Thus semi-automatic processing (for
example, flagging “interesting” slices for future review) can be
crucial. And yet, in a real-world clinics advanced automatic
processing is the exception rather than the rule.
      </p>
      <p>
        MIRF project was started in 2018 as an informal
collaboration between students of St. Petersburg State University
and radiologists of one of the private clinics in St. Petersburg.
It was designed as a framework written in Kotlin for a
development of desktop and mobile applications for processing
DICOM and NifTI scans. It is integrated with TensorFlow,
thus allowing to use neural networks, has its own utilities for
DICOM and NifTI processing, can generate PDF reports [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
Although it quickly became obvious that desktop and mobile
applications can not be very effective in a real-world
radiology due to the problems with data storage and amount of
computational resources needed for 3D images processing. As
a second version MIRF was redesigned to use microservices
architectural style, to be distributed, scalable and web-oriented.
Thanks to this, users do not need to install MIRF on their
computer, they can just use the web service, and we can
manage the load on the servers.
      </p>
      <p>This article presents our experience in creating a new
distributed architecture of Medical Images Research Framework
home page, URL: http://cvpr2020.thecvf.com/ (accessed:
and a several new applications including automated diagnostic
of cardiovascular diseases by electrocardiogram and
intracranial hemorrhage detection. Electrocardiogram processing is
especially interesting because electrocardiogram is not
actually an image, so a successful electrocardiogram diagnostic
application shows that MIRF is able to work effectively with
more general medical data (despite “Images” in its name).
As most of the medical tasks, it is an extremely challenging
problem, solving which c help save many lives.</p>
    </sec>
    <sec id="sec-2">
      <title>I. MIRF 2.0 ARCHITECTURE</title>
      <p>MIRF is divided into 2 global packages — core and
features.</p>
      <p>• core contains the basic types of libraries: abstract classes
and interfaces representing blocks, filters and the base
classes for medical data — image series, ECG series.
• features contains the different MIRF functionality — API
to access the repositories, reporting tools, various data
formats parsers, image series segmentation and
visualization tools</p>
      <p>Data in MIRF is represented as a child classes of the abstract
class Data. The main objective of the class is to provide
convenient access to the metadata stored as list of attributes
(the AttributeCollection class in MIRF), as well as to ensure
pipeline integrity — only Data-derived classes are to transfer
via pipelines.</p>
      <p>Computational elements are presented as the
implementations of the Algorithm functional interface. It is expected that
Algorithm would be implemented only with the pure functions.
Such a reduction of possible implementations along with the
fact that the algorithm can be easily created from one method
(using the SimpleAlg class) provides opportunities for flexible
algorithm and hierarchies creation. A typical example is static
classes containing handler methods for data of one types, each
of which can be converted into an algorithm instead class
institutions for each method.</p>
      <p>The main purpose of the MIRF library is to create pipelines
— series of data handlers. In the terminology of Pipes &amp;
Filters architecture, the filters are instances of Algorithm
encapsulated in PipelineBlock — a class designed to
connect Algorithms among themselves. Data transfer between the
blocks is based on event-oriented model, and PipelineBlocks
implement Observer pattern. Some blocks are used only for
linking algorithms (such as the AlgorithmHostBlock class),
whereas others may also be used for the data aggregation
or have a specific purpose. So, for example, the
AccumulatorBlock class can subscribe to several blocks and signal the
result only if the results of all input blocks are ready, but
ConsumerBlock does not allow subscribe to itself and serves
as a pipeline terminator.</p>
      <p>To improve performance and to ensure the possibility of
using our system by an unlimited number of people, as well
as to save users from the need to install the library on a local
computer, we have developed and implemented a
microservice architecture. Each Block of MIRF is implemented as
a microservice. This allows to flexibly add, remove blocks,
change the network configuration, track performance issues.
The whole system consists of a set of Blocks, Repository and</p>
      <sec id="sec-2-1">
        <title>Orchestrator.</title>
      </sec>
      <sec id="sec-2-2">
        <title>A. Block</title>
        <p>Block is a microservice that supports one or more MIRF
blocks (a microservice wrapper for PipelineBlock class).
Blocks do not have an internal state and continuously process
incoming data using contained Algorithm objects.</p>
      </sec>
      <sec id="sec-2-3">
        <title>B. Repository</title>
        <p>Repository is a shared (possibly distributed) database that
provides a convenient access to data. This entity is necessary
because some blocks require more than one data set (for
example, the result of processing images in two projections)
and the microservices that support such blocks do not have to
store them locally and wait until the data is ready. They just
store data in the repository and start processing other data sets
if there is at least one such ready-made set, or wait until the
complete data set appears in the repository.</p>
      </sec>
      <sec id="sec-2-4">
        <title>C. Orchestrator</title>
        <p>Orchestrator is a microservice that distributes the load
between other microservices. It receives data and specifications
from users and sends them to the repository. Specification
is a connected acyclic graph that contains information about
data processing. A graph always has one input vertex and one
output vertex. Graph nodes are the types of blocks that should
process data at the current stage. As soon as the repository
receives data, the Orchestrator asks the blocks for status, looks
which block is the least loaded and sends it a message that
the data is loaded and ready.</p>
      </sec>
      <sec id="sec-2-5">
        <title>D. Online medical files storage</title>
        <p>Online storage is used when there is a large amount of data
which cannot be stored on the local machine. For such purpose
server for storing medical files and supporting Kotlin library
was created.</p>
        <p>
          Server: there are several realizations which could be used
as a server. The first one is to create your own server which
stores files. The reason why it is not suitable is because
there are medicine oriented PACS6 which has its own server
realizations. On the other hand, you can use NAS7. It has
possibilities to use compression while transferring files (for
example, JPEG 20008) and more advanced network protocol
therefore, data transfer speed may increase significantly [
          <xref ref-type="bibr" rid="ref23">23</xref>
          ],
but installation complexity and configuration increases, since
there are no ready-made NAS solutions. Hence decision to use
PACS server was made.
        </p>
        <p>6Picture Archiving and Communication System, URL:
https://en.wikipedia.org/wiki/Picture archiving and communication system
(accessed: 11.02.2020)</p>
        <p>7Network Attached Storage, URL:
https://en.wikipedia.org/wiki/Networkattached storage (accessed: 11.02.2020)</p>
        <p>8JPEG 2000, URL: https://en.wikipedia.org/wiki/JPEG 2000 (accessed:
11.02.2020)</p>
        <p>
          Library: as MIRF is written in the Kotlin programming in a separate MIRF block. Pipes and Filters architecture gives
language9, the goal was to use capabilities of the language us an opportunity to combine these blocks, which serve for
and the libraries written in the language to achieve maximum different purposes, in a one ECG-processing pipeline.
usability. For network communication, choice of libraries was
between those written in Java (Kotlin is free to use with such A. Database
libraries) or in Kotlin. The second option was picked, since Two biggest public datasets with annotated ECG records are
it uses the ”coroutine” paradigm 10, which is not supported in PTB Diagnostic ECG Database [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ] and MIT-BIH Arrhythmia
Java libraries and significantly simplifies writing asynchronous Database [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ], [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ]. MIT-BIH Arrhythmia database contains
code. At the moment, there are not a lot of alternatives, as a records with different types of arrhythmias whereas PTB
result, the ktor11 library was used, due to the fact that it is writ- database serves as a Myocardial infarction database where
ten and supported by the developers of the Kotlin language, most of the records belong to one class. That is why we have
therefore it is stable and well documented. Server responds chosen MIT-BIH database. It includes 48 ECG recordings with
to requests with JSON objects, so the kotlinx.serialization 30-minute duration. Three files are associated with every
palibrary was selected for serialization/deserialization, because tient: header file, file with two-lead raw signals and annotation
it is lightweight (485 KB), at the same time provides minimal file with heartbeat classifications from doctors.
necessary functionality, and is part of the extended standard In order to upload electrocardiogram data in MIRF we first
library of the language. In the library two abstractions are need to decode it. Signals have 11-bit resolution and 360Hz
used: first one represents local file which can be processed or sampling rate. Header file contains all necessary information
uploaded to the server (so called MedImage) and remote file required for correct data decoding such as checksums and
which can be downloaded or be processed on the server. Now initial values. ECG decoding will be one of the blocks in our
work on remote files processing is underway. pipeline.
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>II. ELECTROCARDIOGRAM PROCESSING</title>
      <sec id="sec-3-1">
        <title>B. Denoising</title>
        <p>
          At the time of creation, MIRF worked only with im- As an electrical signal, ECG is distorted by different kinds
ages. Nevertheless we thought that its functionality could of noises such as the Gaussian white noise and baseline wander
be expanded to solve problems related to electrocardiogram noise.
signal processing. The electrocardiogram itself is a record White noise is a sequence of independent numbers with
of electrical currents generated by heart. These currents are constant spectral density over all real values. ECG signals are
measured with electrodes placed on the surface of the different usually contaminated with Gaussian white noise which has
parts of body. Potential difference between electrodes is called a normal distribution with zero mean. This kind of noise is
a Lead. In a heartbeat of a healthy person QRS-complex caused by muscle contractions.
could be defined as well as many different waves, segments ECG is a non-stationary signal, therefore standard filtering
and intervals. The morphology of ECG signal is illustrated in methods could not be used (e.g., Fourier Transform).
ComFig. 1. monly used methods for removing white noise from ECG are
adaptive filtering, discrete wavelet transform (DWT),
SavitzkyGolay filtering [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ]. In a comparative study of mentioned
methods the best results are obtained while using DWT [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ].
        </p>
        <p>Wavelets are functions that are localized in time and
frequency domain. Discrete wavelet transform is based on a
signal representation as a linear combination of dilated and
shifted versions of mother wavelet.</p>
        <p>
          Denoising with the help of DWT is performed in several
steps. First step is decomposition of a signal which gives
us approximate and detail coefficients. Approximation
coefficients represent low frequency parts, i.e., main features of a
given signal. Some of the coefficients are being removed or
Fig. 1. ECG signal morphology [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ] scaled down using threshold filters. After that step the filtered
signal is reconstructed from new coefficients [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ]. Symlet and
        </p>
        <p>
          ECG data preprocessing and classification could be done in Daubechies mother wavelets are usually used because their
several consistent steps. Each of them then would be wrapped waveforms resemble the form of a QRS-complex which means
that ECG-signal could be well represented by them. Symlet
9Kotlin official documentation, URL: https://kotlinlang.org (accessed: was chosen as a mother function considering good results in
11.02.2020) papers [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ], [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ]. Soft thresholding function is used for noise
htt1p0sK:/o/ktolitnlinlang.oCrogr/doouctisn/eresferenceo/cfofircoiuatlines/cordoouctiunmese-ngtuaitdioen. h,tml URL: reduction. It sets to zero detail coefficients with absolute
(accessed: 11.02.2020) values less than a threshold, or reduces the coefficient by
11Ktor official documentation, URL: https://ktor.io (accessed: 11.02.2020) threshold otherwise. These parameters are used in most cases
of white noise removal in ECG and they give good results
in [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ], [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ], [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ].
        </p>
        <p>
          Another kind of noise is baseline wander. It is caused by
respiration or body movements. The method using wavelets
proposed in [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ] was chosen since it preserves important
clinical information. This algorithm is based on the idea that
baseline wander and pure ECG signal are independent parts
of the ECG signal. Baseline wander could be extracted using
discrete wavelet transform. The level of decomposition is
calculated using the preset cut-off frequency. Fig. 2 and Fig. 3
show noise cancellation tested on the record 100 from
MITBIH database.
        </p>
        <p>Many different algorithms have been proposed to classify
abnormalities in ECG records. They could be divided in two
classes.</p>
        <p>
          Algorithms from the first class are based on extraction
of morphological features such as amplitudes, segment and
interval lengths. These features are then used as an input to
the classification algorithm. As a classification method we can
use k-nearest members method [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ], method based on linear
discriminant analysis [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ] or support vector machine [
          <xref ref-type="bibr" rid="ref13">13</xref>
          ].
        </p>
        <p>
          Algorithms from the second class work with images
obtained from raw digital data. One of the most commonly used
technique for ECG image classification are convolutional
neural networks (CNN) as they are able to learn spatial hierarchies
of patterns. Researches made in [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ], [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ] show that CNN
has an advantage over other classification algorithms. For this
reason a model proposed in [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ] was implemented.
        </p>
        <p>MIT-BIH database consists of records with 14 different
types of abnormalities. Healthy heartbeats and heartbeats with
7 clinically significant types of arrhythmias were extracted
from MIT-BIH database. Each chosen heartbeat belongs to one
of 8 classes: normal beat, right bundle branch block beat, left
bundle branch block beat, premature ventricular contraction
beat, paced beat, atrial premature contraction beat, ventricular
flutter wave beat, and ventricular escape beat. In database
annotations they are shortened to NOR, RBB, LBB, PVC,
PAB, APC, VFW and VEB respectively. We obtained 100852
distinct heartbeat images from MIT-BIH database.</p>
        <p>Due to the imbalanced distribution across classes when
more than 50% of data belongs to NOR class, images that
belong to arrhythmias need to be augmented. Nine cropping
methods are applied and all images are resized to 128×128
before feeding them to a model.</p>
        <p>The model has 11 Conv2D, MaxPooling and Dense layers.</p>
        <p>The model summary could be seen in Table I. To avoid
overfitting batch normalization layers and dropout regularization
layers are added. Xavier initializer is used to set initial random
weights to layers. According to the original publication, ELU
activation function showed better results compared to ReLU
and LReLU. Cross-entropy function serves as loss function
and optimized with Adam.</p>
        <p>To evaluate model after training special cases could be
defined: true positive (TP)–model correctly detects arrhythmia,
false positive (FP)–model detects arrhythmia in a healthy
ECG, true negative(TN)–model does not detect arrhythmia in
a healthy ECG, false negative(FN)–model incorrectly classifies
ECG with arrhythmia.</p>
        <p>Certain characteristics based on these cases exist to check
if the diagnosis tool produces good results. Such metrics are
accuracy, sensitivity, specificity and positive predictive value.</p>
        <p>They are defined below:</p>
        <p>T P +T N
Accuracy = T P +T N+F P +F N ∗ 100%</p>
        <p>T N
Specificity = F P +T N ∗ 100%</p>
        <p>T P
Sensitivity = F N+T P ∗ 100%</p>
        <p>T P</p>
        <p>Positive Predictive Value = T P +F P ∗ 100%</p>
        <p>Using these metrics the model could be evaluated and
compared to the other classification solutions. The comparison
0
1
2
3
4
5
6
7
8
9
10
11
could be seen in Table II.</p>
        <p>The model does not reach the classification performance of
other solutions. Nevertheless, the results are considered to be
satisfying since the aim of this paper is to show that MIRF is a
convenient tool for a quick medical application development.</p>
        <p>The model was implemented in Python language using
open-source library Keras12. For training the network NVIDIA
Tesla P100 GPU with CUDA 10.1 was used.</p>
        <p>The pipeline that processes ECG in MIRF is illustrated with
Fig. 4. Custom functions are wrapped in AlgorithmHostBlocks
which are later connected to each other.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>III. INTRACRANIAL HEMORRHAGE DETECTION</title>
      <p>Medical image analysis competitions have gained great
popularity among researchers in the field of machine learning.
A large number of people take part in competitions and discuss
their results. Our team have decided to integrate the best
solutions from the competition into MIRF. With this approach,
the library would be expanded with new blocks. What is more,
12Keras, URL: https://github.com/fchollet/keras (accessed: 10.11.2019)
it could draw attention of other researchers and users interested
in this topic.</p>
      <p>There is a large number of venues where data analysis
contests are held. The most popular of them are: Kaggle,
Codalab, CrowdAI. Different venues differ from each other
in the way they present data and the prize pool which greatly
affects the number of participants and the level of competition.</p>
      <p>
        It was decided to add CNN based solution from RSNA
Intracranial Hemorrhage Detection because this competition
became one of the most popular competitions on Kaggle in
2019. The purpose of this competition is to classify
intracranial hemorrhage into 6 categories: epidural, intraparenchymal,
intraventricular, subarachnoid, subdural and any other
hemorrhage, including its absence. Labeled data for training and
testing was provided by the organization comitee. The success
of the solution was evaluated by the LogLoss metric [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ].
      </p>
      <p>At the moment, our team is developing a block at MIRF
which implements the solution from the competition.</p>
    </sec>
    <sec id="sec-5">
      <title>IV. RELATED WORK</title>
      <p>There are some other systems that allow to create medical
imaging processing applications and build research and clinical
software prototypes. The main criteria for the comparisons
of these systems is a support for different medical imaging
types, tool functionality, languages and type of platform
to run in. Also some of the medical imaging processing
tools are open source or have free version to be used
noncommercially, while others have only commercial versions.
For instance, the Medical Imaging Interaction Toolkit (MITK)
is a software system for development of an interactive medical
image processing software. MITK framework is a software
tool that combines the Insight Toolkit (ITK) and the
Visualization Toolkit (VTK) 13. One of the main disadvantages
of MITK is that tools are built separately for each
platform. NiftyRec could also be mentioned. It is one of the
projects developed at University College London. NiftyRec
is a software for tomographic reconstruction, providing the
fastest GPU-accelerated reconstruction tools for emission and
transmission computed tomography14. Besides that NiftyRec
works with only brain tomography, it has only Matlab and
Python interfaces. Another existing tool is Slicer 15 which is
a software modular platform for medical image processing,
and three-dimensional visualization. Slicer can be expanded
for necessary task with specifically written plugins for these
platforms, but this approach does not give the developers
enough flexibility to create and adjust their own systems and
functionality.</p>
    </sec>
    <sec id="sec-6">
      <title>V. FUTURE WORK</title>
      <p>Our future research directions will be focused on
improvement of existing functionality and adding new features for
a quick and efficient development. By means of new blocks
creation, we will provide an ability to work with text data
and histology images. These additions are related to the
clinical practice guidelines that consist of recommendations
for optimizing patient care, and according to that doctor
should take into account all patient data at diagnosis, including
laboratory tests and histological techniques. Likewise, one
of the most important goals of our future research is to
make machine learning algorithms accessible to the doctors
and medical researchers. It would save their time in routine
operations such as compiling a report and would give an
opportunity to compare doctor’s diagnosis with a machine
learning tool prediction. At the beginning of our work with
MIRF framework, our main advisors among the medical
community were radiologists. A radiologist is a physician
who obtains and interprets medical images directly. Thereby,
radiology was the first medical specialization to computerize
and, historically, radiologists use wide range of software tools.
For these reasons, most radiologists differ from the other
medical specialists, so far as having technical skills such as
programming. Working on the tasks of the ECG analysis, we
collaborated with cardiologists and had completely realized
that most doctors do not have any previous programming
experience and do not have time to get it. The actual challenge
for us is to make MIRF framework available for an average
doctor who does not have any coding experience. With that
in mind, we directed our attention to visual programming
technology, that allows non-developers to build applications.
One of advantages of visual languages is that skills in writing
code are not needed. Syntax errors are most common types of
13The Medical Imaging Interaction Toolkit (MITK), URL:
http://mitk.org/wiki/The Medical Imaging Interaction Toolkit (MITK)
(accessed: 09.02.2020)</p>
      <p>14NiftyRec 2.0, URL: http://niftyrec.scienceontheweb.net/wordpress/
(accessed: 09.02.2020)
153D Slicer, URL: https://www.slicer.org/ (accessed: 09.02.2020)
errors made by programmers. These types of errors are avoided
with block-based approach. Doctors will be able to create tools
based on machine learning algorithms by dragging icons and
fitting them together.</p>
      <p>
        The block-based approach of visual programming gained
popularity while introducing programming to kids. But
recently, the largest technology company and research groups
have been releasing graphical and drag and drop development
tools for different tasks, including machine learning (e.g.,
Watson Studio by IBM, Microsoft drag and drop machine
learning tool, MIT project Northstar [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ], University of
Copenhagen [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ]).
      </p>
      <p>
        MIRF framework is evolving in the ecosystem of Software
Engineering Department, we are well acquainted with the
REAL.NET research project. REAL.NET framework uses
multilevel metamodeling approach for fast creation of
graphical programming tool which includes new language, editor
and code generator for wide range of tasks and areas [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ].
Through cooperation with REAL.NET team we plan to make
convenient and highly specialized visual platform for creating
medical applications based on machine learning algorithms.
Hence, this will allow more doctors and medical researchers
to improve daily clinical practice and to exploit new ideas by
a way of prototyping new tool within a few hours and ensure
smooth integration of it into the doctor’s work environment.
      </p>
    </sec>
    <sec id="sec-7">
      <title>CONCLUSION</title>
      <p>In this paper we described additions and improvements
made to the MIRF library.</p>
      <p>Firstly, we moved MIRF to microservices. A system of
Blocks, Repository and Orchestrator, where each Block is
implemented as a microservice, was developed. Thus, we
aimed to improve performance and made it easier to add,
remove blocks, change the network configuration and track
performance issues. However, performance experiments have
not yet been conducted. This is an important area of further
work.</p>
      <p>Secondly, we examined storage implementation variants
and selected the best one — PACS. Basic repository access
library functionality was implemented. PACS server gave us
opportunity to conveniently process, upload and download
medical data to our server. It would also allow us to process
files remotely in the future.</p>
      <p>We also added new medical functionality to MIRF and
showed that this library is capable of processing medical data
apart from images. We investigated various techniques which
are used for ECG processing and chose the ones that showed
the best results. Algorithms for denoising and decoding were
implemented and a convolutional neural network for
arrhythmia classification was trained.</p>
      <p>Finally, our plans for future MIRF development were
described such as adding blocks for processing histology images.
We also want our tools to be used by doctors in real clinical
practice. For that purpose we are planning to develop visual
language which will allow to create tools for medical data
processing by dragging icons and fitting them together.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>S.</given-names>
            <surname>Musatian</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Lomakin</surname>
          </string-name>
          ,
          <string-name>
            <surname>A</surname>
          </string-name>
          . Chizhova, “Medical images research framework”
          <source>in CEUR Workshop Proceedings</source>
          , Volume
          <volume>2372</volume>
          (4th Conference on Software Engineering and Information Management,
          <string-name>
            <surname>SEIM</surname>
          </string-name>
          <year>2019</year>
          ), Apr.
          <year>2019</year>
          , pp.
          <fpage>60</fpage>
          -
          <lpage>66</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>T. N.</given-names>
            <surname>Gia</surname>
          </string-name>
          et al. “
          <article-title>Fog computing in body sensor networks: An energy efficient approach</article-title>
          ” in IEEE International Body Sensor Networks Conference, pp.
          <fpage>1</fpage>
          -
          <lpage>7</lpage>
          ,
          <year>January 2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>R.</given-names>
            <surname>Bousseljot</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Kreiseler</surname>
          </string-name>
          ,
          <string-name>
            <surname>A. Schnabel,</surname>
          </string-name>
          (
          <year>1995</year>
          ).
          <article-title>“Nutzung der EKGSignaldatenbank CARDIODAT der PTB u¨ber das Internet” in Biomedical Engineering</article-title>
          , Vol.
          <volume>40</volume>
          (
          <issue>s1</issue>
          ),
          <source>Jan 1</source>
          ,
          <year>1995</year>
          , pp.
          <fpage>317</fpage>
          -
          <lpage>318</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>G. B.</given-names>
            <surname>Moody</surname>
          </string-name>
          and R. G. Mark, “
          <article-title>The impact of the mit-bih arrhythmia database</article-title>
          ,
          <source>” IEEE Engineering in Medicine and Biology Magazine</source>
          , Volume
          <volume>20</volume>
          , no.
          <issue>3</issue>
          , pp.
          <fpage>45</fpage>
          -
          <lpage>50</lpage>
          , May-June
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>A. L.</given-names>
            <surname>Goldberger</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L. A.</given-names>
            <surname>Amaral</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Glass</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. M.</given-names>
            <surname>Hausdorff</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P. C.</given-names>
            <surname>Ivanov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. G.</given-names>
            <surname>Mark</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. E.</given-names>
            <surname>Mietus</surname>
          </string-name>
          , G. B. Moody, C.
          <article-title>-</article-title>
          K. Peng, and
          <string-name>
            <given-names>H. E.</given-names>
            <surname>Stanley</surname>
          </string-name>
          , “PhysioBank, PhysioToolkit, and
          <article-title>PhysioNet: Components of a New Research Resource for Complex Physiologic Signals</article-title>
          .
          <source>Circulation”</source>
          , Volume
          <volume>101</volume>
          , no.
          <issue>23</issue>
          , pp.
          <fpage>e215</fpage>
          -
          <lpage>e220</lpage>
          ,
          <year>2000</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>A.</given-names>
            <surname>Mohammed</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. H.</given-names>
            <surname>Bryan</surname>
          </string-name>
          , “
          <article-title>Performance Study of Different Denoising Methods for ECG Signals</article-title>
          ” in Procedia Computer Science,
          <year>2014</year>
          , Volume
          <volume>37</volume>
          , pp.
          <fpage>325</fpage>
          -
          <lpage>332</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>M.</given-names>
            <surname>Ste</surname>
          </string-name>
          <article-title>´phane, “A Wavelet Tour of Signal Processing (Third Edition)</article-title>
          ” in Academic Press,
          <year>2009</year>
          , pp.
          <fpage>89</fpage>
          -
          <lpage>153</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>M.</given-names>
            <surname>Aqil</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Jbari</surname>
          </string-name>
          ,
          <string-name>
            <surname>A</surname>
          </string-name>
          . Bourouhou, “
          <article-title>ECG Signal Denoising by Discrete Wavelet Transform</article-title>
          ” in
          <source>International Journal of Online Engineering</source>
          ,
          <year>2017</year>
          , p.
          <fpage>51</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>A.</given-names>
            <surname>Fedotov</surname>
          </string-name>
          , “
          <article-title>Myographic Interference Filtering from ECG Signals Using Multiresolution Wavelet Transform” in Biomedical Engineering</article-title>
          ,
          <year>January 2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>B.</given-names>
            <surname>Mozaffary</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. A.</given-names>
            <surname>Tinati</surname>
          </string-name>
          , “
          <article-title>ECG Baseline Wander Elimination using Wavelet Packets</article-title>
          ” in World Academy of Science, Engineering and Technology,
          <year>2005</year>
          , pp.
          <fpage>14</fpage>
          -
          <lpage>16</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>J.</given-names>
            <surname>Park</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Lee</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Kang</surname>
          </string-name>
          , “
          <article-title>Arrhythmia detection from heartbeat using k-nearest neighbor classifier</article-title>
          ”
          <source>in IEEE International Conference on Bioinformatics and Biomedicine</source>
          ,
          <year>2013</year>
          , pp.
          <fpage>15</fpage>
          -
          <lpage>22</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>P.</given-names>
            <surname>DeChazal</surname>
            , M. O'Dwyer
          </string-name>
          ,
          <string-name>
            <given-names>R. B.</given-names>
            <surname>Reilly</surname>
          </string-name>
          , “
          <article-title>Automatic Classification of Heartbeats Using ECG Morphology and Heartbeat Interval Features” in IEEE Transactions on Biomedical Engineering</article-title>
          , Vol.
          <volume>51</volume>
          ,
          <issue>Issue</issue>
          : 7,
          <string-name>
            <surname>July</surname>
          </string-name>
          <year>2004</year>
          , pp.
          <fpage>1196</fpage>
          -
          <lpage>1206</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>J.A.</given-names>
            <surname>Nasiri</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Naghibzadeh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.S.</given-names>
            <surname>Yazdi</surname>
          </string-name>
          , “
          <article-title>ECG arrhythmia classification with support vector machines and genetic algorithm”</article-title>
          ,
          <source>UKSim European Symposium on Computer Modeling and Simulation</source>
          ,
          <year>2009</year>
          , pp.
          <fpage>187</fpage>
          -
          <lpage>192</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>T. J.</given-names>
            <surname>Jun</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H. M.</given-names>
            <surname>Nguyen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Kang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Kim</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Kim</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.-H.</given-names>
            <surname>Kim</surname>
          </string-name>
          , “
          <article-title>ECG arrhythmia classification using a 2-D convolutional neural network</article-title>
          ”,
          <year>2018</year>
          . [Online]. Available: https://arxiv.org/pdf/
          <year>1804</year>
          .06812.pdf [Accessed:
          <fpage>09</fpage>
          .
          <fpage>02</fpage>
          .
          <year>2020</year>
          ]
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>J.</given-names>
            <surname>Liu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Song</surname>
          </string-name>
          , G. Sun,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Fu</surname>
          </string-name>
          , “
          <article-title>Classification of ECG Arrhythmia Using CNN, SVM</article-title>
          and LDA” in
          <source>Artificial Intelligence and Security</source>
          ,
          <year>2019</year>
          , pp.
          <fpage>191</fpage>
          -
          <lpage>201</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>U. R.</given-names>
            <surname>Acharya</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. L.</given-names>
            <surname>Oh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Hagiwara</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. H.</given-names>
            <surname>Tan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Adam</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Gertych</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. S.</given-names>
            <surname>Tan</surname>
          </string-name>
          , “
          <article-title>A deep convolutional neural network model to classify heartbeats” in Computers in Biology</article-title>
          and Medicine,
          <year>2017</year>
          , pp.
          <fpage>389</fpage>
          -
          <lpage>396</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>S.</given-names>
            <surname>Kiranyaz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Ince</surname>
          </string-name>
          , M. Gabbouj, “
          <article-title>Real-Time Patient-Specific ECG Classification by 1</article-title>
          -
          <string-name>
            <given-names>D</given-names>
            <surname>Convolutional</surname>
          </string-name>
          Neural Networks”
          <source>in IEEE Transactions on Biomedical Engineering</source>
          ,
          <year>2016</year>
          , Vol.
          <volume>63</volume>
          (
          <issue>3</issue>
          ), pp.
          <fpage>664</fpage>
          -
          <lpage>675</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <surname>Wei</surname>
            <given-names>Jiang</given-names>
          </string-name>
          , Seong Kong, “
          <article-title>Block-Based Neural Networks for Personalized ECG Signal Classification</article-title>
          ” in
          <source>IEEE Transactions on Neural Networks</source>
          ,
          <year>2007</year>
          , Vol.
          <volume>18</volume>
          (
          <issue>6</issue>
          ), pp.
          <fpage>1750</fpage>
          -
          <lpage>1761</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <given-names>V.</given-names>
            <surname>Vovk</surname>
          </string-name>
          , ”
          <article-title>The fundamental nature of the log loss function”, 2015</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <given-names>T.</given-names>
            <surname>Kraska</surname>
          </string-name>
          , “
          <article-title>Northstar: an interactive data science system</article-title>
          ”
          <source>in Proceedings of the VLDB Endowment</source>
          , Vol.
          <volume>11</volume>
          ,
          <string-name>
            <surname>Issue</surname>
            <given-names>12</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Aug</surname>
          </string-name>
          . 2018
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [21]
          <string-name>
            <given-names>S.</given-names>
            <surname>Tamilselvam</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Panwar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Khare</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Aralikatte</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Sankaran</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Kumarasamy</surname>
          </string-name>
          , K. Senthil, “
          <article-title>A Visual Programming Paradigm for Abstract Deep Learning Model Development”</article-title>
          . [Online]. Available: https://arxiv.org/pdf/
          <year>1905</year>
          .02486.pdf [Accessed:
          <fpage>09</fpage>
          .
          <fpage>02</fpage>
          .
          <year>2020</year>
          ].
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          [22]
          <string-name>
            <surname>Kuzmina</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Litvinov</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          “
          <article-title>Implementation of ”smart greenhouse</article-title>
          ”
          <source>in CEUR Workshop Proceedings</source>
          , Volume
          <volume>2372</volume>
          (4th Conference on Software Engineering and Information Management,
          <string-name>
            <surname>SEIM</surname>
          </string-name>
          <year>2019</year>
          ), Apr.
          <year>2019</year>
          , pp.
          <fpage>67</fpage>
          -
          <lpage>73</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          [23]
          <string-name>
            <surname>Veeramani</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Masood</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Sidhu</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <year>2014</year>
          .
          <article-title>“A PACS alternative for transmitting DICOM images in a high latency environment“</article-title>
          ,
          <source>IEEE Conference on Biomedical Engineering and Sciences</source>
          , pp.
          <fpage>975</fpage>
          -
          <lpage>978</lpage>
          . Kuala Lumpur: IEEE. [Online]. Available: https://espace.curtin.edu.au/handle/20.500.11937/45899 [Accessed:
          <fpage>09</fpage>
          .
          <fpage>02</fpage>
          .
          <year>2020</year>
          ].
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>