CN-121998984-A - Pipeline inner wall defect detection method and system based on image recognition
Abstract
The invention relates to the technical field of image recognition and discloses a pipeline inner wall defect detection method and system based on image recognition, wherein the method comprises the steps of performing image decoupling on an original image sequence of the pipeline inner wall to obtain a structural layer image sequence and a texture layer image sequence; the method comprises the steps of carrying out consistency on a structural layer image sequence and a texture layer image sequence to obtain an enhanced image sequence, mapping the enhanced image sequence to a preset two-dimensional plane to obtain a two-dimensional plane unfolding diagram to obtain a candidate region mask, carrying out depth feature fusion on multi-scale context information to obtain a discriminative depth feature vector, carrying out preliminary defect classification and confidence assessment on the discriminative depth feature vector, optimizing a low-confidence region based on a confidence assessment result to obtain a defect type label and a pixel-level semantic segmentation contour, and determining actual geometric parameters and spatial poses of defects to generate a structural defect detection report.
Inventors
- ZHANG XINHUA
- ZHANG BIN
Assignees
- 宝鸡华岚新材料科技有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20260409
Claims (10)
- 1. An image recognition-based pipeline inner wall defect detection method is characterized by comprising the following steps: S1, acquiring an original image sequence of the inner wall of a pipeline, and performing image decoupling on the original image sequence to obtain a structural layer image sequence and a texture layer image sequence of the original image sequence; s2, performing vision field unification on the structural layer image sequence and the texture layer image sequence to obtain an enhanced image sequence of the inner wall of the pipeline; S3, mapping the enhanced image sequence to a preset two-dimensional plane according to the geometric parameters and the camera imaging parameters of the inner wall of the pipeline to obtain a two-dimensional plane expansion diagram of the inner wall of the pipeline, and performing coarse extraction of a defect candidate region on the two-dimensional plane expansion diagram to obtain a candidate region mask of the inner wall of the pipeline; S4, carrying out depth feature fusion on the multi-scale context information corresponding to the candidate region mask to obtain a discriminant depth feature vector of the inner wall of the pipeline; S5, performing defect preliminary classification and confidence assessment on the discriminant depth feature vector, and performing iterative optimization on a low-confidence region based on a confidence assessment result to obtain a defect type label and a pixel-level semantic segmentation contour of the inner wall of the pipeline; S6, determining actual geometric parameters of defects and space positions of defects of the inner wall of the pipeline based on the defect type labels, the pixel-level semantic segmentation outlines and the image-space mapping relation to generate a structural defect detection report of the inner wall of the pipeline.
- 2. The method for detecting defects of an inner wall of a pipeline based on image recognition according to claim 1, wherein the steps of obtaining an original image sequence of the inner wall of the pipeline, and performing image decoupling on the original image sequence to obtain a structure layer image sequence and a texture layer image sequence of the original image sequence, comprise: Acquiring an original image sequence of the inner wall of the pipeline; performing frequency domain decomposition on an original image in the original image sequence to obtain a low-frequency component image and a high-frequency component image of the original image sequence; Taking the low-frequency component image as a structural layer image sequence of the original image sequence; Performing non-downsampling contourlet transformation on the high-frequency component image to obtain a subband coefficient set of the high-frequency component image; performing coefficient modulation on the sub-band coefficient set to obtain an enhanced high-frequency sub-band coefficient set of the sub-band coefficient set; And carrying out non-downsampling contourlet inverse transformation according to the enhanced high-frequency subband coefficient set, generating a reconstructed high-frequency detail image of the original image sequence, and taking the reconstructed high-frequency detail image as a texture layer image sequence of the original image sequence.
- 3. The method for detecting defects of an inner wall of a pipeline based on image recognition according to claim 1, wherein the performing the view-field unification on the structural layer image sequence and the texture layer image sequence to obtain the enhanced image sequence of the inner wall of the pipeline comprises: extracting a frame image in the structure layer image sequence and a feature point set of a corresponding frame image in the texture layer image sequence; Based on the feature point set, carrying out multi-mode image registration on the structural layer image sequence and the texture layer image sequence to obtain a space transformation parameter set of the inner wall of the pipeline; Affine transformation is carried out on the texture layer image sequence according to the space transformation parameter set, so that a registration texture layer image sequence of the texture layer image sequence is obtained; and carrying out image fusion on the structural layer image sequence and the registration texture layer image sequence to obtain an enhanced image sequence of the inner wall of the pipeline.
- 4. The method for detecting defects of an inner wall of a pipeline based on image recognition according to claim 1, wherein the mapping the enhanced image sequence to a preset two-dimensional plane according to the geometric parameters and the camera imaging parameters of the inner wall of the pipeline to obtain a two-dimensional plane unfolded view of the inner wall of the pipeline comprises: establishing a first mapping relation between image pixel coordinates in the enhanced image sequence and three-dimensional space coordinates of the inner wall of the pipeline based on a pinhole imaging model according to focal length, principal point coordinates and distortion coefficients in camera imaging parameters; converting the three-dimensional space coordinates into coordinate conversion rules of a preset two-dimensional plane according to the geometric parameters of the inner wall of the pipeline and the first mapping relation; based on the coordinate transformation rule, carrying out coordinate transformation on the enhanced image sequence, and calculating a projection coordinate set of pixels in the enhanced image sequence on the preset two-dimensional plane; and carrying out reprojection on the enhanced image sequence according to the projection coordinate set to obtain a two-dimensional plane expansion diagram of the inner wall of the pipeline.
- 5. The method for detecting defects on an inner wall of a pipeline based on image recognition as set forth in claim 4, wherein the calculation formula of the projection coordinate set is: ; in the formula, For the projection coordinates of the pixels on the preset two-dimensional plane, For a camera focal length in the camera imaging parameters, For the vertical image coordinates of the pixel in the original enhanced image, Is the longitudinal coordinates of the principal point of the image in the imaging parameters of the camera, For the lateral image coordinates of the pixel in the original enhanced image, Is the transverse coordinates of the principal point of the image in the imaging parameters of the camera, For the pipe radius in the geometrical parameters of the inner wall of the pipe, Is a preset constant correction coefficient which is preset, For fine tuning the equivalent focal length to accommodate for changes in the curvature of the tube in actual imaging.
- 6. The method for detecting defects of an inner wall of a pipeline based on image recognition as set forth in claim 1, wherein the performing coarse extraction of the defect candidate regions on the two-dimensional plane expansion map to obtain the candidate region mask of the inner wall of the pipeline comprises: Mapping the structure layer image sequence to the preset two-dimensional plane according to the coordinate conversion rule of the inner wall of the pipeline to obtain a structure reference diagram of the inner wall of the pipeline; Comparing the structural reference image with the two-dimensional plane expansion image pixel by pixel difference to obtain a significant difference image of the inner wall of the pipeline; Performing self-adaptive threshold segmentation on the significant difference graph to obtain a preliminary candidate region binary graph of the significant difference graph; mapping the texture layer image sequence to the preset two-dimensional plane to generate an edge structure diagram of the inner wall of the pipeline; Carrying out morphological reconstruction on the preliminary candidate region binary image according to the edge structure diagram to obtain an optimized candidate region binary image of the inner wall of the pipeline; and taking the circumscribed rectangle of the connected region in the optimized candidate region binary image as a candidate region to generate a candidate region mask of the inner wall of the pipeline.
- 7. The method for detecting defects of an inner wall of a pipeline based on image recognition according to claim 1, wherein the depth feature fusion is performed on multi-scale context information corresponding to the candidate region mask to obtain a discriminative depth feature vector of the inner wall of the pipeline, comprising: Extracting a corresponding candidate image block set in the two-dimensional plane expansion diagram according to the candidate region mask; constructing an image block-context information pair set of the inner wall of the pipeline for the candidate image blocks in the candidate image block set; Extracting the characteristics of the image blocks and the corresponding context information in the image block-context information pair set to obtain a local depth characteristic vector and a multi-scale context depth characteristic vector set of the inner wall of the pipeline; Weighting and fusing the local depth feature vector and the multi-scale context depth feature vector set to obtain candidate image block depth feature vectors of the inner wall of the pipeline; And aggregating the candidate image block depth feature vectors to generate the discriminant depth feature vector of the inner wall of the pipeline.
- 8. The method for detecting the defects of the inner wall of the pipeline based on the image recognition according to claim 1, wherein the steps of performing preliminary defect classification and confidence assessment on the discriminative depth feature vector, and performing iterative optimization on a low-confidence region based on a confidence assessment result to obtain a defect type label and a pixel-level semantic segmentation contour of the inner wall of the pipeline comprise the following steps: Inputting the discriminant depth feature vector into a classification network of the inner wall of the pipeline to obtain preliminary defect type prediction and prediction confidence of the inner wall of the pipeline; marking the area with the prediction confidence coefficient lower than a set threshold value as a low confidence coefficient area; extracting multi-level features corresponding to the low confidence level region in a preset multi-scale depth feature map, and fusing to generate enhanced feature representation; reclassifying the low confidence region based on the enhanced feature representation to obtain updated defect class prediction and updated prediction confidence of the inner wall of the pipeline; Integrating the updated defect type prediction to obtain a defect type label of the inner wall of the pipeline; And based on the defect type label, performing pixel-level semantic segmentation on the two-dimensional plane expansion graph to obtain a pixel-level semantic segmentation contour of the inner wall of the pipeline.
- 9. The method for detecting defects on an inner wall of a pipeline based on image recognition according to claim 1, wherein determining actual geometric parameters of defects and spatial poses of defects on the inner wall of the pipeline based on the defect class labels, the pixel-level semantic segmentation contours and the image-space mapping relation to generate a structured defect detection report of the inner wall of the pipeline comprises: According to the image-space mapping relation, mapping the pixel-level semantic segmentation contour into a three-dimensional space coordinate of the inner wall of the pipeline to obtain a defect three-dimensional space representation of the inner wall of the pipeline; Based on the three-dimensional space representation of the defect, extracting the space morphological characteristics of the defect in the inner wall of the pipeline, and determining the barycenter coordinates and the main axis direction of the defect to obtain the space pose of the defect of the inner wall of the pipeline; according to the three-dimensional space representation of the defect, carrying out geometric analysis on the surface shape and volume distribution of the defect to obtain the actual geometric parameter of the defect of the inner wall of the pipeline; and integrating the defect type label, the defect space pose and the defect actual geometric parameters to obtain a structural defect detection report of the inner wall of the pipeline.
- 10. An image recognition-based pipeline inner wall defect detection system for implementing the image recognition-based pipeline inner wall defect detection method of claim 1, the system comprising: The image decoupling module is used for acquiring an original image sequence of the inner wall of the pipeline, and performing image decoupling on the original image sequence to obtain a preprocessed image sequence of the original image sequence; the visual enhancement module is used for carrying out vision field consistency on the structural layer image sequence and the texture layer image sequence to obtain an enhanced image sequence of the inner wall of the pipeline; The image unfolding and rough detection module is used for mapping the enhanced image sequence to a preset two-dimensional plane according to the geometric parameters and the camera imaging parameters of the inner wall of the pipeline to obtain a two-dimensional plane unfolding diagram of the inner wall of the pipeline, and performing rough extraction of a defect candidate region on the two-dimensional plane unfolding diagram to obtain a candidate region mask of the inner wall of the pipeline; the feature fusion module is used for carrying out depth feature fusion on the multi-scale context information corresponding to the candidate region mask to obtain a discriminant depth feature vector of the inner wall of the pipeline; The defect precision classification module is used for carrying out defect preliminary classification and confidence assessment on the discriminant depth feature vector, and carrying out iterative optimization on a low-confidence region based on a confidence assessment result to obtain a defect type label and a pixel-level semantic segmentation contour of the inner wall of the pipeline; And the defect quantification report module is used for calculating the actual geometric parameters and the spatial pose of the defects of the inner wall of the pipeline based on the defect type labels, the pixel-level semantic segmentation outlines and the image-space mapping relation so as to generate a structural defect detection report of the inner wall of the pipeline.
Description
Pipeline inner wall defect detection method and system based on image recognition Technical Field The invention relates to the technical field of image recognition, in particular to a pipeline inner wall defect detection method and system based on image recognition. Background The prior art has obvious defects in the image preprocessing and enhancing links of the defect detection of the inner wall of the pipeline. The method has the advantages that the image decoupling of the structural layer and the texture layer is not carried out on the original image sequence of the inner wall of the pipeline, only a single image enhancement means is adopted, structural information and texture details in the image cannot be effectively separated, high-frequency detail characteristics related to defects are submerged or structural information interferes with texture analysis, the vision field unification treatment is not carried out on the images of the structural layer and the texture layer, only images of different modes are simply fused, image registration deviation is easy to occur, the enhanced image cannot accurately reflect the real state of the inner wall of the pipeline, a high-quality image base cannot be provided for subsequent defect detection, and the complex image detection requirement of the inner wall of the pipeline cannot be met. In the prior art, the enhanced image is not mapped into a two-dimensional plane expansion diagram by combining the geometric parameters of a pipeline and imaging parameters of a camera, defect detection is only directly carried out on an original image, deformation and omission of a defect area are caused by the influence of the shape of a curved surface of the pipeline, multi-scale context information of a candidate area is not subjected to depth feature fusion, only local single features are extracted, discrimination features of the defects are difficult to capture, defect classification accuracy is low, iteration optimization is not carried out on a low-confidence area, actual geometric parameters and space pose of the defects are not accurately quantized, defect positions are simply marked, a structural detection report cannot be generated, and the actual requirements of accurate assessment and maintenance of the defects of the inner wall of the pipeline are difficult to meet. Disclosure of Invention The invention provides a pipeline inner wall defect detection method and system based on image recognition, which are used for solving the problems in the background technology. In order to achieve the above object, the present invention provides a method for detecting defects on an inner wall of a pipeline based on image recognition, comprising: S1, acquiring an original image sequence of the inner wall of a pipeline, and performing image decoupling on the original image sequence to obtain a structural layer image sequence and a texture layer image sequence of the original image sequence; s2, performing vision field unification on the structural layer image sequence and the texture layer image sequence to obtain an enhanced image sequence of the inner wall of the pipeline; S3, mapping the enhanced image sequence to a preset two-dimensional plane according to the geometric parameters and the camera imaging parameters of the inner wall of the pipeline to obtain a two-dimensional plane expansion diagram of the inner wall of the pipeline, and performing coarse extraction of a defect candidate region on the two-dimensional plane expansion diagram to obtain a candidate region mask of the inner wall of the pipeline; S4, carrying out depth feature fusion on the multi-scale context information corresponding to the candidate region mask to obtain a discriminant depth feature vector of the inner wall of the pipeline; S5, performing defect preliminary classification and confidence assessment on the discriminant depth feature vector, and performing iterative optimization on a low-confidence region based on a confidence assessment result to obtain a defect type label and a pixel-level semantic segmentation contour of the inner wall of the pipeline; S6, determining actual geometric parameters of defects and space positions of defects of the inner wall of the pipeline based on the defect type labels, the pixel-level semantic segmentation outlines and the image-space mapping relation to generate a structural defect detection report of the inner wall of the pipeline. In a preferred embodiment, the obtaining an original image sequence of the inner wall of the pipeline, and performing image decoupling on the original image sequence to obtain a structural layer image sequence and a texture layer image sequence of the original image sequence includes: Acquiring an original image sequence of the inner wall of the pipeline; performing frequency domain decomposition on an original image in the original image sequence to obtain a low-frequency component image and a high-frequency component image of the