A sewer pipe defect intelligent detection method based on data-driven category reconstruction

By constructing a high-quality dataset, reconstructing the visual superclass structure, and introducing a risk-weighted evaluation mechanism, the reliability and engineering applicability issues of intelligent detection of drainage pipelines in existing technologies have been resolved, achieving higher detection accuracy and reliability.

CN122176360APending Publication Date: 2026-06-09DONGGUAN WATER GRP PIPE NETWORK CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
DONGGUAN WATER GRP PIPE NETWORK CO LTD
Filing Date
2026-02-03
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

The high accuracy of existing intelligent detection technology for drainage pipelines in laboratory environments does not necessarily correspond to high reliability in field applications, and the optimization direction of the models deviates from the practicality of engineering, making it difficult to meet the routine operation and maintenance needs of urban drainage pipe networks.

Method used

By constructing a high-quality defect dataset, performing pixel-level fine annotation and unsupervised clustering, the defect classification system is reconstructed into a hierarchical visual superclass structure. A two-stage detection model is designed and domain knowledge is integrated, a risk-weighted evaluation mechanism is introduced, and the model performance is optimized to meet engineering requirements.

Benefits of technology

It significantly improves the model's discrimination accuracy and engineering applicability, reduces the mutual confusion rate, increases the recall rate of high-risk defects and the credibility of detection results, and enhances the system's reliability and engineering applicability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122176360A_ABST
    Figure CN122176360A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on data-driven category reconstruction sewer defect intelligent detection method, mainly related to the technical field of constructing big data special dataset to detect municipal public works. Including the following steps: S1: construct high-quality pipeline defect dataset in line with "Urban Sewer Inspection and Evaluation Technical Specification (CJJ / T 181-2012)", and find defect visual similarity law through unsupervised clustering analysis;S2: reconstruct defect classification system based on clustering results, form hierarchical "visual superclass" structure;S3: design two-stage pipeline defect intelligent detection architecture, combine domain knowledge engine, realize high-precision, high-robustness defect recognition and classification.The application solves the bottleneck of serious confusion of different categories faced by existing visual-based pipeline defect intelligent recognition technology, especially the problem of low recognition accuracy for structural defects, which can significantly improve the engineering applicability of the sewer intelligent detection system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a data-driven category reconstruction-based intelligent detection method for drainage pipeline defects, belonging to the technical field of constructing a dedicated big data dataset for the detection of municipal public works. Specifically, it relates to an intelligent detection technology for drainage pipeline defects based on data-driven category reconstruction, which is particularly suitable for the automated assessment and maintenance of urban municipal public drainage networks. Background Technology

[0002] As a crucial component of urban infrastructure, the health of municipal drainage pipelines directly impacts urban operational safety and environmental protection. In recent years, closed-circuit television (CCTV) inspection technology has become the mainstream method for assessing the internal condition of pipelines. However, traditional manual interpretation methods suffer from inherent drawbacks such as low efficiency, high cost, and strong subjectivity, making them unsuitable for the routine operation and maintenance needs of large-scale pipeline networks. Therefore, developing intelligent inspection systems capable of automatically identifying and classifying pipeline defects has become a research hotspot in the intersection of municipal engineering and big data.

[0003] In existing technical solutions, researchers mainly focus on improving detection performance by refining deep learning model architectures. For example, they use YOLO series object detection networks for rapid localization, or utilize segmentation models such as U-Net and DeepLabV3+ to obtain more accurate defect contours. Although these methods have achieved high recognition accuracy on specific small datasets, they still face significant challenges in practical engineering applications.

[0004] First, existing publicly available datasets are severely out of sync with domestic engineering practices. While widely used open-source datasets, such as Sewer-ML, are large in scale, their defect classification standards are based on foreign specifications, which do not conform to the 16-category defect system defined in my country's current "Technical Specification for Inspection and Evaluation of Urban Drainage Pipelines" (CJJ / T 181-2012). Furthermore, some datasets suffer from inconsistent image quality and coarse annotation granularity (mostly image-level labels or bounding boxes), lacking pixel-level fine annotation. Therefore, models trained on such publicly available datasets are difficult to directly serve engineering inspections that meet industry standards.

