Abstract
The article presents machine learning methods in the field of reconstruction of tomographic images. The presented research results show that electric tomography makes it possible to analyze objects without interfering with them. The work focused mainly on electrical impedance tomography and image reconstruction using deterministic methods and machine learning, reconstruction results were compared and various numerical models were used. The main advantage of the presented solution is the ability to analyze spatial data and high speed of processing. The implemented algorithm based on logistic regression is promising in image reconstruction. In addition, the elastic net method was used to solve the problem of selecting input variables in the regression model.
Introduction
Electrical tomography allows observing physical and chemical phenomena without interfering with their interior. It is a technique of imaging the interior of the examined object, based on measurements taken at its boundary. The key parameters in electrical tomography are the speed of analysis and accuracy of reconstructed objects. Analysis of spatial data outside the boundary of measurements is a challenge for applications. The reconstruction algorithm is obtained by solving the inverse problem [1–3]. Figure 1 shows the model of the data collection and transmission system. The article presents logistic regression methods for acquiring, processing and reconstructing images from measurement data.
The field most often associated with tomography is medicine [4]. Observing technological development in the sphere of industry, it can be seen that although industrial tomography is still giving way to the popularity of medical tomography (CT computed tomography), however, the dynamic rate of development of automation and computerization of industrial processes makes industrial tomography gain importance every year [2]. Process tomography is an important area of industrial tomography [5–10]. Process tomography usually means imaging the inside of tanks or reactors used during batch production, or imaging the inside of pipes or parts of industrial flow installations.
In practice, we rarely deal with installations where the liquid content remains motionless for a long time. Inside the pipes, a liquid medium flows in a linear manner at a certain speed. However, due to the conditions of specific technological processes, many chemical reactors are equipped with a stirrer, and the liquid contained in them also moves in a vortex or in a more or less chaotic manner.

Model of the acquisition and transfer data system.
The movement of liquids inside the examined object is an additional challenge, because it requires from the tomographic system not only the accuracy of hidden images inside the objects, but also a sufficiently high speed of operation to enable this projection. The speed of reconstruction depends on the parameters of the electronic system used and the effectiveness of the calculation algorithm. Both of the above factors are constantly improving, however, this article focuses on optimizing the tomographic algorithm. Algorithms based on various methods are used in EIT process tomography [11–14], including: shallow artificial neural network [15], deep learning [16], convolutional neural networks [17], SVM, elastic net [18], k-nearest neighbors, gradient boosting machine [19], decision trees, least square regression [20], least angle regression (LARS) [21] etc. Part of the above methods is classified as artificial intelligence (e.g. neural networks), while other algorithms belong to statistical methods. Linear and logistic regression are considered statistical machine learning methods.
Depending on the nature of the object being examined, tomographic images can be flat (2D) or spatial (3D), while the algorithms used can generate real values or classification variables at the output. In this case we are dealing with an EIT tomograph using a logistic regression algorithm generating binary values (zero or one).
As previously mentioned, EIT tomography is an effective method of monitoring the inside of reactors. The reactor is a key element of many industrial installations. It is in it that chemical and physical reactions occur that determine the correct course of the production process.
Reactors can generally be divided into homogeneous and heterogeneous. In heterogeneous reactors there may be gases, solids and liquids in various configurations of states and mutual reactions. The research described in this article focuses on the problem of detecting two-phase processes that may contain liquids and solids (crystallization) or liquids and gases (detection of gas bubbles in suspensions and liquids) inside the reactor. Specific examples of potential applications of industrial tomography are process monitoring within bioreactors. Biological reactions occurring in, for example, biogas plants are very complicated. To maintain optimal parameters of controlled biological processes, constant supervision and continuous adjustment of parameters such as temperature, pressure, angular speed of the stirrer, etc. is necessary. An effective EIT tomograph [1] as part of a large cyber-physical system type SCADA or MES would be able to automate and thus optimize the monitored industrial process.
The main novelties of the described research are: During estimation of the unknown parameters of logistic regression with elastic net the regularization parameter was addicted to distance of finite elements from center of imaging domain. The Receiver Operating Characteristic metrics were used to compare the pattern and reconstruction of imaging domain.
The paper consists of 4 sections. The methods, measurements and algorithms used to solve the inverse problem in image reconstruction, numerical models, are described in Section 2. The results of research work in the form of image reconstruction are shown in Section 3. Section 4 summarizes the research carried out.
This section presents the system model, tomographic methods, mathematical algorithms and measurement models used in image reconstruction. Laboratory equipment and tomographic devices built at the Research and Development Center Netrix SA, the Eidors toolbox for Matlab and the R language were used for the research.
Electrical impedance tomography
Electric tomography is used to analyse and reconstruct images in inaccessible areas, where a current or voltage source is connected to the object. The collected information is processed using a suitable algorithm. Electrical impedance tomography (EIT) is characterized by relatively low image resolution. Difficulties in obtaining high resolution images are caused by: a limited number of measurements, non-linear current flow, and too low sensitivity of voltages depending on changes in conductivity inside the area. Moreover, accurate mathematical model for the forward problem is necessary in EIT. From Maxwell’s equations it can be shown that the electric field potential is the solution to the boundary value problem:
𝛤 - boundary of the domain 𝛺
E k - k-th electrode
N - total number of electrodes
U k - electric potential for k-th electrode
z k - contact impedance for k-th electrode
I k - current flowing through k-th electrode
For above mathematical model simulations of the measured voltages can be obtained by the finite element method.
The construction of a hybrid tomography scanner was based on an electrical tomography and measures the tested object based on measurements of potential distribution or capacitance. The system collects the measured data from the electrodes. The device provides a non-invasive method of testing the spatial distribution of material coefficients. Presented device for electrical tomography includes two measuring methods using 32 channels. The measurements are based on electrical capacitance tomography and electrical impedance tomography. The device is presented in Fig. 2 in the form: measuring block, control and communication system, view from the inside and measuring panel. Measuring models are shown in Fig. 3.

