=Paper= {{Paper |id=Vol-2212/paper26 |storemode=property |title=Machine learning in the problem of recognition of pitting corrosion on aluminum surfaces |pdfUrl=https://ceur-ws.org/Vol-2212/paper26.pdf |volume=Vol-2212 |authors=Marat Enikeev,Leniza Enikeeva,Marina Maleeva,Irek Gubaydullin }} ==Machine learning in the problem of recognition of pitting corrosion on aluminum surfaces == https://ceur-ws.org/Vol-2212/paper26.pdf
Machine learning in the problem of recognition of pitting
corrosion on aluminum surfaces

                    M Enikeev1, L Enikeeva1, M Maleeva2 and I Gubaydullin1,3


                    1
                      Ufa State Petroleum Technological University, Kosmonavtov St. 1, Ufa, Russia, 450062
                    2
                      A.N. Frumkin Institute of Physical Chemistry and Electrochemistry Russian Academy of
                    Sciences, Leninsky prospect 31, Moscow, Russia, 199071
                    3
                      Institute of Petrochemistry and Catalysis, Russian Academy of Sciences, Prospect Oktyabrya
                    141, Ufa, Russia, 450075


                    Abstract. The work is devoted to the problem of identification and quantitative estimation of
                    pitting corrosion. The purpose of the work is to design an algorithm and create a set of
                    programs for evaluating and predicting corrosion processes development on the aluminum
                    surface. Object of a research is process of corrosion of aluminum with hydrogen
                    depolarization. Results of work can be used for a research of corrosion processes and their
                    mechanisms on the basis of the visual analysis.


1. Introduction
One of the reasons of decrease in durability and loss of metal designs operability is corrosion
destruction of metal. Most of all iron, its alloys and also aluminum suffer from corrosion. Metal
designs are subject to generally electrochemical corrosion which arises at contact of metals with
electrolytes. Diagnostics and forecasting of corrosion allow estimating service conditions of devices,
machines and the equipment. Also they allow defining efficiency of methods and means of protection,
to make the decision on their improvement.
    Among the non-destructive testing methods for corrosion monitoring [1-4] are scanning
reflectometry, confocal microscopy, optical microscopy, ultrasonic inspection, laser scanning
microscopy, acoustic emission, vibration analysis, etc. Due to the ease of monitoring, visual inspection
is still employed Due to the ease of monitoring, visual inspection is still employed with satisfactory
results because it informs about the type and extent of the corrosion. Due to the ease of monitoring,
visual inspection is still employed because it informs about the type and level of the corrosion.
However, visual inspection has subjective criteria.
    The most part of the works connected with detection of corrosion effects by methods of computer
vision analyzes cracks and pittings. In most of works, the problem of automation detection and defects
measurement was solve successfully. Studying of pitting corrosion of stainless steel in FeCl3 solution
became one of the initial experience with computer vision for the metals corrosion research [5]. The
ratio of the damaged area to the total image area was determined by photos of corrosion process.
Corrosion studying as three-dimensional object, that is determination of depth and a damaged form by
computer vision methods merits attention. [6]. In [7] other method of metal corrosion identification
based on a minimum distance between the recognition objects is presented. Paper [8] considers fractal
geometry methods for the analysis of corrosion process. Researchers don't take into account that the
reliable application of image processing needs noise reduction. Abdel-Qader [9] has compared various


IV International Conference on "Information Technology and Nanotechnology" (ITNT-2018)
Data Science
M Enikeev, L Enikeeva, M Maleeva and I Gubaydullin




edge detection algorithms and has revealed that the Haar's method is the best practice for crack
detection. However on noisy data this method is likely to be inefficient as well as the methods based
on morphological operations [10]. Prasanna [11] applied histogram analysis and support vector
machine (SVM) in classification for the crack detection. The detection rate of the classifier has been
found to be approximately 76%. In paper [12] applied the principal component analysis (PCA) for
search cracks on the bridge surface. In this case the accuracy of the analysis depends on camera
position. Lattanzi and Miller [13] developed the clustering method based on k-means clustering
algorithm and the Canny edge detector. In [14] developed algorithm that produces automatically and
accurately the quantitative and objective information on the corrosion state of the electroless nickel
immersion gold surface using factor analysis (metal turn over and pH of the plating bath). Belim and
Kutlunin [15] developed the algorithm of boundary extraction based on image clustering. The
mathematical model will allow to describe quantitatively processes on interphase boundaries in a wide
number of test environments and metals. The model is based on image processing of corroding
surface. The computer vision system can serve as the system realizing such model. In [16] developed
design of the device for measurement of the depth of the surface defect of the controlled surface, for
example. Vasin [17] describe a machine vision system for the inspection of the railway track
condition.
    The study of corrosion processes using computer vision methods involves four interconnected
processes that create the prerequisites for the creation of data-processing system:
    1. Accumulation of experimental data (corroded surface images), which require ordering,
structuring and classification for correct use when solving the problem of classifier training.
    2. Development of information processing methods depending on the type of problem being
solved. In this case, it is the use of image processing methods, mathematical statistics and fractal
analysis to evaluate and predict corrosion processes for various types of metals (steel, iron and
aluminum).
    3. Updating the technical means of processing information, increasing the calculations speed
(using graphics processors).
    4. Implementation of automatic systems of scientific research in the form of software packages
and training of the end user (researcher).
    In this paper, we study the results obtained with the help of the created information-computational
analytical system (ICAS) for estimating and predicting corrosion (“CorOcenka”). The main results
based on the use of ICAS are listed.

2. Pitting corrosion identification
The image of an aluminum surface under corrosion potential in a 0.1 M NaCl solution (pH 11) is
shown in figure 1. Process is followed by intensive release of hydrogen. Bubbles of the evolving
hydrogen are presented on the image. The task of searching objects in the image was reduced to
detection of hydrogen bubbles being evolved. The intensity of this evolution had to be determined
from a series of pictures. On the volume of the evolved hydrogen the rate of cathodic reaction is
estimated. This rate is equal to the rate of anode reaction and dissolution or corrosion rate.




    Figure 1. The snapshot of the aluminum surface at a corrosion potential in 0.1 M NaCl (pH 11).

   In the study of the corrosion reactions such methods of information processing as image
processing, fractal analysis, contour analysis and template matching are used.


IV International Conference on "Information Technology and Nanotechnology" (ITNT-2018)               187
Data Science
M Enikeev, L Enikeeva, M Maleeva and I Gubaydullin




   Mathematical processing of experimental data consists in work with the image f which is matrix
f(M,N):
                                               f (0,0) f (0,1) K f (0, N − 1)         
                                                f (1,0) f (1,1) K f (1, N − 1)        
                          f ( x, y ) =                                                
                                                           MM     M                   
                                                                                      
                                        f ( M − 1,0) f ( M − 1,1) K f ( M − 1, N − 1) 
   This matrix is mathematical model of the image. Each element of the matrix is image pixel.
   The following steps can be distinguished in the recognition of surface defects:
   1. Image pre-processing (anti-aliasing, noise filtering, increasing contrast);
   2. Actual processing (image binarization and isolation of object contours);
   3. Image post-processing (filtration of contours on perimeter and area, on form coefficient and
fractality, etc).
   These operations are specific to each problem of computer visioin. Development and use of the
models suitable for the effective solution of a object detection and recognition problems, substantially
remains on the verge of science and art. The solution of this problem requires a special know-how or,
in other words, knowledge of subject domain reflecting long-term experience of a research on the
solution of specific tasks. In more detail this task is considered in work [18].
   For search of a bubble on the image we will use the Histogram of Oriented Gradients method
(HOG, [19]) The method consists in assessment of normalized gradients histograms of the image
brightness. The image is divided into small rectangular regions, in each of which brightness gradient is
calculated. For all received gradients in the area the histogram is calculated. The histogram is the
descriptor of the image region. For increase in accuracy local histograms use normalization by
contrast. In order to take into account changes in illumination and contrast, the strength of the gradient
must be locally normalized, which requires grouping the cells into larger, spatially related blocks.
Because of its locality, the HOG method is stable to rotations.




 Figure 2. Visualization of the "sliding window" on the example of the image from the data set of the
    aluminum corrosion with hydrogen depolarization and the construction of oriented gradients
                          histograms for a bubble on the aluminum surface.

   We will search for a "bubble" in the image using a "sliding window" with a size of 128 × 128
pixels. We divide it into blocks of 8 × 8. Then one window with a size of 128 × 128 pixels will contain
256 blocks. In each block, we calculate the histogram of oriented gradients with 8 cells. Thus, we get 8
× 256 = 2048 characteristics. In Fig. 2 the visualization of this method is presented, the bubble image
has a size of 128 × 128 pixels and is divided into 256 blocks. For illustrative purposes in this case a
scaled model is presented. Such a number of characteristics cannot be taken into account without the
use of machine learning. An effective method for solving this problem is the support vector machine
[20].
   Machine learning is the extraction of knowledge from data. This is a scientific field combining the
methods of statistics, artificial intelligence and computer science and also known as forecasting
analytics or statistical training. The solution of the problem of binary classification using the support



IV International Conference on "Information Technology and Nanotechnology" (ITNT-2018)                188
Data Science
M Enikeev, L Enikeeva, M Maleeva and I Gubaydullin




vector method consists in finding a linear function that correctly divides the data set into two classes.
Consider the classification problem, where the number of classes is two.
   The problem can be formulated as a search for a function y(x) that takes values greater than zero
for vectors of the same class (for bubble images) and less than zero for vectors of another class
(background). As the initial data for solving the problem, that is, searching for the classifying function
y(x), a training set of space vectors is given for which they are known to belong to one of the classes.
The collection of classifying functions can be described in terms of the function y(x). The hyperplane
is defined by the vector a and the value b, that is, y(x) = ax + b. As a result of the SVM-model
construction, a function that takes values less than zero for vectors of one class and greater than zero
for vectors of another class is found. For each new object, a negative or positive value determines
whether the object belongs to one of the classes.




                                       Figure 3. Training of SVM linear classifier.

   The sequence of actions for training of the linear SVM qualifier consists of the following steps
(Fig. 3):
   • We will analyze the image by means of a window of 128*128 pixels in size
   • We will break it into blocks of 8*8 in size. Then one window of 128*128 pixels in size will
contain 256 blocks.
   • We will count the histogram of oriented gradients with 8 cells in each block.
   • We receive 8*256 = 2048 properties шn total.
   After the objects in the image are found, in this case a bubble, we calculate its area. Since the
contour of the bubble is a circle, then, using the method of least squares for the circle, we can calculate
the necessary values for the radius and center of the bubble.

3. Experiment Analysis
The software package that implements ICAS “CorOcenka” was written in C ++ language in the Qt
SDK environment using the OpenCV library, and SQLite was used as a database.
   To solve the problem of corrosion analysis on the surface of aluminum, a sample was created,
consisting of one hundred positive and negative examples.




    Figure 4. The result of the linear classifier work on the data of the initial experiment.


IV International Conference on "Information Technology and Nanotechnology" (ITNT-2018)                 189
Data Science
M Enikeev, L Enikeeva, M Maleeva and I Gubaydullin




    Figure 5. The result of the linear classifier work on the data of an alternative experiment.

   On the sample, the SVM linear classifier was trained. Fig. 4 demonstrates that the classifier
unsatisfactorily processes bubbles that partially fall into the frame or have small dimensions. This
effect can be neglected to obtain an overall picture of the change in the area of the observed
bubbles.However, to obtain an overall picture of the change in the area of the observed bubbles, this
effect can be neglected.
   To verify the performance of the classifier, its work was tested on a set of data from another
experiment occurring under different conditions. The result of processing the experimental data is
shown in Fig. 5. Despite the fact that the classifier was trained on the data of the first experiment, it
showed good performance on an alternative data set.
   The use of the parallel implementation of the SVM training had an excellent effect on the
calculation time. In general, for the task of identifying bubbles on the image, the acceleration was
more than 15 times.
   The change in the total area of the bubbles as a function of time was obtained (Fig. 6).




                                       Figure 6. Change in bubble size over time.

   Also the possibility of bubbles search by means of contour analysis is realized, but this operation
requires the user to introduce the parameters of binarization, noise reduction, morphological analysis
and others (Fig. 7). The implementation of this approach is considered in the paper [15].

4. Conclusion
The paper considers the main aspects of image processing and analysis in the studying the corrosion
damage mechanism:
   • The computer vision and image processing in the problem of detecting bubbles on the
aluminum surface are developed;
   • The general regularity of corrosion data processing on a aluminum surface is defined;
   • The described algorithms are used for detection and recognition of corrosion damage for an
aluminum sample by observing the intensity of hydrogen bubbles formation;



IV International Conference on "Information Technology and Nanotechnology" (ITNT-2018)               190
Data Science
M Enikeev, L Enikeeva, M Maleeva and I Gubaydullin




   • The trained classifier was successfully applied to study several experiments of corrosion on the
aluminum surface.




                       Figure 7. The work of the bubble detector on the aluminum surface.

5. References
[1] Weisner M, Ihlemann J, Muller H, Lankenau E and Huttmann G 2010 Optical Coherence
     Tomography for Process Control of Laser Micromaching Rev. Sci. Instrum. 81 033705
[2] Kotenev V 2001 Optical scanning of morphology of the protective layers and forecasting of
     corrosion resistance thermooxidized steel Protection of Metals 37(6) 565-577 (in Russian)
[3] Weber M 2011 Confocal microscopy of the micro and nanostructured surfaces of materials
     Nanotech Industry 28(4) 42-47 (in Russian)
[4] Kamsu-Foguem B 2012 Knowledge-based support in Non-Destructive Testing for health
     monitoring of aircraft structures Advanced Engineering Informatics 26 859-869
[5] Itzhar D, Dinstein I and Zilberberg T 1981 Pitting corrosion evaluation by computer image
     processing Corrosion Science 21(1) 17-22
[6] Quinn M, Bailey M, Ikeda B and Shoesmith D 1993 Image-analysis techniques for investigating
     localized corrosion processes Atomic Energy of Canada Limited p 52
[7] Yan Y, Gao J, Liu Y and Lei S 2002 Recognition and classification of metal fracture surface
     models based on wavelet transform Acta Metallurgica Sinica 38(3) 309-314
[8] Rudakova О 2012 Fraktal'nyy podkhod k analizu osobennostey ustalostnogo razrusheniya
     svarnykh shvov Bulletin of the Perm National Research Polytechnic University. Mechanical
     Engineering, Materials Science 14 102-107 (in Russian)
[9] Abdel-Qader I, Abudayyeh O and Kelly M 2003 Analysis of edge-detection techniques for
     crack identification in bridges Journal of Computing in Civil Engineering 17(4) 255-263
[10] Yamaguchi T, Nakamura S, Saegusa R and Hashimoto S 2008 Image-Based Crack Detection
     for Real Concrete Surfaces IEEJ Trans Elec Electron Eng 3 128-135
[11] Prasanna P, Dana K, Gucunski N and Basily B 2012 Computer-vision based crack detection and
     analysis Proceedings of SPIE – The International Society for Optical Engineering 8345 115
[12] Abdel-Qader I, Pashaie-Rad S, Abudayyeh O and Yehia S 2006 PCA-Based algorithm for
     unsupervised bridge crack detection Advances in Engineering Software 37(12) 771- 778
[13] Lattanzi D and Miller G 2014 Robust automated concrete damage detection algorithms for field
     applications Journal of Computing in Civil Engineering 28(2) 253-262
[14] Kantola K and Tenno R 2009 Machine vision in detection of corrosion products on SO2
     exposed ENIG surface and an in situ analysis of the corrosion factors Journal of Materials
     Processing Technology 209(5) 2707-2714
[15] Belim S and Kutlunin P 2015 Boundary extraction in images using clustering algorithm
     Computer Optics 39(1) 119-124 DOI: 10.18287/0134-2452-2015-39-1-119-124
[16] Abulhanov S, Popov S, Ivliev N and Podlipnov V 2017 Device for Control of Apertures Surface
     of Pipes of Oil Assortment Procedia Engineering 176 645-652
[17] Vasin N and Diyazitdinov R 2016 A machine vision system for inspection of railway track
     Computer Optics 40(3) 410-415 DOI: 10.18287/2412-6179-2016-40-3-410-415
[18] Enikeev M, Gubaydullin I and Maleeva M 2017 Analysis of corrosion process development on

IV International Conference on "Information Technology and Nanotechnology" (ITNT-2018)            191
Data Science
M Enikeev, L Enikeeva, M Maleeva and I Gubaydullin




     metals by means of computer vision Engineering Journal 21(4) 183-192
[19] Dalal N and Triggs B 2005 Histograms of Oriented Gradients for Human Detection
     Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern
     Recognition 1 886-893
[20] Vapnik V 1999 An Overview of Statistical Learning Theory IEEE Transactions on Neural
     Networks 10(5) 988-999




IV International Conference on "Information Technology and Nanotechnology" (ITNT-2018)   192