<!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>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>V. Balovsyak</string-name>
          <email>s.balovsyak@chnu.edu.ua</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>M. Fodchuk</string-name>
          <email>ifodchuk@ukr.net</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Khrystyna S. Odaiska</string-name>
          <email>k.odaiska@chnu.edu.ua</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Yuriy</string-name>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>T. Roman</string-name>
          <email>y.roman@chnu.edu.ua</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Yuriy Fedkovych Chernivtsi National University</institution>
          ,
          <addr-line>2, Kotsiubynsky str., Chernivtsi, 58012</addr-line>
          ,
          <country country="UA">Ukraine</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Zilina University</institution>
          ,
          <addr-line>Univerzitna 8215, Zilina, 01026</addr-line>
          ,
          <country country="SK">Slovakia</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>contours</institution>
          ,
          <addr-line>Python, Google Colab</addr-line>
        </aff>
      </contrib-group>
      <abstract>
        <p>A method for the analysis of digital X-ray moiré images using artificial neural networks such as "multilayer perceptron" has been developed. Moiré images are obtained by the action of many forces on the surface of the analyzer crystal. Image analysis consisted in solving the inverse problem, namely in calculating the values of forces based on the intensity distribution of the moiré image. Moiré image contours after logarithmization, zooming and convolution were used as input signals for the neural network. Due to this image processing, the learning time of the neural network is reduced and the learning error remains low. The output signals of the neural network are the values of the set (series) of forces that generated the moiré image. Artificial neural network training was performed by the back propagation method. The training sample consisted of a series of calculated moiré images with known values of sets of forces. The artificial neural network was developed by Python in Google Colab cloud platform. The results of testing the developed program showed high accuracy of restoring the values of the set of forces in the analysis of calculated and experimental moiré images. Artificial neural network, multilayer perceptron, inverse problem, X-ray moiré image, image IntelITSIS'2022: 3nd International Workshop on Intelligent Information Technologies and Systems of Information Security, March 23-25, ORCID: https://orcid.org/0000-0002-3253-9006 (S. Balovsyak); 0000-0001-6772-6920 (I. Fodchuk); 0000-0002-3167-1195 (Kh. Odaiska);</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>X-ray moiré images carry valuable information about the studied crystals due to their high
sensitivity to small deformations of the crystal lattice, which allows to determine the relative
deformations of the lattice with an accuracy of 10-8 [1-2]. However, the task of calculating the
intensity distribution of the X-ray moiré image obtained using an LLL interferometer (triple Laue
interferometer) is quite difficult due to the influence of many different factors: defects of the crystal,
geometric characteristics of the interferometer and others [3-5]. In this paper, it is believed that the
deformation of the crystal is due to many forces that cause the appearance of a characteristic intensity
distribution of the moiré image in the form of light and dark bands. One way to calculate the values of
the intensity of the moiré image is the numerical solution of a system of differential equations of the
hyperbolic type (Takagi equations) [2-5]. In addition, the inverse problem of calculating the values of
the set of forces based on the moiré image is even more complex and is not solved analytically.</p>
      <sec id="sec-1-1">
        <title>Therefore, the paper proposes to calculate the values of the forces set on the basis of moiré images</title>
        <p>using artificial neural networks (ANN) type "multilayer perceptron" [6-9]. The advantage of using</p>
      </sec>
      <sec id="sec-1-2">
        <title>ANN as a means of artificial intelligence in this case is the ability to train ANN on examples (training set), which does not require the construction of a complex mathematical model of X-ray</title>
        <p>EMAIL:
(S.</p>
        <p>Balovsyak);</p>
        <p>2022 Copyright for this paper by its authors.
interferometer. Moiré image contours after logarithmization, zooming and convolution were used as
input signals for the ANN [10-12]. The image contours are analyzed because the values of band
periods (and their respective spatial frequencies) are extremely informative for X-ray moiré images,
and the values of such band periods are proportional to the distances between the band contours.
Logarithmization of the image intensity distribution allows to analyze both strong and weak signals,
and image convolution is used to smooth them and identify common patterns. Zooming of images was
used to reduce the training time of ANN. The output signals of the ANN are the values of the set of
forces that caused the appearance of the moiré image. ANN training was performed by the method of
back propagation. The training set consists of a series of calculated moiré images with known values
of force sets. The ANN was developed by Python language [13-15] in Google Colab cloud platform
[16]. After training, ANN is able to solve the inverse problem, i.e. to restore the value of the forces set
acting on the crystal, based on the analysis of calculated and experimental moiré images.</p>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>2. Method of analysis of X-ray moiré images using artificial neural networks</title>
      <p>2.1. Sequence of formation and processing of moiré images</p>
      <p>Initial digital moiré images f are formed and processed as rectangular matrices f = (f (i, k)), where
