Outer wall leakage point positioning detection method and system based on infrared thermal imaging
By collecting multi-time infrared thermal imaging data and performing dynamic temperature correction, thermal characteristic parameters are extracted, and leakage risk mapping is combined with pre-trained models, the inaccuracy problem under the influence of ambient temperature fluctuations in the existing technology is solved, and precise positioning and quantitative evaluation of exterior wall leakage points are achieved.
Patent Information
- Application Number
- CN202510480104.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-17
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2045-04-17
AI Technical Summary
The existing infrared thermal imaging detection methods are difficult to accurately reflect the thermal abnormality characteristics of the exterior wall leakage points under the influence of ambient temperature fluctuations, and lack in-depth excavation and analysis of thermal characteristic parameters, resulting in inaccuracy of positioning and evaluation.
By collecting multi-time infrared thermal imaging data, dynamic temperature correction processing is performed, temperature gradient distribution characteristics, abnormal temperature difference area morphological characteristics and thermal conductivity directional characteristics are extracted, and leakage risk probability mapping is carried out in combination with the pre-trained thermal anomaly detection model. Finally, region segmentation is performed based on the dynamic judgment threshold, and leakage point positioning coordinates and intensity levels are output.
It significantly improves the accuracy and reliability of leakage detection, realizes accurate positioning and quantitative evaluation of exterior wall leakage points, and improves the intelligent level of detection.
Smart Images

