SYNTHESIS OF NEURAL NETWORK STRUCTURE FOR THE ANALYSIS OF COMPLEX STRUCTURED OCULAR FUNDUS IMAGES

This paper proposes an algorithm for synthesizing a neural network (NN) structure to analyze complex structured, low entropy, ocular fundus images, characterized by iterative tuning of the adaptive model’s solver modules. This algo-rithm will assist in synthesizing models of NNs that meet the predetermined characteristics of the classification quality. The relevance of automating the process of ocular diagnostics of fundus pathologies is due to the need to develop domestic medical decision-making systems. Because of using the developed algorithm, the NN structure is synthesized, which will include two solver modules, and is intended to classify the dual-alternative information. Automated hybrid NN structures for intelligent segmentation of complex structured, low entropy, retinal images should provide increased efficiency of ocular diagnostics of fundus pathologies, reduce the burden on specialists, and decrease the negative impact of the human factor in diagnosis.


INTRODUCTION
Over recent decades, artificial NNs have gained wide practical applications in completely different interdisciplinary and nontrivial areas, namely: identification of the composition and prediction of the properties of new compounds and materials; management of technological processes and product quality control; environmental assessment and management of natural resources; assessment and forecasting of economic parameters, both at the level of an individual product entering the market, and within the operation of an entire enterprise, or a group of enterprises; sociodynamic and econometric modeling; and predictive medicine [1][2][3][4][5][6][7][8]. The combination of such distinguishing factors such as structural flexibility, resistance to noise in the input parameters, ability to generalize and isolate hidden, nontrivial dependencies of the input and output parameters, learning ability, and adaptability to changes in external factors make it possible to use these factors to solve fundamentally different problems by combining components of the NNs [43]. Besides forecasting a time series and revealing complex dependencies, an important application of NN technology is the solution of object classification difficulties based on a set of features, and the solution of pattern recognition challenges, including segmentation of video images [41] and the recognition of written text and speech [9][10][11][12][13]. Intelligent segmentation is the process of dividing an object into components by assigning classification labels to each data unit. For an image, a label is assigned to each pixel; the pixels with the same label will have similarities to certain characteristics, such as color, intensity, or texture [14]. Such pixels combine into sets of segments, and neighboring image segments will differ in the same characteristics. Due to new emerging opportunities, artifi-*tatarkanov@ikti.ru cial NNs have become in high demand in recent years to analyze complex structured images resulting from medical imaging [15][16][17][18]42]. A prime example of a successful application of NNs is the RatLesNetv2 model [19]. The "RatLesNetv2" model is a convolutional neural network that highlights the area of brain damage on a tomographic image. The training of the neural network was carried out by its authors on tomographic images of the brain of rodents. The "RatLesNetv2" neural network is trained end-to-end and does not require preprocessing tomographic images before training. The convolutional architecture of the neural network allows you to automate the segmentation of tomographic projections. The "Rat-LesNetv2" model consists of 3 layers with downsampling and 3 layers with upsampling, which are interconnected by means of skip links ( Figure 1). To assess the effectiveness of the "RatLesNetv2" neural network, its work was compared with earlier analogues "RatLesNet" and "VoxResNet". The models were tested on 916 brain tomographic scans. Scans were taken from adult male laboratory rats weighing from 275±25 grams. At the same time, 9 different stages of brain damage were presented on the scans. Comparison of models on the problem of segmentation of brain damage zones in rodents showed the advantage of the RatLesNetv2 neural network. Nevertheless, to solve each specific problem it is necessary to develop a unique tool in the form of a specialized NN, which can be subsequently improved or replaced by a new, even more efficient solution [20]. An important condition of any specialized development is the need to adapt it to specific regional standards and for it to work with the equipment and data formats used by the organization. The relevance of the present work on the automation of ocular diagnostics of fundus pathologies is due to Figure 1: RatLesNetv2 network architecture [19] the need to develop domestic medical decision-making systems [21]- [24].The aim of the work is to increase the efficiency of ocular diagnostics of fundus pathologies, to reduce the burden on specialists, and to reduce negative human-factor impacts when making diagnoses by creating and using automated hybrid NN structures for intelligent segmentation of complex structured medical retinal images. The object of the research is an algorithm for noninvasive diagnostics of ocular fundus pathologies based on retinal images obtained by medical imaging techniques.