[0005] Secondly, most current algorithm optimization strategies focus excessively on the model structure itself, neglecting the fundamental issue of task definition. Most methods iterate the model by introducing more complex network structures (such as Transformers), attention mechanisms, or feature fusion modules, seeking to improve defect recognition accuracy within a fixed 16-class classification framework. However, this optimization paradigm fails to address a core contradiction: the "Technical Specification for Inspection and Evaluation of Urban Drainage Pipelines" (CJJ / T 181-2012) is based on engineering causes and repair strategies, while the learning process of deep learning models relies on underlying visual features. This fundamental conflict between the two logics creates a performance bottleneck for intelligent pipeline defect recognition. For example, categories such as "corrosion" and "scaling," "misalignment" and "disconnection" are highly similar in visual representation, yet are classified as different categories under current standards, inevitably leading to model confusion at the decision boundary. Furthermore, defects within the same category exhibit significant visual differences; for instance, "rupture" encompasses multiple forms from cracks to collapse, further increasing the difficulty for the model to learn a unified feature representation.

[0006] Finally, the high accuracy achieved by current intelligent defect identification technology in laboratory environments does not necessarily translate to high reliability in field applications. Existing methods are typically tested on selected high-quality images, ignoring complex factors in real-world scenarios such as turbid water, low light, lens smudges, and partial occlusion. Furthermore, model performance evaluation often employs metrics commonly used in deep learning (such as F1-score or mAP), failing to consider the varying engineering importance of different defect types—missing a critical structural defect could trigger a serious accident, while a false positive for a functional defect only increases review costs. This bias in the evaluation system causes model optimization to deviate from actual engineering needs.

[0007] In summary, current vision-based intelligent defect detection technology for drainage pipelines has not yet effectively bridged the gap between "laboratory performance" and "engineering practicality." There is an urgent need for a new technical solution that can re-examine and optimize the task definition of defect detection from the perspective of data essence, thereby constructing a reliable, interpretable, and compliant intelligent diagnostic system that meets the requirements of the "Technical Specification for Inspection and Evaluation of Urban Drainage Pipelines" (CJJ / T 181-2012). Summary of the Invention

[0008] The purpose of this invention is to overcome the shortcomings of the prior art and provide a data-driven category reconstruction-based intelligent detection method for drainage pipeline defects, thereby improving the reliability, accuracy, and engineering applicability of intelligent detection systems for urban drainage pipelines.

[0009] The technical solution of this invention: A smart detection method for drainage pipe defects based on data-driven category reconstruction, characterized by the following steps:

[0010] S1: Construct and analyze a high-quality defect dataset to discover patterns in visual similarity; S1.1: Data Acquisition and Preprocessing S1.2: Refined instance-level annotation, S1.3: Extract deep visual features and perform unsupervised clustering. S2: Reconstruct the defect classification system based on clustering results to form a hierarchical "visual superclass" structure; S2.1: Summarize the semantic connotation of "visual superclass". S2.2: Quantify the rationality of the superclass partitioning. S3: Design and train a two-stage detection model, and integrate domain knowledge for post-processing optimization; S3.1: Construct a two-stage layered detection architecture. S3.2: Coding of the integrated domain knowledge engine. S4: Introduce a risk-weighted assessment mechanism to ensure high-priority protection for critical defects; S4.1: Define the importance weight of defects. S4.2: Implement a risk-weighted optimization strategy.

[0011] The aforementioned intelligent detection method for drainage pipeline defects based on data-driven category reconstruction includes step S1, which specifically comprises: extracting high-quality image frames from CCTV inspection videos of drainage pipelines, performing pixel-level precise annotation on each defect instance, and constructing a dedicated dataset covering all 16 types of defects specified in CJJ / T 181-2012; extracting high-dimensional visual features of each defect instance using a pre-trained deep neural network; applying the K-Means clustering algorithm to all feature vectors, determining the optimal number of clusters through the silhouette coefficient, thereby revealing the visual similarity patterns of defects.

[0012] In the aforementioned intelligent detection method for drainage pipe defects based on data-driven category reconstruction, the "visual superclass" in step S2 includes the following four categories:

[0013] C0: Sectional obstruction type, dominated by "obstacles"; C1: Pipe wall condition category, combining "corrosion" and "scaling"; C2: Interface and displacement class, integrating "misalignment", "deformation", "disconnection", "breakage" and "undulation"; C3: Mixed fuzzy class, containing complex samples with multiple co-occurring defects or unclear boundaries.