i = 0, ..., Mi-1; k = 0, ..., Nk-1; Mi is the height of the image in pixels, Nk is the width of the image in
pixels [10-12]. The brightness of the images f is normalized in the range from 0 to 1. Experimental
moiré images are scanned from photographic plates or read from CCD-detectors, and the simulated
images are calculated by numerical solution of the system of differential equations [1-5]. In all cases,
the intensity distribution of the image f depends on the values of the set of forces Pn, where
n = 0,..., N-1, which act in the X-ray LLL interferometer on the surface of the studied crystal. The set
of N such forces are in some way placed spatially, for example, linearly with a given step.</p>
      <sec id="sec-2-1">
        <title>Before analyzing moiré images f by ANN, it is necessary to perform their special processing to</title>
        <p>highlight the informative signs of the images and reduce their dimensionality. Such image processing
consists of contouring, logarithmization, zooming and low-pass filtering.</p>
        <p>The selection of contours [11-12] is performed to quantify the period of dark and light bands on
moiré images, because the distance between the contours describes the periods of the respective
bands. The calculation of contours is performed by the Sobel method by convolving the image f with
the kernel of the filter wSX to select horizontal contours SX and with the kernel of the filter wSY to select
vertical contours SY, where the filter kernels are described by formulas</p>
        <p>
          −1 −2 −1 −1 0 1 (
          <xref ref-type="bibr" rid="ref1">1</xref>
          )
  = [ 0 0 0 ] ,   = [−2 0 2].
        </p>
        <p>1 2 1 −1 0 1</p>
        <p>The resulting contours cn0 = (cn0 (i, k)), where i = 0, ..., MiC-1; k = 0, ..., NkC-1, are calculated as the
root of the sum of the squares of the horizontal SX and vertical SY contours. To avoid edge effects, the
image of the contours (MiC × NkC pixels) is reduced (compared to image f) by the bandwidth BC
(BC = 5 pixels) around the perimeter of the image, i.e. MiC = Mi - 2BC, NkC = Nk - 2BC. In the images of
contours cn0, the intensity values of different sections can differ significantly, so for further analysis of
all components of the signal with different intensities, the image of contours cnA with a logarithmic
scale in intensity is used.</p>
      </sec>
      <sec id="sec-2-2">
        <title>The obtained images of contours cnA have a fairly high resolution, so the supply time to the inputs</title>
        <p>of the ANN pixel intensities training time will be long. Therefore, to reduce the training time of ANN
on the basis of images cnA, the images of contours cn on a reduced scale (Miw × Nkw pixels) were
calculated by cubic interpolation. Reducing the scale of images cn is done to such a size Miw × Nkw,
which does not yet increase the training error of ANN.</p>
        <p>Scalable images of contours cn describe the local features of each band and do not have
generalizing characteristics. That is, when training the images of the contours of the ANN will be able
to accurately restore the values of the forces Pn only for those images that almost completely coincide
with the images of the training set. Therefore, to give the ANN generalizing properties the
lowfrequency filtering [10-12] of the image of contours cn by convolution with a kernel w = (w (m, n)) of
size Mw × Nw in the spatial region is used according to the formula
−1</p>
        <p>−1
 =0  =0
  (  ,   ) =
∑
∑   (  −</p>
        <p>−   ,   −  −   ) ∙  ( ,  )
where fw = (fw (iw, kw)) is filtered image; iw = 0, ..., Miw-1, kw = 0, ..., Nkw-1;
mc = (Mw2 + 1) is the center of the filter kernel in height;
nc = (Nw2 + 1) is the center of the filter kernel in width;</p>
      </sec>
      <sec id="sec-2-3">
        <title>Mw2, Nw2 – whole parts of half the size of the filter kernel.</title>
      </sec>
      <sec id="sec-2-4">
        <title>The operation of convolution the image cn with the kernel w is simply written in the form</title>
        <p>fw = cn * w. The two-dimensional Gaussian function with standard deviation (SD) σw was used as the
