Pipe network node defect visual detection method and system based on a detection robot

By using a detection robot to collect images of sewer network nodes and performing circle detection and sector segmentation, a node connection matrix is ​​constructed. Combined with illumination compensation, the problems of low detection efficiency and illumination interference in existing technologies are solved, and accurate detection of defects in sewer network nodes is achieved.

CN122089679APending Publication Date: 2026-05-26GUANGDONG XINTUO NETWORK TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGDONG XINTUO NETWORK TECHNOLOGY CO LTD
Filing Date
2026-02-06
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing visual inspection methods based on detection robots are difficult to effectively capture the star-shaped topological features of sewer network nodes, resulting in low inspection efficiency and safety hazards. Furthermore, they lack compensation mechanisms for interference factors such as uneven lighting and water reflection.

Method used

A visual inspection method for pipeline node defects based on a detection robot is adopted. By extracting block feature vectors through circle detection and sector segmentation, a node connection relationship matrix is ​​constructed, and combined with illumination compensation, the visual inspection results of defects are generated.

Benefits of technology

It enables comprehensive diagnosis and spatial location of pipeline node connection defects, improves detection accuracy, eliminates the influence of lighting differences, and ensures the integrity of pipeline directional characteristics and the accuracy of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122089679A_ABST
    Figure CN122089679A_ABST
Patent Text Reader

Abstract

This application relates to the field of pipeline network detection technology, and discloses a visual detection method and system for pipeline network node defects based on a detection robot. The method includes: acquiring node images of a sewer network using a detection robot, and performing circle detection and sector segmentation on the node images to obtain multiple sector region blocks; extracting the block feature vector of each sector region block; calculating angular attenuation weights and radial attenuation weights, and constructing a node connection relationship matrix based on the angular attenuation weights and radial attenuation weights; combining the block feature vectors and the node connection relationship matrix to perform feature aggregation and illumination compensation to obtain a global feature vector; calculating angular deviation index, radial mutation rate index, and leakage index, and generating defect visual detection results, thereby realizing comprehensive diagnosis and spatial positioning of pipeline network node connection defects, and improving the defect detection accuracy of sewer detection robots in complex node environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of pipeline network detection technology, and in particular to a visual detection method and system for pipeline network node defects based on a detection robot. Background Technology

[0002] Sewer network nodes are critical locations where multiple pipes converge. Over long-term operation, these nodes are prone to connection defects such as pipe misalignment, disconnection, and leakage, severely impacting the drainage system's functionality. Traditional manual inspection methods are inefficient and pose safety hazards. Existing visual inspection methods based on detection robots primarily employ square grid segmentation and data-driven feature extraction strategies, which struggle to effectively capture the star-shaped topological structure of pipes radiating outwards from the node center. Current detection methods face the following technical challenges when handling complex node areas: First, the segmentation strategy is mismatched with the physical layout of the pipes, resulting in single-pipe features being fragmented into multiple unrelated image blocks; second, there is a lack of structured modeling of the directional and radial hierarchy of pipe connections, and the feature aggregation process does not incorporate prior geometric knowledge of pipe connections; third, there is a lack of targeted compensation mechanisms for interference factors such as uneven lighting and water reflection in the node area. Summary of the Invention

[0003] This application provides a visual inspection method and system for pipeline node defects based on a detection robot, thereby realizing comprehensive diagnosis and spatial positioning of pipeline node connection defects and improving the defect detection accuracy of sewer detection robots in complex node environments.

[0004] The first aspect of this application provides a visual inspection method for pipeline node defects based on a detection robot, the method comprising: The robot collects node images of the sewer network and performs circle detection and sector segmentation on the node images to obtain multiple sector region blocks. Extract the block feature vector of each sector region; The angular attenuation weight and radial attenuation weight are calculated based on the normalized radial distance difference value and circumferential angle difference value of the block feature vector, and a node connection relationship matrix is ​​constructed based on the angular attenuation weight and the radial attenuation weight. By combining the block feature vector and the node connection matrix, feature aggregation and illumination compensation are performed to obtain the global feature vector; Based on the global feature vector, the angle deviation index, radial mutation rate index, and leakage index are calculated, and the defect visual inspection result is generated according to the angle deviation index, the radial mutation rate index, and the leakage index.

[0005] In conjunction with the first aspect, in a first implementation of the first aspect of the present invention, the step of collecting node images of the sewer network by a detection robot and performing circle detection and sector segmentation on the node images to obtain multiple sector region blocks includes: The robot collects node images of the sewer network and performs edge detection on the node images to extract the set of edge pixels of the circular outline of the node chamber. The edge pixel set is accumulated by Hough transformation in the parameter space composed of candidate center coordinates and candidate radius values, and the candidate center positions that satisfy the circle equation are voted and statistically analyzed to obtain the accumulator matrix. Select the candidate center coordinates corresponding to the maximum number of votes from the accumulator matrix as the coordinates of the node center point; A polar coordinate system is established based on the coordinates of the node center point, and the node image is divided into fan-shaped blocks to obtain multiple fan-shaped region blocks.

[0006] In conjunction with the first aspect, in a second implementation of the first aspect of the present invention, the step of establishing a polar coordinate system based on the coordinates of the node center point and dividing the node image into fan-shaped blocks to obtain multiple fan-shaped region blocks includes: A polar coordinate system is established with the coordinates of the node center point as the origin, and the radial distance and azimuth angle from each pixel in the node image to the coordinates of the node center point are calculated. Based on the radial distance, multiple concentric ring layers are set up, and the radial distance boundary of each ring is an integer multiple of the preset pixel interval, so that the node image is divided into multiple ring layers along the radial distance; The circumference is evenly divided into multiple sector-shaped areas, each sector having an equal central angle. Multiple sector-shaped area blocks are generated by combining the radial layering of the multiple annular layers and the angular partitioning of the multiple sector-shaped areas.

[0007] In conjunction with the first aspect, in a third implementation of the first aspect of the present invention, the step of extracting the block feature vector of each sector region block includes: For each sector block, the mean values ​​of the red, green, and blue channels are calculated to obtain the RGB three-channel mean features. The Sobel operator is used to perform convolution on the pixels in each of the fan-shaped regions to calculate the horizontal and vertical gradients. The gradient intensity feature is obtained by summing the squares of the horizontal and vertical gradients and then taking the square root. The normalized radial distance from each sector block to the center point of the node, as well as the sine and cosine values ​​of the azimuth angle of the sector block, are calculated as position encoding features. The RGB three-channel mean features, the gradient intensity features, and the position encoding features are concatenated to obtain a block feature vector.

[0008] In conjunction with the first aspect, in the fourth implementation of the first aspect of the present invention, the step of calculating angular attenuation weights and radial attenuation weights based on the normalized radial distance difference value and circumferential angle difference value of the block feature vector, and constructing a node connection relationship matrix based on the angular attenuation weights and the radial attenuation weights, includes: Calculate the difference in circumferential angle and the difference in normalized radial distance for any two of the aforementioned sector regions; The angular attenuation weight is obtained by multiplying the circumferential angle difference value with the angular attenuation coefficient and then performing an exponential operation. The radial attenuation weight is obtained by multiplying the normalized radial distance difference value with the radial attenuation coefficient and then performing an exponential operation. The attention weight matrix is ​​formed by multiplying the angular attenuation weight corresponding to each pair of sector blocks by the radial attenuation weight. The node connection relationship matrix is ​​obtained by normalizing each row of the attention weight matrix.