[0014] The above-mentioned intelligent detection method for drainage pipeline defects based on data-driven category reconstruction, in step S3, the domain knowledge engine encodes rules from engineering practice, including: defect co-occurrence check: strengthening the prediction confidence of defect combinations that conform to physical cause logic (such as "leakage" and "rupture"); geometric constraint verification: using prior information on the area and aspect ratio of defects to filter out abnormal predictions that do not conform to physical laws; uncertainty handling: automatically marking predictions that are judged as C3 "mixed fuzzy class" and have a confidence level below the threshold as requiring manual review.

[0015] The above-mentioned intelligent detection method for drainage pipeline defects based on data-driven category reconstruction implements a risk-weighted optimization strategy in step S4. During model training, the loss function is adjusted based on the weights of engineering importance, so that the model gives a higher penalty to the identification errors of high-risk structural defects.

[0016] The beneficial effects of this invention are as follows:

[0017] (1) By using data-driven category reconstruction, the originally complex and easily confused 16-class classification task is decomposed into a simpler, more visually consistent multi-stage task, which fundamentally reduces the learning difficulty of the model. Experiments show that this method significantly reduces the mutual confusion rate between "corrosion" and "scaling" and effectively improves the model's discrimination accuracy.

[0018] (2) The two-stage hierarchical detection architecture enables the model to first focus on the distinction of major categories, and then perform fine classification in semantically consistent subspaces, effectively alleviating the challenge of "large differences within categories". It effectively improves the recall rate of defects with varied forms, such as "fracture".

[0019] (3) The integrated "knowledge engine" transforms the experience of human experts into actionable rules, enhancing the system's engineering applicability and decision reliability. In the test set, the engine successfully identified and corrected 15% of potential error combinations and reduced the false negative rate of high-risk defects by 11.7%.

[0020] (4) A risk-weighted assessment mechanism is introduced to ensure that the optimization direction of the model is consistent with the engineering requirements, thus ensuring that high-risk structural defects such as “cracks” and “foreign object penetration” are given priority and high detection rate, which greatly improves the credibility and value of intelligent detection results in actual operation and maintenance decisions. Attached Figure Description

[0021] Figure 1 This is a roadmap for the specific implementation of the present invention.

[0022] Figure 2A schematic diagram of drainage pipeline defect categories based on the "Technical Specification for Inspection and Evaluation of Urban Drainage Pipelines" (CJJ / T 181-2012).

[0023] Figure 3 This is a diagram of the YOLOv12 pre-trained model structure used in this invention.

[0024] Figure 4 This is a flowchart of the construction process for an intelligent detection model (i.e., baseline model) for drainage pipe defects based on the improved YOLOv12.

[0025] Figure 5 shows the unsupervised clustering results of defect instances based on K-Means. In Figure 5(a), the horizontal and vertical axes represent the feature dimensions after dimensionality reduction by principal component analysis (PCA). Points of different colors represent different original defect categories, and the convex hull line represents the boundaries of the four visual superclasses formed by clustering. Figure 5(b) shows the independent schematic diagrams of the four visual superclasses. Figure 5(c) shows the distribution of the real labels corresponding to the four visual superclasses.

[0026] Figure 6 This is a comparison of the overall detection performance of the improved model based on the detection method proposed in this invention and the baseline model.

[0027] Figure 7 This is a comparison of the detection performance of the improved model based on the detection method proposed in this invention with the baseline model for each category. Detailed Implementation

[0028] The technical solution of the present invention will be described in detail below with reference to the embodiments and accompanying drawings.

[0029] See Figure 1 , Figure 2 , Figure 3 , Figure 4 Figure 5 Figure 6 , Figure 7 As shown, this invention provides an intelligent detection method for drainage pipeline defects based on data-driven category reconstruction, and its specific implementation steps are as follows:

[0030] S1. Construct and analyze a high-quality defect dataset to discover patterns in visual similarity.

[0031] We collected CCTV inspection videos of drainage pipes conforming to the CJJ / T 181-2012 standard, extracted image frames from them, and performed pixel-level instance annotations to construct a high-quality dataset containing all 16 types of defects. We used a pre-trained deep neural network to extract high-dimensional visual features for each defect instance. We then performed unsupervised clustering analysis on all feature vectors to reveal the intrinsic correlation and aggregation patterns of different defect categories in the visual feature space.