Figure CN119991682A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision technology, and in particular to an external wall leakage point positioning detection method and system based on infrared thermal imaging. Background Art
[0002] In the field of building exterior wall leakage detection, existing technologies mainly rely on simple single-point infrared thermal imaging detection technology. Although it can use temperature differences to find leakage points to a certain extent, it only collects infrared thermal imaging data at a single moment and cannot fully consider the impact of ambient temperature fluctuations on surface temperature measurements. Changes in ambient temperature will cause dynamic changes in the temperature distribution of the exterior wall surface, making it difficult for single-point detection data to accurately reflect the true thermal anomaly characteristics of the leakage point, thereby reducing the accuracy and reliability of leakage detection.
[0003] In addition, most existing infrared thermal imaging detection methods only focus on simple comparison of temperature values, and lack in-depth exploration and analysis of thermal characteristic parameters. For example, they do not comprehensively consider multi-dimensional thermal characteristic parameters such as temperature gradient distribution characteristics, abnormal temperature difference area morphological characteristics, and heat conduction directional characteristics, which makes it impossible to fully characterize the thermal anomaly pattern caused by the leakage point, and thus it is difficult to accurately assess the leakage risk.
[0004] At the same time, in terms of leakage point location and leakage intensity assessment, the existing technology lacks scientific and effective methods and means. Usually, the location of the leakage point can only be roughly determined, and the leakage point location coordinate set cannot be accurately output. It is even more difficult to quantify and grade the leakage intensity, and it cannot meet the needs of accurate positioning and quantitative assessment of external wall leakage points in actual projects. Summary of the invention
[0005] In view of the above-mentioned problems, in combination with the first aspect of the present invention, an embodiment of the present invention provides a method for locating and detecting leakage points of an external wall based on infrared thermal imaging, the method comprising: Collecting a multi-period infrared thermal imaging data set of the target building exterior wall surface, wherein the multi-period infrared thermal imaging data set includes a surface temperature distribution matrix under different ambient temperature conditions; Performing dynamic temperature correction processing on the multi-period infrared thermal imaging data set to generate a standardized temperature distribution set, wherein the standardized temperature distribution set eliminates the influence of ambient temperature fluctuations on surface temperature measurements; Extracting a thermal characteristic parameter set from the standardized temperature distribution set, the thermal characteristic parameter set including temperature gradient distribution characteristics, abnormal temperature difference area morphological characteristics and heat conduction directionality characteristics; Calling a pre-trained thermal anomaly detection model to perform leakage risk probability mapping processing on the thermal feature parameter set to generate a leakage point probability distribution map on the surface of the exterior wall of the target building; Based on the leakage point probability distribution map and a preset dynamic judgment threshold, a region segmentation process is performed to output a leakage point location coordinate set and a corresponding leakage intensity level identifier.
[0006] On the other hand, an embodiment of the present invention also provides an external wall leakage point positioning and detection system based on infrared thermal imaging, including a processor and a machine-readable storage medium, wherein the machine-readable storage medium is connected to the processor, the machine-readable storage medium is used to store programs, instructions or codes, and the processor is used to execute the programs, instructions or codes in the machine-readable storage medium to implement the above method.
[0007] Based on the above aspects, the embodiment of the present invention realizes the accurate positioning and quantitative evaluation of the leakage points of the building exterior wall. By collecting a multi-period infrared thermal imaging data set under different ambient temperature conditions and combining a dynamic temperature correction algorithm to generate a standardized temperature distribution set, the interference of ambient temperature fluctuations on the thermal imaging data is eliminated, and the accuracy and stability of thermal feature parameter extraction are significantly improved. On this basis, the thermal feature parameter set composed of the extracted temperature gradient distribution characteristics, abnormal temperature difference regional morphological characteristics and heat conduction directional characteristics can comprehensively characterize the thermal anomaly mode caused by the leakage point, and provide a high-dimensional feature space for leakage risk probability mapping. By calling the pre-trained thermal anomaly detection model for leakage risk probability mapping processing, not only the high-precision generation of the leakage point probability distribution map is achieved, but also the adaptability defects of the traditional static threshold method under different environmental conditions are effectively overcome by introducing a dynamic judgment threshold for regional segmentation, so that the output of the leakage point positioning coordinate set has both spatial resolution and confidence. The leakage intensity level mark finally output provides a basis for the priority sorting of leakage repair by quantifying the thermal anomaly feature intensity of the leakage point, and significantly improves the intelligent level of external wall leakage detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1 It is a schematic diagram of the execution flow of the external wall leakage point positioning detection method based on infrared thermal imaging provided by an embodiment of the present invention.
[0009] Figure 2 It is a schematic diagram of exemplary hardware and software components of an external wall leakage point positioning and detection system based on infrared thermal imaging provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0010] The present invention will be described in detail below with reference to the accompanying drawings. Figure 1 It is a flow chart of an external wall leakage point positioning detection method based on infrared thermal imaging provided by an embodiment of the present invention. The external wall leakage point positioning detection method based on infrared thermal imaging is introduced in detail below.
[0011] Step S110: Collect a multi-period infrared thermal imaging data set of the target building exterior wall surface, wherein the multi-period infrared thermal imaging data set includes a surface temperature distribution matrix under different ambient temperature conditions.
[0012] In this embodiment, an infrared thermal imager can be used for data collection. In order to fully obtain the thermal imaging information of the target building's exterior wall at different ambient temperatures, the collection work can be carried out in multiple different time periods. For example, different dates of the week can be selected, and the collection can be carried out at three time points: morning, noon, and evening. Because the ambient temperature is relatively low in the morning, the temperature distribution of the building's exterior wall is relatively uniform after cooling overnight; at noon, the sun is directly shining, the surface temperature of the exterior wall rises, and the temperature difference of the wall in different directions is obvious; at night, as the temperature drops, the heat dissipation of the exterior wall will also be different.
[0013] Assume that the exterior wall of the target building is a rectangular structure with a length of 60 meters and a height of 30 meters, and the resolution of the infrared thermal imager used is 1280×960 pixels, which means that the surface temperature distribution matrix obtained each time is a two-dimensional matrix with 1280 rows and 960 columns. Each element in the two-dimensional matrix represents the temperature value of the corresponding pixel point on the surface of the exterior wall in degrees Celsius. After multiple acquisitions, the surface temperature distribution matrices of the above different time periods are combined together to form a multi-time infrared thermal imaging data set. Each two-dimensional matrix in the multi-time infrared thermal imaging data set reflects the temperature distribution of the exterior wall surface under various ambient temperature conditions.
[0014] Step S120: performing dynamic temperature correction processing on the multi-period infrared thermal imaging data set to generate a standardized temperature distribution set, wherein the standardized temperature distribution set eliminates the influence of ambient temperature fluctuations on the surface temperature measurement value.
[0015] In this embodiment, since environmental factors such as temperature, humidity and wind speed may interfere with the measured value of the surface temperature of the building's exterior wall, in order to obtain data that accurately reflects the actual temperature of the exterior wall, it is necessary to perform dynamic temperature correction processing on the infrared thermal imaging data set of multiple time periods. The specific steps are as follows: Step S121: Acquire a historical meteorological data set of the area where the target building exterior wall is located, wherein the historical meteorological data set includes the real-time ambient temperature, real-time humidity and real-time wind speed parameters corresponding to when the multi-period infrared thermal imaging data are collected.
[0016] In order to obtain accurate historical meteorological data, it is possible to communicate with the meteorological monitoring source to obtain detailed and accurate meteorological information of the area where the target building exterior wall is located. While collecting infrared thermal imaging data for multiple periods, the real-time ambient temperature, real-time humidity and real-time wind speed parameters corresponding to each collection moment are synchronously recorded.
[0017] For example, when collecting infrared thermal imaging data at 8 a.m. on Monday, the real-time ambient temperature was recorded as 12 degrees Celsius, the real-time humidity was 75%, and the real-time wind speed was 1.2 meters per second; when collecting data at 12 noon on Tuesday, the real-time ambient temperature was 26 degrees Celsius, the real-time humidity was 45%, and the real-time wind speed was 2.8 meters per second; when collecting data at 8 p.m. on Wednesday, the real-time ambient temperature was 16 degrees Celsius, the real-time humidity was 68%, and the real-time wind speed was 0.8 meters per second. Therefore, the meteorological parameters corresponding to these different collection times can be organized into a historical meteorological data set.
[0018] Step S122: construct a temperature compensation function, which includes a linear compensation term based on the difference between the real-time ambient temperature and the benchmark ambient temperature, a temperature compensation term based on the conversion effect of the difference between the real-time humidity and the benchmark humidity, and a temperature compensation term based on the conversion effect of the difference between the real-time wind speed and the benchmark wind speed.
[0019] In this embodiment, when constructing the temperature compensation function, reasonable reference environmental parameters must first be determined. For example, after a large number of experiments and analyses, a representative reference environmental temperature of 20 degrees Celsius, a reference humidity of 60%, and a reference wind speed of 2 meters per second are selected.
[0020] For the linear compensation term based on the difference between the real-time ambient temperature and the reference ambient temperature, the linear compensation coefficient k1 is determined to be 0.9 through a large number of experiments. The function of the linear compensation term is to linearly adjust the original surface temperature measurement value according to the difference between the real-time ambient temperature and the reference ambient temperature. It is calculated by multiplying k1 by (real-time ambient temperature - reference ambient temperature). Since the units of the real-time ambient temperature and the reference ambient temperature are both degrees Celsius, the dimension of the linear compensation term is also degrees Celsius, which is consistent with the dimension of the original surface temperature measurement value.
[0021] For the effect of the difference between real-time humidity and reference humidity on the temperature measurement, the humidity difference cannot be directly added to the temperature. Instead, the correlation between the humidity difference and the temperature change must be found through experiments and data analysis. For example, after research, it was found that the effect of humidity difference on temperature can be approximately represented by a quadratic function. Assuming that there is a humidity-temperature conversion coefficient k2 of 0.03, the temperature compensation term for the humidity effect conversion can be expressed as k2 multiplied by the square of (real-time humidity conversion parameter-reference humidity conversion parameter) multiplied by a unit conversion factor, which is determined experimentally and enables the final dimension of the compensation term to be degrees Celsius. For example, when the real-time humidity is 70% and the reference humidity is 60%, the real-time humidity and the reference humidity are first converted into positive integers of 0-100, that is, the real-time humidity conversion parameter is 70 and the reference humidity conversion parameter is 60, then the square of (real-time humidity conversion parameter - reference humidity conversion parameter) is 100, multiplied by k2 to get 3, and then multiplied by the unit conversion factor (assuming it is 0.1) to get 0.3 degrees Celsius, thereby converting the impact of the humidity difference into a temperature compensation amount.
[0022] The effect of the difference between the real-time wind speed and the reference wind speed on the temperature measurement also needs to be converted. For example, the wind speed-temperature conversion coefficient k3 is determined to be 0.15 through experiments. The temperature compensation term for the conversion of wind speed effects can be expressed as k3 multiplied by (real-time wind speed-reference wind speed) and then multiplied by a unit conversion factor, which is also determined through experiments to ensure that the dimension of the compensation term is degrees Celsius. For example, when the real-time wind speed is 3 meters per second and the reference wind speed is 2 meters per second, (real-time wind speed-reference wind speed) is 1 meter per second, multiplied by k3 to get 0.15, and then multiplied by the unit conversion factor (assuming it is 1) to get 0.15 degrees Celsius, converting the effect of the wind speed difference into a temperature compensation amount.
[0023] In summary, the temperature compensation function can be expressed as: compensated surface temperature value = original surface temperature measurement value + k1 multiplied by (real-time ambient temperature - reference ambient temperature) + k2 multiplied by the square of (real-time humidity - reference humidity) multiplied by the unit conversion factor + k3 multiplied by (real-time wind speed - reference wind speed) multiplied by the unit conversion factor. This ensures that the dimensions of each item in the temperature compensation function are unified in degrees Celsius, and the original surface temperature measurement value can be reasonably corrected.
[0024] Step S123: input each surface temperature measurement value in the multi-period infrared thermal imaging data set into the temperature compensation function to obtain a compensated surface temperature value.
[0025] In this embodiment, for each surface temperature measurement value in the multi-period infrared thermal imaging data set, it is substituted into the temperature compensation function for calculation. For example, in the infrared thermal imaging data collected at 9 am on Thursday, the original surface temperature measurement value of a pixel point is 14 degrees Celsius, and the corresponding real-time ambient temperature is 13 degrees Celsius, the real-time humidity is 72%, and the real-time wind speed is 1.4 meters per second. Substitute these values into the temperature compensation function for calculation: Linear compensation term = 0.9 times (13-20) = -6.3 degrees Celsius; Temperature compensation term for humidity effect conversion = 0.03 times (72-60) squared times 0.1 = 0.432 degrees Celsius; The temperature compensation term for the wind speed effect conversion = 0.15 times (1.4-2) times 1 = -0.09 degrees Celsius; The compensated surface temperature value = 14 + (-6.3) + 0.432 + (-0.09) = 8.042 degrees Celsius.
[0026] The surface temperature measurement values of all pixel points in the multi-period infrared thermal imaging data set are calculated to obtain a compensated surface temperature value set, each value in the surface temperature value set is a corrected surface temperature, which effectively eliminates the interference of some environmental factors.
[0027] Step S124: performing spatial interpolation processing on all compensated surface temperature values to generate a standardized temperature distribution set consistent with the resolution of the multi-period infrared thermal imaging data set; wherein the temperature value of each pixel point in the standardized temperature distribution set represents the true temperature of the exterior wall surface after eliminating environmental interference.
[0028] In this embodiment, after temperature compensation, there may be some pixel points whose temperature values are missing or inaccurate. In order to obtain complete and accurate temperature distribution information, it is necessary to perform spatial interpolation processing on all compensated surface temperature values.
[0029] In this embodiment, a bicubic spline interpolation method is used. Bicubic spline interpolation is an interpolation method based on a cubic polynomial, which can more accurately estimate the temperature value of an unknown pixel point based on the temperature value of a known pixel point. Specifically, for a pixel point whose temperature value needs to be estimated, the temperature values of 16 known pixel points within a certain range around it will be selected as a reference. By establishing a cubic polynomial function, the value of the cubic polynomial function at these 16 known pixel points is equal to the known temperature value, and the first-order and second-order derivatives of the function are guaranteed to be continuous at these points. Then, the coordinates of the pixel point to be estimated are substituted into the cubic polynomial function, and the estimated temperature value of the pixel point is calculated.
[0030] For example, for an unknown pixel at (x, y) coordinates, find the coordinates and corresponding temperature values of the 16 known pixels around it and construct a cubic polynomial function. Assume that the temperature values of these 16 known pixels are T1, T2, ..., T16, and determine the coefficients of the cubic polynomial function by calculating and solving the equations. Finally, substitute (x, y) into the function to get the temperature value of the unknown pixel.
[0031] After performing such bicubic spline interpolation processing on all compensated surface temperature values, a standardized temperature distribution set consistent with the resolution of the multi-period infrared thermal imaging data set is generated. The temperature value of each pixel in the standardized temperature distribution set has been corrected and interpolated, and can accurately represent the true temperature of the exterior wall surface after eliminating environmental interference.
[0032] Step S130: extracting a thermal characteristic parameter set from the standardized temperature distribution set, wherein the thermal characteristic parameter set includes temperature gradient distribution characteristics, abnormal temperature difference region morphological characteristics, and heat conduction directional characteristics.
[0033] In order to accurately locate the leakage point of the external wall, it is necessary to extract a set of thermal characteristic parameters that can reflect the leakage characteristics from the standardized temperature distribution set. The specific steps are as follows: Step S131: performing spatial gradient calculation on the standardized temperature distribution set to generate a transverse temperature gradient distribution map and a longitudinal temperature gradient distribution map, and performing vector superposition on the transverse temperature gradient distribution map and the longitudinal temperature gradient distribution map to obtain temperature gradient vector field characteristics.
[0034] The spatial gradient calculation can reflect the rate of change of temperature in space. For the standardized temperature distribution set, the horizontal and vertical spatial gradient calculations are performed respectively.
[0035] When calculating the transverse temperature gradient, for each pixel in the standardized temperature distribution set, calculate the temperature difference between it and the adjacent right pixel, and then divide it by the distance between the pixels (assuming that the horizontal distance between the pixels is 1 unit) to obtain the transverse temperature gradient value of the pixel. For example, for pixel (i, j), its transverse temperature gradient value is (the temperature value of pixel (i, j+1) in the standardized temperature distribution set - the temperature value of pixel (i, j)) divided by 1. By performing such calculations on all pixels in the standardized temperature distribution set, a transverse temperature gradient distribution map is obtained.
[0036] The calculation method of the longitudinal temperature gradient is similar. For each pixel, the temperature difference between it and the adjacent pixel below is calculated, and then divided by the distance between the pixels (assuming that the vertical distance between the pixels is 1 unit) to obtain the longitudinal temperature gradient value of the pixel. For example, for the pixel (i, j), its longitudinal temperature gradient value is (the temperature value of the pixel (i+1, j) in the standardized temperature distribution set - the temperature value of the pixel (i, j)) divided by 1. After calculating all the pixels, the longitudinal temperature gradient distribution map is obtained.
[0037] The transverse temperature gradient distribution map and the longitudinal temperature gradient distribution map are vector superimposed, that is, the transverse temperature gradient value and the longitudinal temperature gradient value of each pixel point are taken as the two components of the vector to obtain the temperature gradient vector field feature. The temperature gradient vector field feature can more comprehensively reflect the temperature change in space, which is of great value for discovering areas with abnormal temperature changes on the exterior wall surface.
[0038] Step S132: Detect the connected areas in the standardized temperature distribution set where the continuous temperature difference exceeds the preset threshold, extract the geometric center coordinates, area, boundary curvature and internal temperature extreme point distribution of each connected area, and generate a morphological feature set of abnormal temperature difference areas.
[0039] In the standardized temperature distribution set, the connected area where the continuous temperature difference exceeds the preset threshold may be the area where the leakage point is located. The preset threshold is determined through a large number of experiments and actual case analysis. In this embodiment, the preset threshold is 2 degrees Celsius.
[0040] Using the connected region detection algorithm, all connected regions with continuous temperature differences exceeding 2 degrees Celsius are found from the standardized temperature distribution set. For each connected region, the following feature extraction is performed: Calculation of geometric center coordinates: Count the coordinates of all pixels in the connected area, add up the horizontal coordinates of all pixels and divide by the number of pixels to get the horizontal coordinate of the geometric center; add up the vertical coordinates of all pixels and divide by the number of pixels to get the vertical coordinate of the geometric center. For example, if there are 100 pixels in a connected area, their horizontal coordinates are x1, x2, ..., x100, and their vertical coordinates are y1, y2, ..., y100, then the horizontal coordinate of the geometric center is (x1+x2+...+x100) divided by 100, and the vertical coordinate is (y1+y2+...+y100) divided by 100.
[0041] Calculation of area: The area of a region is determined by counting the number of pixels in a connected region. Assuming that the actual area represented by each pixel is 0.01 square meters and there are 200 pixels in a connected region, the area of the region is 200 times 0.01 = 2 square meters.
[0042] Calculation of boundary curvature: For boundary pixels of a connected region, calculate the rate of change of the angle between adjacent boundary pixels. The boundary curvature can be obtained by calculating the vector angle between adjacent boundary pixels and then performing statistical analysis on the changes of these angles.
[0043] Determination of the distribution of internal temperature extreme points: Find the maximum and minimum temperature values and their corresponding pixel coordinates in the connected area. For example, in a connected area, after traversing the temperature values of all pixels, it is found that the maximum temperature is 25 degrees Celsius, and the corresponding pixel coordinates are (100, 200); the minimum temperature is 20 degrees Celsius, and the corresponding pixel coordinates are (150, 250).
[0044] These extracted features are combined to generate a set of morphological features of abnormal temperature difference areas, which can reflect the morphological features of abnormal temperature difference areas in the standardized temperature distribution set and provide a basis for determining the location and scale of leakage points.
[0045] Step S133: Analyze the temperature change direction of each pixel point and its adjacent pixel points in the standardized temperature distribution set, count the temperature conduction rates in each direction, and generate a heat conduction directional probability distribution feature.
[0046] For each pixel in the standardized temperature distribution set, the temperature change direction of the pixel and its neighboring pixels is analyzed. The neighboring pixels include the pixels in the up, down, left, right and four diagonal directions.
[0047] Take a pixel (i, j) as an example, and calculate the temperature difference between it and its adjacent pixels. If the temperature difference with the adjacent pixel on the right (i, j+1) is positive, it means that the temperature is transferred from the pixel (i, j) to the right; if the temperature difference is negative, it means that the temperature is transferred from the right to the pixel (i, j).
[0048] Count the temperature conduction rate in each direction. The temperature conduction rate can be calculated by dividing the temperature difference by the distance between the pixels. Assuming the distance between the pixels is 1 unit, and the temperature difference between a pixel and its adjacent pixel on the right is 1 degree Celsius, the temperature conduction rate in that direction is 1 degree Celsius per unit distance.
[0049] Such analysis and statistics are performed on all pixel points in the standardized temperature distribution set to obtain the distribution of temperature conduction rates in each direction. Then, based on these temperature conduction rates, the temperature conduction probability in each direction is calculated. For example, in a certain area, the total temperature conduction rate in the upward direction is 10 degrees Celsius per unit distance, the total temperature conduction rate in the downward direction is 8 degrees Celsius per unit distance, the total temperature conduction rate in the left direction is 6 degrees Celsius per unit distance, and the total temperature conduction rate in the right direction is 12 degrees Celsius per unit distance. Then the probability of temperature conduction in the upward direction is 10 divided by (10+8+6+12)≈0.278, the probability of temperature conduction in the downward direction is 8 divided by (10+8+6+12)≈0.222, the probability of temperature conduction in the left direction is 6 divided by (10+8+6+12)≈0.167, and the probability of temperature conduction in the right direction is 12 divided by (10+8+6+12)≈0.333.
[0050] The temperature conduction probabilities in various directions are arranged in a certain order to generate the heat conduction directional probability distribution characteristics, which can reflect the directional law of heat conduction in the standardized temperature distribution set and play an important role in judging the heat conduction anomaly caused by the leakage point.
[0051] Step S134: aligning the temperature gradient vector field features, the abnormal temperature difference area morphological feature set and the heat conduction directional probability distribution features according to spatial coordinates and fusing them to obtain the thermal feature parameter set.
[0052] After obtaining the temperature gradient vector field characteristics, the abnormal temperature difference area morphological feature set and the heat conduction directional probability distribution characteristics, they need to be fused to form a complete set of thermal feature parameters.
[0053] First, align the three features according to the spatial coordinates. In other words, ensure that the information at the same spatial position in each feature corresponds. For example, the temperature gradient vector information of the pixel point (i, j) in the temperature gradient vector field feature must correspond to the relevant morphological features of the same coordinates (i, j) in the abnormal temperature difference area morphological feature set and the heat conduction probability information of the same coordinates (i, j) in the heat conduction directional probability distribution feature.
[0054] Then, the three features are fused by weighted splicing. Different weights are assigned to the temperature gradient vector field feature, the abnormal temperature difference area morphological feature set, and the heat conduction directionality probability distribution feature. Assume that the weight of the temperature gradient vector field feature is 0.4, the weight of the abnormal temperature difference area morphological feature set is 0.3, and the weight of the heat conduction directionality probability distribution feature is 0.3. For the feature information of each spatial position, the information of the three corresponding features is spliced according to the weight. For example, for the pixel point (i, j), its temperature gradient vector information is multiplied by 0.4, the abnormal temperature difference area morphological feature is multiplied by 0.3, and the heat conduction directionality probability information is multiplied by 0.3, and then these three weighted information are spliced together to form the feature information of the pixel point in the thermal feature parameter set. All pixels in the standardized temperature distribution set are processed in this way, and finally a complete thermal feature parameter set is obtained. The thermal feature parameter set integrates information such as temperature gradient, abnormal temperature difference area morphology, and heat conduction directionality, and can more comprehensively and accurately reflect the thermal characteristics of the exterior wall of the target building.
[0055] Step S140: calling a pre-trained thermal anomaly detection model to perform leakage risk probability mapping processing on the thermal feature parameter set to generate a leakage point probability distribution map on the surface of the exterior wall of the target building.
[0056] The pre-trained thermal anomaly detection model can convert the information in the thermal feature parameter set into leakage risk probability, thereby generating a leakage point probability distribution map. The specific steps are as follows: Step S141: inputting the temperature gradient vector field feature into the first convolution branch of the pre-trained thermal anomaly detection model to extract high-order abstract features of the temperature gradient spatial distribution.
[0057] The first convolution branch of the pre-trained thermal anomaly detection model is specifically used to process the temperature gradient vector field features. The convolution branch consists of multiple convolution layers, pooling layers, and activation function layers. When the temperature gradient vector field features are input to the first convolution branch, the convolution layer performs a convolution operation on the input features. The convolution operation can be understood as using multiple different convolution kernels to slide on the temperature gradient vector field features to extract local features. Each convolution kernel has different weight parameters, and the convolution result is obtained by element-wise multiplication and summation with the input features.
[0058] For example, suppose a 3×3 convolution kernel is convolved with a 3×3 region in the temperature gradient vector field feature. The weight parameters of the convolution kernel are w1, w2, ..., w9, and the temperature gradient vector values of the 3×3 region are t1, t2, ..., t9, respectively. The convolution result is w1×t1+w2×t2+...+w9×t9. Through the convolution operation of multiple convolution kernels, different types of local features can be extracted.
[0059] The role of the pooling layer is to downsample the convolution result, reduce the dimension of the data, and retain important feature information. Common pooling methods include maximum pooling and average pooling. Taking maximum pooling as an example, in a 2×2 area, the maximum value is taken as the pooling result of the area. This can reduce the amount of data and improve computational efficiency.
[0060] The activation function layer is used to introduce nonlinear factors and enhance the expressiveness of the model. Common activation functions include the ReLU function, which sets values less than 0 to 0 and keeps values greater than 0 unchanged. Through the alternating effects of multiple convolutional layers, pooling layers, and activation function layers, the first convolution branch can extract high-order abstract features of the spatial distribution of temperature gradients. These high-order abstract features can more deeply reflect the spatial distribution laws and characteristics of temperature gradients.
[0061] Step S142: inputting the abnormal temperature difference area morphological feature set into the second convolution branch of the pre-trained thermal anomaly detection model to extract multi-scale geometric features of the regional morphology.
[0062] The second convolution branch of the pre-trained thermal anomaly detection model is used to process the morphological feature set of the abnormal temperature difference area. Similar to the first convolution branch, the second convolution branch also contains multiple convolution layers, pooling layers, and activation function layers.
[0063] When the abnormal temperature difference area morphological feature set is input to the second convolution branch, the convolution layer will perform a convolution operation on the input features. Since the abnormal temperature difference area morphological feature set contains a variety of information such as geometric center coordinates, area, boundary curvature, and distribution of internal temperature extreme points, the convolution kernel will extract features for these different types of information. For example, for area information, the convolution kernel can extract features of areas of different sizes; for boundary curvature information, the convolution kernel can extract features such as the degree of curvature of the boundary.
[0064] The pooling layer downsamples the convolution results to reduce the data dimension. The activation function layer introduces nonlinear factors to enhance the model's expressiveness. Through the action of multiple convolutional layers, pooling layers, and activation function layers, the second convolution branch can extract multi-scale geometric features of regional morphology. Multi-scale geometric features mean that the model can capture the morphological features of abnormal temperature difference areas at different scales, such as the overall shape of the region at a large scale and local detail features at a small scale.
[0065] Step S143: inputting the heat conduction directional probability distribution feature into the third convolution branch of the pre-trained thermal anomaly detection model to extract the temporal evolution feature of the heat conduction path.
[0066] The third convolution branch of the pre-trained thermal anomaly detection model is dedicated to processing the probability distribution characteristics of heat conduction directionality. This convolution branch is also composed of convolutional layers, pooling layers, and activation function layers.
[0067] When the heat conduction directional probability distribution feature is input to the third convolution branch, the convolution layer will perform a convolution operation on the input feature. The heat conduction directional probability distribution feature reflects the probability of heat conduction in different directions, and the convolution kernel will extract features based on this probability information. For example, the convolution kernel can extract features in directions with higher probability of heat conduction, as well as correlation features between different directions.
[0068] The pooling layer downsamples the convolution results to reduce the data dimension. The activation function layer introduces nonlinear factors to enhance the model's expressiveness. Since heat conduction is a time-varying process, the third convolution branch takes this temporal evolution into account during processing. Through the effects of multiple convolution layers, pooling layers, and activation function layers, the third convolution branch can extract the temporal evolution characteristics of the heat conduction path. These temporal evolution characteristics can reflect the temporal variation of heat conduction and play an important role in determining heat conduction anomalies caused by leakage points.
[0069] Step S144: Perform cross-channel attention fusion on the high-order abstract features, the multi-scale geometric features and the temporal evolution features to generate a fused feature tensor.
[0070] After extracting high-order abstract features, multi-scale geometric features, and temporal evolution features from the three convolution branches, these features need to be fused to generate more representative features. This embodiment adopts a cross-channel attention fusion method.
[0071] The core idea of the cross-channel attention fusion method is to assign different weights to the features of different channels to highlight important feature information. First, high-order abstract features, multi-scale geometric features, and temporal evolution features are concatenated in the channel dimension to form a new feature tensor. Then, through a global average pooling operation, the feature tensor is compressed in the spatial dimension to obtain the global feature information of each channel.
[0072] Next, the global feature information is input into a fully connected layer and passed through a Sigmoid activation function to obtain the attention weight of each channel. The Sigmoid activation function maps the input value to between 0 and 1, and these values are the attention weights of each channel. The larger the attention weight, the more important the feature of the channel.
[0073] Finally, the original feature tensor is multiplied by the attention weight channel by channel to obtain the weighted feature tensor. This achieves adaptive weighting of different channel features, highlights important feature information, and generates a fused feature tensor. The fused feature tensor integrates high-order feature information such as temperature gradient, abnormal temperature difference area morphology, and heat conduction directionality, and can more accurately reflect the leakage risk of the target building's exterior wall.
[0074] Step S145: Mapping the fused feature tensor to the original infrared thermal imaging data resolution through a deconvolution layer, and outputting the leakage risk probability value of each pixel point to generate the leakage point probability distribution map.
[0075] The function of the deconvolution layer is to restore the resolution of the fused feature tensor to the resolution of the original infrared thermal imaging data. The deconvolution operation can be regarded as the inverse process of the convolution operation, which expands the size of the feature map by upsampling and convolution operations on the input features.
[0076] When the fused feature tensor is input to the deconvolution layer, the deconvolution layer will perform upsampling and convolution operations according to the preset deconvolution kernel and step size. For example, assuming the size of the deconvolution kernel is 4×4 and the step size is 2, the deconvolution layer will fill a certain number of 0s around each element of the fused feature tensor, and then perform a convolution operation with the deconvolution kernel to obtain a feature map of a larger size. Through the action of multiple deconvolution layers, the resolution of the fused feature tensor is gradually restored to the resolution of the original infrared thermal imaging data.
[0077] During the deconvolution process, each pixel will get a corresponding eigenvalue. These eigenvalues are processed through a Softmax activation function and converted into probability values between 0 and 1. These probability values represent the leakage risk probability of each pixel. The leakage risk probability of each pixel is arranged according to its position in the original infrared thermal imaging data to generate a leakage point probability distribution map on the target building's exterior wall surface. The leakage point probability distribution map intuitively shows the leakage risk situation at each position on the target building's exterior wall surface.
[0078] Step S150: performing region segmentation processing based on the leakage point probability distribution map and a preset dynamic determination threshold, and outputting a leakage point location coordinate set and a corresponding leakage intensity level identifier.
[0079] In order to accurately locate the leakage point and determine its leakage intensity level from the leakage point probability distribution map, it is necessary to perform region segmentation processing. The specific steps are as follows: Step S151: according to the material type and environmental exposure level of the target building exterior wall, a basic determination threshold is retrieved from a threshold configuration library.
[0080] The threshold configuration library stores the basic judgment thresholds corresponding to different building exterior wall material types and environmental exposure levels. There are many types of building exterior wall materials, such as brick walls, concrete walls, glass curtain walls, etc. Different material types have different sensitivities to leakage, so the corresponding basic judgment thresholds are also different. The environmental exposure level takes into account the environmental conditions of the building exterior wall, such as whether it is close to a water source and whether it is often washed by rain.
[0081] For example, for brick walls, the basic judgment threshold may be 0.3 under normal environmental exposure levels; for concrete walls, the basic judgment threshold may be 0.4 under high environmental exposure levels. According to the specific material type and environmental exposure level of the target building's exterior wall, the corresponding basic judgment threshold is found from the threshold configuration library. Assuming that the target building's exterior wall is a concrete wall and the environmental exposure level is medium, the basic judgment threshold retrieved from the threshold configuration library is 0.35.
[0082] Step S152: Analyze the global statistical characteristics of the leakage point probability distribution diagram, and calculate the mean and variance of the probability values.
[0083] Perform statistical analysis on the leakage risk probability values of all pixels in the leakage point probability distribution map. First, calculate the mean of the probability values. The mean is calculated by adding the leakage risk probability values of all pixels and then dividing it by the total number of pixels. For example, if there are 10,000 pixels in the leakage point probability distribution map, and their leakage risk probability values are p1, p2, …, p10000, then the mean of the probability values is (p1+p2+…+p10000) divided by 10,000.
[0084] Next, calculate the variance of the probability value, which reflects the degree of dispersion of the probability value. The variance is calculated by first calculating the square of the difference between the leakage risk probability value and the mean of each pixel, then adding these square values and dividing by the total number of pixels. For example, for pixel i, its leakage risk probability value is pi, and the mean is μ, then the square of the difference between the pixel and the mean is (pi-μ) squared. Add the squares of (pi-μ) of all pixels and divide by 10,000 to get the variance of the probability value.
[0085] Assume that after calculation, the mean of the probability value in the leakage point probability distribution diagram is 0.2 and the variance is 0.05.
[0086] Step S153: dynamically offset and adjust the basic decision threshold based on the mean and variance to generate a dynamic decision threshold adapted to the current infrared thermal imaging data.
[0087] The purpose of dynamic offset adjustment is to adjust the basic judgment threshold according to the actual situation of the leakage point probability distribution map to improve the accuracy of leakage point location. The dynamic offset adjustment method can be linearly adjusted according to the size of the mean and variance.
[0088] Assuming that the dynamic offset adjustment coefficient k is 0.2, the calculation formula for the dynamic decision threshold is: dynamic decision threshold = basic decision threshold + k × (mean - basic decision threshold) + 0.1 × variance. Substituting the basic decision threshold of 0.35, the mean of 0.2 and the variance of 0.05 into the formula, the dynamic decision threshold = 0.35 + 0.2 × (0.2-0.35) + 0.1 × 0.05 = 0.35-0.03 + 0.005 = 0.325 is obtained. In this way, a dynamic decision threshold that adapts to the current infrared thermal imaging data is generated.
[0089] Step S154: performing threshold segmentation on the leakage point probability distribution map, and extracting connected areas whose probability values exceed the dynamic determination threshold.
[0090] The dynamic judgment threshold is used to perform threshold segmentation on the leakage point probability distribution map. For each pixel in the leakage point probability distribution map, if its leakage risk probability value exceeds the dynamic judgment threshold of 0.325, the pixel is marked as a possible leakage point; if its leakage risk probability value is less than or equal to the dynamic judgment threshold, the pixel is marked as a non-leakage point.
[0091] Then, the connected region detection algorithm is used to find all connected regions composed of pixels marked as possible leakage points. A connected region refers to a region formed by adjacent pixels of possible leakage points. For example, in the leakage point probability distribution map, some adjacent pixels have leakage risk probability values exceeding the dynamic judgment threshold, and these pixels form a connected region. In this way, all connected regions with probability values exceeding the dynamic judgment threshold are extracted.
[0092] Step S155: performing morphological optimization processing on each of the connected regions, removing isolated pixel points caused by noise, and outputting the leakage point location coordinate set and the corresponding leakage intensity level identifier.
[0093] The purpose of morphological optimization is to remove isolated pixels in the connected area due to noise and other factors, so that the connected area can more accurately reflect the actual location of the leakage point. Commonly used morphological optimization methods include corrosion and expansion operations.
[0094] The erosion operation shrinks the border of the connected area inward and removes some small, isolated pixels. The specific method is to use a structural element to slide on the connected area. If the overlapping part of the structural element and the connected area does not completely conform to the shape of the structural element, the pixel is removed from the connected area. For example, using a 3×3 structural element, if there is only one pixel in the overlapping part of the structural element and the connected area at a certain position, then the pixel will be removed.
[0095] The dilation operation is to expand the boundaries of the connected region outward and fill some small holes inside. The specific method is to use a structural element to slide on the connected region. If the structural element overlaps with the connected region, all the pixels covered by the structural element are added to the connected region.
[0096] Corrosion and expansion operations are performed on each connected area in turn to remove isolated pixels caused by noise and obtain the optimized connected area. Then, the geometric center coordinates of the optimized connected area are extracted, and these coordinates constitute the leakage point location coordinate set.
[0097] Next, determine the leakage intensity level corresponding to each leakage point location coordinate. The specific process is as follows: Step S1551: Calculate the average probability value of the area corresponding to each leakage point location coordinate as the leakage intensity reference value.
[0098] For each connected area corresponding to the location coordinates of the leakage point, calculate the mean of the leakage risk probability values of all pixels in the area. For example, if there are 50 pixels in a connected area, and their leakage risk probability values are p1, p2, ..., p50 respectively, then the mean probability value of the area is (p1+p2+...+p50) divided by 50. This mean probability value is the leakage intensity benchmark value of the area corresponding to the location coordinates of the leakage point.
[0099] Step S1552: Count the maximum temperature gradient value, abnormal area and heat conduction direction consistency index of the region in the thermal characteristic parameter set.
[0100] In the set of thermal characteristic parameters, find the relevant information of the area corresponding to the location coordinates of each leakage point. The maximum temperature gradient value refers to the maximum value of the temperature gradient in the area, which reflects the severity of the temperature change in the area. The area of the abnormal area refers to the area of the connected area, which reflects the size of the leakage point.
[0101] The heat conduction direction consistency index is an index to measure the consistency of heat conduction direction in the area. The calculation method is to count the proportion of pixels with the same heat conduction direction in the area. For example, in an area, there are 80 pixels, of which 60 pixels have the same heat conduction direction, then the heat conduction direction consistency index of the area is 60 divided by 80 = 0.75.
[0102] Step S1553: input the leakage intensity reference value, the maximum temperature gradient value, the abnormal region area and the heat conduction direction consistency index into the pre-trained intensity classification model, and output a discrete leakage intensity level.
[0103] The pre-trained intensity classification model uses the gradient boosting decision tree algorithm. The model uses the intensity labels of historical leakage points and the corresponding multi-dimensional feature vectors as training data during the training process.
[0104] When the leakage intensity baseline value, maximum temperature gradient value, abnormal area and heat conduction direction consistency index are input into the pre-trained intensity classification model, the intensity classification model constructs and predicts the decision tree based on these input features. The decision tree will make branch judgments based on the values of different features and finally output a discrete leakage intensity level. For example, the leakage intensity level can be divided into three levels: mild leakage, moderate leakage and severe leakage. The intensity classification model determines which level the leakage point belongs to based on the input features and outputs the corresponding level identifier.
[0105] At this point, all steps of the external wall leakage point positioning detection method based on infrared thermal imaging have been completed, and the leakage point positioning coordinate set and the corresponding leakage intensity level identification have been output.
[0106] In a possible implementation, the method further includes: Step S210: The training process of the pre-trained thermal anomaly detection model includes the following steps: Step S211: obtaining a sample leakage point annotation data set, wherein the sample leakage point annotation data set includes infrared thermal imaging samples of multiple building exterior walls and their corresponding real leakage point coordinates and leakage intensity labels.
[0107] In order to train the thermal anomaly detection model, a large amount of sample data needs to be collected. By collecting infrared thermal imaging data of multiple different building exterior walls, infrared thermal imaging samples of multiple building exterior walls are obtained. At the same time, manual detection or other reliable detection methods are used to determine the coordinates and leakage intensity level of the real leakage point in each infrared thermal imaging sample, and this information is used as a label on the corresponding infrared thermal imaging sample.
[0108] For example, we collected 1,000 infrared thermal imaging samples of different building exterior walls. For each sample, we determined the coordinates of the real leakage points, such as (x1, y1), (x2, y2), ..., through professional testing. We also annotated each leakage point with a leakage intensity level, such as mild leakage, moderate leakage, or severe leakage, according to the severity of the leakage. We organized these infrared thermal imaging samples and their corresponding real leakage point coordinates and leakage intensity labels into a sample leakage point annotation dataset.
[0109] Step S212: performing the dynamic temperature correction process and the extraction process of the thermal characteristic parameter set on each of the infrared thermal imaging samples to obtain a sample thermal characteristic parameter set.
[0110] In this embodiment, each infrared thermal imaging sample in the sample leakage point annotation data set is processed according to the method described in the previous steps S120 to S134. First, dynamic temperature correction processing is performed to obtain the historical meteorological data corresponding to the sample collection, and a temperature compensation function is constructed. The surface temperature measurement value in the infrared thermal imaging sample is input into the temperature compensation function to obtain the compensated surface temperature value, and then the compensated surface temperature value is spatially interpolated to generate a standardized temperature distribution set.
[0111] Then, the thermal feature parameter set is extracted and processed. The spatial gradient of the standardized temperature distribution set is calculated to generate a transverse temperature gradient distribution map and a longitudinal temperature gradient distribution map, and the two are vector-superimposed to obtain the temperature gradient vector field feature. The connected areas in the standardized temperature distribution set where the continuous temperature difference exceeds the preset threshold (such as 2 degrees Celsius) are detected, and the geometric center coordinates, regional area, boundary curvature and internal temperature extreme point distribution of each connected area are extracted to generate the abnormal temperature difference area morphological feature set. The temperature change direction of each pixel point and its adjacent pixel points in the standardized temperature distribution set is analyzed, and the temperature conduction rate in each direction is counted to generate the heat conduction directional probability distribution feature. Finally, the temperature gradient vector field feature, the abnormal temperature difference area morphological feature set and the heat conduction directional probability distribution feature are aligned and fused according to the spatial coordinates to obtain the sample thermal feature parameter set.
[0112] For example, for a specific infrared thermal imaging sample, the corresponding historical meteorological data shows that the real-time ambient temperature is 18 degrees Celsius, the real-time humidity is 62%, and the real-time wind speed is 1.6 meters per second. The reference ambient temperature is set to 20 degrees Celsius, the reference humidity is 60%, and the reference wind speed is 2 meters per second. The linear compensation coefficient k1 is 0.9, the humidity-temperature conversion coefficient k2 is 0.03, the wind speed-temperature conversion coefficient k3 is 0.15, the unit conversion factor of humidity effect conversion is 0.1, and the unit conversion factor of wind speed effect conversion is 1.
[0113] For a certain pixel in the sample, the original surface temperature measurement is 16 degrees Celsius, which is substituted into the temperature compensation function to calculate: Linear compensation term = 0.9 × (18-20) = -1.8 degrees Celsius; Temperature compensation term for humidity effect conversion = 0.03 × (62-60)² × 0.1 = 0.012 degrees Celsius; The temperature compensation term for the conversion of wind speed effect = 0.15 × (1.6-2) × 1 = -0.06 degrees Celsius; The compensated surface temperature value = 16 + (-1.8) + 0.012 + (-0.06) = 14.152 degrees Celsius.
[0114] Such calculation and subsequent spatial interpolation processing and thermal feature extraction processing are performed on all pixels in the sample, and finally the sample thermal feature parameter set of the sample is obtained. The same operation is performed on all infrared thermal imaging samples in the sample leakage point annotation data set to obtain a complete sample thermal feature parameter set.
[0115] Step S213: construct an initial thermal anomaly detection model, wherein the initial thermal anomaly detection model includes three parallel convolution branches, a cross-channel attention fusion module and a deconvolution layer.
[0116] The construction of the initial thermal anomaly detection model requires the rational design of each module to achieve effective processing and analysis of the thermal characteristic parameters of the samples.
[0117] First, there are three parallel convolution branches. The first convolution branch is used to process the temperature gradient vector field features. It consists of multiple convolution layers, pooling layers, and activation function layers. Parameters such as the convolution kernel size, number, and step size of the convolution layer need to be carefully selected. For example, the first convolution layer can use a 3×3 convolution kernel, 16 in number, and a step size of 1. The weight parameters of the convolution kernel are randomly assigned when the model is initialized and subsequently adjusted through training. The pooling layer can use maximum pooling with a pooling window size of 2×2 and a step size of 2 to reduce the data dimension. The activation function uses the ReLU function to enhance the nonlinear expression ability of the model.
[0118] The second convolution branch is used to process the morphological feature set of the abnormal temperature difference area. Its structure is similar to that of the first convolution branch, but the parameters of the convolution kernel and the number of convolution layers can be adjusted according to the characteristics of the feature. For example, the first convolution layer can use a 5×5 convolution kernel, the number is 24, and the step size is 1.
[0119] The third convolution branch is used to process the probability distribution characteristics of heat conduction directionality, and is also composed of a convolution layer, a pooling layer, and an activation function layer. The parameters such as the size, number, and step length of its convolution kernel also need to be designed according to the characteristics of this feature. For example, the first convolution layer uses a 4×4 convolution kernel, 20 in number, and a step length of 1.
[0120] The cross-channel attention fusion module is located after the three convolution branches. Its function is to fuse the high-order abstract features, multi-scale geometric features, and temporal evolution features output by the three convolution branches. The module first concatenates the three features in the channel dimension, and then compresses the feature tensor in the spatial dimension through a global average pooling operation to obtain the global feature information of each channel. The global feature information is then input into a fully connected layer, and the attention weight of each channel is obtained through a Sigmoid activation function. Finally, the original feature tensor is multiplied by the attention weight channel by channel to achieve adaptive weighted fusion of features.
[0121] The deconvolution layer is located after the cross-channel attention fusion module. Its function is to restore the resolution of the fused feature tensor to the resolution of the original infrared thermal imaging data. The parameters of the deconvolution layer, such as the deconvolution kernel size, number, and step size, need to be designed according to the resolution of the original infrared thermal imaging data and the size of the fused feature tensor. For example, the deconvolution kernel size can be 4×4, the number is the same as the number of channels of the fused feature tensor, and the step size is 2. Through the operation of multiple deconvolution layers, the size of the feature map is gradually expanded, and finally an output consistent with the resolution of the original infrared thermal imaging data is obtained.
[0122] Step S214: input the sample thermal feature parameter set into the initial thermal anomaly detection model, output a predicted leakage probability distribution map, and calculate a focal loss function between the predicted leakage probability distribution map and the actual leakage point coordinates.
[0123] When the sample thermal feature parameter set is input into the initial thermal anomaly detection model, the temperature gradient vector field feature enters the first convolution branch and undergoes the convolution operation of the convolution layer to extract local features. For example, the 16 3×3 convolution kernels of the first convolution layer slide on the temperature gradient vector field feature, multiply the input features by elements and sum them to obtain 16 convolution result feature maps. These feature maps are then downsampled by the pooling layer and nonlinearly transformed by the activation function layer to obtain a more advanced feature representation.
[0124] The morphological feature set of the abnormal temperature difference area enters the second convolution branch, and is also subjected to convolution, pooling, activation and other operations to extract the multi-scale geometric features of the regional morphology. The heat conduction directional probability distribution feature enters the third convolution branch to extract the temporal evolution characteristics of the heat conduction path.
[0125] The features output by the three convolution branches are fused in the cross-channel attention fusion module to obtain a fused feature tensor. The fused feature tensor is then upsampled by the deconvolution layer to output a predicted leakage probability distribution map. Each pixel in the predicted leakage probability distribution map has a corresponding leakage risk probability value.
[0126] Next, calculate the focal loss function between the predicted leakage probability distribution map and the actual leakage point coordinates. The specific steps are as follows: Step S2141: performing Gaussian kernel diffusion processing on the coordinates of the real leakage point to generate a continuous leakage probability density map.
[0127] The purpose of Gaussian kernel diffusion processing is to transform the coordinates of the actual leakage point from discrete point information to a continuous probability density map. First, it is necessary to determine the parameters of the Gaussian kernel, such as the standard deviation of the Gaussian kernel. Assume that the standard deviation is 5 pixel units.
[0128] For each real leakage point coordinate, the probability value of the surrounding pixel points is calculated based on the Gaussian function formula with the coordinate as the center. The form of the Gaussian function is: on a two-dimensional plane, for a point centered at (x0, y0), the probability value of the surrounding points (x, y) is proportional to exp(-((x-x0)²+(y-y0)²) / (2×standard deviation²)). By performing such processing on all real leakage point coordinates, the probability values around each real leakage point are accumulated to obtain a continuous leakage probability density map.
[0129] For example, there is a real leakage point with coordinates (100, 200). For the pixel with coordinates (101, 201), the square of its distance from (100, 200) is (101-100)²+(201-200)²=2, and the probability value of the pixel is calculated by substituting it into the Gaussian function. This calculation and accumulation is performed for all real leakage points and surrounding pixels, and finally a continuous leakage probability density map is generated.
[0130] Step S2142: Calculate the pixel-by-pixel cross entropy loss between the predicted leakage probability distribution map and the continuous leakage probability density map.
[0131] The pixel-wise cross entropy loss is used to measure the difference between the predicted leakage probability distribution map and the continuous leakage probability density map. For each corresponding pixel in the predicted leakage probability distribution map and the continuous leakage probability density map, the cross entropy loss is calculated.
[0132] Assuming that the predicted probability value of pixel (i, j) in the predicted leakage probability distribution map is pij, and the true probability value of the corresponding pixel (i, j) in the continuous leakage probability density map is qij, the calculation formula of the cross entropy loss is -qij×log(pij)-(1-qij)×log(1-pij). This calculation is performed on all pixels in the predicted leakage probability distribution map and the continuous leakage probability density map, and then the cross entropy losses of all pixels are added together to obtain the sum of the pixel-by-pixel cross entropy losses.
[0133] For example, for the pixel (10, 20), the predicted probability value p10,20 is 0.6, the true probability value q10,20 is 0.8, and the cross entropy loss of this pixel is -0.8×log(0.6)-(1-0.8)×log(1-0.6). Similar calculations are performed for all pixels and summed.
[0134] Step S2143: dynamically adjusting the loss weight according to the degree of difference between the probability value in the predicted leakage probability distribution map and the true probability value in the continuous leakage probability density map, wherein a higher weight is given to difficult-to-classify samples.
[0135] In this embodiment, difficult-to-classify samples refer to samples whose predicted probability value is significantly different from the actual probability value (e.g., greater than a set difference value). In order to make the model pay more attention to these difficult-to-classify samples, the loss weight needs to be adjusted dynamically.
[0136] First, the difference between the predicted probability value and the true probability value of each pixel is calculated, for example, it can be expressed by the absolute value of the difference between the two. Then, the loss weight is determined according to the difference. A function can be designed to implement this dynamic adjustment. For example, when the difference is less than a certain threshold, the loss weight is 1; when the difference is greater than the threshold, the loss weight increases as the difference increases.
[0137] Assume that the degree of difference is represented by |pij-qij| and the threshold is 0.2. For pixel (i, j), if |pij-qij|<0.2, the loss weight wij is 1; if |pij-qij|≥0.2, the loss weight wij=1+k×(|pij-qij|-0.2), where k is a constant, such as k=2.
[0138] Step S2144: introducing a regularization term to constrain the low probability response intensity of the non-leakage area in the predicted leakage probability distribution map.
[0139] In this embodiment, the low probability response intensity of the non-leakage area must meet preset conditions, that is, the leakage risk probability value of each pixel point or area in the non-leakage area is lower than the preset low probability threshold, and the low probability value is consistent in spatial distribution.
[0140] The introduction of the regularization term is to prevent the model from overfitting and constrain the low-probability response intensity of the non-leakage area. The L2 regularization term can be used, which is calculated by multiplying the square sum of all trainable parameters in the thermal anomaly detection model by a regularization coefficient λ.
[0141] Assume that the trainable parameters in the model are w1, w2, …, wn, and the L2 regularization term is λ×(w1²+w2²+…+wn²). The regularization coefficient λ needs to be adjusted according to the actual situation, for example, λ can be 0.001.
[0142] Step S2145: weighted sum of the pixel-by-pixel cross entropy loss, the dynamically adjusted loss weight, and the regularization term to obtain a final focal loss function.
[0143] Multiply the pixel-by-pixel cross entropy loss by the dynamically adjusted loss weight and add the regularization term to get the final focal loss function. That is, focal loss function = pixel-by-pixel cross entropy loss × dynamically adjusted loss weight + regularization term.
[0144] For example, the sum of the pixel-by-pixel cross entropy losses is 100, the dynamically adjusted loss weight is 1.2 after calculation and accumulation for each pixel, and the regularization term is 0.5, then the value of the focal loss function is 100×1.2+0.5=120.5.
[0145] Step S215: Iteratively optimize the focus loss function through a back propagation algorithm until the model converges to obtain the pre-trained thermal anomaly detection model.
[0146] The back-propagation algorithm calculates the gradient of the focal loss function for each trainable parameter in the model, and then updates the parameters according to the gradient to reduce the value of the focal loss function.
[0147] First, based on the focal loss function, the chain rule is used to calculate the gradient of the focal loss function with respect to the trainable parameters such as the convolution kernel weights of each convolution layer in the model and the weights of the fully connected layer. For example, for the convolution kernel weights of the convolution layer, the partial derivative of the focal loss function with respect to each of its elements is calculated.
[0148] Then, based on the calculated gradient, an optimization algorithm (such as the stochastic gradient descent algorithm) is used to update the trainable parameters. The update formula of the stochastic gradient descent algorithm is: new parameter value = old parameter value - learning rate × gradient. The learning rate is a hyperparameter that needs to be adjusted. For example, the learning rate can be initialized to 0.001.
[0149] In each iteration, the sample thermal feature parameter set is input into the model, the focal loss function is calculated, the gradient is calculated by back propagation, and then the parameters are updated. As the number of iterations increases, the value of the focal loss function will gradually decrease. When the value of the focal loss function changes by less than a certain threshold (such as 0.001) in multiple consecutive iterations, the model is considered to have converged. At this point, the obtained model is the pre-trained thermal anomaly detection model.
[0150] Step S310: The online optimization process of the thermal anomaly detection model includes the following steps: Step S3101: receiving user feedback information on the leakage point location coordinate set, wherein the feedback information includes a false alarm position mark and a missed alarm position mark.
[0151] In actual applications, the leakage point location coordinate set output by the thermal anomaly detection model may contain false positives and false negatives. Users can provide feedback on the leakage point location coordinate set based on the actual inspection results.
[0152] For example, after conducting an on-site inspection of the building's exterior wall, the user finds that a location marked as a leak point by the model does not actually leak. In this case, the user can mark the location as a false alarm location. Conversely, if the thermal anomaly detection model does not mark a location where an actual leak exists, the user can mark the location as a false alarm location and submit these false alarm location marks and false alarm location marks as feedback information.
[0153] Step S3102: extracting a set of thermal feature parameters corresponding to the false alarm position mark as a negative sample, and extracting a set of thermal feature parameters corresponding to the false alarm position mark as a positive sample.
[0154] For the area corresponding to the false alarm position mark, the infrared thermal imaging data corresponding to the area is subjected to dynamic temperature correction processing and thermal feature parameter set extraction processing according to the method of the previous steps S120 to S134. The obtained thermal feature parameter set is used as a negative sample because these areas are actually not leaked.
[0155] For example, the infrared thermal imaging data of the area corresponding to the false alarm position mark has a real-time ambient temperature of 22 degrees Celsius, a real-time humidity of 55%, and a real-time wind speed of 2.2 meters per second when collected. After dynamic temperature correction processing and thermal feature extraction processing, the temperature gradient vector field characteristics, abnormal temperature difference area morphological feature set and heat conduction directional probability distribution characteristics of the area are obtained. These features are aligned and fused according to spatial coordinates to obtain the thermal feature parameter set of negative samples.
[0156] For the areas corresponding to the missed position marks, dynamic temperature correction processing and thermal feature parameter set extraction processing are also performed, and the obtained thermal feature parameter sets are used as positive samples because these areas actually have leakage.
[0157] Step S3103: adding the newly added positive samples and negative samples to the sample leakage point annotation data set to trigger the derivative training process of the pre-trained thermal anomaly detection model.
[0158] The newly added positive and negative samples are added to the original sample leakage point annotation dataset to expand the dataset. Then the derivative training process of the pre-trained thermal anomaly detection model is triggered to further optimize the performance of the model.
[0159] The derivative training process is similar to the initial training process, but differs in some aspects. The specific steps are as follows: Step S3103-1: rotating, translating and scaling the newly added positive samples and negative samples to generate an enhanced sample set.
[0160] In order to increase the diversity of samples, data augmentation operations are performed on newly added positive and negative samples. The rotation operation can rotate the sample around a certain center point by a certain angle, such as 90 degrees, 180 degrees, or 270 degrees. The translation operation can move the sample a certain distance in the horizontal and vertical directions. The scale transformation operation can enlarge or reduce the sample.
[0161] For example, for a set of thermal feature parameters of a positive sample, rotate it 90 degrees around the center point to obtain a new sample; translate it 5 pixels to the right horizontally to obtain another new sample; enlarge it by 1.2 times to obtain another new sample. Such rotation, translation and scale transformation operations are performed on all newly added positive and negative samples to generate an enhanced sample set.
[0162] Step S3103-2: extracting the standardized temperature distribution set and thermal feature parameter set of the original samples in the enhanced sample set and the sample leakage point annotation data set to generate a multi-dimensional feature vector set.
[0163] The original samples in the enhanced sample set and the sample leakage point annotation data set are subjected to dynamic temperature correction according to the previous method to obtain a standardized temperature distribution set. Then, a set of thermal feature parameters is extracted from the standardized temperature distribution set, including temperature gradient vector field features, abnormal temperature difference area morphological feature set, and heat conduction directional probability distribution features.
[0164] These thermal feature parameter sets are further processed, such as concatenating or reducing their dimensions, to generate a multidimensional feature vector set. Each vector in the multidimensional feature vector set contains rich feature information of the sample for subsequent model training.
[0165] Step S3103-3: Calculate the Euclidean distance between the multidimensional feature vector of the enhanced sample set and the multidimensional feature vector of the original sample to generate a difference distribution matrix.
[0166] Euclidean distance is a common method to measure the distance between two vectors. For each multidimensional feature vector in the enhanced sample set and each multidimensional feature vector in the original sample, the Euclidean distance between them is calculated.
[0167] Assume that there are m multidimensional feature vectors in the enhanced sample set and n multidimensional feature vectors in the original sample. For the i-th multidimensional feature vector in the enhanced sample set and the j-th multidimensional feature vector in the original sample, the Euclidean distance is calculated by adding the squares of the differences between the corresponding elements of the two vectors and then taking the square root.
[0168] For example, the i-th multidimensional feature vector in the enhanced sample set is (a1, a2, ..., ak), and the j-th multidimensional feature vector in the original sample is (b1, b2, ..., bk), and the Euclidean distance between them is √((a1-b1)²+(a2-b2)²+...+(ak-bk)²). After calculating the Euclidean distance between the multidimensional feature vectors of all enhanced sample sets and the multidimensional feature vectors of the original samples, a matrix with m rows and n columns is formed, which is the difference distribution matrix. Each element in the matrix represents the degree of difference between the corresponding enhanced sample and the original sample.
[0169] Step S3103-4: determining a filtering threshold according to the cumulative distribution function of the difference distribution matrix, removing samples in the enhanced sample set whose difference exceeds the filtering threshold, and generating a filtered enhanced sample set.
[0170] First, the cumulative distribution function of the difference distribution matrix is calculated. The cumulative distribution function describes the proportion of samples with a difference less than or equal to a certain value to the total samples.
[0171] Sort all elements in the difference distribution matrix, add up the number of samples corresponding to each element from small to large, and get the cumulative number. Then divide the cumulative number by the total number of samples to get the cumulative distribution function value.
[0172] For example, there are 100 elements in the difference distribution matrix. After sorting, the first element corresponds to a sample size of 1, a cumulative size of 1, and a cumulative distribution function value of 1 / 100=0.01; the second element corresponds to a sample size of 1, a cumulative size of 2, and a cumulative distribution function value of 2 / 100=0.02, and so on.
[0173] The filtering threshold is determined according to the cumulative distribution function. A suitable cumulative distribution function value, such as 0.9, can be selected, and the corresponding difference value is the filtering threshold. For each sample in the enhanced sample set, if the difference between it and the original sample exceeds the filtering threshold, the sample is removed from the enhanced sample set, and finally the filtered enhanced sample set is obtained.
[0174] Step S3103-5: Count the gradient update amplitude of each model parameter based on the number of model training iterations of the filtered enhanced sample set to generate a parameter importance weight matrix.
[0175] In the process of model training using the filtered enhanced sample set, the gradient update amplitude of each model parameter in each iteration is recorded. The model parameters include the convolution kernel weights of the convolution layer, the weights of the fully connected layer, etc.
[0176] For each model parameter, the sum of its gradient update amplitudes in all training iterations is counted. For example, in 100 iterations, the gradient update amplitudes of a convolution kernel weight are g1, g2, ..., g100, and these gradient update amplitudes are added together to get the sum of the gradient update amplitudes of the convolution kernel weight.
[0177] The importance weight of each model parameter is determined based on the sum of the gradient update amplitudes. The sum of the gradient update amplitudes can be normalized so that its value range is between 0 and 1 to obtain the parameter importance weight. The importance weights of all model parameters are arranged according to their positions in the model to form a parameter importance weight matrix.
[0178] Step S3103-6: During the back-propagation optimization process, the gradients of the cross-channel attention fusion module and the deconvolution layer parameters are weighted attenuated according to the parameter importance weight matrix.
[0179] During the back-propagation optimization process, after the gradients of the cross-channel attention fusion module and the deconvolution layer parameters are calculated, these gradients are weighted and attenuated according to the parameter importance weight matrix.
[0180] For each parameter in the cross-channel attention fusion module and the deconvolution layer, its gradient is multiplied by the corresponding parameter importance weight. For example, if the gradient of a parameter is g and its corresponding parameter importance weight is w, then the weighted attenuated gradient is g×w.
[0181] The purpose of this is to make the model pay more attention to those parameters with large gradient updates during training and greater impact on model performance, while suppressing the updates of less important parameters with small gradient updates, thereby improving the training efficiency and performance of the model.
[0182] Step S3103-7: updating the weighted attenuated parameter gradient to the pre-trained thermal anomaly detection model to generate an optimized thermal anomaly detection model.
[0183] Use an optimization algorithm (such as the stochastic gradient descent algorithm) to apply the weighted attenuated parameter gradients to the pre-trained thermal anomaly detection model to update the model parameters.
[0184] For example, for a certain parameter, its old parameter value is p, the gradient after weighted attenuation is g×w, and the learning rate is η, then the new parameter value is p-η×(g×w). This update operation is performed on all parameters in the cross-channel attention fusion module and the deconvolution layer to obtain the optimized thermal anomaly detection model.
[0185] Step S3103-8: Verify the leakage point location accuracy of the optimized thermal anomaly detection model on the sample leakage point annotation data set. If the leakage point location accuracy is lower than a preset threshold, readjust the filtering threshold and repeat the derivative training.
[0186] The optimized thermal anomaly detection model is verified using the sample leakage point annotation dataset. The infrared thermal imaging samples in the sample leakage point annotation dataset are input into the optimized thermal anomaly detection model to obtain the predicted leakage point location coordinate set.
[0187] The predicted leakage point location coordinates are compared with the actual leakage point coordinates in the sample leakage point annotation data set to calculate the leakage point location accuracy. The leakage point location accuracy is calculated by dividing the number of correctly predicted leakage points by the total number of actual leakage points.
[0188] For example, there are 100 real leakage points in the sample leakage point annotation data set, and the optimized thermal anomaly detection model predicts that the number of correct leakage points is 80, so the leakage point positioning accuracy is 80 / 100=0.8.
[0189] The preset threshold is set according to actual needs and model performance requirements, for example, the preset threshold is 0.85. If the verified leakage point location accuracy is lower than the preset threshold, the filter threshold is readjusted. The filter threshold can be increased or decreased, and then the derivative training steps are repeated, including data enhancement for the newly added samples, feature extraction, difference calculation, sample filtering, parameter update, etc., until the leakage point location accuracy reaches or exceeds the preset threshold.
[0190] Step S3104: deploying the optimized pre-trained thermal anomaly detection model to the online detection system to achieve continuous improvement of model performance.
[0191] When the leakage point positioning accuracy of the optimized thermal anomaly detection model on the sample leakage point annotation data set reaches or exceeds the preset threshold, the model is deployed in the online detection system.
[0192] The online detection system can receive new infrared thermal imaging data of building exterior walls in real time, process these data using the optimized thermal anomaly detection model, and output a set of leakage point location coordinates and the corresponding leakage intensity level identification.
[0193] As the online detection system continuously receives new data, users can continue to provide feedback on the detection results, repeat the online optimization process of the thermal anomaly detection model, continuously add new positive and negative samples, perform derivative training, further optimize the performance of the model, and achieve continuous improvement of the model performance, thereby more accurately locating the leakage points of the building exterior walls and determining their leakage intensity levels.
[0194] Figure 2 A schematic diagram of exemplary hardware and software components of an external wall leakage point location detection system 100 based on infrared thermal imaging that can implement the concept of the present invention is shown in some embodiments of the present invention. For example, the processor 120 can be used in the external wall leakage point location detection system 100 based on infrared thermal imaging and used to perform the functions of the present invention.
[0195] The external wall leakage point location detection system 100 based on infrared thermal imaging can be a general server or a special-purpose server, both of which can be used to implement the external wall leakage point location detection method based on infrared thermal imaging of the present invention. Although the present invention only shows one server, for convenience, the functions described in the present invention can be implemented in a distributed manner on multiple similar platforms to balance the processing load.
[0196] For example, the external wall leakage point location detection system 100 based on infrared thermal imaging can include a network port 110 connected to a network, one or more processors 120 for executing program instructions, a communication bus 130, and storage media 140 in different forms, such as a disk, ROM, or RAM, or any combination thereof. Exemplarily, the external wall leakage point location detection system 100 based on infrared thermal imaging can also include program instructions stored in ROM, RAM, or other types of non-temporary storage media, or any combination thereof. The method of the present invention can be implemented according to these program instructions. The external wall leakage point location detection system 100 based on infrared thermal imaging also includes an I / O interface 150 between a computer and other input and output devices.
[0197] For ease of explanation, only one processor is described in the external wall leakage point location detection system 100 based on infrared thermal imaging. However, it should be noted that the external wall leakage point location detection system 100 based on infrared thermal imaging in the present invention may also include multiple processors, so the steps performed by one processor described in the present invention may also be performed jointly or individually by multiple processors. For example, if the processor of the external wall leakage point location detection system 100 based on infrared thermal imaging performs step A and step B, it should be understood that step A and step B may also be performed jointly by two different processors or individually in one processor. For example, the first processor performs step A, the second processor performs step B, or the first processor and the second processor perform steps A and B together.
[0198] In addition, an embodiment of the present invention further provides a readable storage medium, in which computer executable instructions are preset. When a processor executes the computer executable instructions, the above-mentioned external wall leakage point positioning and detection method based on infrared thermal imaging is implemented.
[0199] It should be noted that in order to simplify the description of the present invention and thus help understand one or more embodiments of the invention, in the foregoing description of the embodiments of the present invention, various features are sometimes combined into one embodiment, drawing or description thereof.
Claims
1. A method for locating and detecting external wall leakage points based on infrared thermal imaging, characterized in that: The method comprises: Collecting a multi-period infrared thermal imaging data set of the target building exterior wall surface, wherein the multi-period infrared thermal imaging data set includes a surface temperature distribution matrix under different ambient temperature conditions; Performing dynamic temperature correction processing on the multi-period infrared thermal imaging data set to generate a standardized temperature distribution set, wherein the standardized temperature distribution set eliminates the influence of ambient temperature fluctuations on surface temperature measurements; Extracting a thermal characteristic parameter set from the standardized temperature distribution set, the thermal characteristic parameter set including temperature gradient distribution characteristics, abnormal temperature difference area morphological characteristics and heat conduction directionality characteristics; Calling a pre-trained thermal anomaly detection model to perform leakage risk probability mapping processing on the thermal feature parameter set to generate a leakage point probability distribution map on the surface of the exterior wall of the target building; Based on the leakage point probability distribution map and a preset dynamic judgment threshold, a region segmentation process is performed to output a leakage point location coordinate set and a corresponding leakage intensity level identifier.
2. The method for locating and detecting external wall leakage points based on infrared thermal imaging according to claim 1 is characterized in that: The step of performing dynamic temperature correction processing on the multi-period infrared thermal imaging data set to generate a standardized temperature distribution set includes: Acquire a historical meteorological data set of the area where the target building exterior wall is located, wherein the historical meteorological data set includes real-time ambient temperature, real-time humidity and real-time wind speed parameters corresponding to when the infrared thermal imaging data of the multiple time periods are collected; Constructing a temperature compensation function, wherein the temperature compensation function includes a linear compensation term based on a difference between the real-time ambient temperature and a reference ambient temperature, a nonlinear compensation term based on a difference between the real-time humidity and a reference humidity, and an attenuation compensation term based on a difference between the real-time wind speed and a reference wind speed; Inputting each surface temperature measurement value in the multi-period infrared thermal imaging data set into the temperature compensation function to obtain a compensated surface temperature value; Performing spatial interpolation processing on all compensated surface temperature values to generate a standardized temperature distribution set consistent with the resolution of the multi-period infrared thermal imaging data set; The temperature value of each pixel point in the standardized temperature distribution set represents the real temperature of the exterior wall surface after eliminating environmental interference.
3. The method for locating and detecting external wall leakage points based on infrared thermal imaging according to claim 1 is characterized in that: The step of extracting a set of thermal characteristic parameters from the standardized temperature distribution set comprises: Performing spatial gradient calculation on the standardized temperature distribution set to generate a transverse temperature gradient distribution map and a longitudinal temperature gradient distribution map, and performing vector superposition on the transverse temperature gradient distribution map and the longitudinal temperature gradient distribution map to obtain a temperature gradient vector field feature; Detecting connected areas in the standardized temperature distribution set where the continuous temperature difference exceeds a preset threshold, extracting the geometric center coordinates, area, boundary curvature and internal temperature extreme point distribution of each connected area, and generating a morphological feature set of abnormal temperature difference areas; Analyze the temperature change direction of each pixel point and its adjacent pixel points in the standardized temperature distribution set, count the temperature conduction rates in each direction, and generate a heat conduction directional probability distribution feature; The temperature gradient vector field characteristics, the abnormal temperature difference area morphological feature set and the heat conduction directional probability distribution characteristics are aligned according to spatial coordinates and then fused to obtain the thermal feature parameter set.
4. The method for locating and detecting external wall leakage points based on infrared thermal imaging according to claim 3 is characterized in that: The calling of the pre-trained thermal anomaly detection model to perform leakage risk probability mapping processing on the thermal feature parameter set to generate a leakage point probability distribution map on the surface of the exterior wall of the target building includes: Inputting the temperature gradient vector field feature into the first convolution branch of the pre-trained thermal anomaly detection model to extract high-order abstract features of the temperature gradient spatial distribution; Inputting the abnormal temperature difference area morphological feature set into the second convolution branch of the pre-trained thermal anomaly detection model to extract multi-scale geometric features of the regional morphology; Inputting the heat conduction directional probability distribution feature into the third convolution branch of the pre-trained thermal anomaly detection model to extract the temporal evolution feature of the heat conduction path; Performing cross-channel attention fusion on the high-order abstract features, the multi-scale geometric features, and the temporal evolution features to generate a fused feature tensor; The fused feature tensor is mapped to the original infrared thermal imaging data resolution through a deconvolution layer, and the leakage risk probability value of each pixel point is output to generate the leakage point probability distribution map.
5. The method for locating and detecting external wall leakage points based on infrared thermal imaging according to claim 1 is characterized in that: The training process of the pre-trained thermal anomaly detection model includes: Acquire a sample leakage point annotation data set, wherein the sample leakage point annotation data set includes infrared thermal imaging samples of multiple building exterior walls and their corresponding real leakage point coordinates and leakage intensity labels; Performing the dynamic temperature correction process and the extraction process of the thermal characteristic parameter set on each of the infrared thermal imaging samples to obtain a sample thermal characteristic parameter set; Constructing an initial thermal anomaly detection model, wherein the initial thermal anomaly detection model includes three parallel convolution branches, a cross-channel attention fusion module, and a deconvolution layer; Inputting the sample thermal characteristic parameter set into the initial thermal anomaly detection model, outputting a predicted leakage probability distribution map, and calculating a focal loss function between the predicted leakage probability distribution map and the actual leakage point coordinates; The focus loss function is iteratively optimized through a back-propagation algorithm until the model converges to obtain the pre-trained thermal anomaly detection model.
6. The method for locating and detecting external wall leakage points based on infrared thermal imaging according to claim 5 is characterized in that: The calculating of the focal loss function between the predicted leakage probability distribution map and the actual leakage point coordinates includes: Performing Gaussian kernel diffusion processing on the coordinates of the real leakage point to generate a continuous leakage probability density map; Calculating a pixel-by-pixel cross entropy loss between the predicted leakage probability distribution map and the continuous leakage probability density map; Dynamically adjust the loss weight according to the difference between the probability value in the predicted leakage probability distribution map and the true probability value in the continuous leakage probability density map, wherein a higher weight is given to difficult-to-classify samples; Introducing a regularization term to constrain the low probability response intensity of the non-leakage area in the predicted leakage probability distribution map; The pixel-by-pixel cross entropy loss, the dynamically adjusted loss weight, and the regularization term are weighted and summed to obtain the final focal loss function.
7. The method for locating and detecting external wall leakage points based on infrared thermal imaging according to claim 1 is characterized in that: The region segmentation process is performed based on the leakage point probability distribution map and a preset dynamic determination threshold, and the leakage point location coordinate set and the corresponding leakage intensity level identifier are output, including: Retrieving a basic determination threshold from a threshold configuration library according to the material type and environmental exposure level of the exterior wall of the target building; Analyze the global statistical characteristics of the leakage point probability distribution map, and calculate the mean and variance of the probability values; Dynamically offset and adjust the basic decision threshold based on the mean and variance to generate a dynamic decision threshold adapted to current infrared thermal imaging data; Performing threshold segmentation on the leakage point probability distribution map to extract connected areas whose probability values exceed the dynamic determination threshold; Morphological optimization processing is performed on each of the connected areas to remove isolated pixel points caused by noise, and the leakage point positioning coordinate set and the corresponding leakage intensity level identifier are output.
8. The method for locating and detecting external wall leakage points based on infrared thermal imaging according to claim 7 is characterized in that: The generation process of the leakage intensity level mark includes: Calculate the average probability value of the area corresponding to each leakage point location coordinate as the leakage intensity reference value; Counting the maximum temperature gradient value, the area of the abnormal region and the heat conduction direction consistency index of the region in the thermal characteristic parameter set; Input the leakage intensity reference value, the maximum temperature gradient value, the abnormal area and the heat conduction direction consistency index into a pre-trained intensity classification model to output a discrete leakage intensity level; The pre-trained intensity classification model adopts a gradient boosting decision tree algorithm, and its training data includes intensity labels of historical leakage points and corresponding multi-dimensional feature vectors.
9. The method for locating and detecting external wall leakage points based on infrared thermal imaging according to claim 5, characterized in that: The method also includes an online optimization process of the pre-trained thermal anomaly detection model: Receiving feedback information from a user on the leakage point location coordinate set, wherein the feedback information includes a false alarm position mark and a missed alarm position mark; Extracting a set of thermal feature parameters corresponding to the false alarm position mark as a negative sample, and a set of thermal feature parameters corresponding to the false alarm position mark as a positive sample; Adding newly added positive samples and negative samples to the sample leakage point annotation data set to trigger the derivative training process of the pre-trained thermal anomaly detection model; Freeze some convolution layer parameters during the derivative training process, and only optimize the cross-channel attention fusion module and deconvolution layer parameters; Deploy the optimized pre-trained thermal anomaly detection model to the online detection system to achieve continuous improvement of model performance; The specific steps of the derivative training process include: Rotating, translating and scaling the newly added positive samples and negative samples to generate an enhanced sample set; Extracting a standardized temperature distribution set and a thermal characteristic parameter set of the original samples in the enhanced sample set and the sample leakage point annotation data set to generate a multi-dimensional feature vector set; Calculating the Euclidean distance between the multidimensional feature vector of the enhanced sample set and the multidimensional feature vector of the original sample to generate a difference distribution matrix; Determining a filtering threshold according to the cumulative distribution function of the difference distribution matrix, removing samples whose difference exceeds the filtering threshold in the enhanced sample set, and generating a filtered enhanced sample set; Counting the gradient update amplitude of each model parameter based on the number of model training iterations of the filtered enhanced sample set to generate a parameter importance weight matrix; During the back-propagation optimization process, weighted attenuation is performed on the gradients of the cross-channel attention fusion module and the deconvolution layer parameters according to the parameter importance weight matrix; Updating the weighted attenuated parameter gradient to the pre-trained thermal anomaly detection model to generate an optimized thermal anomaly detection model; The leakage point positioning accuracy of the optimized thermal anomaly detection model on the sample leakage point annotation data set is verified. If the leakage point positioning accuracy is lower than a preset threshold, the filtering threshold is readjusted and the derivative training is repeated.
10. An external wall leakage point positioning detection system based on infrared thermal imaging, characterized in that: It includes a processor and a memory, the memory is connected to the processor, the memory is used to store programs, instructions or codes, and the processor is used to execute the programs, instructions or codes in the memory to implement the external wall leakage point positioning detection method based on infrared thermal imaging as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Leakage source detecting device based on infrared thermal imaging processing
CN102636313A
Dam leakage area identification method and device based on unmanned aerial vehicle remote sensing infrared thermal image color distance
CN118115900A
House leakage identification method and system based on hyperspectrum and imaging technology
CN119023173A
Recognition and early warning method for hidden water body in front of construction tunnel
CN119479233A
Infrared thermal image analysis device, infrared thermal image analysis method, and program
WO2022091702A1
Cited By
Roof leakage point intelligent positioning method and system based on machine vision
CN120563498A
A method and system for intelligently locating roof leakage points based on machine vision
CN120563498B
Building roof water leakage detection method and system
CN120892871A
Building facade leakage detection method based on multi-modal image data fusion
CN121030369A
Dam face leakage detection method integrating visual detection and infrared thermal imaging
CN121600161A