kernel of the filter w.
2.2.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Mathematical model of an artificial neural network</title>
      <sec id="sec-3-1">
        <title>A three-layer perceptron with back propagation training method was used as ANN [7-9]. A mathematical model of ANN has been developed, which describes the structure of the neural network and its functioning in the modes of training, testing and forecasting.</title>
      </sec>
      <sec id="sec-3-2">
        <title>The structure of the ANN is as follows (Fig. 1):</title>
        <p>1. The input layer X; the states of its elements are written in the vector X = (Xi), where i = 0,..., QX.</p>
      </sec>
      <sec id="sec-3-3">
        <title>The size of the training set (number of vectors) at the inputs X is equal to QN, the vector number</title>
        <p>
          ni = 0,..., QN-1. The inputs of layer X are fed to the values of the corresponding pixels of the filtered
image of the contours fw (
          <xref ref-type="bibr" rid="ref2">2</xref>
          ), normalized in the range from 0 to 1. Layer X does not contain a matrix of
weights, so it is not taken into account in the total number of layers.
        </p>
      </sec>
      <sec id="sec-3-4">
        <title>2. Hidden layers</title>
        <p>Layer V1 (level L = 1); the states of its elements are written in the vector V1 = (V1k1), where
k1 = 0,..., QV1; the weights of the layer are written in the matrix W1 = (W1i, k1); the difference of the
layer vectors (during training) is written in the vector D1 = (D1k1), where k1 = 0,..., QV1.</p>
        <p>Layer V2 (L = 2): the states of its elements are written in the vector V2 = (V2k2), where
k2 = 0,..., QV2; the weights of the layer are written in the matrix W2 = (W2k1, k2); the difference of the
layer vectors (during training) is written in the vector D2 = (D2k2), where k2 = 0 ... QV2.</p>
        <p>3. Source layer Y (L = 3): the states of its elements are written in the vector Y = (Yj), where
j = 0,..., QY; the weights of the layer are written in the matrix W3 = (W3k2, j); the difference of the layer
vectors (during training) is written in the vector D3 = (D3j). True output (true) is described by the
vector Y</p>
        <p>T = (YTj), where j = 0,..., QY, which is recorded normalized in the range from 0 to 1 values of
forces Pn, where n = 0,..., N-1 (QY = N-1).</p>
        <sec id="sec-3-4-1">
          <title>The normalization of the values of the vector YT is performed by the formula</title>
          <p>=   ⁄ 

where</p>
          <p>PnMax is the maximum value of the set of forces Pn; j = 0 ... QY.
of the vector Y are multiplied by the coefficient PnMax.</p>
        </sec>
      </sec>
      <sec id="sec-3-5">
        <title>Accordingly, to calculate the predicted values of forces PnN at the outputs of the ANN, the values</title>
      </sec>
      <sec id="sec-3-6">
        <title>ANN is studied according to the algorithm of back propagation in this sequence (Fig. 2).</title>
        <p>
          (
          <xref ref-type="bibr" rid="ref2">2</xref>
          )
(
          <xref ref-type="bibr" rid="ref3">3</xref>
          )
        </p>
      </sec>
      <sec id="sec-3-7">
        <title>1. Initialization. The initial weights W for all layers are set equal to small random values in the range</title>
        <p>[-ΔW, .. ΔW] (for example, ΔW = 0.1) using a uniformly distributed random variable. For example, for the
hidden layer V1, the initial values of the weights are calculated by the formula:</p>
        <p>
          1, 1 = 2(  − 0.5) ∙ ∆ , (
          <xref ref-type="bibr" rid="ref4">4</xref>
          )
