Overhead pipeline defect identification method, device, equipment and medium

By enhancing data and extracting the defect images of overhead pipelines, a dual-branch learning network is built, which solves the problems of low manual inspection efficiency and insufficient recognition accuracy in the prior art, and achieves efficient and accurate identification of overhead pipeline defects.

CN119625395AActive Publication Date: 2025-03-14BEIJING UNIV OF CIVIL ENG & ARCHITECTURE
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411688576.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-25
Publication Date
2025-03-14
Estimated Expiration
2044-11-25

Smart Images

  • Figure CN119625395A_ABST
    Figure CN119625395A_ABST
Patent Text Reader

Abstract

The invention provides an overhead pipeline defect identification method, apparatus and device, and a medium. The method comprises: a model training stage: performing data enhancement on an original defect image in a data set to obtain a plurality of groups of enhanced defect images; wherein the enhanced defect image comprises a first part image and a second part image; constructing a first loss function of the classification branch sub-model by using the first feature vector of the first part image; constructing a second loss function representing the learning branch sub-model by using a second feature vector of the second part image; wherein the first loss function and the second loss function are used for constructing an overall loss function; performing parameter adjustment on the overall loss function to obtain a defect identification model; and a model use stage: inputting a to-be-detected image of the to-be-detected overhead pipeline into the defect identification model to obtain a defect identification result output by the defect identification model. According to the invention, the identification capability and the identification precision of pipeline defects under long tail distribution are obviously improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of defect identification, and in particular to a method, device, equipment and medium for identifying defects in overhead pipelines. Background Art

[0002] As a key part of modern urban infrastructure, overhead pipelines are responsible for urban water supply, gas supply and transportation of various important materials. However, with the passage of time and the continuous influence of the external environment, overhead pipelines have gradually exposed a series of safety hazards such as aging, corrosion, and mechanical damage. If these safety hazards are not discovered and properly handled in time, it will not only lead to the degradation of pipeline performance, but also may trigger serious safety accidents, causing adverse effects on urban operations and residents' lives. Therefore, it is particularly important to strengthen the maintenance and management of overhead pipelines to ensure their safe and stable operation.

[0003] In the past, manual inspection was often used as the main method for detecting defects in overhead pipelines. Inspectors evaluate pipelines by visual observation, handheld inspection equipment such as telescopes, and using climbing equipment such as climbing ropes to approach overhead pipelines. However, manual inspection is not only inefficient and has safety hazards, but is also easily affected by subjective factors, resulting in missed inspections or misjudgments. In addition, with the acceleration of urbanization, the number of overhead pipelines has increased dramatically, and the pressure on manual inspections has also increased. Therefore, there is an urgent need for an efficient and accurate detection method to meet the growing demand for overhead pipeline inspections. Summary of the invention

[0004] In view of this, the purpose of the present application is to provide a method, device, equipment and medium for identifying defects in overhead pipelines to overcome the problems in the prior art.

[0005] In a first aspect, an embodiment of the present application provides a method for identifying defects in an overhead pipeline, the method comprising: a model training phase and a model use phase;

[0006] The model training phase includes:

[0007] Performing data enhancement on the original defect images in the data set to obtain multiple groups of enhanced defect images; wherein the enhanced defect images include a first partial image and a second partial image;

[0008] Using the first feature vector of the first partial image to construct a first loss function of the classification branch sub-model;

[0009] Using the second feature vector of the second partial image to construct a second loss function representing the learning branch sub-model; wherein the first loss function and the second loss function are used to construct an overall loss function;

[0010] By adjusting the parameters of the overall loss function, a defect recognition model is obtained;

[0011] The model use phases include:

[0012] The image of the overhead pipeline to be tested is input into the defect recognition model to obtain the defect recognition result output by the defect recognition model.

[0013] In some technical solutions of the present application, the original defect images in the data set are enhanced to obtain multiple groups of enhanced defect images; wherein the enhanced defect images include a first partial image and a second partial image, including:

[0014] Performing data enhancement on the original defect image in the data set using a first preprocessing method to obtain the first partial image;

[0015] The second preprocessing method and the third preprocessing method are used to perform data enhancement on the original defect image in the data set to obtain the second part of the image.

[0016] In some technical solutions of the present application, the above-mentioned defect recognition model includes a backbone network; wherein the backbone network is used to extract basic features to obtain a first basic feature map of the first partial image and a second basic feature map of the second partial image.

[0017] In some technical solutions of the present application, the above classification branch sub-model includes: an adaptive perception module, a global attention pooling module, and a classification layer;

[0018] The adaptive perception module is used to dynamically adjust the first basic feature map of the first partial image, and fuse the adjusted features with the original features through a residual connection to obtain a fused first adjusted feature map;

[0019] The global attention pooling module is used to perform a pooling operation on the fused first adjusted feature map, dynamically assign weights to different feature regions, and thus generate a first feature vector of the first partial image;

[0020] The classification layer is used to map the first feature vector to obtain a first mapping vector, and use the first mapping vector to construct a first loss function of the classification branch sub-model.

[0021] In some technical solutions of the present application, the adaptive perception module is used to dynamically adjust the first basic feature map of the first partial image, and fuse the adjusted features with the original features through a residual connection to obtain a fused first adjusted feature map, including:

[0022] Using a first convolution branch and a second convolution branch to perform a convolution operation on the first basic feature map respectively, to obtain a first convolution map and a second convolution map; wherein the first convolution map and the second convolution map are used to fuse to obtain a first fusion map;

[0023] Performing a pooling operation and a compression operation on the first fusion image in sequence to obtain a fourth eigenvector;

[0024] Processing the fourth eigenvector through an attention mechanism to obtain a first weight of the first convolution branch and a second weight of the second convolution branch;

[0025] The first convolution map and the second convolution map are fused according to the first weight and the second weight to obtain the preliminary adjusted feature map.