[0009] In conjunction with the first aspect, in a fifth implementation of the first aspect of the present invention, the step of calculating the circumferential angle difference value and the normalized radial distance difference value for any two of the sector-shaped region blocks includes: Obtain the first azimuth angle of the first sector block and the second azimuth angle of the second sector block in any two sector blocks, calculate the absolute value of the difference between the first azimuth angle and the second azimuth angle, and obtain the initial angle difference; Subtracting the initial angle difference from 360 degrees yields the circumferential angle difference value. Obtain the first radial distance of the first sector block and the second radial distance of the second sector block, calculate the absolute value of the difference between the first radial distance and the second radial distance and divide it by the preset maximum radial distance to obtain the normalized radial distance difference value.

[0010] In conjunction with the first aspect, in the sixth implementation of the first aspect of the present invention, the step of combining the block feature vector and the node connection relationship matrix to perform feature aggregation and illumination compensation to obtain a global feature vector includes: M1: Stack the block feature vectors into an initial feature matrix, and perform layer normalization on the initial feature matrix to obtain the normalized feature matrix of the i-th layer; M2: Multiply the normalized feature matrix of the i-th layer by the node connection matrix to obtain the attention-weighted feature matrix of the i-th layer; M3: Perform a nonlinear transformation on the attention-weighted feature matrix of the i-th layer and connect it with the initial feature matrix to obtain the updated feature matrix of the i-th layer. Use the updated feature matrix of the i-th layer as the initial feature matrix for the next iteration. Repeat steps M1 to M3 until the preset number of iterations is completed and the aggregated feature matrix is ​​obtained; The average value of the RGB three channels of each sector block is calculated as the block brightness. The median of all the block brightnesses is calculated as the reference brightness. The illumination compensation factor is calculated based on the difference between the block brightness and the reference brightness. Each block feature in the aggregated feature matrix is ​​multiplied by the corresponding illumination compensation factor to obtain the global feature vector.

[0011] In conjunction with the first aspect, in the seventh implementation of the first aspect of the present invention, the step of performing a nonlinear transformation on the attention-weighted feature matrix of the i-th layer and performing a residual connection with the initial feature matrix to obtain the updated feature matrix of the i-th layer, and using the updated feature matrix of the i-th layer as the initial feature matrix for the next iteration, includes: The first output feature is obtained by performing a dimension-up linear transformation on the attention-weighted feature matrix of the i-th layer and adding a bias. Applying the ReLU activation function to the first output feature sets negative values ​​to zero and retains positive values ​​to obtain the activated feature; The activated features are subjected to a dimensionality reduction linear transformation and a bias is added to obtain the second output features. The second output features are added element by element to the initial feature matrix to obtain the updated feature matrix of the i-th layer, and the updated feature matrix of the i-th layer is used as the initial feature matrix for the next iteration.

[0012] In conjunction with the first aspect, in the eighth implementation of the first aspect of the present invention, the step of calculating the angle deviation index, the radial mutation rate index, and the leakage index based on the global feature vector, and generating a defect visual inspection result based on the angle deviation index, the radial mutation rate index, and the leakage index, includes: Extract the sine and cosine values ​​of the azimuth coded component from the global feature vector, and calculate the angle between the azimuth coded component and the preset reference direction vector as an angle deviation index. For each sector, the radial difference value of the block features between different annular layers is calculated to obtain the radial gradient value of each sector. The maximum value among all the radial gradient values ​​of the sectors is selected as the radial mutation rate index. The number of sector-shaped area blocks with a light compensation factor lower than a preset compensation threshold is counted, and the ratio of the number to the total number of sector-shaped area blocks is used as a leakage index. The angle deviation index is compared with the angle threshold, the radial mutation rate index is compared with the mutation threshold, and the leakage index is compared with the leakage threshold. When any index exceeds the corresponding threshold, it is determined that there is a node connection defect and a visual inspection result of the defect is generated.

[0013] A second aspect of this application provides a visual inspection system for pipeline node defects based on a detection robot, the system comprising: The acquisition module is used to acquire node images of the sewer network through a detection robot, and to perform circle detection and sector segmentation on the node images to obtain multiple sector region blocks; The extraction module is used to extract the block feature vector of each sector region block; The construction module is used to calculate the angular attenuation weight and the radial attenuation weight based on the normalized radial distance difference value and the circumferential angle difference value of the block feature vector, and to construct the node connection relationship matrix based on the angular attenuation weight and the radial attenuation weight; The aggregation module is used to combine the block feature vector and the node connection matrix to perform feature aggregation and illumination compensation to obtain a global feature vector; The calculation module is used to calculate the angle deviation index, radial mutation rate index and leakage index based on the global feature vector, and generate the defect visual detection result based on the angle deviation index, the radial mutation rate index and the leakage index.

[0014] Compared with existing technologies, this application has the following advantages: By establishing a polar coordinate sector block mechanism, the image segmentation strategy is naturally matched with the star-shaped topology of the pipeline. Each sector block corresponds to the local view of a single pipeline, ensuring the integrity of pipeline directional features. By constructing a node connection relationship matrix to explicitly encode the angular continuity and radial hierarchy prior of pipeline connections, image blocks in adjacent pipeline directions and at the same radial level are given higher association weights. This structured attention mechanism differs from traditional data-driven methods, establishing feature association patterns that conform to physical laws without requiring a large number of training samples. Through a multi-layer iterative aggregation process combined with a structured attention matrix, global topological feature fusion across pipeline directions and radial levels is achieved. Layer normalization eliminates the influence of illumination differences, and residual connections ensure the feature transfer efficiency of deep networks, enabling the model to capture the overall connection state information of nodes. By dynamically adjusting the feature weights of each region based on an adaptive illumination compensation factor with median reference brightness, the interference of pipeline shadows and water reflections on defect judgment is effectively suppressed. By extracting three complementary judgment indicators—angle deviation, radial mutation rate, and leakage index—from the global feature vector, precise judgment criteria are established for three typical defect types: pipeline misalignment, disconnection, and leakage. This enables comprehensive diagnosis and spatial positioning of pipeline node connection defects, improving the defect detection accuracy of sewer detection robots in complex node environments. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] The structures, proportions, sizes, etc., shown in the accompanying drawings of this specification are only for the purpose of assisting those skilled in the art in understanding and reading the content disclosed in the specification, and are not intended to limit the conditions under which the present invention can be implemented. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in the proportions, or adjustments to the size, without affecting the effects and objectives that the present invention can produce, should still fall within the scope of the technical content disclosed in the present invention.

[0017] Figure 1 This is a flowchart illustrating the visual inspection method for pipeline node defects based on a detection robot provided in an embodiment of the present invention. Figure 2 This is a schematic block diagram of the structure of a visual inspection system for pipeline node defects based on a detection robot, provided in an embodiment of the present invention. Detailed Implementation

[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0019] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content and operations / steps, nor does it necessarily have to be performed in the order described. For example, some operations / steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.