LITERATURE REVIEW AND INFORMATION ANALYSIS
Due to the active development of NN technology, there are now many types of NNs tailored to various practical applications [25]. With regard to tasks of intelligent segmentation, sets of reference samples also can be used as training samples, indicating which class they belong to. This kind of training, when a NN is fed with an already marked dataset, is called training with a teacher, or tutor [26]. Otherwise, when a NN uses an unlabeled dataset to find hidden connections and classification features, it is called learning without a teacher or tutor. There is also a third, mixed variant when the NN is fed with a small sample of marked data and a large set of unmarked data for training as the training material. In addition, by correlating the parameters of a new object with the features that determine whether it belongs to one class or another, the NN makes an appropriate decision about the object's classification. In some cases, ambiguous or incorrect determination of object class is possible; however, this problem can be solved by setting and retraining the NN without entering additional evaluators, which favorably distinguishes this technology from traditional mathematical algorithms by having a clear solve order [27]. In the case of binary image classification, most problems are reduced to the choice of one of two possibilities: whether the image segment belongs to a given class or not. However, since the feature space obtained from the analysis of the complex structured low entropy image has a rather complex configuration, it is necessary to use non-linear approximating functions, synthesized by a NN. There is a multitude of NNs, each of which will have properties of universal approximators of functions of many variables [28], [29]. In this case, each continuous function f of n variables over the unit cube of the dimensional space In=I×I×…×I can be represented in the following form: Where hq(u) are continuous functions of one variable, and the functions ϕpq(xp) are fixed increasing, continuous, defined on I=[0, 1], and independent of the function f choice. The NN must include a non-linear transducer of all available signals, a non-linear adaptive adder, and a decision box to implement this provision. The decision box must distribute the same signal to several addresses at the same time. Such a NN is a heterogeneous NN [30].  (1) can be significantly transformed by presenting it in another form. In particular, the functions hq can be replaced by one generalized continuous function h, which it is reasonable to represent as an absolutely convergent Fourier series. Together with this, the functions ϕpq(xp)can be "split" into products lpϕq, where lp are rational independent numbers (p = 1, 2,…, n), and ϕq (q = 1, 2,…, 2n+1) represents continuous and nondecreasing functions on I=[0, 1]. Accordingly, the representation of any continuous function fϵC[In] can be written as expression (2): Figure 3 shows the network structure corresponding to the formula (2). However, it is a multilayer NN, which is difficult to implement in practice. It is because q functions in formula (2) are continuous but not smooth. Since the length of the function machine code is inversely proportional to its smoothness, accordingly, very low accuracy of the Kolmogorov representation is obtained [31]. In order to simplify the approximation process as much as possible, it is reasonable to replace the hypersurface corresponding to equations (1) and (2) with a hyperplane described by expression (3): where ai and b-constants (i=1, n). It is important to note that when the number of initial data increases, expression (3) Arbitrary identical values for each partial class can be assigned to the vector components in the model (4). If a classifier for one class is constructed based on equation ..,f(x m )) T components are equal to zero. It allows you to pass from the system of inhomogeneous equations (4) to the system of linear homogeneous equations (5) In order to find a nontrivial solution to this system, the condition should be met that the rank of the coefficient matrix is less than n. If n data vectors are used to determine n coefficients, then for the system (5) to be consistent, it is sufficient that condition (6) is met: In modern classification systems m > n and the system is redefined, which means that no valid nontrivial solution can be found to it. In order to reach a solution, it is necessary to perform a certain sequence of actions. It is reasonable to represent the right part of expression (5) as some membership function with a basic variable lying in the range ±ε.Only if these conditions are met, the region of the feature space will be enclosed between two parallel hyperplanes, which is required to find a non-trivial solution. In the most favorable case, all the vectors of the training sample will be on the hyperplane, which is defined by the vector A=(a 1 ,a 2 ,...,a m ,b) with the determinant X=0 and ε=0. Given this circumstance, let us move from the system of equalities (4) to the system of inequalities (7): The system of inequalities (7) describes a set of parallel hyperplanes, the distance between which does not exceed some valueε: where l=1,2,...,m; k=1,2,...,m; l≠k. Figure 4 presents a network structure implementing the described approximation method in which the initial system (7) is split into λ non-parallel hyperplanes.

