3. Use Case: (Com)2INet for Levee Piping Hazard Inspection via Remote Sensing
Piping leakage is a critical factor leading to levee breaches and catastrophic flooding disasters. Levee breaches often result in mass casualties, making piping leakage a major threat to flood disaster prevention and mitigation in China. According to statistics, China’s river levees extend over 328,000 kilometers, protecting a population of 650 million and 42 million hectares of farmland. However, more than 90% of these river levees consist of aging earth-rock dams, which are highly susceptible to severe hazards during the annual flood season due to high water levels. UAV-based remote sensing technology has demonstrated significant potential in the inspection and identification of piping hazards in levees. UAV platforms are characterized by their portability, lightweight design, and low cost, enabling rapid acquisition of levee data. Furthermore, various sensors can capture diverse morphological data of levees, providing abundant information sources for identifying piping hazards. The remote sensing data processing techniques designed based on the (Com)2INet architecture can achieve rapid, accurate, and large-scale inspections of levee hazards.
However, current UAV-based remote sensing approaches for levee piping hazard inspection face challenges such as low recognition accuracy and poor scalability. Although piping hazards are visually prominent in thermal infrared imagery, such imagery is heavily influenced by weather conditions. The piping features extracted from thermal infrared imagery exhibit significant variability under different weather and environmental conditions, leading to poor stability in distinguishing piping hazards from other surface objects. Moreover, the complex flood-season levee environment introduces interference to recognition algorithms. The levee surface is covered by diverse natural and manmade objects, and the harsh conditions during the flood season further complicate the scene. Particularly in large-scale, multi-sensor, and multi-object application scenarios, uncertain objects often affect the performance of recognition algorithms.
Currently, deep learning-based object recognition algorithms typically rely on large sample datasets. However, due to the difficulty in obtaining piping hazard data, the demand for extensive training samples cannot be met. This study proposes an unsupervised machine learning-based method, SC-based stepwise adaptive clustering method (SACM), for piping hazard segmentation using UAV thermal infrared imagery. The SC-based SACM method extracts piping hazards through iterative clustering and adaptive strategies. First, thermal infrared imagery is converted into temperature maps. Second, a series of binary classifications is applied to the temperature maps to progressively exclude background regions unrelated to piping hazards, thereby mitigating interference caused by complex levee environments. Finally, the elbow method is introduced to determine the hyperparameters of the clustering algorithm, overcoming the dependence on subjective manual settings for cluster centers and achieving adaptive clustering based on data features.
SC-based SACM is an unsupervised clustering algorithm specifically designed for piping hazard segmentation in UAV thermal infrared imagery. Unlike traditional clustering algorithms, SC-based SACM employs a progressive and adaptive strategy to iteratively refine the segmentation process. By leveraging temperature field analysis and stepwise clustering, SC-based SACM effectively eliminates irrelevant background regions and accurately extracts piping hazard targets. This method is particularly robust in complex environments, ensuring high precision and reliability in hazard detection. The SC-based SACM algorithm is composed of three key steps: temperature field preprocessing, background removal, and stepwise adaptive clustering. Each step can be modeled as a VNF and chained into an SC, which can be executed sequentially on multiple computing devices to achieve the scalable levee piping hazard inspection. The SC-based SACM algorithm is designed to overcome challenges such as interference from complex levee environments, variability in thermal infrared imagery due to weather conditions, and the subjectivity of manual parameter selection. By introducing the elbow method for hyperparameter determination, the SC-based SACM achieves fully adaptive clustering based on data characteristics, without requiring predefined cluster centers. The specific process is illustrated as
Figure 7, and the main pseudo-code is as follows.
| SC-based SACM for levee piping hazard inspection |
|
Input: UAV thermal infrared imagery I; Convergence threshold ; Maximum iterations T. |
|
Process: |
| 1. Temperature Field Preparation: |
| · Convert the thermal infrared imagery I into a temperature map T using the thermal infrared radiative transfer mechanism. |
| · Normalize the temperature map T to ensure consistent data scaling across different images. |
| 2. Background Removal: |
| · Perform a series of binary segmentations on the temperature map T to isolate potential piping hazard regions: |
| · Calculate the temperature threshold for binary segmentation using statistical analysis of the temperature distribution. |
| · Segment the image into background regions and suspected target regions based on . |
| · Iteratively refine the segmentation by updating to progressively exclude irrelevant background regions. |
| 3. Stepwise Adaptive Clustering: |
| · Apply adaptive clustering to the refined target regions: |
| · Use the elbow method to determine the optimal number of clusters k based on the within-cluster sum of squares (WCSS) |
| · Initialize cluster centroids adaptively based on the temperature distribution of the target regions. |
| · Perform iterative clustering to assign each data point to the nearest cluster and update cluster centroids. |
| · Continue the clustering to assign each data point to the nearest cluster and update cluster centroids. |
| 4. Output: |
| · Extracted piping hazard regions with precise boundaries. |
| · Cluster assignments representing the segmented target areas. |
(i) Land surface temperature retrieval from UAV thermal infrared imagery. Utilizing thermal infrared (TIR) imagery acquired by UAVs, the land surface temperature is retrieved according to the thermal infrared radiative transfer mechanism. This step ensures the accurate reconstruction of temperature fields, providing a solid foundation for subsequent analysis.
(ii) Levee piping temperature field analysis for image background removal. Based on the retrieved temperature map, the thermal characteristics of piping targets are analyzed. This involves extracting the temperature distribution features of the target region and performing binary segmentation to separate the image into background regions and regions containing potential piping targets. This segmentation step effectively removes irrelevant background areas, reducing interference for subsequent clustering analysis.
(iii) Feature construction using stepwise adaptive clustering. Following background removal, stepwise adaptive clustering is employed to construct the thermal field features of the piping targets. This process includes further refinement of the segmented target regions to extract suspected piping areas. Automatic clustering is then applied to further delineate and refine the target regions, avoiding the subjectivity associated with manual threshold selection. The SC-based SACM approach for levee piping hazard inspection is particularly robust and adaptable for extracting piping targets in complex scenarios, ensuring high scalability and accuracy in feature construction.
Benchmarks. (1)
k-Medoids (KM) algorithm is a classical partitioning clustering algorithm widely used in data mining. Unlike k-Means, which relies on centroids as cluster representatives, KM selects actual data points (medoids) to represent clusters, making it more robust to noise and outliers. The algorithm aims to minimize the sum of dissimilarities between data points and their corresponding medoids, ensuring the formation of compact and well-separated clusters. KM algorithm is particularly suitable for scenarios with non-Euclidean distance metrics or when the dataset contains outliers that could significantly distort the results of k-Means. By iteratively refining the medoids and cluster assignments, KM seeks to achieve optimal clustering with respect to the chosen dissimilarity measure. Because of the global dependence on the central object, the KM cannot be split and can only be executed as a whole function on a separate computing device. The main pseudo-code is as follows.
| KM-based levee piping hazard inspection |
|
Input: Dataset ; Number of clusters k. |
|
Process: |
| 1. Randomly select k samples from D as the initial centroids }. |
| 2. Repeat: 3. Initialize for . 4. For : |
| · Compute the distance between sample and each centroid . |
| · Assign to the cluster with the nearest centroid: . |
| ·Update the cluster: . |
| v.End For
|
| vi.For : |
| · Compute the new centroid for each cluster:. |
| If : |
| · Update the centroid:. |
| Else: |
| · Keep the current centroid unchanged. |
| vii. End For
|
| 3. Until centroids remain unchanged or maximum iterations are reached. |
|
Output: Cluster assignments . |
(2)
Fuzzy C-Means (FCM) is a widely used unsupervised clustering algorithm based on fuzzy set theory. Unlike traditional hard clustering methods, such as k-Means, where each data point is assigned to exactly one cluster, FCM allows a data point to belong to multiple clusters with varying degrees of membership. This flexibility makes FCM particularly suitable for applications where data points exhibit overlapping characteristics or uncertainty in cluster boundaries. The objective of FCM is to minimize the weighted sum of squared errors between data points and cluster centers, with the weights determined by the membership degrees. The algorithm iteratively updates cluster centers and membership degrees until convergence. Since FCM requires global consistency, it cannot be split and can only be executed as a whole function on a separate computing device. The main pseudo-code is as follows.
| FCM-based levee piping hazard inspection |
|
Input: Dataset ; Number of clusters k; Fuzziness parameter ; |
| convergence threshold ; Maximum iterations T. |
|
Process: |
| 1. Initialization: |
| · Randomly initialize the membership matrix , where and
|
| for all j. |
| 2. Repeat: 3. Update Cluster Centers: |
| · Compute the cluster center for . |
| iv.Update Membership Degrees: |
| · For each data point and cluster i, update the membership degree : |
| . |
| v.Check Convergence: |
| · Compute the change in membership matrix . If or the maximum nember of iterations reached, stop the iteration. |
| 3. End Repeat. |
| 4. Assign each data point to the cluster with the highest membership degree. |
|
Output: Cluster centers ; Membership matrix . |
(3)
Gaussian mixture model (GMM) is a probabilistic model widely used for clustering tasks. It assumes that data points are generated from a mixture of several Gaussian distributions with unknown parameters. Each Gaussian component represents a cluster, and GMM algorithm aims to model the entire dataset as a weighted sum of these Gaussian distributions. GMM is particularly effective for datasets with overlapping clusters and can model more complex cluster shapes compared to simpler algorithms like k-Means. Unlike hard clustering methods, such as k-Means, which assign each data point to a single cluster, GMM performs soft clustering by assigning each data point a probability of belonging to each cluster. This probabilistic approach makes GMM more flexible in capturing underlying structure of the data. For the soft clustering process of GMM, the posterior probability calculation and parameter update must be based on global data to ensure model convergence and accuracy. Therefore, the GMM model cannot be split and can only be executed as a whole function on a separate computing device. The main pseudo-code is as follows.
| GMM-based levee piping hazard inspection |
|
Input: Dataset ; Number of clusters k; convergence threshold . |
|
Process: |
| 1. Initialization: |
| · Randomly initialize the parameters of the Gaussian components. |
| · Means . |
| · Covariance matrices . |
| · Mixing coefficients such that . |
| 2. Expectation-Maximization (EM) Algorithm: |
| · Repeat: |
| · E-step(Expectation): |
| · For each date point and each Gaussian component , |
| compute the posterior probability (responsibility) that belongs to the th |
| Gaussian: where is the Gaussian probability density |
| function:. |
| · M-step(Maximization): |
| · Update the parameters of the Gaussian components based on the responsibility : |
| a.Update the mixing coefficients:
|
| b.Update the means:
|
| c.Update the covariance matrices:
|
| · Check for Convergence: |
| · Compute the log-likelihood of the data under the current model: |
| . |
| · If the change in log-likelihood is less than the threshold stop the iteration. |
| 3. Output: |
| · The parameters of the Gaussian components and the cluster assignments based on the maximum posterior probability: Cluster assignment for . |
Performance Evaluation.
Evaluation Indicator. Mean Intersection over Union (mIoU) and total runtime of per frame are adopted in this paper for evaluating accuracy of target extraction and algorithm efficiency. The mIoU quantitatively measures the accuracy of predicted segmentation results com-pared to the label truth. It evaluates the overlap between the predicted segmentation region and the true region for each class and computes the average across all classes. As a robust and interpretable metric, mIoU is particularly suitable for assessing the performance of clustering and segmentation algorithms, including those applied to UAV thermal infrared imagery for levee piping hazard detection. For the specific target, the IoU and the total runtime are computed as below.
where True Positive is the number of pixels correctly predicted as belonging to piping target, False Positive is the number of pixels incorrectly predicted as belonging to piping target. False Negative if the number of pixels belonging to piping target.
Experimental Data. The experimental data in this manuscript were obtained using remote sensing images captured by the DJI H20T sensor mounted on the DJI M300 UAV. The images were taken from a nadir perspective with a flight speed of 8 meters per second, primarily acquiring thermal infrared remote sensing images. The data collection took place in the Pajiang River Basin, Fogang County, Qingyuan City, Guangdong Province, on April 20, 2023. The UAV operated at a flight altitude of 30 meters, and the thermal infrared camera had a resolution of
with a Noise Equivalent Temperature Difference (NEDT)
. During this data acquisition, eight frames of thermal infrared remote sensing images containing piping hazards were collected, as shown in
Figure 8. These thermal infrared remote sensing images with piping hazards were used in this manuscript to test and evaluate the performance of the proposed SC-based SACM algorithm, which in terms of accuracy of target extraction and computational time of benchmarks.
Comparison in accuracy of target extraction. As shown in
Table 1, SACM demonstrates a significant advantage in terms of target extraction accuracy. As indicated by the data of
Table 1, SACM consistently achieves the highest mIoU values across all tests, with an average mIoU of 0.1469. This suggests that SACM provides superior precision in extracting piping hazards. In contrast, traditional algorithms such as KM, GMM, and FCM exhibit lower average mIoU values of 0.0423, 0.0269, and 0.0303, respectively. These conventional methods often struggle with the complexities of thermal infrared remote sensing imagery, where background noise and environmental variations can adversely affect target extraction accuracy.SACM effectively mitigates irrelevant background regions through its progressive adaptive clustering strategy, enhancing the precision of piping hazard extraction. Its robust and reliable performance in complex environments is evident, maintaining stability under varying weather conditions. Consequently, SACM demonstrates superior performance in piping detection tasks, validating its applicability and efficacy in challenging scenarios.
Comparison in computational time. As shown in
Table 2, SC-based SACM also exhibits a remarkable advantage in computational efficiency. SC-based SACM achieves the lowest average runtime per frame at
, significantly outperforming other algorithms. This indicates that SC-based SACM is highly efficient in processing thermal infrared imagery for piping hazard detection. In contrast, traditional monolithic-based algorithms, such as KM, GMM, and FCM, have average runtimes of 6.7628, 96.3845, and 209.3182 seconds per frame, respectively. To be specific, the time complexity of monolithic-based KM is
, where
n indicates the number of data points and
k indicates the number of clusters. The time complexity of monolithic-based GMM is
, where
D indicates the dimension of the covariance matrix. The time complexity of monolithic-based FCM is
, where
c indicates the number of iterations and
I indicates the dimension of data. Since FCM needs to process fuzzy membership, the calculation process is relatively complicated and usually requires multiple iterations to converge, so the computational time is higher. The efficiency of SC-based SACM is attributed to the fact that the model can be split and coordinated among multiple computing devices, and its streamlined clustering process, which reduces computational overhead while maintaining higher accuracy. This efficiency makes SC-based SACM particularly suitable for real-time applications, where rapid processing is crucial. The significant reduction in runtime not only demonstrates the computational superiority of SC-based SACM but also its potential for large-scale deployment in practical scenarios.