[0020] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0021] It should also be further understood that the term "and / or" as used in this application specification and the appended claims refers to any combination of one or more of the associated listed items, as well as all possible combinations, and includes such combinations. See also Figure 1One embodiment of the visual inspection method for pipeline node defects based on a detection robot in this application includes: Step 100: Collect node images of the sewer network using a detection robot, and perform circle detection and sector segmentation on the node images to obtain multiple sector region blocks; Specifically, using an industrial-grade vision acquisition module mounted on a detection robot, panoramic images are acquired after the robot moves into the interior of a node manhole in the sewer network. High-resolution RGB images covering the central area of ​​the manhole and all its inlet and outlet pipe interfaces are obtained. After image acquisition, edge enhancement is performed on the original node images. The Canny edge detection algorithm is used, and appropriate high and low thresholds are set to extract circular contour boundary pixels with obvious structural features in the node manhole, resulting in a set of edge pixels. This set includes high-gradient regions in the image that belong to manhole boundaries, pipe interfaces, or other circular structures. The set of edge pixels is mapped to a three-dimensional parameter space containing the center coordinates (a, b) and radius R. In this three-dimensional parameter space, a Hough circle transformation is performed on each edge point, i.e., for points satisfying the circle equation... All candidate center positions are voted on one by one to form a three-dimensional accumulator matrix H(a, b, R), where the value of each element represents how many edge points support the corresponding center parameter combination. The accumulator matrix is ​​traversed and the maximum value is extracted to identify the triplet (a_max, b_max, R_max) with the largest vote value, and the corresponding (a_max, b_max) coordinates are used as the optimal estimate of the well chamber center point in the node image. A polar coordinate system is established with the node center point as the origin, converting the original image coordinates into polar coordinate form, specifically including two components: radial distance r and azimuth angle θ. r represents the Euclidean distance from any pixel point to the node center, and θ represents the angle of that pixel point in the circumferential direction. Based on the established polar coordinate system, the radial direction is divided into several concentric ring levels at preset equidistant intervals, and the angular direction is divided into 360° full angles at fixed angular intervals, forming fan-shaped regions with defined inner diameters, outer diameters, and central angles. The original image is divided into multiple fan-shaped regions with radial structures, each region having a clear geometrical relationship with the node center.

[0022] Step 200: Extract the block feature vector of each sector region; Specifically, the image regions that have been divided into sector blocks are processed block by block, and multi-dimensional features representing color information, texture characteristics, and spatial location information are extracted sequentially. Regarding color features, for all pixels contained in each sector block, the pixel values ​​of the red, green, and blue channels are extracted, and the pixel mean of each channel is calculated to obtain the RGB three-channel mean feature. The red channel mean is the sum of the red component values ​​of all pixels divided by the number of pixels. The green and blue channel mean values ​​are calculated in the same way. The RGB mean reflects the overall color distribution characteristics of the sector block, effectively representing the visual changes produced by the node region under material, stain, watermark, or rust conditions. Regarding texture feature extraction, the Sobel operator is applied to the image data within each sector block for convolution. The Sobel operator has specific convolution kernels in the horizontal and vertical directions, which can capture the gray-level gradient changes in the image along the x and y axes, respectively. By calculating the square value of each convolution result and then summing them, the square root of the sum is taken to obtain the gradient intensity feature, effectively quantifying the edge intensity and texture clarity within the region. In terms of spatial location encoding, the normalized radial distance is calculated based on the geometric relationship between the center point of the sector block and the center point of the node. That is, the Euclidean distance from the center of the sector block to the center of the node is divided by the maximum radius of the outermost sector block, so that the radial position of all blocks is mapped to the interval [0,1]. The sine and cosine values ​​of the angular direction of the sector block are used to encode its angular position to avoid discontinuities caused by the periodic boundaries of the angle. The sine and cosine function mapping ensures that the angles remain similar at 0° and 360°. The mean of the RGB three channels, the gradient intensity feature, the normalized radial distance, and the sine and cosine values ​​of the azimuth angle are concatenated in sequence to form the block feature vector.

[0023] Step 300: Calculate the angular attenuation weight and radial attenuation weight based on the normalized radial distance difference value and circumferential angle difference value of the block feature vector, and construct the node connection relationship matrix based on the angular attenuation weight and radial attenuation weight; It should be noted that all sector blocks are paired, and within each pair, their angular differences and normalized radial distance differences in polar coordinates are calculated sequentially. Each sector block is assigned a defined radial level r_i and angular sector θ_j when constructing the polar coordinate system. When calculating the circumferential angular difference, the minimum angular difference between the central angles of the two sectors is found, i.e., with a period of 360°. and A smaller value is chosen to ensure seamless and continuous angle calculations. When calculating the normalized radial distance difference, the relative distance in the radial dimension is obtained by dividing the difference in radial levels of the two sector blocks by the maximum radius. Two hyperparameters are introduced to control the attention decay rate: the angular decay coefficient α and the radial decay coefficient β. An exponential decay function is applied after multiplying the angle difference by α. To obtain the angular attenuation weight, the radial distance difference is multiplied by β and then an exponential attenuation function is applied. Radial attenuation weights are obtained, reflecting the proximity of two sector blocks in the circumferential and radial directions, respectively. Angular proximity is used to model the continuity between blocks along the same pipe direction, while radial proximity is used to model the spatial consistency between upstream and downstream regions of the pipe connection point. The angular and radial attenuation weights between each pair of sector blocks are multiplied to obtain the structural attention weights. These structural attention weights form a 60×60 attention weight matrix, where each element corresponds to the connection strength between two sector blocks. The attention weight matrix is ​​then normalized row-wise, meaning the sum of all weights in each row is normalized to equal 1, resulting in the node connection matrix.

[0024] Step 400: Combine the block feature vector and the node connection matrix to perform feature aggregation and illumination compensation to obtain the global feature vector; Specifically, the block feature vectors extracted from all sector regions are stacked according to their spatial arrangement in the node image to construct an initial feature matrix Z^(0) of dimension N×d, where N represents the total number of sector regions and d is the dimension of each block feature vector. Layer normalization is performed on the initial feature matrix, i.e., subtracting the mean from each column of Z^(0) and then dividing by the standard deviation to obtain the normalized feature matrix Norm(Z^(0)). The normalized feature matrix is ​​multiplied by the node connection matrix generated from the structural prior to obtain the attention-weighted feature matrix of the i-th layer. The attention-weighted feature matrix is ​​input into a two-layer fully connected nonlinear transformation module with a ReLU activation function to obtain the enhanced nonlinear expression. Then, residual connections are constructed by element-wise summing with the original input to form the updated feature matrix of the i-th layer. The updated feature matrix is ​​used as the input to the next layer, and the above three steps of normalization, attention weighting, and nonlinear residual fusion are repeated until the preset network layer number L is reached, for example, L=6, to obtain the aggregated feature matrix that integrates global topological information. The RGB three-channel average of each sector is calculated to obtain the brightness value of each sector. The median brightness value I_ref of all blocks is calculated and used as the reference brightness. Based on this, the illumination compensation factor for each block is calculated. λ is a proportional coefficient that adjusts the intensity of the illumination compensation. The illumination compensation factor is increased in dark areas and decreased in overly bright areas, thereby suppressing the interference of local illumination on visual features. The illumination compensation factor is multiplied element-wise with the feature vector of each corresponding sector in the aggregated feature matrix, making the adjusted features more balanced in spatial dimension. All compensated feature vectors are then weighted and summed according to their L2 norm normalized weights to obtain a global feature vector that integrates illumination compensation and structure perception.

[0025] Step 500: Calculate the angle deviation index, radial mutation rate index and leakage index based on the global feature vector, and generate the defect visual inspection results based on the angle deviation index, radial mutation rate index and leakage index.