[0032] S1.1 Data Acquisition and Preprocessing: CCTV inspection videos of drainage pipelines from more than ten major cities in China were collected, supplemented by Quick View (QV) camera recordings and laboratory simulations (used to generate rare but critical defects such as pipeline collapse). QV cameras were used to capture close-up images of pipe openings or interior sections to help obtain defect details that are difficult to clearly see from CCTV frames. Based on this, image frames were extracted using a systematic frame extraction strategy. This strategy prioritizes the most representative key frames where defects are fully visible, lighting conditions are good, and there is no temporal redundancy, thus constructing an initial image library.

[0033] S1.2 Refined Instance-Level Annotation: The LabelMe tool was used to perform pixel-level contour annotation on each defect instance in the image database, strictly adhering to the definitions in the "Technical Specification for Inspection and Evaluation of Urban Drainage Pipelines" (CJJ / T 181-2012). A three-level quality control process was implemented: initial annotation, independent review, and dispute arbitration meeting. The final result was a dedicated dataset containing approximately 55,000 precisely annotated instances, covering all 16 types of defects (10 structural and 6 functional), with no fewer than 500 instances for each type.

[0034] S1.3 Extracting deep visual features and performing unsupervised clustering: Using the EfficientNet series backbone network model pre-trained on a general image dataset (such as ImageNet) as a feature extractor, high-dimensional deep visual feature vectors are extracted from each labeled instance; the K-Means clustering algorithm is applied to all feature vectors, and the optimal number of clusters k=4 is determined by indicators such as the contour coefficient, thereby revealing the inherent correlation and aggregation pattern of different defect categories in the visual feature space.

[0035] S2. Based on the clustering results, reconstruct the defect classification system to form a hierarchical "visual superclass" structure.

[0036] Based on the clustering results in S1, the original 16 defect categories were reorganized into several "visual superclasses". Visual superclasses are sets of defects with higher visual homogeneity formed based on the inherent patterns of the data. For example, "corrosion" and "scaling" were merged into the "pipe wall condition class"; "misalignment", "disconnection", and "deformation" were merged into the "interface and displacement class".

[0037] S2.1 Summarize the semantic connotation of "visual superclasses": Based on the clustering results of step 1.3, the original 16 defect categories are reorganized into 4 "visual superclasses". The specific division is as follows:

[0038] C0: Sectional Blockage Class: This superclass is mainly composed of "obstacles" and represents a functional defect in which the effective flow cross-section of the pipeline is significantly reduced due to the entry of foreign objects.

[0039] C1: Pipe Wall Condition Class: This superclass is dominated by "corrosion" and "scaling". Although corrosion is a structural defect of material loss and scaling is a functional defect of pipe wall contamination, both are visually manifested as local changes in pipe wall texture and reflectivity, sharing similar visual characteristics.

[0040] C2: Interface and Displacement Class: This superclass integrates multiple structural defects such as "misalignment", "deformation", "disconnection", "crack", and "undulation". The common feature of these defects is a macroscopic change in the pipeline geometry, which usually originates from interface failure or uneven foundation settlement. In actual inspection, they often occur together with related causes.

[0041] C3: Mixed Ambiguous Class: This superclass exhibits high heterogeneity, containing samples from multiple classes with no single dominant class. It represents complex or transitional scenarios in real-world detection where multiple defects coexist, boundaries are unclear, or image quality is poor.

[0042] The "visual superclass" refers to the aggregation of defect categories obtained through unsupervised clustering algorithms, where the homogeneity index within the category meets a preset threshold (e.g., purity is higher than 80% or silhouette score is higher than 0.5).

[0043] S2.2 Quantifying the rationality of superclass partitioning: The purity and Shannon entropy of each cluster were calculated. The results showed that C0 and C1 had high purities of 87% and 85%, respectively, verifying their high internal homogeneity; while C3 had the highest entropy value, confirming its mixed characteristics. This quantitative analysis provides a solid basis for subsequent model design.

[0044] S3. Design and train a two-stage detection model, and perform post-processing optimization by incorporating domain knowledge.

[0045] A two-stage defect detection model is constructed: the first stage is a superclass discrimination module, which is used to identify the "visual superclass" to which the input defect belongs; the second stage is a fine-grained classification module, which establishes a dedicated expert classifier for each "visual superclass" to complete the final fine classification of 16 types of defects; a "knowledge engine" is integrated at the model output, which encodes domain knowledge rules from engineering practice, including defect co-occurrence relationship checking, geometric constraint verification, and uncertainty handling logic, which are used to verify, enhance, or mark the detection results as requiring manual review.

