A pipeline CCTV defect identification method, system, device and storage medium

By training the pipeline CCTV defect recognition network model and using deep networks and feature prediction units to identify pipeline defects, it solves the problem of misjudgment caused by relying on manual judgment in defect identification in the existing technology, and improves the safety and identification consistency of pipeline operations.

CN118135469BActive Publication Date: 2024-08-30广东省有色工业建筑质量检测站有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410172062.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-07
Publication Date
2024-08-30
Estimated Expiration
2044-02-07

AI Technical Summary

Technical Problem

In the existing technology, pipeline CCTV defect identification relies on the experience of engineers, and the judgment results are highly subjective and have a high probability of misjudgment, which affects the consistency of the judgment results.

Method used

Through the trained pipeline CCTV defect recognition network model, the deep network unit, pipeline defect area prediction unit and pipeline defect shape prediction unit are used to extract and predict features of pipeline image data, generate defect alarms, and reduce misjudgments in manual evaluation.

Benefits of technology

It improves the accuracy and consistency of pipeline defect identification, promptly reminds staff to deal with defects, avoids the expansion of defects, and improves the safety of pipeline operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118135469B
    Figure CN118135469B
Patent Text Reader

Abstract

The present invention discloses a pipeline CCTV defect recognition method, system, device and storage medium, the method comprising the following steps: obtaining pipeline historical defect image data, establishing a pipeline image data set, and dividing a training set and a test set; constructing a pipeline CCTV defect recognition network model, the pipeline CCTV defect recognition network comprising a deep network unit, a pipeline defect area prediction unit and a pipeline defect morphology prediction unit; using the training set to train the pipeline CCTV defect recognition network model to obtain a trained pipeline CCTV defect recognition network model; inputting the collected pipeline CCTV image to be recognized into the trained pipeline CCTV defect recognition network model to realize defect recognition of pipeline CCTV images. The present invention can accurately identify defect information in the pipeline, and promptly send an alarm to the staff, reduce the misjudgment rate caused by manual evaluation, and improve the safety of the pipeline.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of pipeline engineering detection, and in particular relates to a pipeline CCTV defect recognition method, system, equipment and storage medium. Background Art

[0002] CCTV pipeline endoscopy is currently the most widely used pipeline engineering inspection method. It mainly uses a high-definition camera mounted on a pipeline robot. The staff remotely controls the pipeline robot to move in the pipeline to collect images, and transmits the images to the ground in real time through a transmission cable for inspection. Since the images collected by the high-definition camera can accurately capture the subtle defects of the pipeline, it has a high accuracy rate for small defects in the pipeline.

[0003] However, in the prior art, pipeline CCTV defect identification and detection still relies on the experience of engineers, and the judgment results are highly subjective. Different engineers may make different judgments, which affects the consistency of the judgment results and increases the probability of misjudgment. Summary of the invention

[0004] The purpose of the present invention is to overcome the shortcomings of the above-mentioned prior art and provide a pipeline CCTV defect recognition method. Through a trained pipeline CCTV defect recognition network model, the defect information in the pipeline can be accurately identified and early warnings can be given to the staff in time, thereby reducing the misjudgment rate caused by manual evaluation and improving the safety of the pipeline.

[0005] Meanwhile, a second object of the present invention is to provide a pipeline CCTV defect recognition system.

[0006] Meanwhile, a third object of the present invention is to provide a computer device.

[0007] Meanwhile, a fourth object of the present invention is to provide a storage medium.

[0008] The purpose of the present invention is achieved through the following technical solutions:

[0009] 1. A pipeline CCTV defect identification method, comprising the following steps:

[0010] S1. Obtain historical pipeline defect image data, use a preset pipeline defect morphology mechanism and a pipeline defect area mechanism to mark the historical pipeline defect image data, establish a pipeline image data set, and divide it into a training set and a test set; the pipeline image data set includes marked historical pipeline defect images with labels and defect-free images;

[0011] S2. Construct a pipeline CCTV defect recognition network model, wherein the pipeline CCTV defect recognition network includes a deep network unit, a pipeline defect area prediction unit, and a pipeline defect morphology prediction unit; the deep network unit includes a feature detector, a feature fusion unit, and a feature converter; the pipeline defect area prediction unit includes a regional edge domain, a regional focus domain, and a regional prediction domain; the pipeline defect morphology prediction unit includes a morphological spatiotemporal block, a morphological exploration block, and a morphological prediction block;

[0012] S3, using the training set obtained in step S1 to train the pipeline CCTV defect recognition network model to obtain a trained pipeline CCTV defect recognition network model; the training process specifically includes the following steps:

[0013] S31, preprocessing the image data of the training set, and inputting the preprocessed image data into the feature detector;

[0014] S32, the feature detector extracts image feature vectors from the input image data, and inputs the image feature vectors into the morphological spatiotemporal block and the regional edge domain respectively;