[0026] Specifically, the azimuth coding component containing direction information is extracted from the global feature vector. The azimuth coding component is obtained by accumulating the sine and cosine values ​​of the angle codes of multiple sector regions during the global weighting process, thus constructing a two-dimensional direction vector. Where w_i is the feature weighting coefficient of the corresponding block, and sinθ_i and cosθ_i are the triangular codes of the angular direction of the block in the polar coordinate system. The angle α between the aggregated direction vector and the preset reference direction vector (e.g., [0,1] represents the vertical direction) is calculated, and the angle deviation index is obtained using the inverse cosine function formula. The angle deviation index is used to characterize the directional offset phenomenon caused by pipe misalignment. For each fixed angular sector, i.e., every 30° direction, the feature difference between two adjacent sector blocks in different radial layers along that direction is calculated sequentially. For example, by calculating... The L2 norm difference is calculated, and then the average or maximum value of the four sets of differences between the five levels is taken to obtain the radial gradient response of the sector, indicating whether there are local abrupt changes such as discontinuities or faults in the structure in that direction. The radial gradient values ​​of all 12 sectors are traversed, and the maximum value is selected as the radial abrupt change rate index. Combined with the γ factor data recorded during the illumination compensation process, the number of blocks in all sector regions with an illumination compensation factor γ lower than a preset threshold (e.g., 0.5) is counted. These low compensation factors reflect abnormally bright areas in the image, caused by water reflection or local leakage. The ratio of this number to the total number of blocks is used as the leakage index. The angle deviation index is compared with the angle threshold, the radial abrupt change rate index is compared with the abrupt change threshold, and the leakage index is compared with the leakage threshold. The angle deviation threshold is set to 3.5° to identify directional anomalies, the radial abrupt change rate threshold is set to 0.8 to indicate that the characteristic abrupt change exceeds a certain proportion of the normal inter-level differences, and the leakage index threshold is set to 0.12 to indicate that more than 12% of the image area has brightness anomalies. When any one of the indicators exceeds its corresponding threshold, it is determined that there is a connection defect in the current node image. Based on the triggering results of the three indicators, the defect type is determined to be one of misalignment, disconnection or leakage. The output includes the defect existence status, defect type and the corresponding radial level and angular sector position in the polar coordinate system.

[0027] In one specific embodiment, the process of performing step 100 may specifically include the following steps: The robot collects node images of the sewer network and performs edge detection on the node images to extract the set of edge pixels of the circular outline of the node chamber. The edge pixel set is accumulated by Hough transformation in the parameter space composed of candidate center coordinates and candidate radius values. The candidate center positions that satisfy the circle equation are voted and statistically analyzed to obtain the accumulator matrix. Select the candidate center coordinates corresponding to the maximum number of votes from the accumulator matrix as the coordinates of the node center point; A polar coordinate system is established based on the coordinates of the node center point, and the node image is divided into fan-shaped blocks to obtain multiple fan-shaped regions.

[0028] Specifically, an industrial camera mounted on a probe enters the manhole area to capture images of the sewer nodes. The image resolution is 1920×1080 pixels, covering the center of the manhole and all pipe connections. Canny edge detection is performed on the acquired color images. With a high threshold of 150 and a low threshold of 50, the set of edge pixels corresponding to locations of abrupt changes in grayscale gradient is extracted. These pixels are distributed along the circular structure of the manhole and the pipe edges. The edge pixels are mapped to a parameter space consisting of the center coordinates and radius. A global search is performed within the candidate coordinate range of the center and the candidate radius value range R∈[200,600] pixels. Voting is accumulated at each position satisfying the circular geometric relationship, forming a three-dimensional accumulator matrix. Each coordinate point in the matrix records how many edge pixels support it under the corresponding parameter combination. The entire parameter space is traversed, and the point with the largest number of votes is identified. Its corresponding center coordinates are used as the node center coordinates. This process constructs a polar coordinate system on the image plane, with the node center as the pole. Each pixel in the image is re-represented as a combination of polar radius r and azimuth angle θ, where the polar radius represents the Euclidean distance from the pixel to the center point, and the azimuth angle represents the direction of the pixel. After establishing the polar coordinate system, the image is divided into 5 concentric ring layers in the radial direction, each layer being 50 pixels wide. In the angular direction, 360° is divided into 12 sectors, each sector having an angular width of 30°. This generates 5 × 12 = 60 sector blocks on the entire image, each sector having a unique spatial location number indicating its radius layer and angular interval.

[0029] In one specific embodiment, the process of establishing a polar coordinate system based on the coordinates of the node center point and dividing the node image into sector blocks to obtain multiple sector region blocks can specifically include the following steps: Establish a polar coordinate system with the node center point coordinates as the origin, and calculate the radial distance and azimuth angle of each pixel in the node image to the node center point coordinates; Based on the radial distance, multiple concentric ring layers are set, and the radial distance boundary of each ring is an integer multiple of the preset pixel interval, dividing the node image into multiple ring layers along the radial distance; The circumference is evenly divided into multiple sector-shaped areas, with each sector having an equal central angle. Multiple sector-shaped area blocks are generated by combining the radial layering of multiple annular layers and the angular partitioning of multiple sector-shaped areas.

[0030] Specifically, using the node center point as the pole of the polar coordinate system and setting the node center coordinates as the origin, a coordinate transformation is performed on each pixel in the image under the polar coordinate system. The polar radius and polar angle of each pixel relative to the center point are calculated, where the polar radius represents the pixel distance between the point and the node center, and the polar angle represents the angular position of the point in the circumferential direction, with the angle range limited to 0° to 360°. Concentric ring structures with equal intervals are set according to the size of the polar radius. The boundaries of the rings are set as integer multiples of a preset pixel value, for example, with a fixed interval of 50 pixels to form the inner and outer adjacent ring boundaries. Therefore, the entire image is divided into multiple levels in the radial direction, for example, five levels, corresponding to five concentric ring layers with radii of 0 to 50, 50 to 100, 100 to 150, 150 to 200, and 200 to 250 pixels, respectively. In the angular direction, the complete circumference is divided into several sectors with equal central angles at fixed angles. For example, 360° is divided into 12 sectors, each with an angle of 30°. Each sector covers the same angular range and completely encloses the entire circumference, achieving uniform spatial division in the angular direction. By combining the radially layered concentric ring structure with the angularly divided sector structure, each ring layer intersects with each angular sector to form multiple fan-shaped regions. Each fan-shaped region has a unique spatial location identifier, corresponding to a specific radial level and angular interval, thus constructing a multi-scale, multi-directional fan-shaped block image representation structure covering the entire node image.

[0031] In one specific embodiment, the process of performing step 200 may specifically include the following steps: For each sector block, the mean values ​​of the red, green, and blue channels are calculated to obtain the RGB three-channel mean features. The Sobel operator is used to convolve the pixels in each sector block to calculate the horizontal and vertical gradients. The gradient intensity features are obtained by summing the squares of the horizontal and vertical gradients and then taking the square root. The normalized radial distance from each sector block to the center point of the node, as well as the sine and cosine values ​​of the azimuth angle of the sector block, are calculated as position encoding features. The RGB three-channel mean features, gradient intensity features, and position encoding features are concatenated to obtain the block feature vector.

[0032] Specifically, each sector block is processed individually, with each pixel processed separately. In the color feature extraction stage, the red, green, and blue channel values ​​of the pixels within each sector block are summed. The sum of each channel is then divided by the total number of pixels in the sector block to obtain the mean values ​​for the red, green, and blue channels. These three channel means together constitute the RGB color feature vector of the sector block, effectively reflecting the overall color distribution trend of the region and demonstrating responsiveness to color anomalies caused by pipe corrosion, water stains, or sediment. In the texture feature extraction process, the Sobel gradient operator is used to convolve the image pixels within each sector block in both the horizontal and vertical directions, obtaining gradient response maps along the horizontal and vertical directions. The gradient magnitudes in both directions are then squared pixel-by-pixel and summed. Finally, the sum is squared to obtain the average gradient intensity feature within the current sector region, reflecting the edge density and texture complexity of the image within the local area. The distance between the center point of each sector block and the center point of the node is calculated and divided by the maximum radius to obtain the normalized radial distance. Then, based on the polar coordinate angle corresponding to the block, the sine and cosine values ​​of that angle are calculated. These two trigonometric function values ​​constitute the angle encoding feature, ensuring that different angle regions can be continuously distinguished in the encoding space and avoiding abrupt changes caused by angles crossing the 360° boundary. The RGB three-channel mean features, gradient intensity features, and positional encoding are concatenated into a seven-dimensional vector as the complete feature representation of the current sector block.