[0026] The preliminary adjusted feature map is fused with the first basic feature map by element-by-element addition through a residual connection to obtain the first adjusted feature map that is finally output.

[0027] In some technical solutions of the present application, the second partial image includes a first sub-image and a second sub-image;

[0028] The representation learning branch sub-model includes: a cross-space feature fusion module, a multi-layer perceptron and a clustering module;

[0029] The cross-space feature fusion module is used to enrich the second basic feature map of the first sub-image and the third basic feature map of the second sub-image to obtain the second feature vector of the first sub-image and the third feature vector of the second sub-image;

[0030] The multilayer perceptron is used to map the second eigenvector and the third eigenvector to obtain a second mapping vector of the second eigenvector and a third mapping vector of the third eigenvector;

[0031] A clustering module is used to construct a second loss function representing a learning branch sub-model for the second mapping vector and the third mapping vector based on a vMF mixed distribution.

[0032] In some technical solutions of the present application, the cross-space feature fusion module enriches the second basic feature map of the first sub-image in the following manner to obtain the second feature vector of the first sub-image:

[0033] Using multiple branches to process the second basic feature map to obtain processing results of multiple branches;

[0034] The second feature vector of the first sub-image is obtained by fusing the processing results of multiple branches.

[0035] In a second aspect, an embodiment of the present application provides a device for identifying defects in an overhead pipeline, the device comprising:

[0036] Model training module and model usage module;

[0037] The model training module is used to:

[0038] Performing data enhancement on the original defect images in the data set to obtain multiple groups of enhanced defect images; wherein the enhanced defect images include a first partial image and a second partial image;

[0039] Using the first feature vector of the first partial image to construct a first loss function of the classification branch sub-model;

[0040] Using the second feature vector of the second partial image to construct a second loss function representing the learning branch sub-model; wherein the first loss function and the second loss function are used to construct an overall loss function;

[0041] By adjusting the parameters of the overall loss function, a defect recognition model is obtained;

[0042] The model uses modules for:

[0043] The image of the overhead pipeline to be tested is input into the defect recognition model to obtain the defect recognition result output by the defect recognition model.

[0044] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned method for identifying defects in overhead pipelines when executing the computer program.

[0045] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the above-mentioned method for identifying defects in overhead pipelines are executed.

[0046] The technical solution provided by the embodiments of the present application may have the following beneficial effects:

[0047] The method of the present application includes the model training phase, which includes: performing data enhancement on the original defect images in the data set to obtain multiple groups of enhanced defect images; wherein the enhanced defect images include a first partial image and a second partial image; using the first eigenvector of the first partial image to construct a first loss function of a classification branch sub-model; using the second eigenvector of the second partial image to construct a second loss function representing the learning branch sub-model; wherein the first loss function and the second loss function are used to construct an overall loss function; by adjusting the parameters of the overall loss function, a defect recognition model is obtained; the model use phase includes: inputting the image to be tested of the overhead pipeline to be tested into the defect recognition model to obtain a defect recognition result output by the defect recognition model.

[0048] The method of this application significantly improves the recognition ability of pipeline defects under long-tail distribution by optimizing the pipeline defect recognition and classification module. It has high recognition accuracy for balanced or unbalanced pipeline defect images, and the model speed is faster.

[0049] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0051] Figure 1 A schematic flow chart of a method for identifying defects in an overhead pipeline provided in an embodiment of the present application is shown;

[0052] Figure 2 A schematic diagram of an overall framework provided by an embodiment of the present application is shown;

[0053] Figure 3 A branch network schematic diagram provided in an embodiment of the present application is shown;

[0054] Figure 4 A schematic diagram of an adaptive sensing module provided in an embodiment of the present application is shown;

[0055] Figure 5 A schematic diagram of a cross-space feature fusion module provided in an embodiment of the present application is shown;

[0056] Figure 6 A schematic diagram of an overhead pipeline defect identification device provided in an embodiment of the present application is shown;

[0057] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0058] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.

[0059] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0060] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.

[0061] As a key part of modern urban infrastructure, overhead pipelines are responsible for urban water supply, gas supply and transportation of various important materials. However, with the passage of time and the continuous influence of the external environment, overhead pipelines have gradually exposed a series of safety hazards such as aging, corrosion, and mechanical damage. If these safety hazards are not discovered and properly handled in time, they will not only lead to the degradation of pipeline performance, but may also trigger serious safety accidents, causing adverse effects on urban operations and residents' lives.

[0062] The formation of defects in overhead pipelines may be caused by the combined effects of multiple factors, such as long-term ultraviolet radiation, the continuous impact of bad weather, the erosion of chemical substances, and the accumulation of mechanical stress. Under the long-term effects of these factors, the performance of the pipeline gradually deteriorates and the material is damaged, thereby increasing the risk of defects. For example, pipeline corrosion is one of the most common defects of overhead pipelines. Especially in a humid environment or under the action of chemical corrosive media, the surface of the metal pipeline is prone to oxidation and corrosion, which not only seriously weakens the structural strength of the pipeline, but also threatens its stability. In addition, overhead pipelines may also encounter mechanical impact or external damage, such as accidental contact during construction, traffic accidents, wind disasters and other emergencies. These unforeseen events may cause deformation, rupture or even more serious structural damage to the pipeline, which in turn affects the normal operation and safety of the pipeline. In view of this, timely and accurate identification of overhead pipeline defects and taking corresponding repair and maintenance measures are of vital importance to ensure the stable operation of the urban supply system and the safety of residents' lives.

[0063] In the past, manual inspection was often used as the main method for detecting defects in overhead pipelines. Inspectors evaluate pipelines by visual observation, handheld inspection equipment such as telescopes, and using climbing equipment such as climbing ropes to approach overhead pipelines. However, manual inspection is not only inefficient and has safety hazards, but is also easily affected by subjective factors, resulting in missed inspections or misjudgments. In addition, with the acceleration of urbanization, the number of overhead pipelines has increased dramatically, and the pressure on manual inspections has also increased. Therefore, there is an urgent need for an efficient and accurate detection method to meet the growing demand for overhead pipeline inspections.