where Rnd is uniformly distributed in the range from 0 to 1 random variable, i = 0,..., QX; k1 = 0,..., QV1.
        </p>
      </sec>
      <sec id="sec-3-8">
        <title>In weight matrices W, rows correspond to the elements from which the connections come, and</title>
        <p>columns correspond to the elements to which the connections go.</p>
        <sec id="sec-3-8-1">
          <title>2. Normalization (scaling) of the values of all X and YT vectors in the range from 0 to 1.</title>
        </sec>
      </sec>
      <sec id="sec-3-9">
        <title>Normalization of vector values is due to the fact that the ANN uses sigmoid activation functions of</title>
        <p>neurons whose output signals are in the range from 0 to 1.</p>
      </sec>
      <sec id="sec-3-10">
        <title>3. Direct propagation is to find the output vector Y based on the input X by the following formulas:</title>
      </sec>
      <sec id="sec-3-11">
        <title>Layer 1:</title>
        <p>where k1 = 0,..., QV1.</p>
      </sec>
      <sec id="sec-3-12">
        <title>Layer 2:</title>
        <p>where k2 = 0,..., QV2.</p>
        <p>Layer 3:
where j = 0,..., QY.
 1 = ∑ =0   ∙   1, 1,   11 = 1+exp⁡(1−  1)</p>
        <p>,
 2 = ∑ 1=10   11 ∙   21, 2,   22 = 1+exp⁡(1−  2)</p>
        <p>,
 = ∑ =0   22 ∙   32, ,   = 1+exp⁡1(−  )
If the value of the mean square error εK is less than the specified value, the network training
4. Back propagation is the correction of weights through the difference signals D.</p>
        <p>3 =   (1 −   )(   −   ),   2,

3( ) =   32(, −1) +   
 3  22,
where j = 0,..., QY; e is epoch number; because the sigmoid activation function of neurons is used,
the difference of vectors (YT - Y) is multiplied by the derivative of the sigmoid function: Y (1 - Y).
process ends.</p>
      </sec>
      <sec id="sec-3-13">
        <title>Layer 3:</title>
      </sec>
      <sec id="sec-3-14">
        <title>Layer 2:</title>
      </sec>
      <sec id="sec-3-15">
        <title>Layer 1:</title>
        <p>
          where k2 = 0,..., QV2.
(
          <xref ref-type="bibr" rid="ref8">8</xref>
          )
(
          <xref ref-type="bibr" rid="ref9">9</xref>
          )
(
          <xref ref-type="bibr" rid="ref10">10</xref>
          )
(
          <xref ref-type="bibr" rid="ref11">11</xref>
          )
        </p>
        <p>As a result of direct propagation, the mean squared error (mse) is calculated (for all vectors of the
training set) by the formula:

 =
2( −1)
+   2  2
2   11,
 11 = ∑
 2=20   11(1 −   11)(  22 ∙   1, 2),   1,(1) =   , 1
2
1( −1) +   1 11  ,
where k1 = 0,..., QV1; ηY, ηL2, ηL1 – training standards (norms) (e.g. 0.1).</p>
      </sec>
      <sec id="sec-3-16">
        <title>The mode of ANN testing consists in direct signal propagation, i.e. in calculation by means of</title>
        <p>
          formulas (
          <xref ref-type="bibr" rid="ref5 ref6 ref7">5-7</xref>
          ) on the basis of input moiré images of input signals X and output Y, as well as predicted
values of forces PnN at ANN outputs. In the test mode, the predicted values of forces PnN are compared
with the exact (pre-known) values of forces Pn.
        </p>
      </sec>
      <sec id="sec-3-17">
        <title>The prediction mode is similar to the test mode, but in this mode only the predicted values of</title>
        <p>forces PnN are calculated, and their exact values Pn are unknown.
2.3.</p>
        <p>Software implementation of
moiré image analysis using artificial
neural networks</p>
      </sec>
      <sec id="sec-3-18">
        <title>The program "p_Moire_Neuro" for the analysis of X-ray moiré images was created on the basis of</title>
        <p>an algorithm (Fig. 2) in Python [13-15] using the cloud platform Google Colab in a web shell Jupyter</p>
      </sec>
      <sec id="sec-3-19">
        <title>Notebook [16]. The program provides reading of initial images f in various graphic formats (in</title>
        <p>particular in tiff and jpg formats). The values of the correct output signals of the ANN, namely the set
of forces Pn for the training set are read from text files. The values of the forces predicted by means of</p>
      </sec>
      <sec id="sec-3-20">
        <title>ANN are displayed in text and graphic formats.</title>
      </sec>
      <sec id="sec-3-21">
        <title>The program imported a number of libraries, including the "numpy" library for mathematical</title>
        <p>calculations, the "matplotlib" library for graphing and image visualization, the "pandas" library for