[0015] S33, based on zero-phase component analysis, the morphological spatiotemporal block obtains morphological features according to the image feature vector, and the morphological exploration block processes the morphological features using the L1 norm and average operation in the channel dimension to obtain candidate morphologies;

[0016] S34, the region edge domain obtains a region of interest by calculating the L1 norm and the region average value of the position corresponding to the image feature vector, and the region focus domain performs an upsampling operation on the region of interest to obtain a candidate region;

[0017] S35, inputting the candidate morphology, candidate region and image feature vector into the feature fusion device, and the feature fusion device maps the candidate morphology and candidate region to the image feature vector to generate a fused image;

[0018] S36, the region prediction domain and the morphology prediction block respectively predict according to the fused image to generate a predicted morphology score value and a predicted region score value;

[0019] S37, the feature converter screens the predicted morphological score value and the predicted regional score value obtained in step S36 to obtain a final predicted morphological score value and a predicted regional score value, matches the final predicted morphological score value and the predicted regional score value with a preset pipeline defect morphological mechanism and a preset pipeline defect regional mechanism, and obtains a label of the input image data, wherein the label includes a defect type and a defect location coordinate;

[0020] S38, repeating steps S31-S37 to train the pipeline CCTV defect recognition network model until the model meets the termination condition, and using the pipeline CCTV defect recognition network model obtained at this time as the trained pipeline CCTV defect recognition network model;

[0021] S4. Input the collected pipeline CCTV image to be identified into the trained pipeline CCTV defect recognition network model to realize defect recognition of the pipeline CCTV image and issue a corresponding defect alarm.

[0022] Preferably, the feature detector adopts a pre-trained feature extraction network model, and the feature extraction network model adopts a ResNet-101 network model without a fully connected layer. The ResNet-101 network model without a fully connected layer includes 101 network layers, and the 101 network layers are divided into 5 convolution blocks.

[0023] Preferably, the working process of the pre-trained feature extraction network model is as follows:

[0024] When working, the pre-trained feature extraction network model directly extracts the depth features in the input image data, the pre-trained feature extraction network model directly extracts the depth features at different positions in the input image data, and the pre-trained feature extraction network model outputs the depth features at different levels. The representation is as follows:

[0025]

[0026] in, represents the kth deep feature output by the i-th convolutional block of the pre-trained feature extraction network model, M is the maximum number of channels output by the current network, i∈{1, 2, ..., 5}, φ i,k (·) represents the kth network parameter of the i-th convolutional block in the feature extraction network;

[0027] Finally, the pre-trained feature extraction network model aggregates all the output depth features into an image feature vector.

[0028] Preferably, the specific process of step S33 is as follows:

[0029] First, based on zero-phase component analysis, the morphological spatiotemporal block is constructed according to the depth feature. Obtain morphological characteristics, the morphological characteristics The expression is as follows:

[0030]

[0031]

[0032] Among them, j∈{1, 2, ..., M}, then represents the deep features, M∈{1, 2, ..., j}, I represents the identity matrix, ε represents the minimum value used to prevent the matrix from being invertible, Co represents the covariance matrix, and st represents the constraint condition;

[0033] Then, the morphological exploration block uses the L1 norm and average operation on the channel dimension to extract the morphological features. Processing to obtain candidate forms The candidate form The expression is as follows:

[0034]

[0035] Wherein, j∈{1, 2, ..., M}, t represents the radius, and t=2 can be taken.

[0036] Preferably, the process of extracting the region of interest in step S34 is as follows:

[0037] First, the edge domain of the region is related to the depth feature Calculate the L1 norm of the corresponding position to get the preliminary region of interest The representation is as follows:

[0038]

[0039] in, represents the deep features in the image feature vector; M is the maximum number of channels output by the current network;

[0040] Then the region edge domain uses the regional average operation on the preliminary region of interest to obtain the final region of interest The region of interest The expression is as follows:

[0041]

[0042] Among them, t represents the radius, r represents the area radius, and r can be set to 1.

[0043] Preferably, the specific process of step S35 is as follows:

[0044] The image feature vector obtained by mapping the candidate form and the candidate region is recorded as f2, the candidate form is recorded as C2, and the candidate region is recorded as L2. The data dimension of f2 is converted into the data dimension of the input CCTV image by bilinear interpolation, and the fused image weight coefficient Y is calculated. The fused image weight coefficient Y is expressed as follows:

[0045]

[0046] The final fused image I f The representation is as follows:

[0047] I f =Y*I k , Formula (10),

[0048] Among them, I k is the input original CCTV image data.

[0049] Preferably, the specific process of step S36 is as follows:

[0050] The region prediction domain and the morphology prediction block respectively perform a f The pixel data X in is calculated to obtain the predicted morphological score value and the predicted regional score value; the predicted morphological score value and the morphological regional score value are expressed as follows:

[0051] Y loc =softmax[(X×W loc )]·(X×V loc ), Formula (11),

[0052] Y cls =softmax[(X×W cls )]·(X×V cls ), Formula (12),