Figure 4: Network structure of the universal classifier
The choice of ε value is determined by the distance between different classes. Assuming that the distance between the diagnosed class R and the alternative class R is equal to one, and all objects of these classes are placed within hyperspheres of a single diameter, the value ε can be determined by equation (9). It follows from equation (9) that the value choice is a compromise between increasing the number of neurons in the second layer and increasing the approximation accuracy.
( ) ε= / λ+ 1 1 When using nonlinear transformations in the fourth NN layer, shown in Figure 4, an operation called "fuzzy or" is performed. (10) According to the structure shown in Figure 4 and equations (7-10), the "fuzzy or" function is denoted in the form (11): 2 1 (11) and neuron outputs of the second layer as expression (12): respectively. An approximating model for the network structure of Figure 4 is expressed by the general equation (13), which corresponds to the Kolmogorov-Arnold theorem, i.e. a multidimensional continuous function can be represented as a superposition of continuous functions of one variable. More details about the content and features of the use of the Kolmogorov-Arnold theorem are described in the articles [31][32][33][34]. The main advantage of this equation is that its functions have no dependence on the approximated function.

NN DEVELOPMENT METHODOLOGY FOR SOLVING DUAL-ALTERNATIVE CLASSIFICATION PROBLEMS
Since one of the pixel attributes is its brightness (or RGB-code in the case of a color image), the simplest and most common segmentation method is a threshold or bi-threshold processing, leading to image binarization. As fragments in the image are in different illumination zones, this requires tuning out from the background component, due to which various gradient methods are used for the segmentation of such images [35,36]. Initial pixel attributes are relevant indicators for image segmentation, and they are successfully used in "splitting and merging" and "region growing" methods.
With the aim to reduce image segmentation errors, adaptive methods should be employed, depending on the type of the selected segment. Since the diversity of properties of selected segments and the noisiness of their boundaries are important image features, hybrid methods should be adopted for their segmentation, as they are also applicable to low entropy images. In order to implement this approach, classification NNs are used, requiring the neighborhood attributes of the analyzed pixel as the inputs (the neighborhood is defined by an a priori specified mask and can range from one pixel to 7 but must be an odd number [37]). A signal that determines whether the pixel belongs to a given class is obtained as the output.
Depending on the segment selection method adopted, it is possible to propose many corresponding NN implementations. First, a basic variant of NN structure (oriented on a single pixel) is considered, given that increasing the complexity of the neighborhood and method of segment area formation does not lead to qualitative improve- In order to separate the fundus image pixels into the "segment" and "non-segment" classes, the network structure shown in Figure 5 can be adopted, whereby the two vectors of informative features serve as the NN input and the first three-component vector of informative features is fed to the first solver module. This vector comprises of the RGB codes of the pixels to be classified. As the first solver module is configured for the "segment" class, its structure should correspond to the universal structure described by equation (13). In this case, it is necessary to perform a nonlinear mapping of the input vector into the feature space of the same or higher dimension as, according to Cover's theorem [38], this increases the probability of linear separability of the images. The first solver module is designed for marking segments in the image when separating the brightness level (background) in the studied pixel neighborhood into three classes. Three nonlinear transformations are formed for each class of backgroundΨk: The structure model presented in Figure 6 uses three background classes Ψ1, Ψ2, Ψ3 with coefficients КУ(Ψ), which are calculated in the second solver module. In this case, for each informative feature (or vector of informative features, in general case) three nonlinear mappings corresponding to the three background classes should be constructed: ADALINE -ADAptive LInear NEurons [39] were used to form approximating planes. The "MAX" block in Figure 6 assigns to the output variable z the value corresponding to the maximum value of neuron outputs. The block of nonlinear mapping selection connects to the input vector that nonlinear mapping, which corresponds to the classified background. To obtain the nonlinear mappings (15)(16)(17), the histograms of RGB-code intensity distribution in pixels of images and expert assessments are calculated (Figure 7). Using the histograms of RGB codes of segments, the corresponding nonlinear mappings can be obtained. Gaussians of histograms were approximated by sigmoidal functions ( Figure 8). As shown in figure 8, the histogram can be approximated by either one or two mixed functions.
To receive the final form of the nonlinear mapping, it is necessary to introduce a normalization factor, which can be calculated from equation (18): where Δ i -the i-th histogram interval, N ωl (Δ i ) -the number of pixels of ω l class, caught in the interval Δ i , N ωΣ (Δ i )-the number of pixels caught in and not belonging to the ω l class. Step 1: Synthesis of training samples. In interactive mode, using the "image pixel information" option available in MATLAB with the "Image Processing Toolbox" module, a data matrix was obtained for the pixels of the image segment belonging to the ocular fundus vessels. The data matrix for the parameters of the average background of the analyzed pixel in the halftone image window is generated.
Step 2: Ranking of the background parameters. At this stage, the dynamic range of the background parameter is divided into several subranges, depending on the type of the selected segment. The process of subdividing is carried out according to the cluster analysis results.
Step 3: Obtaining histograms of RGB codes of segments for each of the selected subranges of the background parameter.
Step 4: Synthesis of nonlinear mappings. The nonlinear transformations used in this article are shown in Figure 9.
The second solver module is constructed according to the scheme of multilayer NNs of direct propagation. Two models of the second key module construction were used for background classification: non-block structure (NBS) and block structure (BS). One NN was constructed to classify all classes for the solver in the NBS. The number of the NN output layer neurons is equal to the number of classes. The structure of the NN solver is shown in Figure 10. The structure of the BS neural solver is shown in Figure  11. The analysis has shown that it is advisable to use