[0033] In one specific embodiment, the process of performing step 300 may specifically include the following steps: Calculate the difference in circumferential angle and the difference in normalized radial distance for any two sector regions; The angular attenuation weight is obtained by multiplying the circumferential angle difference value by the angular attenuation coefficient and then performing an exponential operation. The radial attenuation weight is obtained by multiplying the normalized radial distance difference value by the radial attenuation coefficient and then performing an exponential operation. The attention weight matrix is ​​formed by multiplying the angular attenuation weight and the radial attenuation weight corresponding to each pair of sector blocks. The node connection relationship matrix is ​​obtained by normalizing each row of the attention weight matrix.

[0034] Specifically, a unified numbering index is established for all sector blocks, and the radial level number and angular sector number of each sector block are recorded. For any two sector blocks numbered m and n, their angular sector numbers θ are extracted respectively. m and θ n The minimum angular difference between the two is taken as the circumferential angular difference value. The periodicity of the angle must be considered when calculating the circumferential angular difference; therefore, from θ... m With θ nThe smaller of the absolute value of the difference and the difference between 360° and 360° is selected as the final angular difference result. Simultaneously, the radius value corresponding to the radial level number of each region is extracted, and the absolute value of the difference is divided by the maximum radius value to obtain the normalized radial distance difference value. Corresponding attenuation control coefficients are introduced for the two difference values: the angular attenuation coefficient is 0.1, and the radial attenuation coefficient is 0.05. The angular attenuation weight is obtained by multiplying the circumferential angle difference by 0.1, taking the negative value, and then performing an exponential operation. Similarly, the radial attenuation weight is obtained by multiplying the radial distance difference by 0.05 and taking the negative value. These two weights reflect the similarity of the two sector regions in the two dimensions of angle and distance, respectively. The closer the angles and radii of the two regions are, the closer the output values ​​of the two attenuation functions are to 1, indicating a stronger topological correlation between them. Multiply the angular attenuation weights by the radial attenuation weights to obtain the joint weight value between the two current region blocks. This joint weight value is then filled into the m-th row, n-th column of the attention weight matrix, representing the degree of attention the m-th region pays to the n-th region during aggregation. This process is repeated for all pairwise combinations of sector region blocks to construct an attention weight matrix of size 60×60. Each row corresponds to a source region block, and each column corresponds to a target block. Each element in the matrix represents the absorption intensity of the target block information by the source block during feature aggregation. Each row is normalized by using the sum of all elements in that row as the denominator, and each element is divided by the sum of the row's elements until the sum of the elements in the normalized row is 1, resulting in the node connection matrix.

[0035] In one specific embodiment, the process of calculating the difference in circumferential angle and the difference in normalized radial distance between any two sector regions may specifically include the following steps: Obtain the first azimuth angle of the first sector block and the second azimuth angle of the second sector block in any two sector blocks, calculate the absolute value of the difference between the first azimuth angle and the second azimuth angle, and obtain the initial angle difference; Subtracting the initial angle difference from 360 degrees yields the circumferential angle difference value; Obtain the first radial distance of the first sector block and the second radial distance of the second sector block, calculate the absolute value of the difference between the first radial distance and the second radial distance and divide it by the preset maximum radial distance to obtain the normalized radial distance difference value.

[0036] Specifically, each sector block with an established polar coordinate structure is numbered, and the angular and radial level numbers of each sector block in the polar coordinate system are recorded. The angular numbers are mapped to the corresponding azimuth values; for example, numbers 1 to 12 correspond to 0 degrees, 30 degrees, 60 degrees, and up to 330 degrees, respectively. After selecting any two sector blocks, the angle value of the sector where the first sector block is located is extracted as the first azimuth, and the angle value of the sector where the second sector block is located is extracted as the second azimuth. The difference between these two angle values ​​is calculated, and its absolute value is taken to obtain the initial angle difference, which varies between [0°, 360°]. Considering the periodicity of angles in polar coordinate systems (i.e., 0° and 360° are in the same direction), the initial angle difference is calculated by subtracting 360° from the initial angle difference. The smaller value between this initial angle difference and its complementary angle is then taken as the circumferential angle difference value, representing the shortest angular distance between two regions on the polar coordinate circle. This effectively avoids abrupt changes caused by crossing the 0° boundary while ensuring that adjacent regions have smaller angular differences. The actual radius positions corresponding to the radial layer numbers of the two sector regions are obtained. For example, if each ring layer is defined as 50 pixels apart, then layer 1 is 50, layer 2 is 100, and so on. After obtaining the first radial distance of the first sector region and the second radial distance of the second sector region, the difference between them is calculated and its absolute value is taken. This difference is then divided by a preset maximum radial distance value, for example, a maximum radius of 250 pixels. The normalization operation maps the radial difference value to between 0 and 1, obtaining a normalized radial distance difference value that reflects the relative radial layer difference between the two regions in the node image.

[0037] Specifically, for each sector, the radial difference value of block features between different annular layers is calculated to obtain the radial gradient value of each sector. The maximum value among all sector radial gradient values ​​is selected as the radial mutation rate index. This includes: performing layer-by-layer difference calculation on the compensated block feature vectors corresponding to multiple annular layers arranged in ascending order of radial distance within each sector; subtracting the block feature vector corresponding to the i-th annular layer from the block feature vector corresponding to the (i-1)-th annular layer element-by-element to obtain the radial difference vector of the i-th layer; calculating the L2 norm of each radial difference vector as the radial variation amplitude of that layer; and calculating the radial variation amplitude within the same sector. The arithmetic mean of the radial variation amplitudes of all annular layers is used to obtain the average radial gradient value of the sector. The average radial gradient values ​​of all sector sectors are traversed, and the average radial gradient value with the largest value is found as the global radial mutation rate index. At the same time, the index of the sector corresponding to the maximum value is recorded as the suspected decoupling direction. The global radial mutation rate index is compared with the preset mutation threshold. When the global radial mutation rate index is greater than the mutation threshold, it is determined that there is a pipeline decoupling defect, and the suspected decoupling direction and the index of the annular layer with the largest radial variation amplitude in that direction are output as the radial positioning information of the decoupling location.

[0038] In one specific embodiment, the process of performing step 400 may specifically include the following steps: M1: Stack the block feature vectors into an initial feature matrix, and perform layer normalization on the initial feature matrix to obtain the normalized feature matrix of the i-th layer; M2: Multiply the normalized feature matrix of the i-th layer by the node connection matrix to obtain the attention-weighted feature matrix of the i-th layer; M3: Perform a nonlinear transformation on the attention-weighted feature matrix of the i-th layer and connect it with the initial feature matrix to obtain the updated feature matrix of the i-th layer. Use the updated feature matrix of the i-th layer as the initial feature matrix for the next iteration. Repeat steps M1 to M3 until the preset number of iterations is completed and the aggregated feature matrix is ​​obtained; The average of the RGB three-channel values ​​of each sector block is calculated as the block brightness. The median of all block brightness is calculated as the reference brightness. The illumination compensation factor is calculated based on the difference between the block brightness and the reference brightness. Each block feature in the aggregated feature matrix is ​​multiplied by the corresponding illumination compensation factor to obtain the global feature vector.