[0053] Among them, Y loc , Y cls Respectively represent the score values ​​of the predicted area and predicted form, W loc , W cls are the prediction region parameter matrix and the prediction morphology parameter matrix, V loc 、V cls They are the predicted region score matrix and the predicted morphology score matrix respectively.

[0054] A pipeline CCTV defect recognition system, used to implement the pipeline CCTV defect recognition method, the system comprising:

[0055] A sample acquisition module is used to acquire historical pipeline defect image data, and mark the historical pipeline defect image data using a preset pipeline defect morphology mechanism and a pipeline defect area mechanism, establish a pipeline image data set, and divide it into a training set and a test set; the pipeline image data set includes marked historical pipeline defect images with labels and defect-free images;

[0056] A model building module is used to build a pipeline CCTV defect recognition network model, wherein the pipeline CCTV defect recognition network includes a deep network unit, a pipeline defect area prediction unit, and a pipeline defect morphology prediction unit; the deep network unit includes a feature detector, a feature fusion unit, and a feature converter; the pipeline defect area prediction unit includes a regional edge domain, a regional focus domain, and a regional prediction domain; the pipeline defect morphology prediction unit includes a morphological spatiotemporal block, a morphological exploration block, and a morphological prediction block;

[0057] A model training module, used to train the pipeline CCTV defect recognition network model using the training set to obtain a trained pipeline CCTV defect recognition network model;

[0058] An image acquisition module is used to acquire CCTV images of pipelines to be identified in real time;

[0059] A defect recognition module, used for inputting the collected pipeline CCTV image to be recognized into the trained pipeline CCTV defect recognition network model to realize defect recognition of the pipeline CCTV image;

[0060] The defect alarm module is used to issue a corresponding defect alarm according to the defect information identified by the defect identification module.

[0061] A computer device comprises a processor and a memory for storing a program executable by the processor. When the processor executes the program stored in the memory, the pipeline CCTV defect identification method is implemented.

[0062] A storage medium stores a program, and when the program is executed by a processor, the pipeline CCTV defect identification method is implemented.

[0063] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0064] (1) The pipeline CCTV defect recognition method of the present invention recognizes the collected real-time pipeline image data through a pre-trained pipeline CCTV defect recognition model, accurately identifies the pipeline defect information and generates corresponding defect alarms, and promptly reminds the staff to deal with the relevant defects, thereby avoiding the further expansion of the pipeline defect situation and improving the safety of pipeline operation.

[0065] (2) The pipeline CCTV defect recognition model of the present invention is different from the setting of the traditional convolutional network that fully connects the feature layer and then predicts. The pipeline CCTV defect recognition model sets corresponding prediction units for the defect area and defect morphology respectively; then uses a deep feature extraction network to extract the image feature vector, and then performs deep processing on the image feature vector for the defect morphology and defect area information respectively, and generates a fused image carrying the defect morphology and defect area information based on the image feature vector carrying the defect morphology and defect area information. The regional prediction domain and morphology prediction block of the pipeline CCTV defect recognition model respectively predict based on the fused image to generate the predicted defect information of the input image data.

[0066] (3) The pipeline CCTV defect recognition model of the present invention is different from the traditional convolutional network gradient descent and back propagation algorithm. The pipeline CCTV defect recognition model of the present invention uses an improved global loss function to evaluate the network's defect feature recognition performance for the original image and the generated image. BRIEF DESCRIPTION OF THE DRAWINGS

[0067] Figure 1 A flowchart of a pipeline CCTV defect identification method provided in Example 1 of the present invention;

[0068] Figure 2 A schematic diagram of the workflow of the pipeline CCTV defect recognition network model provided in Example 1 of the present invention;

[0069] Figure 3 A training flow chart of a pipeline CCTV defect recognition network model provided in Example 1 of the present invention;

[0070] Figure 4 A schematic diagram of the structure of a pipeline CCTV defect recognition system provided in Example 2 of the present invention;

[0071] Figure 5 A schematic diagram of the structure of a computer device provided in Example 3 of the present invention.

[0072] Figure 6 A schematic diagram of the structure of a storage medium provided in Example 4 of the present invention. DETAILED DESCRIPTION

[0073] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0074] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0075] The technical solution of the present invention is further described below with reference to the accompanying drawings and through specific implementation methods.

[0076] Example 1

[0077] like Figure 1-3 As shown, this embodiment provides a pipeline CCTV defect identification method, comprising the following steps:

[0078] S1. Obtain historical pipeline defect image data, use a preset pipeline defect morphology mechanism and a pipeline defect area mechanism to mark the historical pipeline defect image data, establish a pipeline image data set, and divide it into a training set and a test set; the pipeline image data set includes marked historical pipeline defect images with labels and defect-free images;

[0079] Specifically, the pipeline defects mainly include pipeline rupture, deformation, misalignment, disconnection, leakage, corrosion, rubber ring shedding and foreign body intrusion damage.