[0046] S3.1 Constructing a Two-Stage Hierarchical Detection Architecture: A two-stage defect detection model is designed. The first stage is the "superclass discrimination module," whose task is to quickly classify input defect instances into one of four "visual superclasses" C0-C3. The second stage is the "fine-grained classification module," which establishes a dedicated expert classifier for each superclass branch: For C0, due to its relatively simple category, a dedicated model with a window attention mechanism is adopted, focusing on "flow cross-sectional loss caused by pipe blockage"; for C1, a dual-branch structure is designed, one branch focuses on identifying the material loss features of "corrosion," and the other branch extracts the texture coverage features of "scaling"; for C2, considering the strong correlation of its internal defects, a graph attention mechanism is introduced to explicitly learn the co-occurrence relationships between defects. The entire model uses YOLOv12 as the basic framework to ensure end-to-end trainability.

[0047] S3.2 Integrated Domain Knowledge Engine: A "knowledge engine" is integrated at the model output. This knowledge engine encodes rules derived from engineering practice, including:

[0048] ① Defect co-occurrence check: When the model predicts two or more "reasonable coexistence" defect combinations (such as "leakage" and "crack") at the same time, it is considered to be in line with engineering principles, thus strengthening its prediction confidence.

[0049] ② Geometric constraint verification: Using the prior information on defect area and aspect ratio obtained from the statistics in Section 1.3, filter out abnormal predictions that clearly do not conform to physical laws (e.g., a very small "deformation" instance).

[0050] ③ Uncertainty handling logic: For predictions that are classified as C3 "mixed fuzzy class" and have a confidence level of less than 0.7, they are automatically marked as "requiring manual review" to avoid the model making high-risk misjudgments in ambiguous situations.

[0051] Furthermore, to ensure the knowledge engine is feasible and suitable for engineering deployment, its inputs, outputs, and rule execution methods are described below. The knowledge engine is used to perform engineering logic verification and post-processing on the detection results during the model inference stage. Its inputs include: (i) The defect category label, confidence score, target location box, or segmentation region output by the model; (ii) Spatial relationship between different defect targets in the same pipe segment or within the same frame; (iii) Importance weights and preset rule sets corresponding to defect categories.

[0052] The output of the knowledge engine includes: (i) Defect category labels after rule validation; (ii) Adjusted confidence level or verification mark; (iii) List of defect instances that require manual review.

[0053] Preferably, the knowledge engine executes rules sequentially or based on priority, and uses a preset priority to adjudicate when rules conflict. For example, rules related to the risk of missing structural defects can be executed first, followed by rules related to merging similar defects or redundant filtering, thereby ensuring the detection stability of high-risk structural defects.

[0054] (3) In this embodiment, to ensure that the clustering results are reproducible and applicable to different datasets, the number of clusters and the threshold parameter can be determined in the following way:

[0055] (i) the number of clusters It is not a fixed limitation; it can be selected from a preset candidate range based on the number of defect categories to be analyzed and the data distribution. For example, in Within the range, the contour coefficients are calculated one by one, and the contour coefficients that reach the maximum value or are in a local optimum and stable state are selected. The value is used as the final cluster number. Preferably, on the dataset of this embodiment, when The contour coefficient reaches a relatively optimal level at time 4, therefore it is selected. 4. Furthermore, to avoid arbitrariness in clustering parameters, this embodiment explains the setting method for the number of clusters and the threshold as follows.

[0056] (ii) The homogeneity threshold for the visual superclass can be set as an adjustable parameter according to engineering requirements, for example, the purity threshold can be set to... (Preferred value 0.8), set the contour coefficient threshold to (Preferred value: 0.5). When samples within a cluster meet the above threshold condition, the cluster is determined to be a visual superclass. This method avoids limiting the applicability of fixed values ​​and improves the transferability of the visual superclass construction process.

[0057] (iii) To ensure the engineering interpretability of the threshold setting during the inference phase, this embodiment explains the principles for setting the confidence threshold as follows. During the inference phase, the confidence threshold is used to balance the risk of missed detections with the cost of manual review. This threshold is an adjustable parameter, for example, within a range... The threshold is preferably 0.7. When the confidence level of the defect category output by the model is lower than the threshold, the defect instance is marked as requiring manual review, thereby reducing the probability of missing high-risk defects.