Netrix electrical tomograph.

Measurement model for electrical impedance tomography.
Image reconstruction in electrical impedance tomography requires accurate modeling. In EIT by solving the inverse problem we estimate the conductivity distribution of the surveyed object which corresponds to measurements of voltages between electrodes located on the boundary. There are many optimization methods [6,17,22–31] that have been used to date in various studies. Deterministic methods are characterized by the fact that they search for a minimum of the objective function, continuous in a given range of variability [5,13,32–36]. Machine learning includes algorithms based on artificial neural networks, deep learning, statistical methods, or genetic algorithms. numerical algorithms for machine learning methods are relatively simple, but require a very large number of calculations in the learning process, but the use of these methods is aimed at obtaining the expected solution in a very short time, virtually online [3,37–39]. The algorithm presented in the paper was based on logistic regression. In addition, the elastic net method was used to solve the problem of selecting input variables in the regression model.
Logistic regression
Below we present method of application the logistic regression to image reconstruction in EIT. Let the grid of imaging domain contains k finite elements,
At first for each finite element we create a data set containing n records. Let
To simplify the description of logistic regression model we leave the index j as affiliation for j-th finite element (although we keep in mind that this procedure we must realize for each finite element). Let
The task of logistic regression is to estimate the probability of success P (Y = 1|x) based on the realization x and we denote that
After estimating unknown parameters in linear model (4) from (5) we determine probability of belonging the finite element into inclusion area as
During the measurements we can see that the values obtained from some electrodes are strongly correlated (due to the way of measurement). Thus we have a multicollinearity problem. If the independent variables (predictors) are correlated then the direct solution does not give the expected effect, because the forecasts based on such model are unstable. Thus, we have a problem connected with the selection of predictors (input variables) that should be included to regression model. Selected predictors on the one hand should influence on the value of response variable, on the other hand they should not generate multicollinearity.
There are many methods to solve the optimization problem when the input variables are correlated, for example. One of the possible ways to reduce the problem of multicollinearity between predictors consists in application of the elastic net method [37,40,42,43]. Solving the inverse problem in electrical tomography by application the elastic net method we obtain more accurate and stable reconstruction results [44]. This method consists in imposing a penalty on large values of estimators. The elastic net is a connection of ridge regression (Tikhonov regularization) and LASSO (Least Absolute Shrinkage and Selection Operator). This technique implies a shrinkage of estimators of unknown parameters. To determine the unknown parameters