[0080] The pipeline defect morphology mechanism corresponds to the text label of the pipeline defect type in the label, and the pipeline defect area mechanism corresponds to the corresponding pipeline defect position in the label. In this embodiment, the pipeline defect position is represented by a square frame, and the specific coordinate position is represented by the coordinates of the four endpoints of the square frame. Therefore, the label consists of the text information of the pipeline defect position and the coordinates of the four endpoints of the square frame of the pipeline defect position.

[0081] In this embodiment, the labels are represented in the form of computer-readable tensors during the training and operation of the pipeline CCTV defect recognition model network model, and the conversion between the labels and tensors is achieved through the One-Hot Encoding technology.

[0082] S2. Construct a pipeline CCTV defect recognition network model, wherein the pipeline CCTV defect recognition network includes a deep network unit, a pipeline defect area prediction unit, and a pipeline defect morphology prediction unit; the deep network unit includes a feature detector, a feature fusion unit, and a feature converter; the pipeline defect area prediction unit includes a regional edge domain, a regional focus domain, and a regional prediction domain; the pipeline defect morphology prediction unit includes a morphological spatiotemporal block, a morphological exploration block, and a morphological prediction block;

[0083] S3, using the training set obtained in step S1 to train the pipeline CCTV defect recognition network model to obtain a trained pipeline CCTV defect recognition network model;

[0084] like Figure 3 As shown, the training process of the pipeline CCTV defect recognition network model specifically includes the following steps:

[0085] S31, preprocessing the image data of the training set, and inputting the preprocessed image data into the feature detector;

[0086] S32, the feature detector extracts image feature vectors from the input image data, and inputs the extracted image feature vectors into the morphological spatiotemporal block and the regional edge domain respectively;

[0087] Specifically, in this embodiment, the feature detector uses a pre-trained feature extraction network model, and the feature extraction network model uses a ResNet-101 network model without a fully connected layer, and the ResNet-101 network model without a fully connected layer includes 101 network layers, and the 101 network layers are divided into 5 convolution blocks (conv1, conv2, conv3, conv4, conv5). The network parameters of the pre-trained feature extraction network model are set according to the optimal training parameters obtained by pre-training the ResNet-101 network model on ImageNet.

[0088] The process of extracting image feature vectors from input image data by the feature detector is as follows:

[0089] When working, the pre-trained feature extraction network model directly extracts the deep features from the input image data, thereby ensuring that the network input and the training data are approximately in the same distribution. The pre-trained feature extraction network model directly extracts the deep features at different positions in the input image data, and the pre-trained feature extraction network model outputs the deep features at different levels. The representation is as follows:

[0090]

[0091] in, represents the kth deep feature output by the i-th convolutional block of the pre-trained feature extraction network model, M is the maximum number of channels output by the current network, i∈{1, 2, ..., 5}, φ i,k (·) represents the kth network parameter of the i-th convolutional block in the feature extraction network;

[0092] Finally, the pre-trained feature extraction network model aggregates all the output depth features into an image feature vector.

[0093] S33, based on zero-phase component analysis, the morphological spatiotemporal block obtains morphological features according to the image feature vector, and the morphological exploration block processes the morphological features using the L1 norm and average operation in the channel dimension to obtain candidate morphologies;

[0094] The specific process of step S33 is as follows:

[0095] First, based on zero-phase component analysis, the morphological spatiotemporal block is constructed according to the depth feature. Obtain morphological characteristics, the morphological characteristics The expression is as follows:

[0096]

[0097]

[0098] Among them, j∈{1, 2, ..., M}, then represents the deep features, M∈{1, 2, ..., j}, I represents the identity matrix, ε represents the minimum value used to prevent the matrix from being invertible, Co represents the covariance matrix, and st represents the constraint condition;

[0099] Then, the morphological exploration block uses the L1 norm and average operation on the channel dimension to extract the morphological features. Processing to obtain candidate forms The candidate form The expression is as follows:

[0100]

[0101] Wherein, j∈{1, 2, ..., M}, t represents the radius, and t=2 can be taken.

[0102] S34, the region edge domain obtains a region of interest by calculating the L1 norm and the region average value of the position corresponding to the image feature vector, and the region focus domain performs an upsampling operation on the region of interest to obtain a candidate region;

[0103] Specifically, the specific process of step S34 is as follows:

[0104] First, the edge domain of the region is related to the depth feature Calculate the L1 norm of the corresponding position to get the preliminary region of interest The representation is as follows:

[0105]

[0106] Then, the region edge domain uses a regional average operation on the preliminary region of interest to obtain the final region of interest The region of interest The expression is as follows:

[0107]

[0108] Among them, r represents the area radius and r can be set to 1.

[0109] The regional focus domain performs an upsampling operation on the region of interest to obtain a candidate region; the specific process is as follows:

[0110] The region of interest Perform a softmax-like operation to obtain preliminary candidate regions It is expressed as follows:

[0111]

[0112] Where K represents the number of regions of interest, Represents the initialization candidate area, ranging from [0, 1].