[0058] (4) For ease of implementation, the target detection network can be implemented using a single-stage detection framework from the YOLO series. The YOLO series detection framework typically includes: a backbone network for extracting image features, a feature fusion network (Neck) for multi-scale feature fusion, and a detection head (Head) for outputting the target category and location.

[0059] In this embodiment, the improved YOLO model is optimized based on the above framework. For example, by introducing a feature fusion structure, attention mechanism or small target detection enhancement module that is more suitable for fine-grained defect recognition, the detection performance can be improved in scenarios such as blurred pipeline defect edges, small target scale and strong background noise.

[0060] It should be noted that the YOLO model version can be selected and replaced according to actual needs. Its core lies in training by combining the reconstructed classification system with the importance weight loss function and knowledge engine post-processing, so that the model is more suitable for engineering scenarios of drainage pipe defects.

[0061] The two-stage detection model is implemented by adding a parallel 'superclass classification branch' after the YOLOv12 detection head. This branch shares backbone features with the original 16-class classification branches, thus forming an end-to-end trainable multi-task learning framework. The knowledge engine performs post-processing on the detection results in the following order: first, geometric constraint verification is performed to filter out abnormal predictions; then, defect co-occurrence checks are performed to strengthen the confidence of reasonable combinations; finally, predictions that are classified as C3 and have a confidence level below the threshold are marked as requiring manual review.

[0062] S4. Introduce a risk-weighted assessment mechanism to ensure high priority protection for critical defects. During model training and inference, a risk-weighted strategy based on the importance weight of defects is introduced. High-risk structural defects (such as rupture, foreign object penetration, etc.) are given higher loss weights or lower confidence thresholds, thereby ensuring that the system prioritizes the detection rate of critical defects on the basis of overall performance.

[0063] S4.1 Defining Defect Importance Weights: Based on the impact of various defects on the structural safety, operational efficiency, and maintenance costs of the pipeline network, and combining expert scoring and literature review results, different engineering importance weights (IW) are assigned to 16 types of defects. For example, "rupture" is assigned the highest weight of 1.0 because it may lead to pipeline collapse; "leakage" is assigned a weight of 0.64 due to its potential threat to structural stability; and "scum" is assigned a weight of 0.10 as a temporary functional problem. This weighting system reflects the priorities in engineering decisions. Appendix Table 1 shows the importance weight values ​​for the 16 types of drainage pipeline defects: Table 1 code name Importance weight (IW) PL rupture 1.00 BX Deformation 0.16 FS corrosion 0.55 CK wrong mouth 0.64 QF ups and downs 0.40 TJ Disconnection 0.64 TL Interface material falling off 0.18 AJ Concealed branch pipe connection 0.42 CR Foreign object penetration 0.90 SL Leakage 0.31 CJ sediment 0.08 JG Scale 0.23 ZW obstacle 0.25 CQ Remains of walls, dam base 0.33 SG root 0.36 FZ scum 0.10

[0064] S4.2 Implement a risk-weighted optimization strategy: During model training, to make the model pay more attention to high-risk defect categories, defect importance weights are introduced. Adjust the cross-entropy loss. Let the true class of the sample be... The model is for categories. The predicted probability is The weighted cross-entropy loss function is then defined as:

[0065] in, This represents the number of defect categories (16 categories in this example). Encode the real label. For real categories of For the sample, the above formula can be simplified to:

[0066] By employing the aforementioned weighted loss function, when the model misclassifies high-weight defects during training, its loss value increases. This results in a greater force for updating the parameters of this type of defect during backpropagation, thereby improving the recall rate of high-risk defects and reducing the probability of missed detections. The cross-entropy loss function is adjusted using importance weights, allowing the model to impose a higher penalty on errors related to high-weight defects during backpropagation. During the inference phase, the confidence thresholds for each category are dynamically adjusted based on the importance weights, prioritizing the detection rate of high-risk structural defects such as "ruptures" and "foreign object penetration."

[0067] To clearly describe and understand the technical solution of this invention, the evaluation indicators and clustering indicators involved in the specification are explained as follows:

[0068] (1) IoU (Intersection over Union): is used to measure the degree of overlap between the detection box or segmentation region and the ground truth region. The larger the value, the more consistent the prediction result is with the actual result.

[0069] (2) mAP (mean Average Precision): used to comprehensively evaluate the detection accuracy of the model in each defect category. It is usually calculated based on the average precision under different recall levels. The higher the mAP value, the better the overall detection effect of the model.