[0039] Specifically, the seven-dimensional feature vectors extracted from 60 sector regions are stacked sequentially to construct an initial feature matrix, where each row represents the fused feature of a sector. The entire matrix is ​​60×7 in size and serves as the input for the first iteration. In the i-th iteration, the feature matrix is ​​normalized by calculating the overall mean and standard deviation along each column. Then, each value is subtracted from the mean and divided by the standard deviation to obtain a normalized feature matrix with a mean of zero and a variance of one, effectively eliminating the distribution offset of features between different sector regions. The i-th layer normalized feature matrix is ​​multiplied by the 60×60 node connection matrix to obtain the i-th layer attention-weighted feature matrix. The angular and radial structural weights encoded in the structural attention matrix are used to achieve feature propagation across blocks, enabling each sector region to fuse information from its topologically adjacent regions and obtain context-enhanced representations. A nonlinear processing mechanism is introduced into the attention-weighted feature matrix. This involves performing channel transformation and nonlinear activation using a multilayer perceptron with ReLU activation to enhance feature representation. The result of the nonlinear transformation is then residually concatenated with the input feature matrix of layer i, i.e., element-wise summed to obtain the updated feature matrix of layer i. This updated matrix is ​​then used as the initial feature matrix of layer i+1 for the next iteration. The normalization, attention weighting, and nonlinear residual aggregation steps are repeated, with a preset iteration depth of 6 layers, outputting an aggregated feature matrix that incorporates global structural information. The average of the RGB three-channel values ​​in the original color features of each sector block is taken as the brightness index of that block. All block brightness values ​​are sorted and the median is extracted as the reference brightness value. The illumination compensation factor for each block is calculated based on the relative difference between the block brightness and the reference brightness. When the block brightness is lower than the reference brightness, the compensation factor is greater than 1, which is used to amplify the feature response of the region. When the block brightness is higher than the reference brightness, the compensation factor is less than 1, which is used to suppress the abnormal response of the block due to reflection or overexposure. The aggregated feature vector of each block is multiplied one by one with the corresponding illumination compensation factor to generate the final block feature expression of illumination adaptation. Then, global weighted aggregation is performed based on the weighted feature vector to construct the global feature vector.

[0040] The process involves calculating the average of the RGB three-channel values ​​for each sector block as the block brightness, and using the median of all block brightness as the reference brightness. A lighting compensation factor is calculated based on the difference between the block brightness and the reference brightness. The global feature vector is obtained by multiplying the feature of each block in the aggregated feature matrix by its corresponding lighting compensation factor. This includes: calculating the block brightness value by performing an arithmetic mean calculation on the RGB three-channel values ​​for each sector block in the aggregated feature matrix; selecting the value in the middle of the sorted block brightness values ​​for all sector blocks as the reference brightness value; calculating the difference between the block brightness value of each sector block and the reference brightness value; and dividing the difference by the reference brightness value to obtain the normalized brightness deviation. The normalized brightness deviation is multiplied by the preset illumination compensation intensity coefficient and then added to the numerical value to obtain the initial illumination compensation factor. The initial illumination compensation factor is then truncated to the upper and lower limits. When the initial illumination compensation factor is greater than the preset upper limit threshold, it is truncated to the upper limit threshold. When the initial illumination compensation factor is less than the preset lower limit threshold, it is truncated to the lower limit threshold to obtain the final illumination compensation factor. The block feature vector corresponding to each sector in the aggregated feature matrix is ​​multiplied element-wise with the final illumination compensation factor corresponding to that block to obtain the compensated block feature vector. The L2 norm of all compensated block feature vectors is calculated and normalized to obtain the block weight. All compensated block feature vectors are weighted and summed according to their corresponding block weights to obtain the global feature vector.

[0041] Before multiplying the normalized feature matrix of layer i with the node connection matrix to obtain the attention-weighted feature matrix of layer i, the process includes a step of dynamically adjusting the node connection matrix based on the feature distribution characteristics of the current layer. Specifically, this includes: calculating the variance and skewness of each block feature vector in the normalized feature matrix of layer i according to the dimensions of the sector regions. The variance is obtained by calculating the sum of the squares of the differences between the values ​​of each dimension of the block feature vector and the mean, then dividing by the number of dimensions. The skewness is obtained by calculating the average of the cubes of the standardized values ​​of each dimension of the block feature vector. The variance and skewness are concatenated to form a block feature statistical vector. Global statistical characteristics are calculated for the block feature statistical vectors of all sector regions, including calculating the standard deviation of the variance of all blocks as a feature dispersion index and calculating the average absolute value of the skewness of all blocks as a feature asymmetry index. Based on the feature dispersion index and the feature asymmetry index, a feature distribution description vector for the current layer is constructed. The feature distribution description vector is then input... The system performs a nonlinear mapping using a preset attention adjustment function to obtain angular and radial adjustment factors. The angular adjustment factor, based on the feature dispersion index, is mapped to the 0.5-1.5 interval using a Sigmoid function to control the sensitivity of angular attenuation. The radial adjustment factor, based on the feature asymmetry index, is mapped to the 0.8-1.2 interval using a Tanh function to control the strength of radial attenuation. The angular attenuation weight corresponding to each element in the node connection matrix is ​​multiplied by the angular adjustment factor, and the radial attenuation weight is multiplied by the radial adjustment factor. After recalculating the attention weights for each pair of sector blocks, row normalization is performed to obtain the adaptive attention matrix of the i-th layer. The normalized feature matrix of the i-th layer is multiplied by the adaptive attention matrix of the i-th layer to obtain the adaptive attention weighted feature matrix of the i-th layer. This allows the feature aggregation process to dynamically adjust the inter-block correlation strength according to the actual distribution of features in the current layer, enhancing the adaptive capture capability for different defect patterns.

[0042] In one specific embodiment, the process of performing a nonlinear transformation on the attention-weighted feature matrix of the i-th layer and performing a residual connection with the initial feature matrix to obtain the updated feature matrix of the i-th layer, and using the updated feature matrix of the i-th layer as the initial feature matrix for the next iteration, can specifically include the following steps: The first output feature is obtained by performing a dimension-up linear transformation on the attention-weighted feature matrix of the i-th layer and adding a bias. Applying the ReLU activation function to the first output feature sets negative values ​​to zero and retains positive values ​​to obtain the activated feature; The activated features are subjected to a dimensionality reduction linear transformation and a bias is added to obtain the second output feature. The second output feature is added element by element to the initial feature matrix to obtain the updated feature matrix of the i-th layer, and the updated feature matrix of the i-th layer is used as the initial feature matrix for the next iteration.

[0043] Specifically, the attention-weighted feature matrix of layer i undergoes a dimensionality-upgrading linear transformation. This involves linearly mapping the original feature dimensions using a pre-defined dimensionality-upgrading transformation weight matrix, expanding the original seven-dimensional features to a higher dimension (e.g., 28 dimensions). Simultaneously, a set of trainable bias terms is added during the mapping process to enhance the model's ability to flexibly fit the feature distribution. The first output feature after dimensionality upgrading is then introduced into the ReLU activation function, setting all values ​​less than zero to zero and retaining only the greater-than-zero values. This suppresses invalid or noisy features while improving the sparsity and separability of the feature representation, enhancing the model's ability to distinguish complex structural defects. After activation, a dimensionality-reduction linear transformation is performed on the high-dimensional features. This is achieved by compressing them back to a seven-dimensional form using a dimensionality-reduction transformation matrix mapped to the original dimension and the corresponding bias terms, yielding the second output feature. The second output feature is added element-wise to the initial feature matrix before the start of the i-th layer iteration to achieve residual connection. This allows the original information and the nonlinear enhancement result to participate in the next layer calculation, forming the updated feature matrix of the i-th layer. The updated feature matrix is ​​then used as the input of the i+1-th layer to continue participating in subsequent normalization, structural attention aggregation, and nonlinear activation processing.