ALGORITHMIC IMPLEMENTATION OF THE DEVELOPED MODEL OF SOLVER MODULES
For the use of the network model of pixel classification in a complex image to obtain data on their belonging to a certain segment, the software has been developed. The model-generation algorithm designed to systematize pixels in the image is shown in Figure 12. Samples for the first and second solver modules are selected in the first and second blocks of the algorithm. Generally, each sampling element is output as a separate line, in which all pixel coordinates and RGB codes are sequentially recorded. Data sampling intended for training can be selected from one or several images. In this case, the program can either accumulate several files from different images received in one illumination flow or supplement an existing data file with pixel properties of another image. The expert fixes the systematization of different illumination parameters in the image area. He has an opportunity to work with the image in grayscale after the color image and to give the brightness assessment of individual im- T age areas in numerical expression. The systematization of the illumination parameters is fuzzy; due to this each class of a particular pixel is defined by a number denoting the illumination level around the analyzed pixel to a set class, which numerical value is in the range from 0 to 1.
In the second part of the algorithm (Figure 12), the training samples for the second solver module are selected. The vector of informative features is formed by analyzing RGB codes of pixels. According to the above information, the second solver module denotes the illumination level parameters in the neighborhood of the analyzed pixel into three classes.
In the third part of the algorithm ( Figure 12) the nonlinear mappings for the first solver module are generated. The configuration of the nonlinear mappings is shown in Figure 13. For each class of morphological structures ( Figure 13) a triad of nonlinear mappings is applied: one for each element of RGB codes. There are three non-linear mappings in the triad, and each of them corresponds to a certain class of illumination level. Then a setting of NN of direct propagation takes place, which carries out the classification of illumination parameters of a particular area of the image of the fundus of the eyeball, where the pixel to be analyzed is located. After completion of the second solver module generation process, an indicator is fixed that allows for dispatching functions that create a transition from the setting of the first solver module to the second one during the system  Figure 14.
The setting process starts with loading the training samples {{X ω1 } i } j and {{X ω2 } i } j the "segment" and "non-segment" classes and their corresponding images {G j } . For each element from the training samples, the class of the neighborhood illumination level is determined (block 2 in Figure 14) using the second solver module and then the corresponding triad of nonlinear mappings {ϕ ω ψ i k (Λ)} . The collection of neuron weights is done in block 5 (Figure 14). The number of neurons in the network is not defined a priori and depends on the classification error, which is set in block 3 ( Figure 14). In a particular case, an acceptable classification error even a network with one neuron can provide. After that, it is necessary to generate the updated training samples from the incorrectly specified elements of the samples and to configure the neuron of ADALINE type. These actions are performed in blocks 5-9 of the algorithm ( Figure 14). After setting the first module, testing of the system as a whole is performed (block 7, Figure  14). Since these actions do not differ from the testing of the first solver module, it is possible to proceed to the subsequent iterative setting of the second module parameters, and conversely (blocks 5, 9, and 10 of the algorithm shown in Figure 14). Thus, an algorithm for synthesizing the structure of hybrid NN for the analysis of complexly structured low en-