[0064] In recent years, with the development of computer vision and deep learning technology, intelligent detection methods have gradually been introduced into the defect identification of overhead pipelines. Using drones, high-definition cameras and other equipment for real-time monitoring and automatic data collection, the collected image data is transmitted to a remote server with strong data processing capabilities and combined with deep learning algorithms for defect identification processing. In the urban overhead pipeline image data set, some defect types may appear frequently, while other rare defect types may show a long-tail distribution. However, most deep learning algorithms are based on relatively balanced data sets. For real data, the amount of data in different categories is usually not an ideal uniform distribution, but an unbalanced data distribution. For long-tail distributed data, it is equally important to pay attention to those rare defect types. Rare defects may represent potential safety hazards and require special attention and identification. The more the number of low-frequency categories, the greater the gap between the number of samples and the number of high-frequency samples, and the lower the recognition accuracy of defects, which poses a challenge to traditional supervised learning algorithms.

[0065] Based on this, the embodiments of the present application provide a method, device, equipment and medium for identifying defects in an overhead pipeline, which are described below through embodiments.

[0066] Figure 1 A flow chart of a method for identifying defects in an overhead pipeline provided in an embodiment of the present application is shown, wherein the method includes steps S101, a model training phase, and S102, a model use phase; specifically:

[0067] S101, the model training phase includes:

[0068] Performing data enhancement on the original defect images in the data set to obtain multiple groups of enhanced defect images; wherein the enhanced defect images include a first partial image and a second partial image;

[0069] Using the first feature vector of the first partial image to construct a first loss function of the classification branch sub-model;

[0070] Using the second feature vector of the second partial image to construct a second loss function representing the learning branch sub-model; wherein the first loss function and the second loss function are used to construct an overall loss function;

[0071] By adjusting the parameters of the overall loss function, a defect recognition model is obtained;

[0072] S102, the model use phase includes:

[0073] The image of the overhead pipeline to be tested is input into the defect recognition model to obtain the defect recognition result output by the defect recognition model.

[0074] The method of this application significantly improves the recognition ability of pipeline defects under long-tail distribution by optimizing the pipeline defect recognition and classification module. It has high recognition accuracy for balanced or unbalanced pipeline defect images, and the model speed is faster.

[0075] Some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0076] In the model training stage, the embodiment of the present application needs to first determine the data set for model training. Figure 2 As shown in the figure, we collect image data and build a dataset of urban overhead pipeline defects: we use drones equipped with high-definition cameras to collect actual images of pipelines to ensure that all possible types of defects and different environmental conditions are covered. We manually screen the original images that can truly reflect the status of the pipelines, especially those containing potential defects.

[0077] The original defect images in the data set are enhanced to obtain multiple sets of enhanced defect images; the collected images are preprocessed, that is, data enhancement is performed. The first preprocessing method performs conventional image enhancement: random cropping, random horizontal flipping, and normalization; the second preprocessing method performs enhanced image enhancement: random cropping to a specified size, random horizontal flipping, random changes in image brightness, contrast, saturation and hue, converting the image to grayscale with a probability of 0.2, Gaussian blur, and normalization.

[0078] Specifically, the first preprocessing method is used to perform data enhancement on the original defect images in the data set to obtain the first partial image; the second preprocessing method and the third preprocessing method are used to perform data enhancement on the original defect images in the data set to obtain the second partial image.

[0079] For example, for the same defect image, three different image preprocessing operations are applied to obtain the first part of the image and the second part of the image (enhanced images x1, x2 and x3). The first part of the image is the enhanced image x1, which is used for the classification task, and the second part of the image is the enhanced images x2 and x3, which are used for the contrast learning task.

[0080] like Figure 3 As shown, after the data is enhanced, a dual-branch learning network consisting of a classification branch based on a linear classifier and a representation branch based on a projection head is constructed, and the network is improved in combination with the overhead pipeline defect features. The improved dual-branch learning model for defect recognition includes: a backbone network, a classification branch, and a representation learning branch. The backbone network is used to extract basic features, obtain a first basic feature map of the first partial image, and extract a second basic feature map of the second partial image.

[0081] In the classification branch, the network first extracts basic features, then dynamically adjusts the basic features through the adaptive perception module, while retaining the original feature information and fusing them through residual connections. This module can dynamically adapt to the optimal perception scale, while refining the feature extraction, while maintaining the complement and balance of the original global information. Subsequently, after the global attention pooling module, the network can dynamically assign different weights to different feature regions, thereby further enhancing the feature expression of key regions and generating the category feature vector f1 of the image x1. This design effectively alleviates the possible information loss in deep feature extraction through residual connections, allowing the network to more accurately focus on fine-grained features for the head category, while expanding the perceptual field for the tail category and capturing a wider range of contextual information, thereby significantly improving the classification performance. Subsequently, the one-dimensional feature vector f1 is passed to the fully connected classification layer, during which the refined features are mapped to the new feature space to generate the logits s required for classification, where s represents the confidence prediction for each category, which is a key step in the classification process and directly affects the generation of the final classification result. After obtaining the logits, the softmax function is applied to normalize them into a probability distribution. Finally, the probability obtained from the softmax function is used to calculate the cross entropy loss L for the classification branch. CE :

[0082]

[0083] where y i is the true label, v i is the predicted probability. This loss function measures the deviation between the predicted probability distribution and the actual label distribution. By minimizing this loss, the weights of the fully connected classification layer can be further adjusted to reduce the classification error.