processing text file data, the "scipy" and "cv2" libraries for contouring and image scaling. Low-pass
filtering is performed by the function "gaussian_filter" of the submodule "ndimage" of the "scipy"
library. Uniformly distributed random variables were generated by the "random.uniform" function of
the "numpy" library.</p>
      </sec>
      <sec id="sec-3-22">
        <title>The "tensorflow" library for working with neural networks was not used to create the ANN model, and the functions of the "numpy" library were mainly used to process signals in the ANN. This solution partially reduces the speed of the program when training ANN, but provides more flexibility in choosing the structure and modes of operation of the neural network.</title>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>3. Results of neural network analysis of X-ray moiré images</title>
      <sec id="sec-4-1">
        <title>ANN training was performed by the program "p_Moire_Neuro" on the basis of a training set,</title>
        <p>which contained 15 calculated moiré images f with known values of forces Pn [4-5], which caused
their formation (Fig. 3). In the image file name, the first digit means the form of force distribution (S1
– with a minimum in the center, S2 – uniform distribution, S3 – with a maximum in the center), the
next number means the sum of forces, and the set of numbers after "PL" means forces Pn (Fig. 4).</p>
        <p>
          а) b)
Figure 4: The calculated image f of the training set, which is formed by the action of the forces
Pn = (
          <xref ref-type="bibr" rid="ref1 ref2 ref2 ref3 ref3 ref5 ref5">5, 3, 2, 1, 2, 3, 5</xref>
          ) (a) and the three main shapes (S1, S2, S3) of the distribution of forces (b)
        </p>
      </sec>
      <sec id="sec-4-2">
        <title>In this work, the values of Pn forces were measured in relative units, but it is possible to convert</title>
        <p>them into absolute (N) [4-5]. On the basis of the initial images f their contours are calculated,
logarithmization, zooming and filtering are performed (Fig. 5 – Fig. 7). The contours of the images
were calculated by the Sobel method in terms of height and width, and the image size f was reduced
from the initial (Mi × Nk pixels) to the size of the filtered image of the contours fw (Miw × Nkw pixels).</p>
      </sec>
      <sec id="sec-4-3">
        <title>To prevent retraining in addition to training set (Fig. 3) also formed a test set of images with known values of forces (Fig. 8). Distributions of test set forces have shapes similar to the distributions of training set forces, but quantitatively different from them.</title>
        <p>
          a) b) c)
Figure 5: Calculated image f of the training set, which is formed by the action of the forces
Pn = (
          <xref ref-type="bibr" rid="ref3 ref3 ref3 ref3 ref3 ref3 ref3">3, 3, 3, 3, 3, 3, 3</xref>
          ) (a); calculated on the basis of image f the contours cnA after logarithm (b);
calculated on the basis of cnA the filtered image fw on a reduced scale (c)
        </p>
        <p>
          a) b) c)
Figure 6: Calculated image f of the training set, which is formed by the action of the forces
Pn = (
          <xref ref-type="bibr" rid="ref1 ref1 ref3 ref3 ref4 ref4 ref5">1, 3, 4, 5, 4, 3, 1</xref>
          ) (a); calculated on the basis of image f the contours cnA after logarithm (b);
calculated on the basis of cnA the filtered image fw on a reduced scale (c)
        </p>
        <p>
          a) b) c)
Figure 7: Calculated image f of the training set, which is formed by the action of the forces
Pn = (
          <xref ref-type="bibr" rid="ref14 ref14 ref7">35, 21, 14, 7, 14, 21, 35</xref>
          ) (a); calculated on the basis of image f the contours cnA after logarithm
(b); calculated on the basis of cnA the filtered image fw on a reduced scale (c)
        </p>
      </sec>
      <sec id="sec-4-4">
        <title>The peculiarity of the test sample is that it was not taken into account in the training process to change the weight of the ANN, and was used only to calculate the training error for the test set (error was calculated similarly to the error for the training set). ANN training was performed for a specified number of epochs, but was interrupted with increasing error for the test set (Fig. 9).</title>
        <p>
          Training of ANN was carried out during QE = 5000 epochs. For moiré images f with size Mi × Nk =
