NEURAL NETWORK AND CONVOLUTIONAL ALGORITH TO EXTRACT SHAPES BY E-MEDICUS APPLICATION

. The solution shows the architecture of the system collecting and analyzing data. There was tried to develop algorithms to image segmentation. These algorithms are needed to identify arbitrary number of phases for the segmentation problem. With the use of algorithms such as the level set method, neural networks and deep learning methods, it can obtain a quicker diagnosis and automatically marking areas of the interest region in medical images.


Introduction
In medical clinical research and practice, imaging has become an essential part to diagnose and to study anatomy and function of the human body. The image data is of immense practical importance in medical informatics. Through continuous improvement of algorithms, we come to reduce the noise in the medical image. The proposed algorithms have been used to real pictures with promising results in the medical images segmentation. With the use of modern algorithms, the physician is able to obtain a quicker diagnosis. By automatically marking areas of interest you will notice all the changes in medical images [1][2][3][4][5][6][7]. E-Medicus system consists of artificial intelligence algorithms, segmentation algorithms, framework, agents, topological algorithms, databases, visualization systems and user interface.
Medical image segmentation, which aims at automated extraction of object boundary features, plays a fundamental role in understanding image content for searching and mining in medical image archives. A challenging problem is to segment regions with boundary insufficiencies, i.e., missing edges and/or lack of texture contrast between regions of interest (ROIs) and background. Lately, much interest has been raised in the medical imaging community about segmentation algorithms that use active contours or surfaces. In e-Medicus system, the segmentation algorithms were used, such as neural networks, deep learning, algorithm Beyesa, level set method, fuzzy sets and algorithm kmeans ( Fig. 1).

Processing and analysis of data images
Processing and analysis of medical images includes image creation and reconstruction, image restore, image enhancement, image compression and storage, visualization [10][11][12][13][14]. In this work the image segmentation and analysis by artificial algorithms (such as neural networks and deep learning) and level set methods are presented.
The level set method tracks the motion of an interface by embedding the interface as the zero-level set of the signed distance function [8,9,13,14]. The idea is merely to define a smooth function , that represents the interface as the set where . The motion is analyzed by the convection the ϕ values (levels) with the velocity field. The Hamilton-Jacobi equation of the form: (1) where ν is the velocity on the interface. The numerical algorithm is following: from the level set function (initial) at a time level t, find necessary interface information,  calculate the velocity,  extend velocity,  update the level set function,  reinitialization.  check convergence.
In Fig. 2, the level set method to compare two images and select differences between them was presented.
The artificial neural network (ANN) imitates the action of the human brain. It consists of neuronswhich are the counterparts of nerve cells. Individual neurons are interconnected by creating a network. An artificial neural network usually consists of many types of neurons that exchange information between themselves. Neurons in the network can be grouped into so-called layers. There are hidden layers between the input layer and the output layer. Networks of this design are the popular variant of the ANN called multilayer perceptron networks (MLP). The characteristic feature of multilayer perceptrons is that the neurons in the same layer do not have connections between them.
The common feature of Machine Learning methods is that they can be used to teach computers in a manner that is analogous to how people learn by example. One of the Machine Learning techniques is Deep Learning, which is usually associated with Convolutional Neural Networks (CNN). Describing the extraordinary neural network workflow as "deep" distinguishes CNN model from the well-known Artificial Neural Networks (ANN) shallow architecture. Deep learning takes place if the neural network structure contains so-called convolutional layers and pooling layers. Another difference is the amount of hidden layers.

Fig. 2. Level set methodcomparison of images: a) image 1, b) image 2, c) differences
While typical ANNs usually contain no more than 2-3 hidden layers, CNN can have them more than a hundred. Significant advantage of deep learning models is their ability to learn features directly from the data. It means that the training process is conducted automatically, without the need for manual feature extraction. To make it possible and efficient the CNN must be trained by using large sets of labelled data [4].

Neural network to recognize shapes
In our example, 11749 geometric figures were generated, such as: square, circle, rectangle, ellipse, for which all moments of inertia and variance were determined after developing the object's edge into polar coordinates. A neural network was created for which the input data are moments and variance of previously interchangeable flat figures. The output data are belonged to a particular class of figures. We rely on binary photos (Fig. 3). The network has two layers. The number of layers are calculated from the formulas: (3) where nfnumber of neurons in the first layer, nsthe number of neurons in the second layer, ld-number of input variables, n-number of the set.

Fig.3. Shapes of the binary photos
The method to update weights and free words on the basis of trial and error was chosen as a conjugate gradient method -"trainscg". The validation threshold from 6 to 7 has been changed. For learning, 0.7, 0.15 and 0.15 of the set were used as a training, testing and validation set respectively. By minimizing the crossentropy, the object sought the best classification. Science ended after 1135 iterations. The criterion for retaining science was to reach the validation threshold (network overriding was avoided). As a visualization of the results, a gradient and classification chart on the whole set is used (Fig.4).
Neural network gained 93.7% correctness in classification. The first class represents ellipses, the second circle, the third rectangle, and the fourth are squares. It can be noticed that the given network unmistakably classifies districts (as the object was a circle it was qualified as a circle).

Convolutional networks to extract shapes
Based on the emulsion images, a binary mask with clearly emphasized circles is marked in Fig. 5. We use a two-layer network, both layers are based on 33 size convolution filters. The first layer has 5, the second 10 neurons.
Below, we consider convolutional networks without pooling (without reducing the matrix n-times by selecting the maximum from n  n blocks), a 4-layer network with neuron numbers of 10, 8, 5, 4 respectively for the first, second, etc. layers. At the entrance there is a 24  36 size photo, It gets a 16  28 size mask. Two approaches to the formulas for the activation function are presented.

Activation function I:
, where x is the value for individual pixels.
Activation function II: The threshold was selected experimentally as a 10% quantum from the condition of all generated drawings. The presented pictures are examples of the results of the convolutional network ( Fig. 7 and Fig. 8) with the first activation function for the original photo (Fig. 6). It maps the block over a 24  36 size moving by a vector {16,28}, so it do not play back the edges at the moment. We give up this activation function because, as it turns out, pictures that do not contain circles are reproduced as white noise.
For the second activation function, the results was received after two iterations in Fig. 9. For time reasons, only the second iteration. Changing the activation function may reduce or even remove the white noise that occurred earlier. Assigning a constant value of 0 for the would reset the part of the image that contains only a part of the circle or a very small circle.

Conclusion
In medical clinical research and practice, imaging has become an essential part to diagnose and to study anatomy and function of the human body. The proposed algorithms have been used to real pictures with promising results in the medical images segmentation. With the use of modern algorithms, the physician is able to obtain a quicker diagnosis and to enable comparing the figures. By automatically marking areas of interest it will notice all the changes in medical images. In this work, the effective algorithms (such as the level set methods, neural networks and convolutional neural networks) to analysis and compare medical images were developed.