Pipeline Damage Assessment Based on Corrosion Segmentation Using JetRacer Kit

. This paper describes the development of a criticality assessment of corroded metallic pipelines using the JetRacer Kit. Considering the difficulty of accessing pipelines from the inside, the developed program launched on a robotic platform allows for diagnostics. Replacing damaged sections of pipelines after scanning can increase the longevity of operation. The video stream is segmented using the method of separating colour characteristics of corrosion at different stages of its progression and tested on the system at several investigated corrosion areas inside the pipelines. The process of segmentation of corrosion into three levels, high, medium, and low, is described. Each damage level is visualized using the corresponding colours: red, orange, and yellow. In addition, the corrosion concentration for each level was grouped into selected rectangles. Damage assessment is based on the segmented number of found image pixels. The work results can be helpful for services engaged in diagnosing pipelines.


INTRODUCTION
Metal pipelines provide underground and surface communications for water supply and more.With constant operation and the action of external factors, defects in metals begin to appear.A peculiarity of metal is the process of corrosion fatigue.The internal parts of the pipelines are often more vulnerable than the external ones, given the constant operation and interaction with moisture.Pipe sizes are different, and visual assessment can be an alternative for assessing the criticality of the pipeline condition.One of the disadvantages of visual assessment is the lack of natural lighting and demanding access to pipeline bottlenecks.When metal elements are affected by corrosion, one of the ways to extend their durability is to replace the damaged part.
Corrosion detection processes in metal pipes can be automated using robotic operating systems (ROS).
Corrosion detection using machine learning methods was implemented in [1].Thus, the technique automates the approach for recognizing damage to metal.However, assessment using criticality classification is not taken into account.Corrosion detection with more application details and comparisons is implemented in [2].The specificity of this study is in the study of external damage and not the internal parts of the pipes.The paper [3] shows the possibility of classifying corrosion in infrastructure objects by degree.In general, much attention is paid to the external features of corrosion detection, but the indicated chances are not for the internal scanning of pipelines.There are several studies based on similar principles of damage assessment.The determination of damaged pixels is based on the principle of the percentage of damage in work [4] and the use of robotic tools [5], and a general list of various achievements in this area of research is listed [6].
This paper aims to implement a solution for the segmentation of corrosion in the internal part of the pipeline based on the data collected from the JetRacer Kit.
The main tasks in the work are the following: -the grouping of metal corrosion damage into three categories according to colour saturation; -analysis of frames from the video stream with the available amount of corrosion in graphical dependence.

MATERIALS AND METHODS
The JetRacer Kit is an assembled model based on the Nvidia Jetson Nano microcomputer with a connected camera, motors for movement and more.Taking into account the possibility of action from the teleoperation of the remote control, the investigation of damaged sections of pipelines can take place in hard-to-reach places.The Linux operating system is installed on the Jetson Nano with additional Python libraries to provide movement work with images and calculations [7].
Each image consists of pixels that have the property of a combination of RGB (red, green, blue).The program's algorithm for matching pixel colours to colour range templates for critical, medium, and minor corrosion damage to a pipeline section.The OpenCV library is used to work with image pixels [8].
In addition, damage is grouped according to the criticality of corrosion fatigue in the metal.For this, a search is carried out from each group for the minimum and maximum values on the x and y axes.The beginning of the rectangle that encloses the damaged area is taken in the minimum x and y coordinates, and the length and width are the difference between the maximum and minimum values along the axes.

RESULTS AND DISCUSSION
Implementation.Robotic tools make it possible to automate the process of detecting defects in various infrastructure facilities.In the same way, it can be applied to detect corrosion [9].As shown in the visualization in Figure 1, the JetRacer Kit moves in the pipe and records and stores the number of detected critical damages in the investigated area.
The camera captures pixels with specific template colours of corrosion of different criticality in the movement process.The main steps of the software algorithm are shown in Figure 2.
The conditions for falling into a specific range for other states will involve a deviation from 5 to 25 units in the colour scale.Calculation of corroded section.To assess the criticality of the effect of corrosion on parts of a metal pipeline, it is worth considering the recognition of visual damage.Figure 3a shows a frame from a video shot using the JetRacer Kit in an old pipe covered with corrosion from the inside.Figure 3b shows the overlay of colour filters on a frame with corrosion damage.In the case of sand and dust in the pipeline, places with corrosion in those parts may not be accurately detected.However, it is possible to visually identify the damaged interests with an indication of criticality quite precisely by standard colours.Suppose it is necessary to separate only other degrees of corrosion criticality.In that case, it can be done as shown in Figure 4b and Figure 4c for medium condition and light degree of damage, respectively.The amount of corrosion in percentage by level was found to be high -1.535%,medium -21.357%, and low -4.01%.
In the same way, we tried to recognize corrosion in a more detailed fragment, as shown in Figure 5a.In a pipe, especially an old one, the robot has many obstacles to move.Therefore, the camera changes the shooting angle when the robot hits obstacles.As shown in Figure 5b, the detected corrosion of a high level of 0.007%, an average level of 0.96% and a low level of 0.27% was calculated. а)