EXAMPLES OF OCULAR FUNDUS IMAGE ANALYSIS
Fluorescein angiography (FA) is a widespread noninvasive method of ocular fundus vessel examination [40].
Its essence consists of injecting contrast in the form of 5-10 ml of 5-10% fluorescein sodium salt solution into a vein. After 3 seconds, photography of the fundus should be started. The interval between photographs should be between 0.3 and 2 seconds. After this procedure, the specialist receives a large number of photographs of the fundus taken at short intervals, which allows for the eyeball comprehensive analysis. An example of FA image analysis of the fundus vessels using the software and the developed algorithm is shown in Fig. 15. The analysis of eyeball images for pathology consists of the two most significant steps. At the first step, a specialist finds the boundaries of the segments in the image, which, in his professional opinion, belong to the required material. At the second step, this hypothesis is checked-the specialist examines the data in more detail and decides whether a particular segment belongs to the analyzed class. The classification process is reduced to testing the hypothesis that the image pixel belongs to the sought class. The specialist has a task, simple enough, at first sight, to determine whether the image belongs to the class under study or not. Taking into account that each ν-th pixel is characterized by m spatial brightness attributes, then for the k-th image for pathology from class l each pixel is described by a numerical sequence of length m of the form (19): where t k -the point of time at which the photographic image was taken k= (1,K); ω m -spatial brightness attribute of the pixel m=(1,M), α-experimentally definable parameter. If a process, generally random, described by numerical sequence (series), depends on some controlled parameters (in this case these are parameters k and ω m ), then there are as many additional coordinates as values of controlled parameters. Then, the process is described by a matroid, which dimension is determined by the number of controlled parameters. In this case, the numerical series corresponds to some matroid section with all fixed coordinates, except the ordinal number of the series element. The numerical series describing the ν-th pixel of the segment with fixed ω m will have not a vector but a matrix representation which has the matrix (20a) form if the matroid section is performed by coordinate m, or matrix (20b) if the matroid section is performed by coordinate k.
Content of (20a) and (20b) is determined by diagnostic information, and one of its most relevant attributes is the filtration point intensity coefficient (CI) -the ratio of fluorescence of the point-of-interest (point in the area of the selected segment) to the average fluorescence values of the retinal capillaries. The information is displayed as a histogram on which CI (in standard units) is plotted along the y-axis, and fluorescence time (in minutes) is plotted along the x-axis. Figure 16 shows the histogram corresponding to the image of the ocular fundus shown in Figure 15.
In the tasks of segment classification in the FA photographic image, the non-stationarity of the observed process is characterized by the fact that the studied image is illuminated nonuniformly depending on the location of the studied segment. A quantitative measure of nonuniformity in making a diagnostic decision should be histograms, an example of which is shown in Figure 15.

CONCLUSIONS
This paper proposes the mathematical algorithm that can be used to synthesize the structure of universal approximating NNs for the analysis of dual-alternative samples when solving segmentation problems of complex structured low-entropy images of eye vessels. Because of using the developed algorithm, the NN structure has been synthesized, which includes two solver modules and is intended for the classification of dual-alternative information. The nodes of the first hidden layer of the network produce non-linear mappings, and the nodes of the second hidden layer are autonomously adjustable neurons. Subsequently, it is possible to change the nonlinear mappings of the first hidden layer in the The use of automated hybrid NN structures for intelligent segmentation of complex structured low-entropy retinal images should provide increased efficiency of ocular diagnostics of fundus pathologies, and reduce the burden on specialists and the negative impact of the human factor in diagnosis.
To automate the process of making medical diagnostic decisions using the developed algorithms, it is necessary to use control samples for certain classes of images with pathologies. This task should be solved by specialized healthcare organizations.