[0084] The improved representation learning branch can achieve multi-scale perception and cross-space learning. By fusing spatial features of different scales and regions, it promotes feature complementarity, thereby effectively extracting transferable and highly discriminative features suitable for long-tail image tasks. First, the backbone network extracts the basic feature vectors f′2 and f′3 of images x2 and x3, and then further processes these features through the cross-space feature fusion module to generate richer multi-scale category feature representations, denoted as f2 and f3; then a multi-layer perceptron MLP with hidden layers is used to map the feature representations f2 and f3 to another feature space to obtain representations z2 and z3 for contrastive learning. MLP consists of multiple layers of fully connected networks and can learn more abstract and high-order feature representations. All representations used for contrastive learning here are normalized using the L2 norm to ensure that the feature space is a unit hypersphere.

[0085] In order to solve the problem of class imbalance caused by long-tail distribution, vMF (von Mises-Fisher) mixed distribution is introduced to model the normalized feature vector in contrastive learning. vMF distribution can enhance the compactness of feature clusters and alleviate the class imbalance in long-tail classification through uniform distribution in hypersphere space. On this basis, a new loss function L corresponding to the learning branch is derived. R This loss function reduces the reliance on large-scale sample sampling by generating enough comparison pairs, thus improving the overall performance of the model in long-tail data.

[0086] Throughout the framework, the representation learning branch and the classification branch work closely together, aiming to minimize the overall loss function through the following coordinated training process:

[0087] L=αL R +βL CE

[0088] Among them, L represents the overall loss function of the model, which is composed of the classification branch loss L CE and represents the learning branch loss L R The weighted combination ensures the dual optimization of classification performance and feature learning. During the optimization process, the stochastic gradient descent algorithm is used to train the two branches simultaneously. Through this design, the recognition model we designed shows stronger generalization ability and higher classification accuracy under long-tail pipeline defect image data.

[0089] Specifically, the classification branch sub-model includes: an adaptive perception module, a global attention pooling module, and a classification layer;

[0090] The adaptive perception module is used to dynamically adjust the first basic feature map of the first partial image, and fuse the adjusted features with the original features through a residual connection to obtain a fused first adjusted feature map;

[0091] The global attention pooling module is used to perform a pooling operation on the fused first adjusted feature map, dynamically assign weights to different feature areas, and thus generate a first feature vector of the first partial image; the classification layer is used to map the first feature vector to obtain a first mapping vector, and use the first mapping vector to construct a first loss function of the classification branch sub-model.

[0092] The adaptive perception module is used to dynamically adjust the first basic feature map of the first partial image, and fuse the adjusted features with the original features through a residual connection to obtain a fused first adjusted feature map, including:

[0093] Using a first convolution branch and a second convolution branch to perform a convolution operation on the first basic feature map respectively, to obtain a first convolution map and a second convolution map; wherein the first convolution map and the second convolution map are used to fuse to obtain a first fusion map;

[0094] Performing a pooling operation and a compression operation on the first fusion image in sequence to obtain a fourth eigenvector;

[0095] Processing the fourth eigenvector through an attention mechanism to obtain a first weight of the first convolution branch and a second weight of the second convolution branch;

[0096] The first convolution map and the second convolution map are fused according to the first weight and the second weight to obtain the preliminary adjusted feature map.

[0097] The preliminary adjusted feature map is fused with the first basic feature map by element-by-element addition through a residual connection to obtain the first adjusted feature map that is finally output.

[0098] Specific as Figure 4 As shown in the figure, the receptive field of a certain layer in a traditional convolutional neural network is fixed and cannot be adjusted dynamically according to the input, which limits the ability to capture multi-scale information. The adaptive perception module designed here can provide multiple receptive field options for neurons, and adjust the optimal output through a dynamic weight mechanism to capture the multi-scale features of the target object. The design of residual connection further ensures the robustness and information integrity of the features, thereby improving the representation ability of the final feature map.

[0099] Assume that the first basic feature map of the first part of the input image is X∈R, the first basic feature map is first sent to two branches (the first convolution branch and the second convolution branch): the first convolution branch applies a 3×3 convolution kernel, and the second convolution branch applies a 5×5 convolution kernel (to improve efficiency, the 5×5 convolution is replaced by an expansion convolution with a dilation rate of 2, which can maintain a larger receptive field and reduce the amount of calculation). Each branch generates its own output feature map (the first convolution map and the second convolution map), which are respectively recorded as the first convolution map (3×3 convolution output) and the second convolution map (5×5 convolution output).

[0100]

[0101] Among them, F3 and F5 represent 3×3 and 5×5 convolution operations respectively.

[0102] The first convolutional graph and the second convolutional graph are fused by element-by-element addition to obtain a first fused graph U:

[0103]

[0104] The first fusion map is then pooled by global average pooling to generate a global channel-level statistical vector s, which summarizes the global information of each channel.

[0105]

[0106] In order to further compress features and reduce the amount of computation, a fully connected layer is used to reduce the dimension of the global information and generate a compact fourth eigenvector z to guide the subsequent selection process.

[0107] z=σ(Ws)

[0108] Where σ is the activation function and W is the weight matrix of the fully connected layer.

[0109] This step fuses the information from different convolution kernel branches and generates global information to help the selection of subsequent branches, ensuring that information at different scales can be integrated and provide a basis for the next step.

[0110] Use vector z to generate weights a and b for each branch through the softmax attention mechanism, corresponding to 3×3 and 5×5 convolution kernel branches respectively:

[0111]

[0112] Where A and B are weight matrices, ensuring that a+b=1.

[0113] According to the generated weights a and b, the output feature maps of the two branches are weighted summed to generate a preliminary adjusted feature map V:

[0114]

[0115] Finally, the input first basic feature map X is fused element by element with the adjusted feature map V through the residual connection to obtain the final first adjusted feature map:

[0116] V final =V+X

[0117] This module dynamically selects the optimal feature representation by providing multiple receptive field options (such as 3×3 and 5×5 dilated convolution kernels), and combines residual connections to retain the original feature information, further improving the refinement and expression capabilities of features. The representation learning branch sub-model includes: cross-space feature fusion module, multi-layer perceptron and clustering module;

