CN-122023418-A - Cable trench detection method and system
Abstract
The invention provides a cable trench detection method and a system, which are applied to handheld equipment inspection. The method comprises the steps of collecting continuous local images of a cable duct construction section through a handheld camera device, carrying out sequential panoramic stitching on the continuous local images to generate panoramic stitching images, and inputting the panoramic stitching images into a construction defect detection model to obtain a construction defect identification result. The model is an improved model based on YOLOv architecture, a main network of the model is constructed by ShuffleNetV2 modules to realize light weight, a cavity space pyramid pooling module with multi-cavity expansion rate is introduced at the tail end to fuse multi-scale characteristics, and a neck network key layer is embedded into a convolution block attention module to strengthen the response of a defect area. The invention realizes the automatic, accurate and flexible identification of the construction defects of the long-distance cable trench.
Inventors
- LU WEI
- XU SHAOZHONG
- XU JIANAN
- Zhou Zhebi
- REN TAO
- YAN JUAN
- GUO JIALEI
Assignees
- 电管家能源管理(上海)有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260414
Claims (10)
- 1. The cable pit detection method is applied to handheld equipment inspection and is characterized by comprising the following steps of: Acquiring continuous partial images acquired along a cable duct construction section through a handheld camera device; Carrying out serialization panoramic stitching treatment on the continuous local images to generate panoramic stitching images covering the complete working face of the cable pit construction section; Inputting a panoramic spliced image into a construction defect detection model to obtain a construction defect identification result of a cable pit, wherein the construction defect detection model is an improved model based on YOLOv framework, a main network of the improved model is constructed by a ShuffleNetV2 module and is used for carrying out light feature extraction on the input image, a cavity space pyramid pooling module is introduced at the tail end of the main network and is configured with a plurality of different cavity expansion rates and used for fusing multi-scale contextual features of the construction defect of the cable pit, and a convolution block attention module is embedded in a neck network key feature layer of the improved model and is used for enhancing feature response to a defect area; The construction defect identification result comprises defect types existing in the construction section of the cable pit and positioning frame information of each defect in the panoramic spliced image, wherein the defect types comprise at least one of pipeline alignment deviation, construction foreign matter residues, structural support instability and apparent defects of concrete pouring.
- 2. The method for detecting a cable duct according to claim 1, wherein the sequential panoramic stitching process specifically comprises: The improved SIFT feature extraction and matching are carried out on the continuous partial images, the improvement is that after feature points are extracted by the SIFT algorithm and initial matching is carried out, a RANSAC algorithm is introduced to purify matching pairs so as to eliminate mismatching caused by illumination change or repeated textures; Based on the purified correct matching pair, calculating a homography transformation matrix between adjacent images, and carrying out alignment and geometric correction on the images; and fusing the aligned images, wherein the fusion adopts a multi-band fusion algorithm, and different frequency bands of the image pyramid are respectively weighted and fused, so that a splicing seam is eliminated, and a panoramic splicing image with consistent vision is generated.
- 3. The cable pit detection method according to claim 2, wherein, when the serialized panorama stitching process is performed, equipment pose data acquired by an inertial measurement unit built in the handheld camera equipment is fused as spatial motion constraints for image alignment.
- 4. The method of claim 1, wherein before inputting the panoramic stitched image into the construction defect detection model, the method further comprises the step of background rejection: Inputting the panoramic stitching image into an example segmentation model based on U 2 -Net architecture training; outputting an accurate pixel level mask of a cable or pipeline main body in the panoramic spliced image by the example segmentation model; based on the mask, cutting out an image of the area to be detected, which only contains the cable or pipeline main body, from the panoramic spliced image so as to enable the construction defect detection model to carry out defect identification.
- 5. The cable pit detection method according to claim 1, wherein in the construction defect detection model construction, the backbone network constructed by ShuffleNetV modules realizes light weight through structural recombination, specifically comprising: and replacing a plurality of standard C2f modules for feature extraction in the YOLOv original backbone network with the same number of ShuffleNetV basic units, wherein each ShuffleNetV basic unit sequentially executes channel segmentation, branch convolution, channel splicing and channel shuffling operations so as to maintain the high-efficiency information interaction capability among feature channels while reducing model parameters and calculation amount.
- 6. The method according to any one of claims 1 or 5, wherein the void space pyramid pooling module specifically comprises four parallel branches: a 1*1 standard convolution branch for extracting local detail features of the cable or pipe body; Three parallel 3*3 hole convolution branches with different hole expansions, wherein the hole expansions are respectively set to 6, 12 and 18 and are respectively used for capturing the context characteristics of small-scale micro cracks, medium-scale foreign matters or damages and large-scale structure alignment offset; a global average pooling branch for obtaining global semantic context information of the cable trench construction section; the outputs of the branches are fused in the channel dimension, so that an enhanced feature map capable of simultaneously representing microscopic-to-macroscopic multi-scale information of the cable trench construction defects is generated.
- 7. The method for detecting cable duct according to claim 1, wherein the processing procedure of the convolution block attention module embedded in the key feature layer of the neck network of the improved model specifically comprises: receiving an intermediate feature map from the neck network of the improved model, wherein the intermediate feature map is enhanced by a pyramid pooling module of the hollow space and completes primary scale fusion; Performing channel attention calculation on the intermediate feature map to generate a weight vector of channel dimension, wherein the weight vector is used for adaptively recalibrating the response intensity of the feature channel with high semantic relativity with at least one defect of pipeline alignment deviation, construction foreign matter residues, structural support instability and concrete pouring apparent defects by compressing global space information and learning relativity among channels; carrying out space attention calculation on the feature map subjected to channel attention weighting adjustment to generate a weight matrix with space dimension, wherein the weight matrix is used for reasoning a significant region in which defects appear in the highlighted image in a two-dimensional space by aggregating channel information and learning a context relation of space positions, and inhibiting background information with repeated or irrelevant textures in a cable duct background; and sequentially multiplying the intermediate feature map with the channel weight vector and the space weight matrix element by element, and outputting the feature map subjected to channel and space dimension dual attention modulation so as to improve the positioning and classifying precision of the construction defect detection model on multiple types of defects in a complex background.
- 8. The method for detecting the cable pit according to claim 1, wherein the training of the construction defect detection model adopts a multitask loss function combining scale perception and shape priori, and the loss function is formed by weighting classification loss, bounding box regression loss and shape constraint loss, and the specific expression is: Wherein, the 、 、 Is a preset balance coefficient; 、 、 Classifying loss, boundary box regression loss and shape priori loss respectively; is the total number of samples in a batch; the method is a defect type set and comprises the defects of pipeline alignment deviation, construction foreign matter residue, structural support instability and concrete pouring appearance; whether the sample i belongs to the true label of the category c or not; Predicting the probability that the sample i belongs to the category c for the model; the weight coefficient of the class c is inversely proportional to the sample number of the class defect in the training data and is used for relieving the class imbalance problem; Is a focusing parameter; The intersection ratio of the prediction boundary frame and the real boundary frame is set; cost for distance loss; Cost for shape loss; An included angle between the connecting line of the central point of the predicted frame and the central point of the real frame and the horizontal axis of the image; a penalty coefficient for direction; And The width and the height of the boundary box of the model prediction are respectively; Is an indication function; Is a typical aspect ratio a priori value for category c derived from the cable duct construction scene statistics.
- 9. A method of raceway detection according to claim 1, the method is characterized in that the method also comprises the following steps: Generating an countermeasure network by utilizing the depth convolution, and generating a simulated defect image based on the marked actual image of the construction defect of the cable pit so as to expand a training data set of the construction defect detection model; And converting the trained construction defect detection model into an optimized format suitable for the embedded edge computing equipment through OpenVINO tool chains, and carrying out INT8 quantization processing.
- 10. A raceway detection system for implementing a raceway detection method according to any one of claims 1-9, characterized in that the system comprises: The image acquisition module is configured on the handheld inspection equipment and is used for acquiring continuous partial images along the construction section of the cable pit; the image processing module is in communication connection with the image acquisition module and is used for carrying out sequential panoramic stitching on the continuous local images to generate panoramic stitching images covering the complete working surface of the cable duct construction section; The system comprises a defect detection module, a construction defect detection module, a convolution block attention module, a convolution block analysis module and a display module, wherein the defect detection module is in communication connection with the image processing module, integrates a construction defect detection model and is used for receiving a panoramic spliced image and outputting a construction defect identification result, the construction defect detection model is an improved model based on YOLOv framework, a main network of the construction defect detection model is constructed by a ShuffleNetV module, a plurality of cavity space pyramid pooling modules with different cavity expansion rates are introduced at the tail end of the main network, and the convolution block attention module is embedded in a neck network key characteristic layer of the construction defect detection model; the result output module is in communication connection with the defect detection module and is used for outputting construction defect identification results, and the results comprise defect types and positioning frame information of the defect types in the panoramic spliced image.
Description
Cable trench detection method and system Technical Field The invention relates to the technical field of intelligent operation and maintenance of electric power facilities, in particular to a cable trench detection method and a cable trench detection system. Background The cable trench is used as a key infrastructure for laying the power cable, and the construction quality of the cable trench is directly related to safe and stable operation of a power grid. At present, the detection of the construction quality of a cable pit mainly depends on manual inspection. The inspection personnel need to enter the ditch, and whether defects such as pipeline alignment deviation, foreign matter residues, instability of supporting structures, concrete cracks or breakage and the like exist is checked visually. The method is low in efficiency and high in cost, is greatly influenced by personnel experience and subjective judgment, is difficult to realize comprehensive, objective and traceable detection, and is high in risk of missing detection and false detection especially for long-distance cable ditches. With the development of computer vision technology, some automatic detection schemes based on image analysis are presented. However, when the prior art scheme is applied to a specific complex scene of a cable trench, the prior art scheme still faces significant challenges, namely, firstly, a single image only covers a limited range and is difficult to carry out global and continuous quality assessment on a long-distance cable trench due to the view of a camera. Although the image stitching technology can be used for widening the field of view, in the environment that illumination in the cable trench is uneven and background textures are repeated, such as the inner wall of concrete, the traditional feature matching algorithm is easy to produce mismatching, so that stitching dislocation or seam is obvious, and the accuracy of subsequent analysis is affected. Second, construction defects within the cable pit have large dimensional differences, such as fine concrete cracks that coexist with large area structural misalignment. When the existing general target detection model processes such multi-scale targets, it is often difficult to combine the detection precision of small targets with the context information capturing capability of large targets, so that the recognition rate of partial defects is not high. In order to meet the real-time requirements of on-site handheld device inspection, the inspection model must run under limited computing resources. The existing high-performance model is large in parameter quantity and complex in calculation, and is difficult to directly deploy on the embedded mobile device, and the excessive light-weight model loses necessary feature extraction capacity, so that detection accuracy is reduced. In addition, the internal environment of the cable trench is complex, and background information such as cables, brackets and the like can cause serious interference to defect identification. The existing method lacks an effective mechanism to guide the model to focus on the real defect area, so that the background texture is easily misjudged as the defect, or the real defect confused with the background is ignored. Therefore, an intelligent identification method and system which can adapt to mobile inspection of handheld equipment, realize long-distance continuous detection, give consideration to precision and efficiency and effectively cope with construction defects of complex scenes of cable ditches are urgently needed. Disclosure of Invention The invention provides a cable trench detection method and a system for solving the problems of limited field of view, difficult multi-scale defect detection, high model calculation complexity and serious background interference in the prior art. The invention specifically provides the following technical scheme: the cable pit detection method is applied to handheld equipment inspection, and comprises the following steps of: Acquiring continuous partial images acquired along a cable duct construction section through a handheld camera device; Carrying out serialization panoramic stitching treatment on the continuous local images to generate panoramic stitching images covering the complete working face of the cable pit construction section; Inputting a panoramic spliced image into a construction defect detection model to obtain a construction defect identification result of a cable pit, wherein the construction defect detection model is an improved model based on YOLOv framework, a main network of the improved model is constructed by a ShuffleNetV2 module and is used for carrying out light feature extraction on the input image, a cavity space pyramid pooling module is introduced at the tail end of the main network and is configured with a plurality of different cavity expansion rates and used for fusing multi-scale contextual features of the construction defe