[0070] (3) Precision / Recall / F1-score: Precision is used to represent the accuracy of the model when it predicts a certain defect category, recall is used to represent the model's ability to detect the defect category, and F1-score is the harmonic mean of precision and recall, which is used to comprehensively measure detection performance.

[0071] (4) Purity: used to measure the consistency of sample categories within each cluster in the clustering results. The higher the purity, the more concentrated the samples within the cluster are in the same category.

[0072] (5) Silhouette Score: Used to evaluate the rationality of cluster structure, taking into account the degree of compactness within clusters and the degree of separation between clusters. The larger the silhouette score, the clearer the clustering result and the more stable the structure.

[0073] (6) Shannon Entropy: Used to measure the uncertainty or heterogeneity of the distribution of sample categories. The lower the entropy value, the more concentrated the category distribution, and the higher the entropy value, the more dispersed the category distribution.

[0074] The method proposed in this invention, by combining data-driven category reconstruction with professional knowledge in the engineering field, fundamentally solves the performance bottleneck of intelligent pipeline defect identification models caused by the misalignment between the current classification system and visual rules in intelligent vision technology, and significantly improves the reliability, accuracy and engineering applicability of intelligent detection systems for drainage pipelines.

[0075] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent modifications made based on the content of the present invention specification and drawings, or direct or indirect applications in related technical fields, are included within the patent protection scope of the present invention.

Claims

1. A data-driven category reconstruction-based intelligent detection method for defects in drainage pipelines, characterized in that... Includes the following steps: S1: Construct and analyze a high-quality defect dataset to discover patterns in visual similarity; S1.1: Data Acquisition and Preprocessing S1.2: Refined instance-level annotation, S1.3: Extract deep visual features and perform unsupervised clustering. S2: Reconstruct the defect classification system based on the clustering results to form a hierarchical "visual superclass" structure; S2.1: Summarize the semantic connotation of "visual superclass". S2.2: Quantify the rationality of the superclass partitioning. S3: Design and train a two-stage detection model, and integrate domain knowledge for post-processing optimization; S3.1: Construct a two-stage layered detection architecture. S3.2: Coding of the integrated domain knowledge engine. S4: Introduce a risk-weighted assessment mechanism to ensure high-priority protection for critical defects; S4.1: Define the importance weight of defects. S4.2: Implement a risk-weighted optimization strategy.

2. The intelligent detection method for drainage pipeline defects based on data-driven category reconstruction according to claim 1, characterized in that... The S1 step specifically includes: extracting high-quality image frames from CCTV inspection videos of drainage pipes, performing pixel-level precise annotation on each defect instance, and constructing a dedicated dataset covering all 16 types of defects specified in CJJ / T 181-2012; extracting high-dimensional visual features of each defect instance using a pre-trained deep neural network; applying the K-Means clustering algorithm to all feature vectors, determining the optimal number of clusters through the silhouette coefficient, thereby revealing the visual similarity patterns of defects.

3. The intelligent detection method for drainage pipeline defects based on data-driven category reconstruction according to claim 1, characterized in that... In step S2, the "visual superclass" includes the following four categories: C0: Sectional obstruction type, dominated by "obstacles"; C1: Pipe wall condition category, combining "corrosion" and "scaling"; C2: Interface and displacement class, integrating "misalignment", "deformation", "disconnection", "breakage" and "undulation"; C3: Mixed fuzzy class, containing complex samples with multiple co-occurring defects or unclear boundaries.

4. The intelligent detection method for drainage pipeline defects based on data-driven category reconstruction according to claim 1, characterized in that... In step S3, the domain knowledge engine encodes rules derived from engineering practice, including: defect co-occurrence check: strengthening the prediction confidence of defect combinations that conform to physical cause logic (such as "leakage" and "crack"); geometric constraint verification: using prior information on the area and aspect ratio of defects to filter out abnormal predictions that do not conform to physical laws; uncertainty handling: automatically marking predictions that are judged as C3 "mixed fuzzy class" and have a confidence level below the threshold as requiring manual review.

5. A data-driven category reconstruction-based intelligent detection method for drainage pipeline defects according to any one of claims 1-3, characterized in that... In step S4, a risk-weighted optimization strategy is implemented. During model training, the loss function is adjusted based on the weights of engineering importance, so that the model can impose a higher penalty on the identification errors of high-risk structural defects.