[0118] The cross-space feature fusion module is used to enrich the second basic feature map of the first sub-image and the third basic feature map of the second sub-image to obtain the second feature vector of the first sub-image and the third feature vector of the second sub-image;

[0119] The multilayer perceptron is used to map the second eigenvector and the third eigenvector to obtain a second mapping vector of the second eigenvector and a third mapping vector of the third eigenvector;

[0120] A clustering module is used to construct a second loss function representing a learning branch sub-model for the second mapping vector and the third mapping vector based on a vMF mixed distribution.

[0121] The cross-space feature fusion module enriches the second basic feature map of the first sub-image in the following manner to obtain a second feature vector of the first sub-image:

[0122] Using multiple branches to process the second basic feature map to obtain processing results of multiple branches;

[0123] The second feature vector of the first sub-image is obtained by fusing the processing results of multiple branches.

[0124] Specifically, Figure 5 As shown in Figure 1, the core of this module is the design of parallel sub-networks. First, the global feature extraction sub-network extracts global dependency information from the horizontal and vertical directions respectively through average pooling (AvgPool) operations in the X and Y directions.

[0125] The two-dimensional global pooling operation formula is as follows:

[0126]

[0127] Therefore, the output of the cth channel at height h can be expressed as:

[0128]

[0129] Similarly, the output of the cth channel with width W can be written as:

[0130]

[0131] After pooling, the two one-dimensional feature vectors are concatenated along the channel dimension to produce a pair of direction-aware feature maps.

[0132] Next, these concatenated features are subjected to dimensionality reduction through a 1×1 convolution operation, which not only reduces the number of channels but also promotes the deep fusion of spatial information.

[0133] Subsequently, the generated attention map is normalized by applying the sigmoid function (denoted as σ) to compress the values ​​between 0 and 1, thereby giving different weights to the features of each channel. This process significantly improves the multi-scale perception ability of the model, ensures that the model can evenly pay attention to the feature distribution in different directions, and provides a basis for subsequent feature re-weighting.

[0134] in, Represents element-by-element multiplication. By applying the attention map to the original input features, weighted features are generated, thereby achieving cross-space feature reweighting, which helps the model focus more on information-dense areas in different spatial regions of the image.

[0135] At the same time, the local feature enhancement sub-network captures fine-grained spatial detail features through 3×3 convolution, enhancing the network's ability to express local features.

[0136] By performing multi-scale pooling and softmax operations on the weighted features r1 and r3 of the two branches, two corresponding spatial attention weights W1 and W3 are generated to capture multi-scale features. The multi-scale attention mechanism ensures that the model pays equal attention to feature information at different spatial scales, further enriching the hierarchical structure of the features.

[0137] Furthermore, the multi-scale weights W1 and W3 are respectively interacted with the feature matrices r3 and r1 of the other branch through matrix multiplication to generate attention maps M across spatial dimensions. These attention maps not only encapsulate the local information of each pixel, but also reveal the global relationship between the pixel and other spatial locations.

[0138] The outputs of the two weight matrices are then fused by element-wise addition ⊕ and normalized using the Sigmoid activation function to generate the final weight map. This weight map is then multiplied by element-wise multiplication Combined with the original input feature map r, the feature is re-weighted. Then, the re-weighted feature map is compressed into a compact one-dimensional feature vector through global average pooling (GAP). This step ensures that the model can highlight key features and suppress irrelevant information, generating fused features with rich spatial expression capabilities, thereby improving the spatial information expression effect of the model.

[0139] In an optional implementation, the present application also introduces vMF distribution to derive the loss function representing the branch. Introducing vMF distribution in mixed modeling normalized feature vectors: There are two reasons for using von Mises-Fisher (vMF) distribution to model the normalized vectors.

[0140] The representation branch designed in the embodiment of the present application learns features by comparing the similarities and differences between different samples, aiming to map similar samples to similar representation spaces, and to map dissimilar samples to distant representation spaces. On the one hand, since in contrastive learning, normalized vectors are usually restricted to the unit hypersphere (i.e., their norm is 1), in order to effectively model the distribution of these vectors, the embodiment of the present application designs a mixture of multiple von Mises-Fisher (vMF) distributions to model the normalized feature vectors in contrastive learning. The vMF distribution is a probability distribution commonly used for modeling data on a hypersphere, which can be regarded as a generalization of the normal distribution on the unit hypersphere, and can capture the concentration and direction of normalized features. After the features are normalized, it is assumed that these features follow the von Mises-Fisher distribution, and by mixing different distributions, this helps the model learn more complex and effective feature representations, so that similar samples are closer in the feature space. On the other hand, the parameters of the vMF distribution can be efficiently estimated in different small batches by maximum likelihood estimation, which is suitable for processing data imbalance problems. In this way, the desired contrast loss function can be effectively calculated, avoiding the overhead of directly sampling a large number of contrast pairs.

[0141] By modeling the feature vector with vMF mixed distribution, the representation branch loss function is derived: In the derivation process, it is first assumed that the normalized feature vector in contrastive learning follows the vMF mixed distribution, and then the parameters of the distribution are obtained by maximum likelihood estimation. Based on these parameters, a closed-form solution to the expected loss is derived, replacing the loss obtained by sampling in traditional contrastive learning. The key to this reasoning process is to introduce the vMF distribution and use its good statistical properties to allow the model to optimize the contrast loss without explicit sampling, avoiding the computational overhead of relying on large-scale sampling in traditional contrastive learning. The specific derivation process is as follows:

[0142] Definition of vMF distribution: In contrastive learning, features are normalized and constrained to the unit hypersphere, so they cannot be directly modeled using a regular normal distribution. To accommodate this, it is assumed that these features follow a von Mises-Fisher (vMF) distribution.