= 640 × 640 pixels, filtered images of contours fw with dimensions Miw × Nkw = 78 × 78 pixels are
calculated, so the number of ANN inputs is equal to (QX + 1) = 6084. The number of neurons in the
first hidden layer is set equal to (QV1 + 1) = 64, the number of neurons in the second hidden layer is
(QV2 + 1) = 32. This number of neurons (QV1, QV2) was used, because with more neurons in the hidden
layers the value of the training error εK (
          <xref ref-type="bibr" rid="ref8">8</xref>
          ) does not decrease, but significantly increases the training
time; at the same time, with fewer neurons (QV1, QV2), the training error εK increases.
        </p>
        <p>The values of training norms are set equal to ηY = 0.09, ηL2 = 0.09, ηL1 = 0.09, because at lower
values of norms the training time increases significantly without changing the training error εK, and at
higher values of norms the error εK increases.</p>
      </sec>
      <sec id="sec-4-5">
        <title>As a result of ANN training, the values of the predicted PnN forces compared to the correct Pn for</title>
        <p>all images of the training set were almost identical, as evidenced by the small values of the mean
square error eps (Fig. 10). For images of the test set, the distribution of forces for which differs from
the distribution of forces of the training set, a satisfactory agreement of the calculated forces PnN with
the theoretical Pn is obtained (Fig. 11).</p>
        <p>This can be explained by the fact that, thanks to the training of ANN, it became able to establish
the relationship between the intensity distribution of moiré images and the distribution of forces that
led to their formation. After training, ANN was used to calculate the values of forces on the basis of
both calculated (Fig. 12) and experimental moiré images (Fig. 13).</p>
        <p>
          a)
g) h) k)
Figure 10: Examples of calculated PnN and theoretical Pn forces for the training set:
a) Pn = (
          <xref ref-type="bibr" rid="ref1 ref2 ref2 ref3 ref3 ref5 ref5">5, 3, 2, 1, 2, 3, 5</xref>
          ); b) Pn = (
          <xref ref-type="bibr" rid="ref3 ref3 ref3 ref3 ref3 ref3 ref3">3, 3, 3, 3, 3, 3, 3</xref>
          ); c) Pn = (
          <xref ref-type="bibr" rid="ref1 ref1 ref3 ref3 ref4 ref4 ref5">1, 3, 4, 5, 4, 3, 1</xref>
          );
d) Pn = (
          <xref ref-type="bibr" rid="ref12 ref12 ref2 ref4 ref4">25, 12, 4, 2, 4, 12, 25</xref>
          ); e) Pn = (
          <xref ref-type="bibr" rid="ref12 ref12 ref12 ref12 ref12 ref12 ref12">12, 12, 12, 12, 12, 12, 12</xref>
          ); f) Pn = (
          <xref ref-type="bibr" rid="ref12 ref12 ref16 ref16 ref4 ref4">4, 12, 16, 20, 16, 12, 4</xref>
          );
g) Pn = (
          <xref ref-type="bibr" rid="ref14 ref14 ref7">35, 21, 14, 7, 14, 21, 35</xref>
          ); h) Pn = (21, 21, 21, 21, 21, 21, 21); k) Pn = (
          <xref ref-type="bibr" rid="ref7 ref7">7, 21, 28, 35, 28, 21, 7</xref>
          )
a) b) c)
        </p>
        <p>
          Figure 11: Examples of calculated PnN and theoretical Pn forces for the test set:
a) Pn = (
          <xref ref-type="bibr" rid="ref7 ref7 ref7">42, 21, 7, 7, 7, 21, 42</xref>
          ); b) Pn = (
          <xref ref-type="bibr" rid="ref1 ref1 ref1 ref3 ref3 ref6 ref6">6, 3, 1, 1, 1, 3, 6</xref>
          ); c) Pn = (
          <xref ref-type="bibr" rid="ref12 ref12 ref4 ref4 ref4">24, 12, 4, 4, 4, 12, 24</xref>
          )
        </p>
      </sec>
      <sec id="sec-4-6">
        <title>In the case of experimental moiré images, the obtained values of forces are consistent with the data of other research methods [2-5].</title>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>4. Conclusion</title>
      <p>A method for analyzing digital X-ray moiré images using artificial neural networks has been