b)
Figure 5 -The process of detected corrosion in a more detailed frame: a) input, b) processed image Also, this same method was tested in a pipe with garbage, cobwebs and leaves, as shown in Figure 6a.The classification according to the corrosion colour in Figure 6b was carried out, and the results were quite good, considering that the extra elements did not fall under the detection conditions.Also, some details in the image are difficult to evaluate regarding criticality without using computer vision methods.
The result is the calculated percentage of damage in the frame: high corrosion covers 0.005%, medium -0.19%, and low -4.0%.The total damage result can be obtained by adding these percentage numbers and tracking its change during the robot's path.The dependence of several frames from the beginning of the pipe is shown in Figure 8.

Figure 8 -Considering the percentage ratio between a small area with frame iterations changes the criticality of corrosion
On such a small video, you can assess the condition of the pipe section.The percentage of highlevel corrosion damage is around 0.4%, medium -about 2%, and low -3.5%.The studied statistics show the places that need urgent repair or the current section of the pipeline.If certain critical percentage limits are inserted for each type of corrosion, then the pipe's condition can be determined.Clarification of the location of the lesion can occur with the start of a video recording in which the frame can be tracked.
A histogram with RGB values can also determine the highest colour frequency, as shown in Figure 9.The prominent histogram peaks show the number of pixels found with that colour.This method can be used to clarify the conditions for determining corrosion from a video frame.
The corrosion detection and classification process between repair criticality levels in such an automated way can be improved by specifying conditions from the colour histogram.In addition, this process can identify and assess the situation, which can help monitor entire water supply systems [10][11][12][13], leading to the house and other hard-to-reach places for humans.In addition, it is worth considering risks and assessments when implementing such systems [14,15].In researching the potential possibilities of assessing the condition of pipes from the inside, filtering methods and conversion into numerical values of pipe corrosion damage were analyzed.
The limitation of such a JetRacer Kit robot device in size is 20 centimetres in all directions.That is, monitoring will not be possible in thinner pipes.
The quality and presence of lighting in such dark places are essential as they affect the assessment of the criticality of the condition.Even considering the obstacles of cobwebs, leaves or sand in the pipe, this corrosion segmentation quite accurately visually detects damage.
One of the critical points for the quality of the evaluation is the robot's speed, which affects the clarity of the frames.The movement in the pipes should be slow, with stops to fix structures.
The criticality of the state of determination can be adjusted according to the conditions because, often, lighting at work and dust in the pipe can make it challenging to detect corrosion and evaluate it accordingly.

CONCLUSIONS
This paper describes the process of working with the JetRacer Kit camera to assess the criticality of pipes using the method of corrosion segmentation.The division into corrosion criticality is implemented based on colour conditions and RGB values.Given the difficulty of accessing the inner part of the pipe, the method of visual assessment from the robot camera was used.In addition, the process of corrosion detection and damage assessment is described.The detection method is tested on corroded pipes with varying degrees of damage.Also, some frames contained extraneous elements, which did not affect damage detection.
Criticality scores are converted into numerical values using the number of pixels found under the specified conditions by colour.In this way, it is possible to monitor the state of the pipe in case of corrosion in metal pipes.

Figure 1 -
Figure 1 -Visualization of the pipeline scanning process for corrosion

Figure 2 -
Figure 2 -Visualization of the main steps of the algorithm for recognizing and classifying corrosion colours according to the state of criticality

Figure 3 -Figure 4 -
Figure 3 -Video frame with detected corrosion in the pipeline: a) input, b) processed

Figure 6 -Figure 7 -
Figure 6 -An example of classification of corrosion with foreign objects in the pipe: a) input, b) processed image

Figure 9 -
Figure 9 -Histogram of colour pixel frequency: a) frame from Figure 7a, b) first frame from Figure 7b