[0143] The probability density function of the vMF distribution is:

[0144]

[0145] Among them: z is a unit vector, representing the feature vector, satisfying ||z||=1; μ is the mean direction, satisfying ||μ||=1; k≥0 is the concentration parameter, indicating the concentration degree of the feature in the mean direction; C p (k) is a normalization constant, given by:

[0146]

[0147] in is a modified Bessel function of the first kind, used to ensure that the integral of the probability density function is 1, and is defined as follows:

[0148]

[0149] Feature distribution hypothesis: In the representation learning branch, it is assumed that the feature distribution of each category can be modeled by vMF distribution, and the overall feature distribution in the dataset is a mixture of multiple vMF distributions. Then the total probability distribution of the feature can be expressed as:

[0150]

[0151] in, is category y i The prior probability of and They are categories y i The mean direction and concentration parameter of is the modified Bessel function. Through maximum likelihood estimation, these parameters can be dynamically updated during the training process.

[0152] Estimation of vMF distribution parameters: To derive a new loss function, we first need to estimate the parameters of the vMF distribution for each category, i.e., the mean direction and concentrated parameters Suppose we have a set of N independent unit vector samples {z i}, these samples come from category y i vMF distribution. For category y i , we can get it through maximum likelihood estimation and The estimated value of .

[0153] According to the maximum likelihood estimation, the mean direction for:

[0154]

[0155] in is the sample mean, is the norm (length) of the sample mean.

[0156] Centralized parameters Approximately:

[0157]

[0158] in and is a modified Bessel function.

[0159] Derivation of the representation branch loss function: The key idea of ​​the derivation of the loss function is to construct an infinite number of contrast pairs through parameter estimation of the vMF distribution and derive a closed form expected contrast loss function.

[0160] According to the definition of supervised contrast loss, we have:

[0161]

[0162] in, Represents the sample x in the batch i Same category i The number of samples, that is, category y i The number of positive samples. i and z p is the sample x i and positive sample x p Normalized eigenvector; z a represents the normalized feature vector of sample a in category j; τ is the temperature parameter; A(y i ) is the same as the sample x i Belong to the same category y i A(j) is the set of positive samples in the batch. A(j) is the set of samples with label j in the batch. K is the total number of categories in the batch.

[0163] The above formula can be further processed to obtain:

[0164]

[0165] When the number of samples N→∞, represents the sampling frequency of class j. In this case, the constant term logN can be ignored, resulting in the following simplified loss formula:

[0166]

[0167] According to the expected formula of vMF distribution and the properties of moment generating function:

[0168]

[0169] Finally, the closed-form expression of the contrastive learning branch loss is obtained:

[0170]

[0171] in: is the modified concentration parameter; π j is the frequency of category j; is category yi The prior probability of p (k) is the modified Bayesian function associated with the vMF distribution.

[0172] The loss L of the contrastive learning branch R The core advantage of L is that it generates enough positive and negative sample pairs by estimating the feature distribution, which is particularly suitable for long-tail category learning. With the vMF mixed distribution model, L R It can generate an unlimited number of sample pairs at the expected level, ensuring that all categories are treated fairly, reducing the reliance on large-scale sample sampling, alleviating the scarcity problem of tail class samples, and improving the learning effect of tail class. R Through closed-form solution optimization, the training speed and efficiency are significantly improved.

[0173] The trained improved defect recognition model is used as a test network to read the test image and output the results of pipeline defect recognition and classification: a part of the data collected by the drone is divided as a validation set to ensure that the validation set covers different defect types and environmental scenarios. The data of the validation set and the training set data maintain the same preprocessing process to ensure data consistency. All samples of the validation set are input into the trained model, and forward propagation is performed one by one to obtain the prediction results of each sample. Using the prediction results and true labels output by the model, various indicators on the validation set are calculated, such as accuracy, precision, recall, F1 score, etc., to evaluate the classification ability of the model. At the same time, the confusion matrix can be used to analyze the recognition effect of the model on different defect types.

[0174] The identification results are organized into reports containing defect types, confidence scores, and recommended maintenance measures to help maintenance teams make efficient decisions.

[0175] After the defect recognition model training is completed, the image of the overhead pipeline to be tested is input into the defect recognition model to obtain the defect recognition result output by the defect recognition model.

[0176] Unlike the prior art, the traditional single classification model often leads to poor recognition ability of long-tail categories when dealing with category imbalance. This application adopts a dual-branch structure. On the one hand, it uses the classification branch to perform defect recognition and classification, and on the other hand, it further optimizes the feature vector representation through the representation learning branch. At the same time, the classification branch and the representation learning branch are improved according to the characteristics of pipeline defects. Here, in particular, a deep characterization is performed for minority class samples, which enables the classification model to accurately identify uncommon pipeline defect categories even under long-tail distribution. In addition, the vMF mixed distribution model is introduced to optimize the contrastive learning loss to ensure that similar samples are closer in the feature space, so that the model can maintain a high recognition accuracy in different scenarios.

[0177] In traditional methods, models often capture features through layers of convolution operations, especially the capture of global and local features often requires a lot of computing resources. This application uses cross-space feature fusion to design a multi-branch convolutional network (for example, 1×1 convolution is used for global information retention, 3×3 convolution is used for local feature capture), so that the model can process spatial information of different scales in parallel, reducing the calculation time of layer-by-layer operations of traditional models, improving the overall processing speed, and making it suitable for real-time applications. Cross-space interaction further extracts long-range dependencies through matrix multiplication and other methods, realizing efficient interaction between spatial dimensions, thereby reducing computational complexity and making the overall model process faster, which is suitable for real-time applications.