[0044] In one specific embodiment, the process of performing step 500 may specifically include the following steps: Extract the sine and cosine values ​​of the azimuth coding component from the global feature vector, and calculate the angle between the azimuth coding component and the preset reference direction vector as the angle deviation index. For each sector, the radial difference value of the block features between different annular layers is calculated to obtain the radial gradient value of each sector. The maximum value among all sector radial gradient values ​​is selected as the radial mutation rate index. The number of sector-shaped areas with a light compensation factor lower than the preset compensation threshold is counted, and the ratio of this number to the total number of sector-shaped areas is used as a leakage indicator. The angle deviation index is compared with the angle threshold, the radial mutation rate index is compared with the mutation threshold, and the leakage index is compared with the leakage threshold. When any index exceeds the corresponding threshold, it is determined that there is a node connection defect and a visual inspection result of the defect is generated.

[0045] Specifically, components representing spatial orientation information are extracted from the global feature vector. These components include the sine and cosine values ​​of the angles formed by the weighted aggregation of each sector block. These two triangular codes constitute the spatial representation of the main directions in the node image. To measure the degree of deviation between the aggregated direction and the standard reference direction, the vertically upward direction vector [0,1] is used as the reference benchmark. The angle between the extracted sine and cosine encoded vectors and the reference direction is calculated as the angle deviation index. The angle is calculated using the cosine similarity function. When the angle deviation is close to zero, it indicates that the node structure direction is evenly distributed or has not deviated from the reference direction. However, when the angle increases, it indicates that the features in a certain direction are abnormally enhanced, which is an indication signal of pipe misalignment. For each fixed-angle sector, i.e., the sector blocks within the same angular range, the block feature differences between different annular layers in that direction are compared sequentially. The numerical difference in feature changes between adjacent layers is calculated and quantified using mean square error or L1 difference metric. The radial gradient response on the angular sector is statistically analyzed layer by layer from the inside out, reflecting the magnitude of visual feature changes from the node center to the pipe opening. When there are connection anomalies such as disconnection, breakage, or misalignment, the difference value will suddenly increase in a certain layer segment. The radial gradient results of all 12 angular sectors are traversed, and the one with the largest value is selected as the radial abrupt change rate index to measure whether there are structural jump regions in the image. Based on the brightness compensation factor corresponding to each sector block recorded in the illumination compensation module, the number of all blocks below a preset threshold (e.g., 0.5) is counted. This number is divided by the total number of blocks, i.e., 60, to obtain the leakage index, which quantifies the proportion of area in the node image where excessive brightness enhancement is caused by water surface or wet area. When the leakage ratio exceeds the set threshold, it is inferred that there is reflective water accumulation or liquid seepage in that area. The angular deviation index, radial mutation rate index, and leakage index are compared with the angular threshold, radial mutation rate index, and leakage threshold, respectively. The angular deviation index is set to 3.5 degrees to reflect the acceptable range of directional deviation; the radial mutation rate index is set to 0.8 to define significant interlayer jumps; and the leakage index is set to 0.12 to identify brightness anomalies exceeding 12% of the area. If any index value exceeds the corresponding threshold, a connection defect is automatically determined for the current node. The defect is then classified according to the specific index type triggered, and the corresponding defect label, suspected location range, and suggested review priority are output, forming the visual defect detection result.

[0046] The process involves extracting the sine and cosine values ​​of the azimuth coding components from the global feature vector, and calculating the angle between the azimuth coding components and the preset reference direction vector as an angle deviation index. This includes: extracting the position coding feature components of all sector blocks from the global feature vector; multiplying the azimuth sine value of each sector block by its corresponding block weight and summing the results to obtain a weighted sine component; multiplying the azimuth cosine value of each sector block by its corresponding block weight and summing the results to obtain a weighted cosine component; combining the weighted sine and weighted cosine components to form a two-dimensional aggregated azimuth vector, and calculating the aggregated azimuth vector... The Euclidean norm of the aggregated azimuth vector is calculated and normalized to obtain the unit aggregated azimuth vector. A reference direction vector is set according to the expected pipeline connection direction. The dot product of the unit aggregated azimuth vector and the reference direction vector is calculated to obtain the cosine similarity. The inverse cosine operation is performed on the cosine similarity to obtain the angle between the two vectors. The angle is compared with a preset angle threshold. When the angle is greater than the angle threshold, it is determined that there is a pipeline misalignment defect. The angle is output as an angle deviation index. At the same time, the actual misalignment direction angle is calculated based on the sine and cosine components of the unit aggregated azimuth vector.

[0047] The above describes the visual inspection method for pipeline node defects based on a detection robot in the embodiments of this application. The following describes the visual inspection system for pipeline node defects based on a detection robot in the embodiments of this application. Please refer to [link to relevant documentation]. Figure 2 One embodiment of the visual inspection system for pipeline node defects based on a detection robot in this application includes: The acquisition module 201 is used to acquire node images of the sewer network through the detection robot, and to perform circle detection and sector segmentation on the node images to obtain multiple sector area blocks; Extraction module 202 is used to extract the block feature vector of each sector region block; Module 203 is used to calculate the angular attenuation weight and radial attenuation weight based on the normalized radial distance difference value and circumferential angle difference value of the block feature vector, and to construct the node connection relationship matrix based on the angular attenuation weight and radial attenuation weight. Aggregation module 204 is used to combine block feature vectors and node connection relationship matrices to perform feature aggregation and illumination compensation to obtain global feature vectors; The calculation module 205 is used to calculate the angle deviation index, radial mutation rate index and leakage index based on the global feature vector, and generate the defect visual inspection results based on the angle deviation index, radial mutation rate index and leakage index.

[0048] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0049] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0050] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A visual inspection method for pipeline node defects based on a detection robot, characterized in that, include: The robot collects node images of the sewer network and performs circle detection and sector segmentation on the node images to obtain multiple sector region blocks. Extract the block feature vector of each sector region; The angular attenuation weight and radial attenuation weight are calculated based on the normalized radial distance difference value and circumferential angle difference value of the block feature vector, and a node connection relationship matrix is ​​constructed based on the angular attenuation weight and the radial attenuation weight. By combining the block feature vector and the node connection matrix, feature aggregation and illumination compensation are performed to obtain the global feature vector; Based on the global feature vector, the angle deviation index, radial mutation rate index, and leakage index are calculated, and the defect visual inspection result is generated according to the angle deviation index, the radial mutation rate index, and the leakage index.

2. The visual inspection method for pipeline node defects based on a detection robot according to claim 1, characterized in that, The process involves using a detection robot to collect node images of the sewer network, and then performing circle detection and sector segmentation on the node images to obtain multiple sector-shaped region blocks, including: The robot collects node images of the sewer network and performs edge detection on the node images to extract the set of edge pixels of the circular outline of the node chamber. The edge pixel set is accumulated by Hough transformation in the parameter space composed of candidate center coordinates and candidate radius values, and the candidate center positions that satisfy the circle equation are voted and statistically analyzed to obtain the accumulator matrix. Select the candidate center coordinates corresponding to the maximum number of votes from the accumulator matrix as the coordinates of the node center point; A polar coordinate system is established based on the coordinates of the node center point, and the node image is divided into fan-shaped blocks to obtain multiple fan-shaped region blocks.