[0113] Get preliminary candidate regions After upsampling, the final candidate region is obtained. The final candidate region The expression is as follows:

[0114]

[0115] Where Δx, Δy∈{0, 1, ..., (2 i-1 -1)}.

[0116] S35, inputting the candidate morphology, candidate region and image feature vector into the feature fusion device, and the feature fusion device maps the candidate morphology and candidate region to the image feature vector to generate a fused image;

[0117] Specifically, the working process of the feature fusion device is as follows:

[0118] The image feature vector obtained by mapping the candidate form and the candidate region is recorded as f2, the candidate form is recorded as C2, and the candidate region is recorded as L2. The data dimension of f2 is converted into the data dimension of the input CCTV image by bilinear interpolation, and the fused image weight coefficient Y is calculated. The fused image weight coefficient Y is expressed as follows:

[0119]

[0120] The final fused image I f The representation is as follows:

[0121] I f =Y*I k , Formula (10),

[0122] Among them, I k is the input original CCTV image data.

[0123] S36, the region prediction domain and the morphology prediction block respectively predict according to the fused image to generate a predicted morphology score value and a predicted region score value;

[0124] The specific process of step S36 is as follows:

[0125] The region prediction domain and the morphology prediction block respectively perform a f The pixel data X in is calculated to obtain the predicted morphological score value and the predicted regional score value; the predicted morphological score value and the morphological regional score value are expressed as follows:

[0126] Y loc =softmax[(X×W loc )]·(X×V loc ), Formula (11),

[0127] Y cls =softmax[(X×W cls )]·(X×V cls ), Formula (12),

[0128] Among them, Y loc , Y cls Respectively represent the score values ​​of the predicted area and predicted form, W loc , W cls are the prediction region parameter matrix and the prediction morphology parameter matrix, V loc 、V cls They are the predicted region score matrix and the predicted morphology score matrix respectively.

[0129] Specifically, W loc , W cls 、V loc 、V cls The matrix parameters are all the parameters obtained by the back propagation algorithm during the training of the pipeline CCTV defect recognition network model.

[0130] S37, the feature converter screens the predicted morphological score value and the predicted regional score value obtained in step S36 to obtain the final predicted morphological score value and the predicted regional score value, and matches the final predicted morphological score value and the predicted regional score value with the preset pipeline defect morphological mechanism and the pipeline defect regional mechanism to obtain a label of the input image data, wherein the label includes the defect type and the defect location coordinates;

[0131] Specifically, the working process of the feature converter is as follows:

[0132] (1) First, a preset threshold c is used to filter the predicted morphological score value. If the predicted morphological score value is lower than the preset threshold c, the predicted morphological score value is discarded. If it is higher than the preset threshold, the predicted morphological score value is retained to obtain the final predicted morphological score value. The final predicted morphological score value is matched with the tensor form corresponding to the preset label. When the match is successful, the label information of the defect morphology corresponding to the tensor is output.

[0133] Specifically, in this embodiment, the preset threshold c is set to 10%.

[0134] The matching process of the final predicted morphological score value and the preset label is as follows:

[0135] As described in step S1, in the embodiment, the tensor form of the label is a position code. Assuming that there are 8 types of defects in the pipeline, 8 fixed position code information are generated when the label data type is converted, and each position code information corresponds to 1 defect type; then the final predicted morphological score value after the threshold c is screened is recorded as Y cls 10%, then Y cls 10% is used for dimension conversion, Y cls 10% is converted into the dimension consistent with the preset defect type, and softmax (CLS) is calculated to obtain 8 values. The position encoding information corresponding to the largest value is taken and the corresponding defect description is obtained, thus completing the matching of the final predicted morphological score value with the preset label.

[0136] Specifically, the final predicted morphological score value is finally transformed as follows:

[0137] CLS=(Y cls 10%)·W C , Formula (13),

[0138] Among them, W C It is a classification output coefficient matrix.

[0139] (2) First, the predicted area score value is screened by a preset threshold d. If the predicted area score value is lower than the preset threshold d, the predicted area score value is discarded. If it is higher than the preset threshold, the predicted area score value is retained to obtain the final predicted area score value. The final predicted area score value is matched with the tensor form corresponding to the preset label. When the match is successful, the label information of the defect area coordinates corresponding to the tensor is output.

[0140] Specifically, in this embodiment, the preset threshold d is set to 30%.

[0141] Specifically, the label information of the defect area coordinates is 4 coordinates, and a square frame can be drawn according to the coordinate points through computer instructions to select the defect location.

[0142] (3) The feature converter finally outputs the defect type (label) and defect location (coordinates) corresponding to the input image data.

[0143] S38, repeating steps S31-S37 to train the pipeline CCTV defect recognition network model until the model meets the termination condition, and using the pipeline CCTV defect recognition network model obtained at this time as the trained pipeline CCTV defect recognition network model;

[0144] Specifically, the training process of the pipeline CCTV defect recognition network model is as follows:

[0145] The image data in the training set obtained in step S1 is used as an input image and input into the initial pipeline CCTV defect recognition network model. During the training process, the initial pipeline CCTV defect recognition network model is trained using a gradient descent algorithm and a back propagation algorithm. The error between the output value of the initial pipeline CCTV defect recognition network model and a preset target value is calculated, and the error is compared with a preset expected value. When the error is greater than the expected value, the error is transmitted back to the initial pipeline CCTV defect recognition network model to obtain the error of each parameter matrix, and the weight is updated according to the obtained error until the error value is less than or equal to the expected value (i.e., the preset loss function is minimized). Finally, when the preset loss function is minimized and tends to be stable, a trained pipeline CCTV defect recognition network model is obtained; the expected value in this embodiment is set to 0.00001.

[0146] Specifically, the preset loss function is expressed as follows:

[0147] L total =λL ssim +L p , Formula (14),

[0148] Among them, L prepresents the image feature vector damage, L ssim represents the structural similarity loss, and λ represents the balance parameter between the two losses.

[0149] Specifically, the balance parameter λ can be set according to the training parameters of the set network model. For example, when the training parameters are set to: 80,000 images in the training data set and the learning rate is set to 1×10 -4 , the batch size is set to 2, the number of iterations for all training data is 4, and λ is set to 100.

[0150] Image feature vector loss L p Calculated by the following formula:

[0151] L p =||OI‖2, Formula (15),

[0152] Among them, O and I represent the image feature vector f2 obtained by mapping the candidate shape and candidate region, respectively, and the feature detector extracts the image feature vector (denoted as f1) from the input image data. ||·||2 represents the difference between the calculated output O and the input I. The smaller the value, the closer the two are.

[0153] Structural similarity loss L ssim Calculate as follows:

[0154] L ssim =1-SSIM(O,I), formula (16),

[0155] Among them, SSIM(·) represents the structural similarity operation, which indicates the degree of similarity between two images in local and global structures. For example, I is the input original CCTV image data (I k ) and O are the fused images generated by the feature fusion device (I f ), the closer the value is to 1, the more similar the two images are. In order to minimize the loss, L ssim It actually indicates the degree of dissimilarity between two images.

[0156] S4. Input the collected pipeline CCTV image to be identified into the trained pipeline CCTV defect recognition network model to realize defect recognition of the pipeline CCTV image and issue a corresponding defect alarm.

[0157] Specifically, the defect alarm is formulated according to the service life, location and size of the pipeline. The defect alarm includes defect type, defect location and defect processing time. This setting is convenient for maintenance personnel to handle defects in time according to the pipeline defect alarm.

[0158] Specifically, this embodiment uses pipeline image data collected by the pipeline inspection robot as input image data.

[0159] The pipeline inspection robot adopts a pipeline inspection robot of model Schroeder S300E.

[0160] Example 2

[0161] like Figure 4 As shown, this embodiment provides a pipeline CCTV defect recognition system, which is used to implement the pipeline CCTV defect recognition method described in Example 1. The system includes:

[0162] A sample acquisition module is used to acquire historical pipeline defect image data, and mark the historical pipeline defect image data using a preset pipeline defect morphology mechanism and a pipeline defect area mechanism, establish a pipeline image data set, and divide it into a training set and a test set; the pipeline image data set includes marked historical pipeline defect images with labels and defect-free images;

[0163] A model building module is used to build a pipeline CCTV defect recognition network model, wherein the pipeline CCTV defect recognition network includes a deep network unit, a pipeline defect area prediction unit, and a pipeline defect morphology prediction unit; the deep network unit includes a feature detector, a feature fusion unit, and a feature converter; the pipeline defect area prediction unit includes a regional edge domain, a regional focus domain, and a regional prediction domain; the pipeline defect morphology prediction unit includes a morphological spatiotemporal block, a morphological exploration block, and a morphological prediction block;

[0164] A model training module, used to train the pipeline CCTV defect recognition network model using the training set to obtain a trained pipeline CCTV defect recognition network model;

[0165] An image acquisition module is used to acquire CCTV images of pipelines to be identified in real time;

[0166] A defect recognition module, used for inputting the collected pipeline CCTV image to be recognized into the trained pipeline CCTV defect recognition network model to realize defect recognition of the pipeline CCTV image;

[0167] The defect alarm module is used to issue a corresponding defect alarm according to the defect information identified by the defect identification module.

[0168] Example 3

[0169] like Figure 5As shown, this embodiment provides a computer device, which includes a processor 102, a memory, an input device 103, a display 104 and a network interface 105 connected through a system bus 101. The processor 102 is used to provide computing and control capabilities, and the memory includes a non-volatile storage medium 106 and an internal memory 107. The non-volatile storage medium 106 stores an operating system, a computer program and a database. The internal memory 107 provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium 106. When the computer program is executed by the processor 102, the pipeline CCTV defect identification method described in Example 1 is implemented.