developed. Image analysis consisted in solving the inverse problem, namely in calculating the values
of forces whose action on the surface of the studied crystal led to the formation of a moiré image. A
multilayer perceptron was used as an ANN, the input signals of which were the contours of the moiré
image after logarithmization, scaling and filtering. Due to this image processing, the training time of
the ANN is reduced and the training error remains low. The output signals of the ANN were the
values of the set of forces, the action of which generated a moiré image. ANN training was performed
by the back propagation method. The training set consisted of a series of calculated moiré images
with known values of forces. The artificial neural network was developed in Python in the cloud
platform Google Colab. The results of testing the developed program showed high accuracy of
restoring the values of the forces in the analysis of calculated and experimental moiré images.</p>
      <sec id="sec-5-1">
        <title>The scientific novelty of the work is the use as input signals of the artificial neural network not directly the pixel intensities of the moiré image, but the values of reduced, logarithmic and filtered image contours, which reduces training time and prevents retraining of the artificial neural network.</title>
      </sec>
      <sec id="sec-5-2">
        <title>An important advantage of the developed method of analysis of moiré images using artificial neural networks is the ability to restore forces with their arbitrary geometric placement on the surface of the studied crystal. To analyze new types of moiré images, it is enough to train the developed artificial neural network on the basis of data from a new training set.</title>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>5. Acknowledgements</title>
      <sec id="sec-6-1">
        <title>We are grateful to S. M. Novikov, I. V. Yaremchuk (Yuriy Fedkovych Chernivtsi National</title>
      </sec>
      <sec id="sec-6-2">
        <title>University, Chernivtsi, Ukraine) for their help in obtaining the X-ray moiré images used in our study, as well as for useful advice on research topic.</title>
      </sec>
      <sec id="sec-6-3">
        <title>This publication has been supported of the Integrated Infrastructure Operational Program for the project "Creation of a Digital Biobank to Support the Systemic Public Research Infrastructure" (ITMS: 313011AFG4) co-financed by the European Regional Development Fund.</title>
      </sec>
    </sec>
    <sec id="sec-7">
      <title>6. References</title>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>H.</given-names>
            <surname>Yoshioka</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Kadono</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Kim</surname>
          </string-name>
          , et al.
          <article-title>Imaging evaluation of the cartilage in rheumatoid arthritis patients with an X-ray phase imaging apparatus based on Talbot-Lau interferometry</article-title>
          ,
          <source>Sci. Rep</source>
          .
          <volume>10</volume>
          (
          <year>2020</year>
          )
          <fpage>6561</fpage>
          -
          <lpage>1</lpage>
          -6561-9. doi: https://doi.org/10.1038/s41598-020-63155-9.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>M.</given-names>
            <surname>Kageyama</surname>
          </string-name>
          , et al.,
          <article-title>X-ray phase-imaging scanner with tiled bent gratings for large-field-ofview nondestructive testing</article-title>
          , NDT &amp; E International,
          <volume>105</volume>
          (
          <year>2019</year>
          )
          <fpage>19</fpage>
          -
          <lpage>24</lpage>
          . doi:
          <volume>10</volume>
          .1016/j.ndteint.
          <year>2019</year>
          .
          <volume>04</volume>
          .007.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Momose</given-names>
            <surname>Lab</surname>
          </string-name>
          .
          <article-title>Optics of X-ray interferometry</article-title>
          ,
          <year>2021</year>
          . URL: http://mml.tagen.tohoku.ac.jp/en/research/xray-interferometer.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>I. M.</given-names>
            <surname>Fodchuk</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. M.</given-names>
            <surname>Novikov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>I. V.</given-names>
            <surname>Yaremchuk</surname>
          </string-name>
          ,
          <article-title>Direct and inverse problems in X-ray threecrystal triple Laue case interferometry</article-title>
          ,
          <source>Appl. Optics., 55</source>
          <volume>12</volume>
          (
          <year>2016</year>
          )
          <fpage>B120</fpage>
          -
          <lpage>B125</lpage>
          . doi:
          <volume>10</volume>
          .1364/AO.55.
          <year>00B120</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>I. M.</given-names>
            <surname>Fodchuk</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. V.</given-names>
            <surname>Balovsyak</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. M.</given-names>
            <surname>Novikov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>I. V.</given-names>
            <surname>Yanchuk</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V. F.</given-names>
            <surname>Romankevych</surname>
          </string-name>
          ,
          <article-title>Reconstruction of spatial distribution of strains in crystals using the energy spectrum of X-ray Moiré patterns</article-title>
          ,
          <source>Ukr. J. Phys. Opt.</source>
          , Vol.
          <volume>21</volume>
          , No.
          <volume>3</volume>
          (
          <year>2020</year>
          )
          <fpage>141</fpage>
          -
          <lpage>151</lpage>
          . doi:
          <volume>10</volume>
          .3116/16091833/21/3/141/
          <year>2020</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>N. K.</given-names>
            <surname>Manaswi</surname>
          </string-name>
          ,
          <article-title>Deep Learning with Applications Using Python, Apress</article-title>
          , India,
          <year>2018</year>
          . doi:
          <volume>10</volume>
          .1007/978-1-
          <fpage>4842</fpage>
          -3516-4.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>E. R.</given-names>
            <surname>Ranschaert</surname>
          </string-name>
          . S. Morozov,
          <string-name>
            <given-names>P. R.</given-names>
            <surname>Algra</surname>
          </string-name>
          ,
          <source>Artificial Intelligence in Medical Imaging. Opportunities, Applications and Risks</source>
          , Springer Nature Switzerland,
          <year>2019</year>
          . doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>319</fpage>
          -94878-2.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>O.</given-names>
            <surname>Berezsky</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Verbovyy</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Pitsun</surname>
          </string-name>
          ,
          <article-title>"Hybrid Intelligent Information Technology for Biomedical Image Processing"</article-title>
          .
          <source>IEEE 13th International Scientific and Technical Conference on Computer Sciences and Information Technologies (CSIT)</source>
          ,
          <source>Lviv</source>
          (
          <year>2018</year>
          ):
          <fpage>420</fpage>
          -
          <lpage>423</lpage>
          . doi:
          <volume>10</volume>
          .1109/STC-CSIT.
          <year>2018</year>
          .
          <volume>8526711</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <surname>Tensorflow. Open</surname>
          </string-name>
          <article-title>source machine learning platform</article-title>
          ,
          <year>2021</year>
          . URL: https://www.tensorflow.org.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>S.</given-names>
            <surname>Krigg</surname>
          </string-name>
          , Computer Vision Metrics. Survey, Taxonomy, and
          <string-name>
            <surname>Analysis</surname>
          </string-name>
          , Apress, Berkeley, CA,
          <year>2014</year>
          . doi:
          <volume>10</volume>
          .1007/978-1-
          <fpage>4302</fpage>
          -5930-5.
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>P.</given-names>
            <surname>Russo</surname>
          </string-name>
          ,
          <article-title>Handbook of X-ray Imaging</article-title>
          .
          <source>Physics and Technology</source>
          , CRC Press, Taylor &amp; Francis Group,
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>R.</given-names>
            <surname>Gonzalez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Woods</surname>
          </string-name>
          ,
          <article-title>Digital image processing, 4th edidion</article-title>
          , Pearson/ Prentice Hall, NY,
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>F.</given-names>
            <surname>Nelli</surname>
          </string-name>
          ,
          <article-title>Python Data Analytics. Data Analysis and Science Using Pandas, matplotlib, and the Python Programming Language</article-title>
          , Apress,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>O.</given-names>
            <surname>Embarak</surname>
          </string-name>
          ,
          <article-title>Data Analysis and Visualization Using Python, Apress</article-title>
          , Higher Colleges of Technology, Abu Dhabi, United Arab Emirates,
          <year>2018</year>
          . doi:
          <volume>10</volume>
          .1007/978-1-
          <fpage>4842</fpage>
          -4109-7.
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          <source>[15] Scipy Lecture Notes</source>
          .
          <article-title>One document to learn numerics, science, and data with</article-title>
          <source>Python</source>
          ,
          <year>2021</year>
          . URL: www.scipy-lectures.org.
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>Google</given-names>
            <surname>Colab</surname>
          </string-name>
          ,
          <year>2021</year>
          . URL: https://colab.research.google.com.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>