3. The visual inspection method for pipeline node defects based on a detection robot according to claim 2, characterized in that, The process involves establishing a polar coordinate system based on the coordinates of the node center point and dividing the node image into fan-shaped blocks to obtain multiple fan-shaped region blocks, including: A polar coordinate system is established with the coordinates of the node center point as the origin, and the radial distance and azimuth angle from each pixel in the node image to the coordinates of the node center point are calculated. Based on the radial distance, multiple concentric ring layers are set up, and the radial distance boundary of each ring is an integer multiple of the preset pixel interval, so that the node image is divided into multiple ring layers along the radial distance; The circumference is evenly divided into multiple sector-shaped areas, each sector having an equal central angle. Multiple sector-shaped area blocks are generated by combining the radial layering of the multiple annular layers and the angular partitioning of the multiple sector-shaped areas.

4. The visual inspection method for pipeline node defects based on a detection robot according to claim 3, characterized in that, The extraction of the block feature vector for each sector region includes: For each sector block, the mean values ​​of the red, green, and blue channels are calculated to obtain the RGB three-channel mean features. The Sobel operator is used to perform convolution on the pixels in each of the fan-shaped regions to calculate the horizontal and vertical gradients. The gradient intensity feature is obtained by summing the squares of the horizontal and vertical gradients and then taking the square root. The normalized radial distance from each sector block to the center point of the node, as well as the sine and cosine values ​​of the azimuth angle of the sector block, are calculated as position encoding features. The RGB three-channel mean features, the gradient intensity features, and the position encoding features are concatenated to obtain a block feature vector.

5. The visual inspection method for pipeline node defects based on a detection robot according to claim 1, characterized in that, The step of calculating angular attenuation weights and radial attenuation weights based on the normalized radial distance difference value and circumferential angle difference value of the block feature vector, and constructing a node connection relationship matrix based on the angular attenuation weights and the radial attenuation weights, includes: Calculate the difference in circumferential angle and the difference in normalized radial distance for any two of the aforementioned sector regions; The angular attenuation weight is obtained by multiplying the circumferential angle difference value with the angular attenuation coefficient and then performing an exponential operation. The radial attenuation weight is obtained by multiplying the normalized radial distance difference value with the radial attenuation coefficient and then performing an exponential operation. The attention weight matrix is ​​formed by multiplying the angular attenuation weight corresponding to each pair of sector blocks by the radial attenuation weight. The node connection relationship matrix is ​​obtained by normalizing each row of the attention weight matrix.

6. The visual inspection method for pipeline node defects based on a detection robot according to claim 5, characterized in that, The calculation of the circumferential angle difference and normalized radial distance difference for any two of the aforementioned sector regions includes: Obtain the first azimuth angle of the first sector block and the second azimuth angle of the second sector block in any two sector blocks, calculate the absolute value of the difference between the first azimuth angle and the second azimuth angle, and obtain the initial angle difference; Subtracting the initial angle difference from 360 degrees yields the circumferential angle difference value. Obtain the first radial distance of the first sector block and the second radial distance of the second sector block, calculate the absolute value of the difference between the first radial distance and the second radial distance and divide it by the preset maximum radial distance to obtain the normalized radial distance difference value.

7. The visual inspection method for pipeline node defects based on a detection robot according to claim 6, characterized in that, The process of combining the block feature vector and the node connection matrix to perform feature aggregation and illumination compensation yields a global feature vector, including: M1: Stack the block feature vectors into an initial feature matrix, and perform layer normalization on the initial feature matrix to obtain the normalized feature matrix of the i-th layer; M2: Multiply the normalized feature matrix of the i-th layer by the node connection matrix to obtain the attention-weighted feature matrix of the i-th layer; M3: Perform a nonlinear transformation on the attention-weighted feature matrix of the i-th layer and connect it with the initial feature matrix to obtain the updated feature matrix of the i-th layer. Use the updated feature matrix of the i-th layer as the initial feature matrix for the next iteration. Repeat steps M1 to M3 until the preset number of iterations is completed and the aggregated feature matrix is ​​obtained; The average value of the RGB three channels of each sector block is calculated as the block brightness. The median of all the block brightnesses is calculated as the reference brightness. The illumination compensation factor is calculated based on the difference between the block brightness and the reference brightness. Each block feature in the aggregated feature matrix is ​​multiplied by the corresponding illumination compensation factor to obtain the global feature vector.

8. The visual inspection method for pipeline node defects based on a detection robot according to claim 7, characterized in that, The step of performing a nonlinear transformation on the attention-weighted feature matrix of the i-th layer and performing a residual connection with the initial feature matrix to obtain the updated feature matrix of the i-th layer, and using the updated feature matrix of the i-th layer as the initial feature matrix for the next iteration, includes: The first output feature is obtained by performing a dimension-up linear transformation on the attention-weighted feature matrix of the i-th layer and adding a bias. Applying the ReLU activation function to the first output feature sets negative values ​​to zero and retains positive values ​​to obtain the activated feature; The activated features are subjected to a dimensionality reduction linear transformation and a bias is added to obtain the second output features. The second output features are added element by element to the initial feature matrix to obtain the updated feature matrix of the i-th layer, and the updated feature matrix of the i-th layer is used as the initial feature matrix for the next iteration.

9. The visual inspection method for pipeline node defects based on a detection robot according to claim 8, characterized in that, The step of calculating the angle deviation index, radial mutation rate index, and leakage index based on the global feature vector, and generating defect visual inspection results based on the angle deviation index, the radial mutation rate index, and the leakage index, includes: Extract the sine and cosine values ​​of the azimuth coded component from the global feature vector, and calculate the angle between the azimuth coded component and the preset reference direction vector as an angle deviation index. For each sector, the radial difference value of the block features between different annular layers is calculated to obtain the radial gradient value of each sector. The maximum value among all the radial gradient values ​​of the sectors is selected as the radial mutation rate index. The number of sector-shaped area blocks with a light compensation factor lower than a preset compensation threshold is counted, and the ratio of the number to the total number of sector-shaped area blocks is used as a leakage index. The angle deviation index is compared with the angle threshold, the radial mutation rate index is compared with the mutation threshold, and the leakage index is compared with the leakage threshold. When any index exceeds the corresponding threshold, it is determined that there is a node connection defect and a visual inspection result of the defect is generated.

10. A visual inspection system for pipeline node defects based on a detection robot, characterized in that, A method for performing visual inspection of pipeline node defects based on a detection robot as described in any one of claims 1-9, comprising: The acquisition module is used to acquire node images of the sewer network through a detection robot, and to perform circle detection and sector segmentation on the node images to obtain multiple sector region blocks; The extraction module is used to extract the block feature vector of each sector region block; The construction module is used to calculate the angular attenuation weight and the radial attenuation weight based on the normalized radial distance difference value and the circumferential angle difference value of the block feature vector, and to construct the node connection relationship matrix based on the angular attenuation weight and the radial attenuation weight; The aggregation module is used to combine the block feature vector and the node connection matrix to perform feature aggregation and illumination compensation to obtain a global feature vector; The calculation module is used to calculate the angle deviation index, radial mutation rate index and leakage index based on the global feature vector, and generate the defect visual detection result based on the angle deviation index, the radial mutation rate index and the leakage index.