[0170] Example 4

[0171] like Figure 6 As shown, this embodiment provides a storage medium storing a program, and when the program is executed by a processor, the pipeline CCTV defect identification method described in Example 1 is implemented.

[0172] It should be noted that the computer-readable storage medium of the present embodiment may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0173] In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device, or device. In this embodiment, the computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium may also be any computer-readable storage medium other than a computer-readable storage medium, which may send, propagate, or transmit a program used by or in combination with an instruction execution system, device, or device. The computer program contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0174] The computer readable storage medium can be written in one or more programming languages ​​or a combination thereof to execute the computer program of the present embodiment, and the programming language includes an object-oriented programming language, such as Java, Python, C++, and also includes a conventional procedural programming language, such as C language or a similar programming language. The program can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect through the Internet).

[0175] In summary, the present invention recognizes the collected real-time pipeline image data through a pre-trained pipeline CCTV defect recognition network model, accurately identifies the defect information of the pipeline and generates a corresponding defect alarm, and promptly reminds the staff to deal with the relevant defects, thereby overcoming the misjudgment problem caused by the defect recognition detection of pipeline CCTV in the prior art relying on personal subjective judgment, avoiding the further expansion of pipeline defects, and thus improving the safety of pipeline operation.

[0176] The above specific implementation modes are preferred embodiments of the present invention and cannot be used to limit the present invention. Any other changes or other equivalent replacement methods that do not deviate from the technical solution of the present invention are included in the protection scope of the present invention.

Claims

1. A pipeline CCTV defect identification method, characterized in that: The following steps are involved: S1. Obtain historical pipeline defect image data, use a preset pipeline defect morphology mechanism and a pipeline defect area mechanism to mark the historical pipeline defect image data, establish a pipeline image data set, and divide it into a training set and a test set; the pipeline image data set includes marked historical pipeline defect images with labels and defect-free images; S2. Construct a pipeline CCTV defect recognition network model, wherein the pipeline CCTV defect recognition network includes a deep network unit, a pipeline defect area prediction unit, and a pipeline defect morphology prediction unit; the deep network unit includes a feature detector, a feature fusion unit, and a feature converter; the pipeline defect area prediction unit includes a regional edge domain, a regional focus domain, and a regional prediction domain; the pipeline defect morphology prediction unit includes a morphological spatiotemporal block, a morphological exploration block, and a morphological prediction block; S3, using the training set obtained in step S1 to train the pipeline CCTV defect recognition network model to obtain a trained pipeline CCTV defect recognition network model; the training process specifically includes the following steps: S31, preprocessing the image data of the training set, and inputting the preprocessed image data into the feature detector; S32, the feature detector extracts image feature vectors from the input image data, and inputs the image feature vectors into the morphological spatiotemporal block and the regional edge domain respectively; S33, based on zero-phase component analysis, the morphological spatiotemporal block obtains morphological features according to the image feature vector, and the morphological exploration block processes the morphological features using the L1 norm and average operation in the channel dimension to obtain candidate morphologies; S34, the region edge domain obtains a region of interest by calculating the L1 norm and the region average value of the position corresponding to the image feature vector, and the region focus domain performs an upsampling operation on the region of interest to obtain a candidate region; S35, inputting the candidate morphology, candidate region and image feature vector into the feature fusion device, and the feature fusion device maps the candidate morphology and candidate region to the image feature vector to generate a fused image; the working process of the feature fusion device is as follows: The image feature vector obtained by mapping the candidate form and the candidate region is recorded as f2, the candidate form is recorded as C2, and the candidate region is recorded as L2. The data dimension of f2 is converted into the data dimension of the input CCTV image by bilinear interpolation, and the fused image weight coefficient Y is calculated. The fused image weight coefficient Y is expressed as follows: The final fused image I f The representation is as follows: If=Y*Ik,Formula (10), Among them, I k is the input original CCTV image data; S36, the region prediction domain and the morphology prediction block respectively predict according to the fused image to generate a predicted morphology score value and a predicted region score value; S37, the feature converter screens the predicted morphological score value and the predicted regional score value obtained in step S36 to obtain a final predicted morphological score value and a predicted regional score value, matches the final predicted morphological score value and the predicted regional score value with a preset pipeline defect morphological mechanism and a preset pipeline defect regional mechanism, and obtains a label of the input image data, wherein the label includes a defect type and a defect location coordinate; S38, repeating steps S31-S37 to train the pipeline CCTV defect recognition network model until the model meets the termination condition, and using the pipeline CCTV defect recognition network model obtained at this time as the trained pipeline CCTV defect recognition network model; S4. Input the collected pipeline CCTV image to be identified into the trained pipeline CCTV defect recognition network model to realize defect recognition of the pipeline CCTV image and issue a corresponding defect alarm.

2. The pipeline CCTV defect identification method according to claim 1 is characterized in that: The feature detector adopts a pre-trained feature extraction network model, and the feature extraction network model adopts a ResNet-101 network model without a fully connected layer. The ResNet-101 network model without a fully connected layer includes 101 network layers, and the 101 network layers are divided into 5 convolution blocks.