[0178] Traditional convolutional neural networks are often designed with fixed receptive fields, that is, the size of the receptive field of neurons in each layer is static and unchanged in the network. This approach lacks flexibility in processing multi-scale features, and may result in the inability to simultaneously take into account the feature extraction of small-scale and large-scale targets. This application introduces an adaptive perception mechanism, which selects convolution operations of different scales (such as 3×3 and 5×5 dilated convolutions) through multiple convolution kernel branches, and combines the soft attention mechanism to adaptively generate the weight distribution of each convolution kernel according to the spatial scale of the input feature map, thereby dynamically selecting the optimal convolution kernel for feature extraction. In addition, the dynamically adjusted features are fused with the original features through residual connections, which not only enhances the flexibility of multi-scale feature extraction, but also retains the original global information and improves the integrity of feature expression. While ensuring computational efficiency, this mechanism effectively expands the model's perception of multi-scale features, enabling the model to more accurately capture information of different scales of the target when processing complex image scenes, thereby significantly improving the model's expressiveness and adaptability.

[0179] Traditional contrastive learning usually requires sampling through a large number of samples to ensure that the model learns the relative relationship between different categories in the feature space. This method has high requirements for the data scale. This application optimizes the feature representation in contrastive learning by assuming the normalized feature vectors to be a vMF mixed distribution and using the maximum likelihood estimation method to model these feature vectors, and derives the expected loss function form that does not require a large number of samples. This modeling method reduces the dependence on large-scale data sets, so that even under small batch data training, the model can maintain the effectiveness of contrastive learning, especially under long-tail data distribution. This improvement makes the model more flexible in practical applications and adapts to scenarios where data is scarce or unbalanced, and is particularly suitable for processing long-tail data distribution.

[0180] Figure 6 A schematic structural diagram of an overhead pipeline defect identification device provided in an embodiment of the present application is shown, wherein the device comprises: a model training module and a model use module;

[0181] The model training module is used to:

[0182] Performing data enhancement on the original defect images in the data set to obtain multiple groups of enhanced defect images; wherein the enhanced defect images include a first partial image and a second partial image;

[0183] Using the first feature vector of the first partial image to construct a first loss function of the classification branch sub-model;

[0184] Using the second feature vector of the second partial image to construct a second loss function representing the learning branch sub-model; wherein the first loss function and the second loss function are used to construct an overall loss function;

[0185] By adjusting the parameters of the overall loss function, a defect recognition model is obtained;

[0186] The model uses modules for:

[0187] The image of the overhead pipeline to be tested is input into the defect recognition model to obtain the defect recognition result output by the defect recognition model.

[0188] The data enhancement is performed on the original defect images in the data set to obtain a plurality of enhanced defect images; wherein the enhanced defect images include a first partial image and a second partial image, including:

[0189] Performing data enhancement on the original defect image in the data set using a first preprocessing method to obtain the first partial image;

[0190] The second preprocessing method and the third preprocessing method are used to perform data enhancement on the original defect images in the data set to obtain the second part of the images.

[0191] The defect recognition model includes a backbone network; wherein the backbone network is used to extract basic features to obtain a first basic feature map of the first partial image and to extract a second basic feature map of the second partial image.

[0192] The classification branch sub-model includes: an adaptive perception module, a global attention pooling module, and a classification layer;

[0193] The adaptive perception module is used to dynamically adjust the first basic feature map of the first partial image, and fuse the adjusted features with the original features through a residual connection to obtain a fused first adjusted feature map;

[0194] The global attention pooling module is used to perform a pooling operation on the fused first adjusted feature map, dynamically assign weights to different feature regions, and thus generate a first feature vector of the first partial image;

[0195] The classification layer is used to map the first feature vector to obtain a first mapping vector, and use the first mapping vector to construct a first loss function of the classification branch sub-model.

[0196] The adaptive perception module is used to dynamically adjust the first basic feature map of the first partial image, and fuse the adjusted features with the original features through a residual connection to obtain a fused first adjusted feature map, including:

[0197] Using a first convolution branch and a second convolution branch to perform a convolution operation on the first basic feature map respectively, to obtain a first convolution map and a second convolution map; wherein the first convolution map and the second convolution map are used to fuse to obtain a first fusion map;

[0198] Performing a pooling operation and a compression operation on the first fusion image in sequence to obtain a fourth eigenvector;

[0199] Processing the fourth eigenvector through an attention mechanism to obtain a first weight of the first convolution branch and a second weight of the second convolution branch;

[0200] The first convolution map and the second convolution map are fused according to the first weight and the second weight to obtain the preliminary adjusted feature map.

[0201] The preliminary adjusted feature map is fused with the first basic feature map by element-by-element addition through a residual connection to obtain the first adjusted feature map that is finally output.

[0202] The second partial image includes a first sub-image and a second sub-image;

[0203] The representation learning branch sub-model includes: a cross-space feature fusion module, a multi-layer perceptron and a clustering module;

[0204] The cross-space feature fusion module is used to enrich the second basic feature map of the first sub-image and the third basic feature map of the second sub-image to obtain the second feature vector of the first sub-image and the third feature vector of the second sub-image;

[0205] The multilayer perceptron is used to map the second eigenvector and the third eigenvector to obtain a second mapping vector of the second eigenvector and a third mapping vector of the third eigenvector;

[0206] A clustering module is used to construct a second loss function representing a learning branch sub-model for the second mapping vector and the third mapping vector based on a vMF mixed distribution.

[0207] The cross-space feature fusion module enriches the second basic feature map of the first sub-image in the following manner to obtain a second feature vector of the first sub-image:

[0208] Using multiple branches to process the second basic feature map to obtain processing results of multiple branches;

[0209] The second feature vector of the first sub-image is obtained by fusing the processing results of multiple branches.

[0210] like Figure 7 As shown, an embodiment of the present application provides an electronic device for executing the method for identifying defects in overhead pipelines in the present application, the device comprising a memory, a processor, a bus, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method for identifying defects in overhead pipelines when executing the computer program.

[0211] Specifically, the above-mentioned memory and processor may be general-purpose memory and processor, which are not specifically limited here. When the processor runs the computer program stored in the memory, the above-mentioned method for identifying defects in overhead pipelines can be executed.