Image reconstruction obtained with LR for 16 electrodes - Example I.

Electrical voltages – the logistic regression method (LR) for 16 electrodes - Example I.
The main task in electrical impedance tomography is an image reconstruction. Below we will present the way of possible reconstruction based on logistic regression. For conductivity distribution σ we determine voltages from numerical simulation. We take into account n different cases. For i-th case the conductivity distribution corresponds to sequence

Image reconstruction obtained with LR for 16 electrodes - Example II.

Electrical voltages – the logistic regression method (LR) for 16 electrodes - Example II.

Image reconstruction obtained with LR for 16 electrodes - Example III.

Electrical voltages – the logistic regression method (LR) for 16 electrodes - Example III.
The predicted imaging domain we denote as sequence

Image reconstruction obtained with LR for 16 electrodes - Example IV.

Electrical voltages – the logistic regression method (LR) for 16 electrodes - Example IV.

Image reconstruction obtained with LR for 32 electrodes - Example I.

Electrical voltages – the logistic regression method (LR) for 32 electrodes - Example I.
We calculate the basic characteristic of recognition as follows

Image reconstruction obtained with LR for 32 electrodes - Example II.

Electrical voltages – the logistic regression method (LR) for 32 electrodes - Example II.
Below we present image reconstructions for 16 electrodes (Figs 4, 6, 8, 10) and for 32 electrodes (Figs 12, 14, 16, 18) obtained by logistic regression method (LR). Internal object are indicated by dark blue colour. White colour in finite element mesh represents zero disturbance in electrical conductivity. Positions of electrodes are pointed by green. Corresponding voltages are given in Figs 5, 7, 9, 11 (16 electrodes) and Figs 13, 15, 17, 19 (32 electrodes). Additionally, this figures contain PE and PCC ratios. Symbol U denotes voltages designed to reconstruction, whereas U (σ rec ) represents voltages determined form reconstructed conductivity distribution. Quantities U and U (σ rec ) are given in arbitrary units. Tables 1-3 show the confusion matrix, LR recognition metrics for 16 and 32 electrodes.

Image reconstruction obtained with LR for 32 electrodes - Example III.

Electrical voltages – the logistic regression method (LR) for 32 electrodes - Example III.

Image reconstruction obtained with LR for 32 electrodes - Example IV.

Electrical voltages – the logistic regression method (LR) for 32 electrodes - Example IV.
Confusion matrix
The main purpose of this work was to prepare a solution based on electrical impedance tomography. Research focused mainly on developing methods and measurement models for data analysis and reconstruction. To solve the inverse problem, Gauss–Newton methods with Laplace regulation, Gauss–Newton methods with Tikhonov regulation, Total Variation and logistic regression method were used. The reconstruction results of individual algorithms were compared using different measurement models. The results obtained show the resolution of spatial data, which gives the possibility of visual analysis of processes occurring in the object. The collected information is processed by an algorithm that reconstructs the image. Difficulties in obtaining high resolution are mainly due to the limited number of measurements, non-linear current flow and too low sensitivity of measurements depending on changes in conductivity in a given area. Image reconstruction by logistic regression gave good reconstruction quality. This method is effective in the process of image reconstruction in electrical impedance tomography. To reduce the problem of the highest correlation between measurements obtained from the electrodes, the elastic net method was implemented. The prepared solution was successfully used in the proposed numerical models. Research gives promising results. Further work will focus on improving methods of image reconstruction using deep learning and the development of measuring devices.
LR recognition metrics for 16 electrodes
LR recognition metrics for 32 electrodes