3. The pipeline CCTV defect identification method according to claim 2 is characterized in that: The working process of the pre-trained feature extraction network model is as follows: When working, the pre-trained feature extraction network model directly extracts the depth features in the input image data, the pre-trained feature extraction network model directly extracts the depth features at different positions in the input image data, and the pre-trained feature extraction network model outputs the depth features at different levels. The representation is as follows: in, represents the kth deep feature output by the i-th convolutional block of the pre-trained feature extraction network model, M is the maximum number of channels output by the current network, i∈{1, 2, ..., 5}, φ i,k (·) represents the kth network parameter of the i-th convolutional block in the feature extraction network; Finally, the pre-trained feature extraction network model aggregates all the deep features outputted as an image feature vector.

4. The pipeline CCTV defect identification method according to claim 1, characterized in that: The specific process of step S33 is as follows: First, based on zero-phase component analysis, the morphological spatiotemporal block is constructed according to the depth feature. Obtain morphological characteristics, the morphological characteristics The expression is as follows: Among them, j∈{1, 2, ..., M}, then represents the deep feature, I represents the identity matrix, ε represents the minimum value used to prevent the matrix from being invertible, Co represents the covariance matrix, and st represents the constraint condition; Then, the morphological exploration block uses the L1 norm and the average operation on the channel dimension to extract the morphological features. Processing to obtain candidate forms The candidate form The expression is as follows: Wherein, j∈{1, 2, ..., M}, t represents the radius, and t=2 can be taken.

5. The pipeline CCTV defect identification method according to claim 1, characterized in that: The process of extracting the region of interest in step S34 is as follows: First, the edge domain of the region is related to the depth feature Calculate the L1 norm of the corresponding position to get the preliminary region of interest The representation is as follows: in, represents the deep features in the image feature vector; M is the maximum number of channels output by the current network; Then the region edge domain uses the regional average operation on the preliminary region of interest to obtain the final region of interest The region of interest The expression is as follows: Among them, t represents the radius, r represents the area radius, and r can be set to 1.

6. The pipeline CCTV defect identification method according to claim 1, characterized in that: The specific process of step S36 is as follows: The region prediction domain and the morphology prediction block respectively perform a f The pixel data X in is calculated to obtain the predicted morphological score value and the predicted regional score value; the predicted morphological score value and the morphological regional score value are expressed as follows: Y loc = softmax[(X × W loc )] · (X × V loc ), Equation (11), Y cls = softmax[(X × W cls )] · (X × V cls ), Equation (12) Among them, Y loc , Y cls Respectively represent the score values ​​of the predicted area and predicted form, W loc , W cls are the prediction region parameter matrix and the prediction morphology parameter matrix, V loc 、V cls are the predicted region score matrix and the predicted morphology score matrix, V loc and V cls It is obtained through the back propagation algorithm during the training of the pipeline CCTV defect recognition network model.

7. A pipeline CCTV defect recognition system, used to implement the pipeline CCTV defect recognition method according to any one of claims 1 to 6, characterized in that: The system comprises: A sample acquisition module is used to acquire historical pipeline defect image data, and mark the historical pipeline defect image data using a preset pipeline defect morphology mechanism and a pipeline defect area mechanism, establish a pipeline image data set, and divide it into a training set and a test set; the pipeline image data set includes marked historical pipeline defect images with labels and defect-free images; A model building module is used to build a pipeline CCTV defect recognition network model, wherein the pipeline CCTV defect recognition network includes a deep network unit, a pipeline defect area prediction unit, and a pipeline defect morphology prediction unit; the deep network unit includes a feature detector, a feature fusion unit, and a feature converter; the pipeline defect area prediction unit includes a regional edge domain, a regional focus domain, and a regional prediction domain; the pipeline defect morphology prediction unit includes a morphological spatiotemporal block, a morphological exploration block, and a morphological prediction block; A model training module, used to train the pipeline CCTV defect recognition network model using the training set to obtain a trained pipeline CCTV defect recognition network model; An image acquisition module is used to acquire CCTV images of pipelines to be identified in real time; A defect recognition module, used for inputting the collected pipeline CCTV image to be recognized into the trained pipeline CCTV defect recognition network model to realize defect recognition of the pipeline CCTV image; The defect alarm module is used to issue a corresponding defect alarm according to the defect information identified by the defect identification module.

8. A computer device comprising a processor and a memory for storing a program executable by the processor, characterized in that: When the processor executes the program stored in the memory, the pipeline CCTV defect identification method according to any one of claims 1 to 6 is implemented.

9. A storage medium storing a program, characterized in that: When the program is executed by a processor, the pipeline CCTV defect identification method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Glass defect detection method and device based on deformable convolution and feature fusion

    CN114170230A

  • Welding defect detection method based on shape perception

    CN114943843A