[0212] Corresponding to the method for identifying overhead pipeline defects in the present application, an embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned method for identifying overhead pipeline defects are executed.

[0213] Specifically, the storage medium can be a general storage medium, such as a mobile disk, a hard disk, etc. When the computer program on the storage medium is run, the above-mentioned method for identifying defects in overhead pipelines can be executed.

[0214] In the embodiments provided in the present application, it should be understood that the disclosed systems and methods can be implemented in other ways. The system embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of systems or units, which can be electrical, mechanical or other forms.

[0215] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0216] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0217] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0218] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.

[0219] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application. They should all be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims

1. A method for identifying defects in an overhead pipeline, characterized in that: The method comprises: a model training phase and a model use phase; The model training phase includes: Performing data enhancement on the original defect images in the data set to obtain multiple groups of enhanced defect images; wherein the enhanced defect images include a first partial image and a second partial image; Using the first feature vector of the first partial image to construct a first loss function of the classification branch sub-model; Using the second feature vector of the second partial image to construct a second loss function representing the learning branch sub-model; wherein the first loss function and the second loss function are used to construct an overall loss function; By adjusting the parameters of the overall loss function, a defect recognition model is obtained; The model use phases include: The image of the overhead pipeline to be tested is input into the defect recognition model to obtain the defect recognition result output by the defect recognition model.

2. The method according to claim 1, characterized in that The data enhancement is performed on the original defect images in the data set to obtain a plurality of enhanced defect images; wherein the enhanced defect images include a first partial image and a second partial image, including: Performing data enhancement on the original defect image in the data set using a first preprocessing method to obtain the first partial image; The second preprocessing method and the third preprocessing method are used to perform data enhancement on the original defect image in the data set to obtain the second part of the image.

3. The method according to claim 1, characterized in that: The defect recognition model includes a backbone network; wherein the backbone network is used to extract basic features to obtain a first basic feature map of the first partial image and to extract a second basic feature map of the second partial image.

4. The method according to claim 1, characterized in that: The classification branch sub-model includes: an adaptive perception module, a global attention pooling module, and a classification layer; The adaptive perception module is used to dynamically adjust the first basic feature map of the first partial image, and fuse the adjusted features with the original features through a residual connection to obtain a fused first adjusted feature map; The global attention pooling module is used to perform a pooling operation on the fused first adjusted feature map, dynamically assign weights to different feature regions, and thus generate a first feature vector of the first partial image; The classification layer is used to map the first feature vector to obtain a first mapping vector, and use the first mapping vector to construct a first loss function of the classification branch sub-model.

5. The method according to claim 4, characterized in that The adaptive perception module is used to dynamically adjust the first basic feature map of the first partial image, and fuse the adjusted features with the original features through a residual connection to obtain a fused first adjusted feature map, including: Using a first convolution branch and a second convolution branch to perform a convolution operation on the first basic feature map respectively, to obtain a first convolution map and a second convolution map; wherein the first convolution map and the second convolution map are used to fuse to obtain a first fusion map; Performing a pooling operation and a compression operation on the first fusion image in sequence to obtain a fourth eigenvector; Processing the fourth eigenvector through an attention mechanism to obtain a first weight of the first convolution branch and a second weight of the second convolution branch; The first convolution map and the second convolution map are fused according to the first weight and the second weight to obtain the preliminary adjusted feature map. The preliminary adjusted feature map is fused with the first basic feature map by element-by-element addition through a residual connection to obtain the first adjusted feature map that is finally output.

6. The method according to claim 1, characterized in that The second partial image includes a first sub-image and a second sub-image; The representation learning branch sub-model includes: a cross-space feature fusion module, a multi-layer perceptron and a clustering module; The cross-space feature fusion module is used to enrich the second basic feature map of the first sub-image and the third basic feature map of the second sub-image to obtain the second feature vector of the first sub-image and the third feature vector of the second sub-image; The multilayer perceptron is used to map the second eigenvector and the third eigenvector to obtain a second mapping vector of the second eigenvector and a third mapping vector of the third eigenvector; A clustering module is used to construct a second loss function representing a learning branch sub-model for the second mapping vector and the third mapping vector based on a vMF mixed distribution.

7. The method according to claim 6, characterized in that The cross-space feature fusion module enriches the second basic feature map of the first sub-image in the following manner to obtain a second feature vector of the first sub-image: Using multiple branches to process the second basic feature map to obtain processing results of multiple branches; The second feature vector of the first sub-image is obtained by fusing the processing results of multiple branches.

8. A device for identifying defects in an overhead pipeline, characterized in that: The device comprises: a model training module and a model use module; The model training module is used to: Performing data enhancement on the original defect images in the data set to obtain multiple groups of enhanced defect images; wherein the enhanced defect images include a first partial image and a second partial image; Using the first feature vector of the first partial image to construct a first loss function of the classification branch sub-model; Using the second feature vector of the second partial image to construct a second loss function representing the learning branch sub-model; wherein the first loss function and the second loss function are used to construct an overall loss function; By adjusting the parameters of the overall loss function, a defect recognition model is obtained; The model uses modules for: The image of the overhead pipeline to be tested is input into the defect recognition model to obtain the defect recognition result output by the defect recognition model.

9. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the method for identifying overhead pipeline defects as described in any one of claims 1 to 7 are performed.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for identifying defects of an overhead pipeline as claimed in any one of claims 1 to 7 are executed.

Citation Information

Patent Citations

  • Semi-supervised product surface defect detection method and system based on heavy balance

    CN114998258A

  • Face recognition model training method and device, face recognition method and device and storage medium

    CN116978100A

  • Method and device for detecting scattered objects on road, electronic equipment and storage medium

    CN117593890A

  • Intelligent industrial defect detection method and system based on fusion model

    CN117853492A