A method for detecting a building coating based on infrared polarization imaging
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-18
- Publication Date
- 2026-08-11
AI Technical Summary
[0004]尽管已有研究初步验证了偏振信息在涂层缺陷检测中的有效性,但现有方法在多类型缺陷的结构建模方面仍存在不足,尤其在涂层边界轮廓模糊、表面纹理复杂及多尺度缺陷共存的情形下,模型易受到墙面污染、光照变化与结构阴影干扰因素的影响,导致缺陷识别存在类型误判率高、边界定位不精确等问题,难以满足建筑工程场景中对高分辨率、精准识别与多类缺陷区分的实际需求
本发明通过构建方向稳定性调制模块,基于第一阶段特征图,选取固定方向邻域位置计算差值并生成方向扰动张量;在扰动张量基础上,引入数值变换构建方向稳定度;进一步结合水平方向差值与像素比值结构,叠加边缘扰动因子与方向调制系数进行加权调节,得到方向调控量;最后利用方向调控量对特征图逐点修正,生成方向稳定增强图像;该机制能够抑制光照反射与纹理噪声对边缘建模的干扰,增强缺陷区域的方向一致性和边界清晰性,实现对建筑涂层缺陷的稳定识别与鲁棒检测。
Smart Images

Figure CN121861042B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing, and more particularly to a method for detecting building coatings based on infrared polarization imaging. Background Technology
[0002] With the increasing demands for durability and aesthetics in urban buildings, the detection of defects in building exterior wall coatings is playing an increasingly important role in urban maintenance and project acceptance. Coatings exposed to wind, sun, temperature and humidity changes, and chemical corrosion over long periods are prone to structural defects such as peeling, blistering, flaking, chalking, and cracking, which seriously affect the appearance and structural safety of buildings. Traditional image detection methods mainly rely on visible light imaging, but under different lighting conditions, surface reflectivity, and texture complexity, they often face problems such as blurred edges and loss of details, making it difficult to accurately identify defective areas.
[0003] Infrared polarization imaging technology, as a novel non-destructive testing method, can enhance the contrast between the target and the background in complex backgrounds, effectively suppress diffuse reflection interference, and highlight the internal structural features of materials. It has been widely used in the fields of defect detection and camouflage identification. This technology can effectively reflect the polarization response differences of coating microstructures by extracting infrared image information at different polarization angles. Publication No. CN120431102A discloses a method for detecting defects in building exterior walls using infrared polarization imaging. First, by acquiring infrared polarization image data of building exterior walls, a multi-scale polarization feature map is constructed. A confidence map of the defect area is constructed by combining context-aware information. Then, a geometrically guided difference sub-map is used to locate abnormal areas such as cracks and peeling on the building surface. Publication No. CN119559183A discloses a method for detecting defects on the surface of building materials using infrared polarization imaging. It introduces an adaptive standard deviation and self-attention mechanism to extract infrared polarization features and multimodal information features of building materials. It further uses a convolutional network to achieve local feature enhancement. After fusing the features, a defect area discrimination map is generated. Finally, a small-scale pooling method is used to optimize the image resolution, thereby achieving the identification of defect areas.
[0004] Although existing studies have preliminarily verified the effectiveness of polarization information in coating defect detection, current methods still have shortcomings in structural modeling of multiple types of defects. In particular, when the coating boundary contour is blurred, the surface texture is complex, and multiple scale defects coexist, the model is easily affected by factors such as wall contamination, changes in lighting, and structural shadows, resulting in problems such as high misclassification rate and inaccurate boundary positioning in defect identification. It is difficult to meet the actual needs of high resolution, accurate identification, and differentiation of multiple types of defects in building engineering scenarios. Summary of the Invention
[0005] This invention provides a method for detecting building coatings based on infrared polarization imaging, aiming to achieve accurate identification and localization of defects on building surfaces. The method constructs a defect image of the building coating surface by acquiring infrared images from multiple polarization angles, extracts multi-scale feature information using a backbone network, and introduces a directional stability modulation module and a cross-scale feature fusion module for structural enhancement and scale unification. Subsequently, a query selection module with the lowest uncertainty selects a preset number of features as the initial target query. A gravity-driven decoder module iteratively generates a target vector set, and finally, a category and bounding box prediction module completes the defect classification and bounding box regression, achieving defect detection of the building coating.
[0006] To achieve the above objectives, the present invention provides the following technical solution: a method for detecting building coatings based on infrared polarization imaging, the specific steps of which are as follows: Collect infrared polarization imaging images of defects on building coating surfaces and construct a dataset of building coating defect images; The ResNet backbone network was used to extract multi-scale features from images of defects on building coating surfaces, and the first-stage feature map, the second-stage feature map and the third-stage feature map were obtained sequentially. Based on the first-stage feature map, a directional perturbation tensor is generated and a directional stability is constructed. The directional control amount is calculated by combining the directional modulation coefficient. The first-stage feature map is then weighted and enhanced point by point to obtain a directionally stable enhanced image. Based on the second-stage feature map, the third-stage feature map, and the orientation-stabilized enhancement image, frequency modulation is performed to generate a structural frequency sensing tensor. An amplitude amplification parameter is introduced, and differential scaling is performed to obtain amplitude residual enhancement features. The amplitude residual enhancement features corresponding to the orientation-stabilized enhancement image, the second-stage feature map, and the third-stage feature map are fused to obtain fused features. Based on the fusion features, spectral density and spectral energy change indices are extracted. Sparse density weights and perturbation energy weights are introduced to construct a scoring function. The top K samples are sorted according to the scoring function values to generate an initial query vector. Based on the fusion characteristics, the difference between each feature sequence and the sample feature vector is calculated to construct the perturbation gravity response term; a step size adjustment factor is introduced to scale the perturbation gravity response term, the sample feature vector is iteratively updated, and finally the target vector set is constructed. The target vector set is input into the category and bounding box prediction module to achieve category identification and location estimation of defects in building coatings.
[0007] Preferably, in step S1, the construction of the building coating defect image dataset includes: first, using a polarization industrial camera to acquire images of the building exterior wall at different polarization angles to obtain original polarization images; preprocessing the obtained original polarization images by noise suppression, contrast enhancement, spatial registration, and size normalization to obtain building coating defect images with consistent channels and aligned pixels; manually annotating five typical coating defects in the building coating defect images—cracks, peeling, bulging, flaking, and chalking—and generating corresponding annotation files; and integrating the building coating defect images and annotation files to form a standardized building coating defect image dataset, providing data support for the training and evaluation of defect detection models.
[0008] Preferably, in step S2, during the multi-scale feature extraction process, the ResNet model is used as the backbone network for feature extraction. The input image of building coating defects is used to extract multi-scale feature representations at different semantic levels through the backbone network, forming the third-stage feature map, the second-stage feature map, and the first-stage feature map, which serve as the basis for subsequent modules to perform cross-scale feature fusion.
[0009] Preferably, in step S3, based on the feature map of the first stage, with the current pixel as the center, eight neighborhood reference positions in fixed directions are selected, the absolute difference between the current pixel and each neighborhood reference pixel is calculated respectively, and the differences in all directions are accumulated to generate a direction perturbation tensor. Based on the directional perturbation tensor, a unit translation is introduced for each pixel position to perform a numerical offset operation. An inverse transformation is applied to the offset directional perturbation value to construct directional stability. Based on the first-stage feature map, the pixel difference along the horizontal direction of the target position is extracted. The pixel difference and the pixel value of the target position in the first-stage feature map are used to form a normalized ratio structure. An edge perturbation enhancement factor and the directional basic modulation coefficient are introduced for joint weighting to generate the directional modulation coefficient. By performing reverse mapping on the pixel value of each pixel position in the directional stability, the instability enhancement amplitude of the corresponding pixel position is obtained; a directional modulation coefficient is introduced to adjust the amplitude of the instability enhancement; the adjusted enhancement amplitude is superimposed on a unit base value to obtain the directional control amount. Based on the directional adjustment amount, the pixel value of the first-stage feature map at the target pixel position is adjusted point by point to obtain a directionally stable enhanced image.
[0010] Furthermore, addressing the uneven illumination reflection and texture noise interference caused by infrared polarization imaging in images of architectural coating defects, this invention proposes a directional stability modulation module. First, based on the first-stage feature map, eight fixed-directional neighborhood reference positions are selected centered on each pixel. Differences are calculated and accumulated to generate a directional perturbation tensor. This tensor comprehensively captures local directional change features, thus avoiding incomplete edge representation due to missing single-directional features. Then, based on the directional perturbation tensor, a unit translation is introduced and an inverse transformation is applied to obtain directional stability, which enhances the structural consistency between pixels and improves the stable modeling capability of edge direction. Next, the pixel differences in the horizontal direction are extracted and combined with pixel values to form a normalized ratio structure. This is then combined with the edge perturbation enhancement factor and the directional... The base modulation coefficients generate directional modulation coefficients, which enhance the difference between edge and non-edge regions, highlighting the boundary features of defects such as cracks and spalling. Based on directional stability, inverse mapping is performed on pixel values to obtain an instability enhancement amplitude, which is then adjusted in conjunction with the directional modulation coefficients. The adjusted enhancement amplitude is superimposed on the unit base value to obtain the directional control amount. This directional control amount effectively suppresses the interference of background texture on defect boundaries, ensuring the stable distribution of defect region boundaries. Finally, the first-stage feature map of the target pixel position is adjusted point by point according to the directional control amount to generate a directionally stable enhanced image. This directionally stable enhanced image highlights the directional consistency and boundary clarity of the defect region, improving the robustness and accuracy of overall defect detection.
[0011] Preferably, in step S4, the second-stage feature map, the third-stage feature map, and the orientation stabilization enhancement image are used as inputs to construct frequency modulation functions based on three control parameters: amplitude, projection frequency, and phase offset. The frequency modulation functions are used for modulation to obtain frequency modulation features. Channel compression mapping is performed through convolution operations, and the spatial size is adjusted to the target resolution using a bicubic interpolation algorithm to generate structural frequency sensing tensors. The structural frequency sensing tensor is subjected to global spatial averaging within the channel dimension to obtain the spatial mean of each channel; the element-by-element difference between each position element in the structural frequency sensing tensor and the spatial mean of the corresponding channel is calculated, and an amplitude amplification parameter is introduced for scaling adjustment to obtain the amplitude residual enhancement feature. The amplitude residual enhancement features corresponding to the orientation-stabilized enhanced image, the second-stage feature map, and the third-stage feature map are subjected to element-wise addition, and channel compression mapping is performed using a 1×1 convolution operation to obtain the fused features.
[0012] Furthermore, addressing the issues of incomplete spectral representation and loss of defect boundary details in building coating defect images, this invention proposes a cross-scale feature fusion module. First, using the second-stage feature map, the third-stage feature map, and the orientation-stabilized enhanced image as input, frequency modulation functions based on three control parameters—amplitude, projection frequency, and phase shift—are constructed. These frequency modulation functions are then used for modulation to obtain frequency modulation features, which can simultaneously characterize the multidimensional variations in amplitude, frequency, and phase of the defect region. Next, convolution operations are performed on the frequency modulation features to achieve channel compression, and bicubic interpolation is used to unify the spatial dimensions to the target resolution, generating a structural frequency-sensing tensor. Tensors can highlight local frequency differences while maintaining global scale consistency. Global averaging of the structural frequency sensing tensor along the channel dimension is performed to obtain the baseline value for each channel. The difference between each element in the tensor and its channel baseline value is calculated, and numerical adjustment is performed using an amplitude amplification factor to obtain the amplitude residual enhancement feature. This feature highlights the amplitude difference between the defect region and the background region. Based on this, the amplitude residual enhancement feature is fused and superimposed element-wise with the orientation stabilization enhancement image, the second-stage feature map, and the third-stage feature map. Channel compression mapping is then performed through convolution to obtain the fused feature. This fused feature can enhance defect boundaries and detailed structures under multi-scale collaboration.
[0013] Preferably, in step S5, the fused features are expanded into a one-dimensional sample feature sequence in the spatial dimension, and the channel vector at each spatial location is extracted as a sample feature; a fast Fourier transform is performed on each sample feature to obtain a frequency domain expression, and the amplitude values of each frequency component are squared and summed based on the frequency domain expression to construct a spectral density index. Based on the frequency domain representation, a perturbation vector generated by a normal distribution with zero mean and unit covariance is introduced. The perturbation vector is then superimposed element by element onto the frequency domain representation to generate a perturbed spectral feature vector. The square of the Euclidean distance between the spectral feature vector and the frequency domain representation is calculated to construct a spectral energy change index. The spectral density index is subjected to an inverse transformation and combined with the spectral energy change index. Sparse density weight and perturbation energy weight are introduced for weighted fusion to construct a scoring function for sample screening. The top K samples to be queried are selected according to the numerical values of the scoring function from largest to smallest to construct the initial query vector.
[0014] Furthermore, addressing the issues of unstable sample selection and insufficient utilization of frequency domain features during the initial query construction of building coating defect images, this invention proposes a minimum energy selection module for spectral density perturbation. First, the fused features are spatially expanded into a one-dimensional sample feature sequence, and the channel vector at each spatial location is extracted as a sample feature. A Fast Fourier Transform is performed on these sample features to obtain a frequency domain representation. Based on this frequency domain representation, the amplitudes of each frequency component are squared and summed to construct a spectral density index, which measures the overall energy distribution of the sample in the frequency domain. Then, based on the frequency domain representation, a perturbation vector following a zero-mean, unit-covariance normal distribution is introduced, and these vectors are element-wise superimposed to obtain the perturbed result. The spectral feature vector is calculated, and the squared Euclidean distance between it and the original frequency domain representation is used to construct a spectral energy change index, which can characterize the stability differences of frequency components under perturbation conditions. Next, the spectral density index is subjected to a reciprocal transformation, and combined with the spectral energy change index, sparse density weights and perturbation energy weights are introduced for weighted fusion to construct a scoring function. All samples are sorted according to the value of the scoring function from largest to smallest, and samples with strong discriminative power are retained first. Finally, the top K sorted samples are selected to construct an initial query vector. This vector can effectively reduce the uncertainty in the sample selection process, provide a more stable and high-quality input for the decoder, and thus improve the accuracy and robustness of defect detection.
[0015] Preferably, in step S6, the fused features are flattened along the spatial dimension, and the responses of each channel at all spatial locations are used as feature sequences, which are then concatenated column by column to construct a channel feature set; for any feature sequence, a neighborhood set containing itself and several adjacent sequences is constructed, and the local mean is calculated based on the numerical values of the features at each location in the neighborhood set; the numerical difference between any feature sequence and the corresponding neighborhood local mean is calculated, and a perturbation amplitude adjustment factor is introduced to perform hyperbolic tangent activation mapping to construct a perturbation gravitational mass factor; Traverse the channel feature set, calculate the difference between the feature sequence and the sample feature vector for each channel to obtain the position difference vector; introduce a perturbation gravitational mass factor to weight the position difference vector, and divide the modulation result by the sum of the square norm of the position difference vector and the numerical stability term to construct the weighted modulation term; accumulate the weighted modulation terms corresponding to each channel along the channel dimension to form the perturbation gravitational response term; Using the feature vectors of each sample in the initial query vector as the initial state, the perturbation gravitational response term corresponding to the current sample feature vector and the Euclidean norm of the perturbation gravitational response term are normalized. A step size adjustment factor is introduced to scale the normalization result. Then, the result is added element by element to the current round sample feature vector to obtain the updated feature vector. The feature vector update operation is repeated for each sample feature vector according to the preset number of iterations T. Finally, the feature vector results obtained by each sample feature vector in the final iteration are arranged in order and concatenated to construct the target vector set.
[0016] Furthermore, addressing the issues of insufficient feature optimization and unstable defect boundary responses in the decoding stage of building coating defect images, this invention proposes a gravity-driven decoder module. First, the fused features are flattened along the spatial dimension, and the responses of each channel at all spatial locations are extracted as feature sequences. These sequences are then concatenated column-wise to obtain a channel feature set. For any given feature sequence, a set containing itself and several neighboring sequences is constructed. Based on this neighborhood set, a local mean is calculated to obtain a smoother feature reference. Next, the difference between any feature sequence and its corresponding local mean is calculated. A perturbation amplitude adjustment factor is introduced, and a perturbation gravity mass factor is constructed using hyperbolic tangent mapping. This factor effectively measures the significance of feature bias. Finally, the channel feature set is traversed, and the relationship between the feature sequence and the sample feature vector is calculated for each channel. The difference is calculated, and then the difference vector is weighted and modulated using a perturbation gravity mass factor. The result is divided by the sum of the square norm of the difference and the numerical stability term to obtain the weighted modulation term, which is accumulated along the channel dimension to form a perturbation gravity response term. This response term can reflect the comprehensive gravity effect between multi-channel features. Based on this, the perturbation gravity response term is normalized and scaled by a step size adjustment factor using the initial query vector as input. Then, it is added element-wise with the current round sample feature vector to obtain the updated feature vector, thus ensuring the stability and gradualness of the update process. Finally, the update is repeated according to the preset number of iterations, and the final round results are concatenated into a target vector set. This set can provide a more discriminative and convergent target representation for defect detection, improving the accuracy and robustness of building coating defect identification.
[0017] Preferably, in step S7, the target vector set is input to the category and bounding box prediction module to simultaneously achieve category identification and location estimation of building coating defects. The category prediction module is composed of a multilayer perceptron structure, which includes two fully connected layers combined with the ReLU activation function, and a fully connected layer combined with the Softmax activation function. It can output the probability distribution of the target category, thereby realizing the discrimination of the defect type. The bounding box regression module is also composed of a multilayer perceptron structure, which includes a fully connected layer combined with the ReLU activation function, a fully connected layer combined with the ReLU activation function, and a fully connected layer combined with the Sigmoid function. It can output the normalized target position parameters, including the center coordinates and width and height information, thereby completing the accurate positioning of the defect area. Through the joint modeling of category prediction and bounding box regression, the present invention can achieve accurate identification and stable positioning of building coating defects under a unified framework, effectively improving the detection accuracy.
[0018] The technical effects and advantages provided by the present invention in the above technical solution are as follows: This invention constructs a directional stability modulation module. Based on the first-stage feature map, it selects fixed-directional neighborhood positions to calculate the difference and generate a directional perturbation tensor. On the basis of the perturbation tensor, it introduces a numerical transformation to construct directional stability. Furthermore, it combines the horizontal directional difference with the pixel ratio structure, superimposes the edge perturbation factor and the directional modulation coefficient for weighted adjustment, and obtains the directional control amount. Finally, it uses the directional control amount to correct the feature map point by point, generating a directionally stable enhanced image. This mechanism can suppress the interference of light reflection and texture noise on edge modeling, enhance the directional consistency and boundary clarity of defective areas, and achieve stable identification and robust detection of defects in building coatings.
[0019] This invention constructs a cross-scale feature fusion module, which enables frequency modulation and spatial alignment between feature maps at different levels, avoiding the boundary blurring and detail loss problems caused by single-scale features. By utilizing the frequency modulation function and amplitude residual enhancement mechanism, it can effectively enhance the multi-dimensional differences in amplitude, frequency, and phase of the defect area, improving the distinguishability between edge and non-edge areas. By fusing multi-scale features and compressing the mapping to obtain a unified representation, it ensures the collaborative modeling capability of global and local features, thereby enhancing the boundary clarity and structural integrity of building coating defects in complex backgrounds, achieving a dual improvement in detection accuracy and robustness.
[0020] This invention proposes a minimum energy selection module for spectral density perturbation. It expands the fused features into a one-dimensional sample sequence in space, uses Fast Fourier Transform to obtain the frequency domain representation, and calculates the spectral density index. Based on the spectral representation, a perturbation vector is introduced to generate perturbation features, and the Euclidean distance to the original frequency domain representation is calculated to obtain the energy change index. On this basis, a reciprocal transform and weighted fusion are performed to construct a sample screening scoring function. The top K samples are selected based on the ranking results to generate an initial query vector. This module effectively suppresses the interference of redundant and low-quality samples during the query sample selection process, highlights key feature samples with significant differences in energy distribution, and improves the discriminativeness and representativeness of the query vector, thereby ensuring the stability and accuracy of building coating defect detection in complex environments.
[0021] This invention proposes a gravity-driven decoder module that expands fused features along the spatial dimension, combines the differences between channel features and neighborhood features, calculates the gravitational mass factor and positional difference vector, and constructs a perturbation gravitational response term. Based on this, using the initial query vector as input, the feature vector is iteratively updated and a target vector set is generated. This module can effectively model the difference relationship between channel features and neighborhood features through a gravity-driven mechanism, ensuring that the target vector gradually converges to a stable distribution during the iterative update process, thereby improving the consistency and discriminability of the feature representation of defective regions and significantly improving the accuracy and robustness of building coating defect detection. Attached Figure Description
[0022] Figure 1 This is a flowchart of a building coating detection method based on infrared polarization imaging provided by the present invention.
[0023] Figure 2 This is a structural diagram of the directional stability modulation module provided by the present invention.
[0024] Figure 3 This is a structural diagram of the cross-scale feature fusion module provided by the present invention.
[0025] Figure 4 This is a structural diagram of the minimum energy selection module for spectral density perturbation provided by the present invention.
[0026] Figure 5 This is a structural diagram of the gravity-driven decoder module provided by the present invention.
[0027] Figure 6 This is a diagram showing the effect of building coating inspection provided by the present invention. Detailed Implementation
[0028] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0029] Please see the appendix Figure 1 To be continued Figure 6 This invention provides a method for detecting building coatings based on infrared polarization imaging.
[0030] Please see Figure 1 As shown in the figure, a building coating detection method based on infrared polarization imaging in this application embodiment has the following specific steps.
[0031] S1. Collect infrared polarization imaging images of surface defects in building coatings and construct a dataset of building coating defect images.
[0032] Further, in step S1, a dataset of building coating defect images is constructed. First, a polarized industrial camera is used to photograph building exterior wall coatings with typical defects at four polarization angles: 0°, 45°, 90°, and 135°. The shooting distance is set to 5-15 meters to obtain raw polarized images. Second, the acquired raw polarized images are preprocessed, including using 3×3 median filtering to remove thermal noise, using adaptive histogram equalization to enhance local contrast, and using an image registration algorithm to spatially align the image sequences at different polarization angles to ensure the consistency of pixels at the same location at each polarization angle. At the same time, all images are uniformly cropped to a fixed size to obtain building coating defect images. Where 640×640 represents the spatial resolution of the building coating defect image, and 4 represents the number of channels of the building coating defect image; further, the building coating defect images are manually annotated, and the annotation categories include five types of defects: cracks, peeling, bulging, flaking and chalking. The annotation tool used is LabelImg, and the output annotation file finally forms a standardized building coating defect image dataset.
[0033] S2. Multi-scale feature extraction is performed on the surface defect image of building coating using the ResNet backbone network to obtain the first-stage feature map, the second-stage feature map and the third-stage feature map in sequence.
[0034] Furthermore, a hierarchical feature extraction process is performed on the building coating defect image using a backbone network. Specifically, a ResNet network is used to extract features from the building coating defect image, outputting a multi-scale feature representation in three stages sequentially. The first stage feature map is denoted as... The number of channels The spatial resolution is 20×20; the second-stage feature map is denoted as... The number of channels The spatial resolution is 40×40; the third-stage feature map is denoted as... The number of channels The height and width of the feature map in the third stage are 80.
[0035] S3. Based on the feature map of the first stage, generate the directional perturbation tensor and construct the directional stability. Combine the directional modulation coefficient to calculate the directional control amount. Then, weight and enhance the feature map of the first stage point by point to obtain the directionally stable enhanced image.
[0036] Furthermore, in step S3, a directional stability modulation module is constructed, and the specific construction steps of the module are shown in the appendix. Figure 2 As shown, the specific implementation of the module includes the following steps.
[0037] Based on the feature map of the first stage, with the current pixel as the center, select the neighborhood reference positions in eight fixed directions, calculate the absolute difference between the current pixel and each neighboring reference pixel, accumulate the differences in all directions, and generate the directional perturbation tensor. Furthermore, during implementation, for the first-stage feature map, eight neighboring reference positions are determined in the horizontal, vertical, and diagonal directions. The difference between the current pixel and the pixels at each neighboring reference position is calculated, and the absolute value of the difference is taken to construct the local directional difference intensity. Finally, the difference intensities in all directions are added together to obtain the directional perturbation tensor. The mathematical model of the directional perturbation tensor is as follows: ; in, For in position The directional perturbation tensor at a given location can comprehensively capture the characteristics of local directional changes. For the first stage feature map at location Pixel value at that location, For the first stage feature map at the neighborhood reference position Pixel value at that location, Indicates the direction of the neighborhood. This represents the set of eight neighborhood directions centered on the current pixel, used to determine the neighborhood reference position. In this embodiment, it is set as follows: .
[0038] Based on the directional perturbation tensor, a unit translation is introduced for each pixel position to perform a numerical offset operation. An inverse transformation is applied to the offset directional perturbation value to construct directional stability. Furthermore, during implementation, based on the directional perturbation tensor, a numerical transformation operation is performed for each pixel position. Specifically, the directional perturbation tensor is shifted by addition using a decrementing function, and the reciprocal is taken. The denominator of the decrementing function is formed by adding the unit constant to the directional perturbation tensor to obtain the corresponding directional stability, which reflects the degree of directional consistency of the current pixel in the spatial structure. A value close to 1 indicates strong directional continuity, while a value close to 0 indicates the presence of abrupt changes or boundary structures.
[0039] Based on the first-stage feature map, the pixel difference along the horizontal direction of the target position is extracted. The pixel difference and the pixel value of the target position in the first-stage feature map are used to form a normalized ratio structure. An edge perturbation enhancement factor and the directional basic modulation coefficient are introduced for joint weighting to generate the directional modulation coefficient. Furthermore, during implementation, for each pixel position in the feature map of the first stage, two horizontally adjacent pixels are extracted, the difference between the two adjacent pixels is calculated, and the absolute value of the difference is normalized with the current pixel value to obtain the local change ratio. The local change ratio is multiplied by the edge perturbation enhancement factor and then added to the unit value to construct the scaling part of the modulation factor. The scaling part is multiplied by the directional basic modulation coefficient to obtain the directional modulation coefficient. The formula for calculating the directional modulation coefficient is as follows: ; in, Indicates the directional modulation coefficient. For the directional basic modulation coefficient, As an edge perturbation enhancement factor, This represents the neighboring pixel value to the right in the horizontal direction. This represents the neighboring pixel value to the left in the horizontal direction. It is a numerically stable term; In this embodiment, the edge perturbation enhancement factor is used to highlight the differential response at boundary structures such as cracks and spalling. Limited to the range [0.5, 2.0], and set... =1.5, the directional base modulation coefficient is the base strength setting value of the directional modulation coefficient, and in this embodiment, it will be... Limited to the [0,1] interval, and set =0.4, the numerical stability term is a constant term to prevent division by zero, and in this embodiment it is set to 0.00001. Through the above parameter design, the directional modulation coefficient is constructed, which can enhance the difference between edge regions and non-edge regions and highlight the boundary features of defects such as cracks and spalling.
[0040] By performing reverse mapping on the pixel value of each pixel position in the directional stability, the instability enhancement amplitude of the corresponding pixel position is obtained; a directional modulation coefficient is introduced to adjust the amplitude of the instability enhancement; the adjusted enhancement amplitude is superimposed on a unit base value to obtain the directional control amount. Furthermore, during implementation, based on the pixel value at each pixel position in the directional stability, the difference between the unit constant and the directional stability response value at the current position is calculated to obtain the instability enhancement amplitude; the instability enhancement amplitude is multiplied by the directional modulation coefficient to control the enhancement degree; the product result is added to the unit constant to obtain the directional control amount, and the calculation formula for the directional control amount is as follows: ; in, This is a directional adjustment parameter used to perform differential enhancement processing on various positions of the first-stage feature map, effectively suppressing the interference of background texture on defect boundaries. For directional stability.
[0041] Based on the directional adjustment amount, the pixel value of the first-stage feature map at the target pixel position is adjusted point by point to obtain a directionally stable enhanced image. Furthermore, during implementation, for each pixel position in the first-stage feature map, the directional modulation amount at the current pixel position is multiplied point-by-point with the corresponding pixel value in the first-stage feature map to achieve directional modulation enhancement processing of the first-stage feature map, resulting in a directionally stable enhanced image. The calculation formula for the directionally stable enhanced image is as follows: ; in, To enhance the image for orientation stabilization, This resulted in a significant enhancement of regions with abrupt changes in direction.
[0042] S4. Based on the second-stage feature map, the third-stage feature map, and the orientation stabilization enhancement image, frequency modulation is performed to generate a structural frequency sensing tensor. An amplitude amplification parameter is introduced, and differential scaling is performed to obtain amplitude residual enhancement features. The amplitude residual enhancement features corresponding to the orientation stabilization enhancement image, the second-stage feature map, and the third-stage feature map are fused to obtain fused features.
[0043] Furthermore, in step S4, a cross-scale feature fusion module is constructed. The specific construction steps of the module are shown in the appendix. Figure 3 As shown, the specific implementation of the module includes the following steps.
[0044] Using the second-stage feature map, the third-stage feature map, and the orientation-stabilized enhanced image as input, frequency modulation functions based on three control parameters—amplitude, projection frequency, and phase offset—are constructed respectively. The frequency modulation functions are then used for modulation to obtain frequency modulation features. Channel compression mapping is performed through convolution operations, and the spatial size is adjusted to the target resolution using a bicubic interpolation algorithm to generate structural frequency sensing tensors. Furthermore, during implementation, the second-stage feature map, the third-stage feature map image, and the orientation stabilization enhancement image are used as input feature maps. Frequency modulation is performed based on a preset frequency modulation function. The frequency modulation function combines amplitude, projection frequency, and phase offset parameters to perform a sine function transformation, generating frequency modulation features. Channel dimension compression mapping is performed through convolution operations, and the spatial size is adjusted to the target resolution using a bicubic interpolation algorithm to obtain the structural frequency sensing tensor. The calculation formula for the structural frequency sensing tensor is: ; ; in, Represents the structural frequency sensing tensor. , It is a frequency modulation feature. Indicates amplitude, used to control the amplitude of the frequency modulation function. This represents the projection frequency, used to control the oscillation frequency of the modulation function. Indicates phase shift, used to control the amplitude of the frequency modulation function. Represents the sine function. This represents the input feature map. When l=2, it is the second-stage feature map; when l=3, it is the third-stage feature map; and when l=4, it is the orientation-stabilized enhancement image. This represents a 1×1 convolution operation, used to adjust the number of channels to 384. This represents the bicubic interpolation algorithm, used to adjust the spatial resolution to 20×20, providing a unified input format for subsequent feature fusion.
[0045] The structural frequency sensing tensor is subjected to global spatial averaging within the channel dimension to obtain the spatial mean of each channel; the element-by-element difference between each position element in the structural frequency sensing tensor and the spatial mean of the corresponding channel is calculated, and an amplitude amplification parameter is introduced for scaling adjustment to obtain the amplitude residual enhancement feature. Furthermore, during implementation, a global average is performed on the structural frequency sensing tensor along the channel dimension to obtain the spatial mean of each channel. Using the spatial mean as a benchmark, the pixel value at each spatial location in the structural frequency sensing tensor is subtracted from the mean of the corresponding channel to obtain the local deviation. An amplitude amplification parameter is introduced to weight and enhance the local deviation, generating an amplitude residual enhancement feature. The mathematical model of the amplitude residual enhancement feature is as follows: ; in, This indicates that the amplitude residual enhancement feature is located at... Pixel value at that location, Indicates the amplitude amplification parameter. This indicates that the structure frequency sensing tensor is located at the c-th channel. Pixel value at that location, This represents the spatial mean of the c-th channel; In this embodiment, the spatial mean of the c-th channel The calculation formula is: ; in, This indicates the high frequency sensitivity tensor of the structure. This represents the width of the structural frequency sensing tensor; In this embodiment, the spatial resolution of the structural frequency sensing tensor is set to 1. = =20, the amplitude amplification parameter is used to adjust the response intensity of the amplitude perturbation enhancement feature. In this embodiment, Limited to [0.1] , 2.0] range, and set =1.0 to ensure effective stretching of amplitude differences between channels and avoid overfitting risks. Through the above parameter design, amplitude residual enhancement features are constructed to provide a response basis for subsequent feature fusion.
[0046] The amplitude residual enhancement features corresponding to the orientation-stabilized enhanced image, the second-stage feature map, and the third-stage feature map are subjected to element-wise addition, and channel compression mapping is performed using a 1×1 convolution operation to obtain the fused features. Furthermore, during implementation, the amplitude residual enhancement features corresponding to the orientation-stabilized enhanced image, the second-stage feature map, and the third-stage feature map are subjected to element-wise addition along the channel dimension to obtain preliminary fusion features; convolution is then used to map and compress the preliminary fusion features along the channel dimension to obtain fusion features. The calculation formula for the fusion features is as follows: ; in, This represents a 1×1 convolution operation used to map the number of channels from 384 to 256. This indicates an amplitude residual enhancement feature. This indicates that the fusion features, through the synergy of multi-scale features, enhance the defect boundaries and detailed structures. .
[0047] S5. Extract spectral density and spectral energy change indices based on the fusion features, introduce sparse density weights and perturbation energy weights, and construct a scoring function; sort by the scoring function values, select the top K samples, and generate an initial query vector.
[0048] Furthermore, in step S5, a minimum energy selection module for spectral density perturbation is constructed. The specific construction steps of the module are shown in the attached figure. Figure 4 As shown, the specific implementation of the module includes the following steps.
[0049] The fused features are expanded into a one-dimensional sample feature sequence in the spatial dimension, and the channel vector at each spatial location is extracted as a sample feature. A fast Fourier transform is performed on each sample feature to obtain a frequency domain representation. Based on the frequency domain representation, the amplitude values of each frequency component are squared and summed to construct a spectral density index. Furthermore, during implementation, the fused features are expanded along the spatial dimension to form a one-dimensional sample feature sequence, and the channel vector at each spatial location is extracted as a sample feature. A sample feature set is constructed through matrix processing. A fast Fourier transform function is called on each sample feature to perform a frequency domain transformation operation, obtaining the frequency domain representation. The amplitude values of each frequency component in the frequency domain representation are squared, and the squared results of all frequency components are accumulated item by item using an addition function to obtain a spectral density index used to measure the overall frequency energy concentration. The calculation formula for the spectral density index is as follows: ; ; ; in, For the sample feature set, N=256, D=400 Represents the Fast Fourier Transform function. This represents the feature of the nth sample. This represents the frequency domain representation of the feature corresponding to the nth sample. Indicates the location Frequency domain representation at that location, , , This represents the spectral density index.
[0050] Based on the frequency domain representation, a perturbation vector generated by a normal distribution with zero mean and unit covariance is introduced. The perturbation vector is then superimposed element by element onto the frequency domain representation to generate a perturbed spectral feature vector. The square of the Euclidean distance between the spectral feature vector and the frequency domain representation is calculated to construct a spectral energy change index. Furthermore, in the implementation process, based on the frequency domain representation, random perturbation variables are introduced for the amplitude values of each frequency component in the frequency domain representation. These perturbation variables follow a normal distribution with a mean of zero and a covariance matrix of identity. The perturbation variables are then element-wise superimposed onto the frequency component amplitude values to generate a perturbed spectral feature vector. The difference between the spectral feature vector and the frequency domain representation at each frequency component is calculated, and the difference is squared element-wise. All squared terms are accumulated along the frequency dimension to construct a spectral energy change index characterizing the perturbation sensitivity. The formula for calculating the spectral energy change index is as follows: ; ; in, This represents the perturbed spectral feature vector. Let be the perturbation vector. As an indicator of spectral energy change; In this embodiment, This indicates that the perturbation vector follows a pattern with a mean of zero and a covariance matrix of... The multivariate normal distribution, wherein, It is the identity matrix. The standard deviation of the disturbance is used to control the effectiveness of the disturbance amplitude. In this embodiment, it will be... Limited to the range [0.01, 0.05], and set... =0.03. By setting the above parameters, a spectrum energy change index is constructed, which has a significant distribution identification ability and stability enhancement effect.
[0051] The spectral density index is subjected to an inverse transformation and combined with the spectral energy change index. Sparse density weight and perturbation energy weight are introduced for weighted fusion to construct a scoring function for sample screening. The first K samples to be queried are selected according to the numerical values of the scoring function from largest to smallest to construct the initial query vector. Furthermore, during implementation, the reciprocal of the spectral density index is multiplied by the sparsity density weight, and the spectral energy change index is multiplied by the perturbation energy weight. These two products are then weighted and fused to construct a query sample scoring function that comprehensively reflects spectral density and perturbation sensitivity. The scores are then sorted according to their numerical values across all samples to be evaluated, and the top K samples with the largest scores are selected to generate an initial query vector. The formula for calculating the initial query vector is as follows: ; ; in, For sparse density weights, To perturb the energy weight, Represents the scoring function. This represents the scoring function corresponding to the feature of the nth sample. This represents the set of indices of the top K samples after sorting all the values of the samples in the scoring function from largest to smallest. This represents the initial query vector. , Represents the first element in the initial query vector. Each sample feature vector; In this embodiment, sparse density weights To enhance the weight of the spectral density index in the scoring function, highlighting the preference for samples in information-concentrated regions, the energy weight is perturbed. To enhance the ability to identify differences in spectral perturbation response and strengthen the ability to identify locally perturbation-sensitive samples, this embodiment sets the following parameters: (1) To achieve a trade-off between spectral stability and perturbation responsibility in the scoring function, and to enhance the global discriminative power and local sensitivity of sample selection. and The sum is a constant 1, and is set to... =0.6. In this embodiment, K=200 is set, which means that 200 features are selected as the initial query. By setting the above parameters, the constructed initial query vector can effectively reduce the uncertainty in the sample selection process and improve the initial recognition capability of the detection model.
[0052] S6. Based on the fusion characteristics, calculate the difference between each feature sequence and the sample feature vector to construct the perturbation gravity response term; introduce a step size adjustment factor to scale the perturbation gravity response term, iteratively update the sample feature vector, and finally construct the target vector set.
[0053] Furthermore, in step S6, a gravity-driven decoder module is constructed. The specific construction steps of the module are shown in the attached figure. Figure 5 As shown, the specific implementation of the module includes the following steps.
[0054] The fused features are flattened along the spatial dimension, and the responses of each channel at all spatial locations are taken as feature sequences and concatenated column by column to construct a channel feature set. For any feature sequence, a neighborhood set containing itself and several adjacent sequences is constructed, and the local mean is calculated based on the numerical values of the features at each location in the neighborhood set. The numerical difference between any feature sequence and the corresponding neighborhood local mean is calculated, and a perturbation amplitude adjustment factor is introduced to perform hyperbolic tangent activation mapping to construct a perturbation gravitational mass factor. Furthermore, in the implementation process, the fused features are flattened along the spatial dimension, and the responses of each channel at all spatial locations are taken as feature sequences and concatenated column by column to construct a channel feature set. For any feature sequence, a neighborhood set containing itself and several adjacent sequences is constructed, and the local mean is calculated based on the numerical values of the features at each location in the neighborhood set. The difference between any feature sequence and the corresponding neighborhood local mean is calculated, and the difference is squared and summed before taking the modulus. A perturbation amplitude adjustment factor is introduced to linearly scale the modulus. Finally, the scaled result is input into the hyperbolic tangent function to achieve nonlinear activation and compression mapping, constructing the perturbation gravitational mass factor. The mathematical model of the perturbation gravitational mass factor is as follows: ; ; in, This is the disturbance amplitude adjustment factor. Represents the set of channel features. , This represents the d-th feature sequence in the channel feature set. Channel vector The corresponding local mean of the neighborhood, This represents the hyperbolic tangent activation function. The perturbation gravitational mass factor; In this embodiment, the formula for calculating the local mean is: ; in, Let d represent the neighborhood set of the d-th feature sequence. This represents the number of feature sequences in the neighborhood set. This represents the nth feature sequence in the channel feature set; In this embodiment, neighborhood set To effectively capture subtle changes in surface texture and contextual continuity in defect detection tasks, this embodiment sets... Disturbance amplitude adjustment factor To control the activation level of neighborhood structural differences in the gravitational mass response, in this embodiment, The value is set to 1.0 to maintain the stability of the numerical response across image features at different scales. By setting the parameters above, a perturbation gravity quality factor is constructed, which can generate sufficient feature discrimination for local anomalous areas such as cracks, detachment, and pulverization, while suppressing the interference caused by background texture and noise, thus achieving stable extraction of local micro-structural differences.
[0055] Traverse the channel feature set, calculate the difference between the feature sequence and the sample feature vector for each channel to obtain the position difference vector; introduce a perturbation gravitational mass factor to weight the position difference vector, and divide the modulation result by the sum of the square norm of the position difference vector and the numerical stability term to construct the weighted modulation term; accumulate the weighted modulation terms corresponding to each channel along the channel dimension to form the perturbation gravitational response term; Furthermore, during implementation, the channel feature set is traversed, and the difference between the feature sequence and the sample feature vector is calculated for each channel to obtain the position difference vector. Based on the perturbation gravitational mass factor, the position difference vector is weighted and modulated to achieve differential adjustment of the response intensity. The square norm of the position difference vector is calculated, and a numerical stability term is introduced for additive shifting and then used for normalization. The amplitude suppression of the modulation result is achieved through division. Finally, the weighted modulation terms corresponding to each channel are accumulated along the channel dimension to construct the perturbation gravitational response term. The mathematical model of the perturbation gravitational response term is as follows: ; in, This represents the perturbation gravitational response term, used to characterize the combined perturbation influence of the sample feature vector across multiple feature dimensions. This represents the feature vector of the k-th sample in the initial query vector. This represents the d-th feature sequence in the channel feature set.
[0056] Using the feature vectors of each sample in the initial query vector as the initial state, the perturbation gravitational response term corresponding to the current sample feature vector and the Euclidean norm of the perturbation gravitational response term are normalized. A step size adjustment factor is introduced to scale the normalization result. Then, the result is added element by element to the current round sample feature vector to obtain the updated feature vector. Furthermore, during implementation, using the sample feature vector in the initial query vector as the starting state, the perturbation gravitational response term corresponding to the current sample feature vector and its Euclidean norm are normalized; the normalization result is multiplied by the step size adjustment factor to achieve amplitude scaling and determine the current perturbation step size; the perturbation step size is then added element-wise with the sample feature vector of the current round to obtain the updated feature vector, the mathematical model of which is: ; in, Let the feature vector of the k-th sample be the feature vector corresponding to the (t+1)-th iteration, where the iteration number is... , This represents the feature vector corresponding to the k-th sample feature vector in the t-th iteration. , This represents the step size adjustment factor, used to control the update amplitude of the perturbation response. To avoid oscillations caused by excessively large updates in each round, and to maintain the asymptotic nature of the gravitational convergence process, this embodiment will... Limited to the range [0.05, 0.2], and set... =0.1.
[0057] The feature vector update operation is repeated for each sample feature vector according to the preset number of iterations T. Finally, the feature vector results obtained by each sample feature vector in the final iteration are arranged in order and concatenated to construct the target vector set. Furthermore, during implementation, the feature vector update operation is repeatedly performed on each sample feature vector according to a preset number of iterations T. After completing T rounds of updates, the final feature vectors of all samples are sequentially concatenated along the feature dimension according to the sample index order to construct a target vector set. The mathematical model of the target vector set is as follows: ; in, This represents the feature vector obtained by the k-th sample feature vector in the final iteration. , Represents the set of target vectors. ; In this embodiment, the preset number of iterations T is used to control the number of update rounds of the feature vector of each sample. Considering that defect areas are often accompanied by unstructured noise and edge blurring and complex factors, in order to avoid semantic shift caused by too many iterations, this embodiment sets T=6. Through the above parameter settings, the constructed target vector set can provide a more discriminative and convergent target representation for defect detection, and improve the accuracy and robustness of building coating defect identification.
[0058] S7. Input the target vector set into the category and bounding box prediction module to realize the category identification and location estimation of building coating defects.
[0059] Furthermore, in the specific implementation process, the target vector set is sequentially input into the category prediction module and the bounding box regression prediction module to generate the target category distribution and bounding box parameters. The category prediction module is composed of a multi-layer perceptron structure. Taking any feature vector in the target vector set as input, it first passes through a first fully connected layer to maintain the dimension and obtains an intermediate representation through the ReLU activation function. Then, it passes through a second fully connected layer and is activated by ReLU. Finally, it is mapped to a 6-dimensional output space through a third fully connected layer and normalized by the Softmax function to obtain the probability distribution result of the target category. The bounding box regression module is also composed of a multi-layer perceptron structure. Taking any feature vector in the target vector set as input, it passes through a first fully connected layer and is activated by the ReLU function. Then, it passes through a second fully connected layer to maintain the dimension and is activated by ReLU. Finally, it is mapped to a four-dimensional space through a third fully connected layer, outputting bounding box parameters. These parameters are then normalized to the interval [0,1] through the Sigmoid activation function, representing the normalized target center coordinates and width and height information in the image space.
[0060] Furthermore, in the specific implementation process, the image of the building exterior wall coating to be detected is used as input and processed according to the building coating detection method based on infrared polarization imaging proposed in this invention to obtain the category identification result and location estimation result of the building coating defect, such as... Figure 6 As shown.
[0061] The above are merely preferred embodiments of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the inventive concept of the present invention, and these modifications and improvements are all within the scope of protection of the present invention.
Claims
1. A method for detecting building coatings based on infrared polarization imaging, characterized in that, Includes the following steps: Collect infrared polarization imaging images of defects on building coating surfaces and construct a dataset of building coating defect images; The ResNet backbone network was used to extract multi-scale features from images of defects on building coating surfaces, and the first-stage feature map, the second-stage feature map and the third-stage feature map were obtained sequentially. Based on the first-stage feature map, a directional perturbation tensor is generated and a directional stability is constructed. The directional control amount is calculated by combining the directional modulation coefficient. The first-stage feature map is then weighted and enhanced point by point to obtain a directionally stable enhanced image. Using the second-stage feature map, the third-stage feature map, and the orientation-stabilized enhanced image as input, frequency modulation functions based on three control parameters—amplitude, projection frequency, and phase offset—are constructed respectively. The frequency modulation functions are then used for modulation to obtain frequency modulation features. Channel compression mapping is performed through convolution operations, and the spatial size is adjusted to the target resolution using a bicubic interpolation algorithm to generate structural frequency sensing tensors. An amplitude amplification parameter is introduced, and differential scaling is performed to obtain amplitude residual enhancement features. The amplitude residual enhancement features corresponding to the orientation-stabilized enhancement image, the second-stage feature map, and the third-stage feature map are fused to obtain fused features. Based on the fusion features, spectral density and spectral energy change indices are extracted. Sparse density weights and perturbation energy weights are introduced to construct a scoring function. The top K samples are sorted according to the scoring function values to generate an initial query vector. The fused features are flattened along the spatial dimension, and the responses of each channel at all spatial locations are taken as feature sequences and concatenated column by column to construct a channel feature set. For any feature sequence, a neighborhood set containing itself and several adjacent sequences is constructed, and the local mean is calculated based on the numerical values of the features at each location in the neighborhood set. The numerical difference between any feature sequence and the corresponding neighborhood local mean is calculated, and a perturbation amplitude adjustment factor is introduced to perform hyperbolic tangent activation mapping to construct a perturbation gravitational mass factor. Traverse the channel feature set, calculate the difference between the feature sequence and the sample feature vector for each channel to obtain the position difference vector; introduce a perturbation gravitational mass factor to weight the position difference vector, and divide the modulation result by the sum of the square norm of the position difference vector and the numerical stability term to construct the weighted modulation term; accumulate the weighted modulation terms corresponding to each channel along the channel dimension to form the perturbation gravitational response term; A step size adjustment factor is introduced to scale the perturbation gravitational response term, the sample feature vector is iteratively updated, and finally the target vector set is constructed. The target vector set is input into the category and bounding box prediction module to achieve category identification and location estimation of defects in building coatings.
2. The method for detecting building coatings based on infrared polarization imaging according to claim 1, characterized in that, A polarization industrial camera was used to image and acquire typical defects in the exterior wall coating of a building at four polarization angles: 0°, 45°, 90°, and 135°. The acquisition distance was set to 5–15 meters to obtain the original polarization images. The original polarization images were then preprocessed to extract the corresponding images of the building coating defects. Images of building coating defects were manually annotated, with the annotation categories including five types of defects: cracks, peeling, bulging, flaking, and chalking, to construct a standardized dataset of building coating defect images.
3. The method for detecting building coatings based on infrared polarization imaging according to claim 2, characterized in that, Based on the image of the building coating defect, multi-scale feature extraction is performed using the ResNet model backbone network to obtain the third-stage feature map, the second-stage feature map, and the first-stage feature map, respectively.
4. The method for detecting building coatings based on infrared polarization imaging according to claim 3, characterized in that, Based on the feature map of the first stage, with the current pixel as the center, select the neighborhood reference positions in eight fixed directions, calculate the absolute difference between the current pixel and each neighboring reference pixel, accumulate the differences in all directions, and generate the directional perturbation tensor. Based on the directional perturbation tensor, a unit translation is introduced for each pixel position to perform a numerical offset operation. An inverse transformation is applied to the offset directional perturbation value to construct directional stability. Based on the first-stage feature map, the pixel difference along the horizontal direction of the target position is extracted. The pixel difference and the pixel value of the target position in the first-stage feature map are used to form a normalized ratio structure. An edge perturbation enhancement factor and the directional basic modulation coefficient are introduced for joint weighting to generate the directional modulation coefficient.
5. The method for detecting building coatings based on infrared polarization imaging according to claim 4, characterized in that, By performing reverse mapping on the pixel value at each pixel position in the directional stability, the instability enhancement magnitude at the corresponding pixel position is obtained. A directional modulation coefficient is introduced to adjust the amplitude of the instability enhancement. The directional control amount is obtained by superimposing the adjusted enhanced amplitude onto the unit base value; Based on the directional adjustment amount, the pixel value of the first-stage feature map at the target pixel position is adjusted point by point to obtain a directionally stable enhanced image.
6. The method for detecting building coatings based on infrared polarization imaging according to claim 1, characterized in that, The structural frequency sensing tensor is subjected to global spatial averaging within the channel dimension to obtain the spatial mean of each channel; the element-by-element difference between each position element in the structural frequency sensing tensor and the spatial mean of the corresponding channel is calculated, and an amplitude amplification parameter is introduced for scaling adjustment to obtain the amplitude residual enhancement feature. The amplitude residual enhancement features corresponding to the orientation-stabilized enhanced image, the second-stage feature map, and the third-stage feature map are subjected to element-wise addition, and channel compression mapping is performed using a 1×1 convolution operation to obtain the fused features.
7. The method for detecting building coatings based on infrared polarization imaging according to claim 6, characterized in that, The fused features are expanded into a one-dimensional sample feature sequence in the spatial dimension, and the channel vector at each spatial location is extracted as the sample feature; Perform a Fast Fourier Transform on each sample feature to obtain a frequency domain representation. Based on the frequency domain representation, square the amplitude values of each frequency component and sum them to construct a spectral density index. Based on the frequency domain representation, a perturbation vector generated by a normal distribution with zero mean and unit covariance is introduced. The perturbation vector is then superimposed element by element onto the frequency domain representation to generate a perturbed spectral feature vector. The square of the Euclidean distance between the spectral feature vector and the frequency domain representation is calculated to construct a spectral energy change index. The spectral density index is subjected to an inverse transformation and combined with the spectral energy change index. Sparse density weight and perturbation energy weight are introduced for weighted fusion to construct a scoring function for sample screening. The top K samples to be queried are selected according to the numerical values of the scoring function from largest to smallest to construct the initial query vector.
8. The method for detecting building coatings based on infrared polarization imaging according to claim 7, characterized in that, Using the feature vectors of each sample in the initial query vector as the initial state, the perturbation gravitational response term corresponding to the current sample feature vector and the Euclidean norm of the perturbation gravitational response term are normalized. A step size adjustment factor is introduced to scale the normalization result. Then, the result is added element by element to the current round sample feature vector to obtain the updated feature vector. The feature vector update operation is repeated for each sample feature vector according to the preset number of iterations T. Finally, the feature vector results obtained by each sample feature vector in the final iteration are arranged in order and concatenated to construct the target vector set.
Citation Information
Patent Citations
Building material surface defect detection method based on infrared polarization imaging
CN119559183A
Building exterior wall defect detection method based on infrared polarization imaging
CN120431102A
Visual detection optimization control method, device and equipment based on digital twinning and storage medium
CN121685996A