A vehicle tank surface texture analysis method and system based on deep learning
By employing deep learning methods, the problem of inconsistent analysis results for the surface texture analysis of hazardous chemical transport vehicle tanks under complex environments was solved. This enabled the differentiation between natural degradation and human intervention, improving the accuracy and interpretability of tank surface condition assessment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHENGDU PROGRESS TECH CO LTD
- Filing Date
- 2026-02-25
- Publication Date
- 2026-05-12
AI Technical Summary
Existing technologies for analyzing the surface texture of tank bodies in hazardous chemical transport vehicles struggle to maintain consistency in analytical results under complex environments, and are also unable to distinguish between changes in surface condition caused by natural degradation and human intervention.
By employing a deep learning-based approach, through data acquisition and preprocessing, tank area determination, strong reflection suppression and illumination decoupling, viewpoint decoupling texture encoding, multi-scale early signs of degradation identification, and repair and camouflage identification, a stable, traceable, and computable spatial location association channel is constructed between cross-viewpoint images, enabling collaborative identification of real degradation and human-camouflaged behavior.
It improves the reliability and interpretability of inspection conclusions, significantly enhances the accuracy and robustness of tank surface degradation risk assessment, reduces the false positive rate, and supports automatic generation of inspection reports and dynamic adjustment of operation and maintenance strategies.
Smart Images

Figure CN121724987B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of hazardous chemical tank inspection technology, and in particular to a method and system for analyzing the surface texture of vehicle tanks based on deep learning. Background Technology
[0002] As a crucial link in the chemical industry's logistics system, the surface condition of the tanks of hazardous chemical transport vehicles directly affects transportation safety. Tanks typically employ a metal substrate combined with anti-corrosion / explosion-proof coatings, and during long-term operation, they are exposed to complex environments such as temperature and humidity, salt spray, chemical evaporation, and mechanical impact. In the field of computer vision and image processing technology, existing solutions mainly involve acquiring images of the tank surface and using image processing algorithms to analyze and evaluate the coating condition. These solutions typically include basic processes such as image acquisition, region segmentation, feature extraction, and condition determination, identifying coating degradation by analyzing texture features, color distribution, and geometric morphology in the images. Some solutions also incorporate multispectral imaging or polarization imaging techniques to enhance the detection capability of specific types of defects. These technologies have already been applied to some extent in industrial inspection, providing technical support for tank surface condition assessment.
[0003] However, in practical applications, the analysis of tank surface texture faces the challenge of characterization stability under complex environmental conditions. The differences in characterization caused by different collection conditions affect the consistency of analysis results, and it is difficult to effectively distinguish between natural degradation and changes in surface state caused by human intervention. Summary of the Invention
[0004] This application provides a deep learning-based method and system for analyzing the surface texture of vehicle tanks to solve the above-mentioned problems.
[0005] Firstly, this application provides a deep learning-based method for analyzing the surface texture of a vehicle tank. The method includes: S1, data acquisition and preprocessing: acquiring surface images or video frames of a hazardous materials transport vehicle tank, and preprocessing the surface images or video frames, the preprocessing including any one or more of distortion correction, resolution normalization, and brightness / color normalization; S2, tank region determination: performing tank region segmentation on the preprocessed image to obtain an effective analysis region (ROI) on the tank surface; S3, strong reflection suppression and illumination decoupling: determining candidate specular regions within the ROI and generating a specular mask, performing reflection suppression processing on the ROI based on the specular mask to obtain an illumination-decoupled texture representation image; S4, viewpoint decoupling texture encoding: performing feature encoding on the texture representation image to obtain a viewpoint decoupling texture representation image. The texture features are coupled, wherein the texture features are learned by applying consistency constraints to multi-view image patches at the same spatial location, such that the feature distance at the same spatial location under different views is less than the feature distance at different spatial locations; S5, Multi-scale early signs of degradation identification: The texture features are extracted and fused at at least two spatial scales to output a degradation heatmap and a degradation index, which are used to characterize the spatial distribution and severity of early signs of coating degradation; S6, Repair camouflage suspicion identification: Based on the texture features and / or the degradation heatmap, a repair suspicion heatmap and a repair suspicion index are calculated; S7, Fusion output: Based on the degradation index and the repair suspicion index, the tank surface texture analysis results are output, and the analysis results include degradation risk level, repair suspicion level and corresponding visual annotations.
[0006] By combining the degradation index with the repair suspicion index, the system can collaboratively identify both genuine degradation and deliberate cover-up: when the degradation index is in the medium to high range and the repair suspicion index rises simultaneously, a "suspected repair cover-up" message is displayed, triggering a re-inspection recommendation; when both are in the low range, the system is considered normal; when the degradation index is low and the repair suspicion index is high, a message is displayed indicating localized repair without significant degradation, requiring attention to the compliance of the repair process; this forms a closed-loop risk assessment mechanism, improving the reliability and interpretability of inspection conclusions.
[0007] Optionally, after obtaining the effective analysis area ROI on the surface of the tank, S2 further includes: dividing the ROI into multiple analysis blocks by meshing according to a preset block size, or performing superpixel segmentation on the ROI to obtain multiple adaptive analysis blocks; assigning a unique block identifier to each analysis block, and recording the coordinate range or pixel index set of the analysis block within the ROI; wherein, the learning, extraction, comparison and determination of texture features in S4 to S6 are all based on the analysis block as the basic unit, and the same spatial position used for multi-view consistency constraints is corresponding to the block identifier and its pixel index set.
[0008] Through the above technical solution, by introducing an analysis block partitioning mechanism and a block identifier mapping system, a stable, traceable, and computable spatial location association channel between cross-view images is constructed without increasing additional annotation costs. Mesh partitioning ensures the regularity and computational efficiency of processing units, while superpixel segmentation enhances the adaptability to tank structure edges and texture abrupt change areas. The block identifier and pixel index set together constitute a "spatial identity certificate," enabling the viewpoint decoupling learning of S4, the multi-scale degradation modeling of S5, and the repair and camouflage recognition of S6 to be carried out at a clear spatial granularity. This avoids noise interference and computational redundancy caused by full-image-level processing and supports the visualization and attribution of fine-grained discrimination results and business interpretability. This structural design is the technical prerequisite for realizing all subsequent block-level operations and is also the key structural innovation that distinguishes this method from general image analysis processes.
[0009] Optionally, determining the candidate region for highlights and generating a highlight mask in S3 includes: calculating the brightness value, saturation value, and brightness gradient magnitude of pixels within the ROI; and determining pixels that meet at least two of the following conditions as candidate pixels for highlights: the brightness value is greater than a first threshold, the saturation value is less than a second threshold, and the brightness gradient magnitude is greater than a third threshold; merging the connected components of the candidate pixels for highlights to form a highlight mask; and performing at least one morphological operation among dilation, erosion, closing operation, or hole filling on the highlight mask to obtain a target highlight mask for reflection suppression processing.
[0010] The above technical solution constructs a specular candidate pixel judgment rule based on the physical imaging mechanism by using a three-dimensional joint criterion of brightness, saturation, and brightness gradient magnitude. This overcomes the sensitivity defect of the single-parameter threshold method in complex outdoor scenes. By merging connected components, the spatial integrity of the specular region is ensured, avoiding mask discrepancies caused by pixel-level misjudgments. Furthermore, morphological operations are used to perform topological optimization on the mask, ensuring that it covers the real reflection area while eliminating noise and artifact interference. The final generated target specular mask has clear spatial positioning capabilities and good structural fidelity, providing a high-quality illumination component stripping foundation for viewpoint decoupling texture encoding in S4. This supports the accuracy and stability of subsequent early degradation sign identification and repair camouflage suspicion judgment.
[0011] Optionally, the reflection suppression processing based on the specular mask in S3 includes: taking the three-channel image corresponding to the ROI and the target specular mask as at least four-channel inputs, inputting them into the reflection suppression network, and outputting a texture representation image with decoupled illumination; wherein, the reflection suppression network includes an encoder and a decoder, the encoder includes multi-layer convolution and downsampling to extract multi-scale features, and the decoder includes upsampling and skip connections to restore spatial details; and the loss function during the training of the reflection suppression network includes at least: a structure preservation loss for non-spectral regions, used to constrain the output and input to maintain structural consistency in non-spectral regions; a mask-weighted reconstruction loss for specular regions, used to enhance the restoration of texture details in specular regions; and a smoothing regularization term, used to suppress pseudo-texture noise in the output; wherein, the ratio of the loss weight for specular regions to the loss weight for non-spectral regions is 2 to 10.
[0012] Through the above technical solution, by embedding the target specular mask as an explicit guiding signal into the four-channel input, and combining the encoder-decoder structure with mask-weighted composite loss, targeted modeling and refined reconstruction of the specular region are achieved. By using the skip connection mechanism, the structural consistency of the non-spectral region is ensured, while the ability to restore the texture details of the specular region is improved. By setting the loss weight of the specular region to 2 to 10 times that of the non-spectral region, the network actively focuses on the region with the most severe reflection interference during training, which significantly enhances the robustness and discriminative power of the illumination-decoupled texture representation image. This texture representation image does not contain specular reflection components and retains the inherent texture features of the coating material, providing a stable and reliable underlying input for viewpoint decoupled texture encoding and subsequent degradation identification and repair suspicion judgment in S4.
[0013] Optionally, applying consistency constraints in S4 includes: based on the unique block identifier corresponding to the analysis block, extracting image blocks with the same block identifier as positive sample pairs from at least two viewpoint images, and extracting image blocks with different block identifiers as negative sample pairs; applying a metric learning loss to the positive sample pairs and negative sample pairs, such that the feature distance d⁺ of the positive sample pairs satisfies d⁺≤τ⁺, and the feature distance d⁻ of the negative sample pairs satisfies d⁻≥τ⁻, where τ⁺ takes values from 0.2 to 0.8, and τ⁻ takes values from 1.0 to 2.5; during the inference phase, calculating a consistency score C for the multi-view feature similarity of the same block identifier, and when C is lower than the threshold range of 0.55 to 0.85, using the corresponding block as a candidate block for patching disguise suspicion identification in S6.
[0014] Through the above technical solution, semantic alignment of image blocks across different viewpoints is achieved by using a unique block identifier. The feature distribution relationship between "same location - multiple viewpoints" and "different locations" is explicitly modeled by metric learning loss, enabling the texture encoder to actively learn viewpoint-invariant embedding structures during training. Based on this, the consistency score C in the inference stage becomes a sensitive indicator for measuring the naturalness of local textures. Although the appearance of a normal tank surface changes under multiple viewpoints, the underlying texture structure remains stable and the feature consistency is high. In contrast, artificially repaired areas often only present a smooth appearance in a single viewpoint, while other viewpoints still expose the original degraded texture or paint color difference, resulting in dispersed features across multiple viewpoints and a significantly reduced C value. This mechanism does not depend on specific degradation morphology or repair process and only requires block-level spatial correspondence to take effect, providing robust, interpretable, and traceable pre-emptive clues for the identification of repair camouflage suspicions in S6.
[0015] Optionally, in S5, feature extraction and fusion of texture features at at least two spatial scales includes: constructing an image pyramid of at least two scales for the analysis block, including the original scale and at least one downsampling scale; performing feature encoding on the texture representation image at each scale to obtain texture features of the corresponding scale; aligning the features of the non-original scale to the original scale through upsampling and coordinate mapping; performing weighted fusion of the features at each scale based on attention weights to obtain multi-scale fused features, and generating a degradation heatmap from the multi-scale fused features.
[0016] The above technical solution achieves multi-granularity unfolding of texture representation by constructing an image pyramid, captures different levels of degradation patterns by using scale-specific encoding, ensures spatial comparability of cross-scale features through upsampling and coordinate mapping, and dynamically fuses multi-scale responses through an attention mechanism, enabling the model to identify both macroscopic uniform degradation and microscopic early signs. The final generated degradation heatmap achieves a balance between spatial positioning accuracy and degradation sensitivity, significantly improving the detection rate of early signs such as pinholes and microcracks, supporting the reliable calculation of subsequent degradation indices and risk level determination.
[0017] Optionally, after outputting the degradation heatmap in S5, the process further includes: binarizing the degradation heatmap with a first threshold to obtain a first candidate degradation region, wherein the first threshold is set as a low threshold for detecting early weak degradation; performing consistency matching on the candidate degradation regions between degradation heatmaps at different scales, retaining regions that are marked at at least two scales as second candidate degradation regions; constraining the degradation intensity or connected region area of the second candidate degradation region with a second threshold, removing small isolated noise regions, and obtaining a target degradation region for calculating the degradation index.
[0018] The above technical solution achieves sensitive capture of early weak degradation signals by setting a first threshold, eliminates random noise interference by utilizing the physical stability of degradation signs at multiple resolutions through cross-scale consistency matching, and further applies structured constraints on degradation intensity and connected region area through a second threshold, forming a three-level degradation region extraction process of "initial screening - verification - fine filtering". This process not only significantly reduces the false positive rate caused by image noise, local texture perturbation or single-scale artifacts, but also ensures the physical interpretability of the target degradation region in terms of spatial distribution, size characteristics and response intensity, thus providing a reliable, robust and traceable input basis for the accurate calculation of the degradation index.
[0019] Optionally, the degradation index is obtained by combining at least two of the following: a weighted integral of the degradation heatmap intensity within the target degradation region; the proportion of the area of the target degradation region to the area of the ROI; and a texture attribute index calculated based on multi-scale fusion features. The texture attribute index includes any one or more of pitting density, crack orientation consistency, and texture roughness spectral energy. Furthermore, the degradation index is normalized to a preset numerical range through linear weighting or nonlinear mapping to output the degradation risk level.
[0020] By combining the weighted integral of the degradation heatmap intensity within the target degradation area, the proportion of the target degradation area to the ROI area, and the texture attribute index calculated based on multi-scale fusion features, a multi-dimensional quantitative characterization of the coating degradation state is achieved. Based on this, normalization is achieved through linear weighting or nonlinear mapping, ensuring that the degradation index reflects both the local severity and spatial extent of degradation, and possesses clear physical interpretability. The final output degradation index within a preset numerical range can directly drive the classification of degradation risk levels, support the automatic generation of inspection reports and dynamic adjustment of maintenance strategies, and significantly improve the accuracy, robustness, and engineering practicality of the surface condition assessment of hazardous chemical transport vehicle tanks.
[0021] Optionally, generating a suspected repair heatmap based on texture boundary discontinuities in S6 includes: calculating texture feature gradients or degradation heatmap gradients on the analysis block, and extracting pixels or blocks with gradient magnitudes greater than a preset threshold as boundary candidates; statistically analyzing texture feature distributions on both sides of the boundary candidates, and calculating the distribution distance between the two sides, wherein the distribution distance includes any one or more of KL divergence, Bhattacharyya distance, or cosine distance; when the distribution distance is greater than a preset distance threshold, confirming the corresponding boundary candidate as a suspected repair boundary and superimposing it onto the suspected repair heatmap; performing connectivity and morphological constraints on the suspected repair boundaries, and removing boundary segments with lengths less than a threshold or curvature changes that do not meet the constraints, in order to reduce false alarms caused by natural texture undulations.
[0022] The above technical solution uses texture gradient response as the initial screening criterion for boundaries and combines it with cross-boundary texture distribution distance measurement to accurately identify statistical mutations caused by repair behavior. On this basis, a dual constraint mechanism of connectivity and curvature morphology is introduced to effectively distinguish between regular boundaries formed by artificial repair and pseudo boundaries caused by natural texture undulations. Finally, the verified suspected repair boundaries are injected into the suspected repair heatmap through spatial overlay, which not only improves the spatial positioning accuracy of repair camouflage identification, but also provides structurally consistent and semantically clear underlying support for subsequent evidence fusion with degradation heatmaps and cross-view consistency heatmaps, thereby enhancing the interpretability and engineering reliability of the overall analysis results.
[0023] Secondly, this application provides a deep learning-based system for analyzing the surface texture of a vehicle tank. The system includes: a data acquisition and preprocessing module for acquiring surface images or video frames of a hazardous materials transport vehicle tank, and preprocessing the surface images or video frames, including distortion correction, resolution normalization, and brightness / color normalization (any one or more of these); a tank region determination module for performing tank region segmentation on the preprocessed image to obtain an effective analysis region (ROI) on the tank surface; a strong reflection suppression and illumination decoupling module for determining candidate specular regions within the ROI and generating a specular mask, and performing reflection suppression processing on the ROI based on the specular mask to obtain an illumination-decoupled texture representation image; and a viewpoint decoupled texture encoding module for performing feature encoding on the texture representation image to obtain a viewpoint. The system includes decoupled texture features, wherein the texture features are learned by applying consistency constraints to multi-view image patches at the same spatial location, such that the feature distance at the same spatial location under different views is less than the feature distance at different spatial locations; a multi-scale early degradation sign identification module, used to extract and fuse the texture features at at least two spatial scales, outputting a degradation heatmap and a degradation index to characterize the spatial distribution and severity of early degradation signs of the coating; a repair / camouflage suspicion identification module, used to calculate a repair / camouflage suspicion heatmap and a repair / camouflage suspicion index based on the texture features and / or the degradation heatmap; and a fusion output module, used to output the tank surface texture analysis results based on the degradation index and the repair / camouflage suspicion index, the analysis results including degradation risk level, repair / camouflage suspicion level, and corresponding visual annotations. Attached Figure Description
[0024] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0025] Figure 1 A flowchart illustrating a deep learning-based method for analyzing the surface texture of a vehicle tank, as provided in one embodiment of this application;
[0026] Figure 2 This is a structural diagram of a deep learning-based vehicle tank surface texture analysis system provided in one embodiment of this application. Detailed Implementation
[0027] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0028] Furthermore, the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article, unless otherwise specified, generally indicates that the preceding and following related objects have an "or" relationship.
[0029] The embodiments of this application will now be described in further detail with reference to the accompanying drawings.
[0030] Example 1:
[0031] Hazardous chemical transport vehicle tanks typically employ a metal substrate with an anti-corrosion / explosion-proof coating. Under conditions of high temperature and humidity, salt spray, chemical evaporation, and mechanical impact, the coating is prone to early degradation textures such as micro-corrosion, pinholes, micro-cracks, blistering precursors, and abnormal orange peel texture. In actual inspections, the curved surface of the tank and the coating cause strong reflections / high gloss, resulting in significant changes in texture appearance from different viewing angles. Unstable outdoor lighting, shadows, and reflection interference can lead to false or missed detections. Furthermore, there are instances of localized repainting or sanding repairs to conceal defects, improving the appearance but not eliminating structural risks, making it difficult to identify using traditional inspection methods.
[0032] Based on the above issues, see Figure 1 This application provides a deep learning-based method for analyzing the surface texture of a vehicle tank, which includes the following steps:
[0033] S1. Obtain surface images or video frames of the tank of a hazardous chemical transport vehicle, and preprocess the surface images or video frames. The preprocessing includes any one or more of distortion correction, resolution normalization, and brightness / color normalization.
[0034] Among them, "distortion correction" refers to geometrically mapping compensation for lens optical distortion (such as barrel distortion or pincushion distortion) to make it conform to the ideal pinhole imaging model, and correction methods based on checkerboard calibration or unsupervised mesh constraints can be used; "resolution normalization" refers to uniformly scaling the input image to a preset spatial size (e.g., 512×512 pixels) to adapt to the subsequent network input requirements and ensure the consistency of feature extraction scale; "brightness / color normalization" refers to standardizing the overall brightness and chromaticity distribution of the image through the gray world hypothesis, white balance adjustment or color constancy algorithm to reduce the impact of ambient lighting differences on texture representation; the three can be performed individually or in combination, and their order is not limited. For example, distortion correction can be performed first and then resolution normalization can be performed, or brightness / color normalization and resolution normalization can be performed simultaneously.
[0035] In one alternative implementation, the preprocessing method may be: based on the intrinsic parameter matrix and distortion coefficients of the vehicle camera, perform bilinear interpolation resampling on the original image, and after distortion correction, use bicubic interpolation to scale to the target resolution, and apply a brightness / color normalization strategy based on statistical histogram matching.
[0036] S2. Perform tank region segmentation on the preprocessed image to obtain the effective analysis region ROI on the tank surface;
[0037] Among them, "tank region segmentation" refers to accurately extracting continuous pixel regions that only cover the tank body, end cap, and weld transition area from the original image containing interfering elements such as background, tires, brackets, and labels; "effective analysis region ROI" refers to the connected region after morphological closing operation, hole filling, and edge smoothing, excluding isolated noise blocks and non-tank structures, and providing geometric constraint boundaries for subsequent texture analysis.
[0038] In one alternative implementation, the tank region segmentation method can be: calling a lightweight semantic segmentation network (such as the MobileNetV3-U-Net structure), taking the preprocessed image as input, outputting a binary segmentation mask, and then performing opening operations to denoise and closing operations to connect broken regions on the mask, finally obtaining the closed tank outline.
[0039] S3. Determine the candidate regions of highlights within the ROI and generate a highlight mask. Perform reflection suppression processing on the ROI based on the highlight mask to obtain a texture representation image with decoupled illumination.
[0040] Among them, "spectral candidate region" refers to the set of pixels within the ROI that meet the physical characteristics of high reflectivity, and its determination criteria include at least two of the following: brightness value, saturation value, and brightness gradient magnitude; "spectral mask" refers to a binary mask composed of specular candidate pixels, which is formed by connected component merging and morphological optimization and can be used for region masking or guided repair; "lighting decoupled texture representation image" refers to an image that removes specular reflection components and retains diffuse reflection texture components. Its visual appearance is that it eliminates specular highlights, restores the texture structure of the underlying coating, and is not affected by changes in incident angle and viewing angle.
[0041] In one alternative implementation, the method for determining the specular candidate region may be as follows: for each pixel of the ROI, calculate the Y-channel luminance value, UV-channel saturation value, and Sobel gradient magnitude in the YUV space; mark pixels whose luminance value is greater than a first threshold (e.g., 0.75), whose saturation value is less than a second threshold (e.g., 0.15), and whose luminance gradient magnitude is greater than a third threshold (e.g., 8.0) as specular candidate pixels; and then merge them through four-neighbor connectivity analysis to form an initial specular mask.
[0042] S4. Perform feature encoding on the texture representation image to obtain viewpoint decoupled texture features. The texture features are learned by applying consistency constraints to multi-view image patches at the same spatial location, so that the feature distance at the same spatial location under different viewpoints is less than the feature distance at different spatial locations.
[0043] Among them, "viewpoint-decoupled texture features" refers to the fact that the feature vectors obtained after encoding image patches of the same physical surface region under different shooting viewpoints maintain a high degree of similarity in the embedding space, while image patches of different physical locations maintain a large distance, thus achieving texture representation that is independent of viewpoint; the same spatial location refers to a local region with a unique corresponding coordinate in the three-dimensional surface coordinate system of the tank, which is aligned across viewpoints in the two-dimensional image through the ROI obtained above and its grid division or superpixel index; "consistency constraint" refers to the introduction of a metric learning mechanism in the training phase, which constructs a loss function through positive and negative sample pairs to drive the encoder to learn discriminative texture representation.
[0044] In one alternative implementation, the feature encoding method can be: constructing a contrastive learning framework, using multi-view image patches with the same identifier as positive sample pairs and image patches with different identifiers as negative sample pairs, and using the NT-Xent loss function to optimize the texture encoder so that the feature cosine similarity of positive sample pairs approaches 1 and that of negative sample pairs approaches 0.
[0045] S5. Extract and fuse texture features at at least two spatial scales, and output degradation heatmaps and degradation indices to characterize the spatial distribution and severity of early signs of coating degradation.
[0046] Among them, "at least two spatial scales" refers to constructing an image pyramid at the original scale and at least one downsampling scale (e.g., 1 / 2, 1 / 4) for the texture representation image; "degradation heatmap" refers to a two-dimensional spatial distribution map that reflects the probability or intensity of early degradation at each spatial location, and the higher the pixel value, the more likely there is pitting, microcracks or roughness anomalies at that location; "degradation index" refers to a scalar value generated after weighted integration, area ratio calculation and texture attribute index fusion of the degradation heatmap, used to quantify the overall degradation severity.
[0047] In one alternative implementation, the multi-scale feature extraction and fusion method can be as follows: extract texture features using a convolutional encoder with shared weights at each scale, align non-original scale features to the original scale through bilinear upsampling and coordinate mapping, generate weights for each scale through a channel attention module (such as an SE Block), and input the weighted fusion into a lightweight decoder to output a degraded heatmap.
[0048] S6. Based on texture features and / or degradation heatmaps, calculate the suspected repair heatmap and the suspected repair index;
[0049] Among them, the "repair suspicion heat map" refers to the spatial distribution map reflecting the areas on the surface of the tank that are suspected of being artificially repainted, sanded or puttyed. Its generation is based on at least one of the following: texture boundary discontinuity, local texture statistical mutation, and cross-view texture consistency destruction. The "repair suspicion index" is a scalar value generated after regional aggregation, intensity weighting and morphological filtering of the repair suspicion heat map, which is used to quantify the possibility of local repair behavior.
[0050] In one alternative implementation, the method for calculating the suspected repair heatmap can be as follows: calculate the gradient magnitude on the texture feature map, extract pixels with magnitudes greater than a preset threshold to form boundary candidates, extract 5×5 neighborhood texture feature distributions on both sides of the boundary, calculate the KL divergence as the distribution distance, and mark the suspected repair boundary when the distance is greater than a preset threshold (e.g., 0.6), and superimpose it onto the suspected repair heatmap.
[0051] S7. Output the surface texture analysis results of the tank based on the degradation index and the repair suspicion index. The analysis results include the degradation risk level, the repair suspicion level and the corresponding visual annotations.
[0052] Among them, "Degradation Risk Level" refers to the risk level divided according to the range of degradation index values, such as 0-0.3 being low risk, 0.3-0.7 being medium risk, and 0.7-1.0 being high risk; "Repair Suspicion Level" refers to the suspicion level divided according to the range of repair suspicion index values, such as 0-0.4 being low suspicion, 0.4-0.7 being medium suspicion, and 0.7-1.0 being high suspicion; "Visual Annotation" refers to rendering the degradation heatmap and the repair suspicion heatmap in a semi-transparent overlay onto the original image or ROI area, distinguishing the degradation and repair areas with different colors, and annotating the corresponding risk level and suspicion level text labels in the corners of the image.
[0053] Example 2:
[0054] In an optional embodiment, this application further provides that after obtaining the effective analysis area (ROI) on the tank surface, the ROI is divided into multiple analysis blocks by meshing according to a preset block size, or the ROI is superpixel segmented to obtain multiple adaptive analysis blocks; a unique block identifier is assigned to each analysis block, and the coordinate range or pixel index set of the analysis block within the ROI is recorded; wherein, the learning, extraction, comparison, and determination of texture features in S4 to S6 are all based on the analysis block as the basic unit, and the same spatial location used for multi-view consistency constraints is corresponding to its pixel index set through the block identifier, including:
[0055] Step 1: Divide the ROI into multiple analysis blocks by meshing according to the preset block size, or perform superpixel segmentation on the ROI to obtain multiple adaptive analysis blocks;
[0056] The "preset block size" refers to a fixed width and height pixel value pre-set in the image space, such as 16×16, 32×32, or 64×64 pixels. Its value can be adapted according to the tank image resolution, surface curvature variation density, and the receptive field of the subsequent feature encoder. This size does not change the overall geometric structure of the ROI, but only performs logical division. "Superpixel segmentation" refers to over-segmenting the ROI based on color, texture, and spatial proximity to generate visually uniform connected regions with boundaries that fit the texture abrupt change areas. For example, it can be implemented using the SLIC (Simple Linear Iterative Clustering) or SEEDS algorithm. The number of superpixels is set to 50-500 to balance local detail preservation and computational load balance. Neither of the two segmentation methods depends on prior semantic labels, but is completed only based on the spatial and appearance distribution characteristics of pixels within the ROI. Mesh segmentation is suitable for regular curved surface segments (such as the middle of the cylinder), while superpixel segmentation is suitable for structural transition areas (such as the head and weld perimeter). The two can be automatically switched according to the local curvature or gradient variance of the ROI.
[0057] Step 2: Assign a unique block identifier to each analysis block and record the coordinate range or pixel index set of the analysis block within the ROI;
[0058] Among them, the "unique block identifier" is a logical index used to establish cross-view correspondence between multi-view images. It is in the form of an integer number (such as ID=1, 2, …, N) or a string code (such as "block_001_tank_side"). Its global uniqueness is guaranteed by the current ROI partitioning process and it does not repeat with other ROIs or historical frames. The "coordinate range" refers to the vertex coordinates (x_min, y_min, x_max, y_max) of the smallest bounding rectangle of the analysis block in the ROI image coordinate system, which is applicable to the gridded partitioning results. The "pixel index set" refers to the set of linear addresses of all pixels covered by the analysis block in the ROI flattening array, which is applicable to the superpixel segmentation results. Both are stored synchronously as metadata with the texture feature vector of the corresponding analysis block. They are directly called in the subsequent consistency constraint training in S4, multi-scale fusion in S5, and repair suspicion judgment in S6 to locate the feature source, align multi-view inputs, and limit the scope of operation.
[0059] Step 3: From S4 to S6, the learning, extraction, comparison and judgment of texture features are all based on the analysis block as the basic unit, and the same spatial location used for multi-view consistency constraints is corresponding to its pixel index set through the block identifier;
[0060] The phrase "using analysis blocks as basic units" means that: in S4, texture feature encoding is no longer performed on the entire ROI image, but rather on each sub-image block cropped from the analysis block, outputting a feature matrix of dimension N×D (N being the total number of analysis blocks and D being the feature dimension); in S5, multi-scale degradation identification performs scale pyramid construction and feature fusion within each analysis block, and the degradation heatmap generates local responses centered on the block and maps them back to the ROI space; in S6, suspected repair identification is also based on block-level statistics (such as boundary gradient distribution distance and cross-view similarity) for scoring and threshold determination; the "same spatial location" correspondence mechanism is manifested as follows: when analysis blocks with the same block identifier are extracted from two images from different viewpoints, the system retrieves the corresponding pixel index set in each image based on the identifier, and then crops out image block pairs with consistent physical locations as positive sample pairs for consistency constraints in S4; this mechanism does not rely on image registration or feature point matching, avoids the risk of registration failure caused by strong reflection and low texture areas, and improves the robustness and engineering feasibility of multi-view modeling.
[0061] Example 3:
[0062] In an optional embodiment, this application further provides step S3, which involves determining candidate specular regions and generating a specular mask, including:
[0063] Step 1: Calculate the brightness value, saturation value, and brightness gradient magnitude for each pixel within the ROI. Pixels that meet at least two of the following conditions are identified as highlight candidate pixels: brightness value is greater than the first threshold, saturation value is less than the second threshold, and brightness gradient magnitude is greater than the third threshold.
[0064] Here, "luminance value" refers to the component representing the intensity of light and dark in an image within a standard color space (such as YUV or CIELab), and its value reflects the degree to which a pixel is affected by direct light. In this embodiment, the luminance value is used to characterize the energy concentration of the specular reflection-dominant region. "Saturation value" refers to a quantitative indicator of color purity in an image, typically defined in the HSV or CIELab color space; a lower value indicates that the color is closer to grayish-white. In this embodiment, a saturation value below the second threshold indicates that the pixel lacks chromaticity information, consistent with the physical characteristic that highly reflective areas on metal / coating surfaces are approximately white or grayish-white. "Luminance gradient magnitude" refers to the rate of change of the luminance value in the spatial domain, expressed using Sobel, Scharr, or gradient magnitude maps. The value of the gradient is obtained by calculation (Map), which reflects the severity of the sudden change in local brightness. In this embodiment, the brightness gradient amplitude is greater than the third threshold, which corresponds to the edge of the highlight or the boundary of the specular reflection jump, which helps to distinguish the real texture structure from the optical artifact. The "first threshold", "second threshold" and "third threshold" are all adjustable parameters, and their value ranges are adapted to different light intensities, camera gains and the reflective characteristics of the tank material. For example, the first threshold can be set to 220~245 (normalized to 0~255), the second threshold can be set to 0.1~0.25 (normalized to 0~1), and the third threshold can be set to 8~20 (gradient response amplitude in pixels). The judgment logic that satisfies "at least two conditions" makes the highlight recognition both robust and selective: a single condition is easily affected by environmental interference (such as overexposed background leading to global high brightness, and generally low saturation under low light), while the combination of multiple conditions can effectively suppress false detections, while retaining the ability to cover complex forms such as weak highlights and diffuse highlights.
[0065] In one alternative implementation, the pixel determination method can be as follows: first, generate a binary image of brightness, a binary image of saturation, and a binary image of gradient magnitude, then perform a logical AND operation on the three images to obtain pairwise combined images (brightness & saturation, brightness & gradient, saturation & gradient), and finally perform a logical OR operation on the three combined images to output the final highlight candidate pixel image;
[0066] Step 2: Merge the connected regions of the candidate specular pixels to form a specular mask;
[0067] Here, "connected region" refers to the largest set of pixels that are interconnected in the sense of four-neighbor or eight-neighbor domains, which constitutes the candidate pixels for highlighting. In this embodiment, the connected region merging operation ensures that the same physical highlighting region (even if the pixels are discrete due to noise or uneven sampling) is uniformly identified, avoiding mask fragmentation. The "highlight mask" is a binary image with the same size as the ROI, where the position of the pixel value is 1 corresponds to the highlighting region, and the position of the pixel value is 0 corresponds to the non-highlighting region. This mask serves as a spatial guiding signal for subsequent morphological processing and reflection suppression network.
[0068] In one alternative implementation, the connected component merging method can be: using a queue-based breadth-first search (BFS) algorithm to traverse all unlabeled speckle candidate pixels, extracting and labeling connected components one by one;
[0069] Step 3: Perform at least one morphological operation on the specular mask, including dilation, erosion, closure, or hole filling, to obtain a target specular mask for reflection suppression processing;
[0070] Among them, "dilation" refers to using structuring elements to expand the neighborhood of the mask, which is used to fill small holes, connect adjacent connected regions, and enhance mask continuity. In this embodiment, the dilation operation can compensate for the shrinkage of highlight areas caused by a strict threshold, improving the mask's coverage of the actual reflection area. "Erosion" refers to using structuring elements to shrink the neighborhood of the mask, which is used to eliminate isolated noise, weaken elongated artifacts, and smooth mask boundaries. In this embodiment, the erosion operation can suppress isolated highlight pixels triggered by image noise or local textures, improving mask spatial accuracy. "Closing" is a composite operation of dilation followed by erosion, used to maintain the basic area of the overall region. Under the premise of not changing, the internal holes are filled and the external contour is smoothed; in this embodiment, the closing operation is suitable for handling the internal breakage phenomenon of the highlight area caused by uneven reflection; "hole filling" refers to setting the 0 value area completely surrounded by 1 in the mask to 1, which is a topology repair method; in this embodiment, hole filling can repair the ring-shaped holes caused by the bright center and dark edge of the highlight due to the scattering of metal microstructure; "target highlight mask" is the final mask after morphological optimization. Its geometric structure is more in line with the physical extension shape of the real highlight area, with higher spatial consistency and topological robustness, and can be used as a reliable spatial attention guide for the reflection suppression network;
[0071] In one alternative implementation, the morphological operation method can be to perform a dilation operation (structuring element is a 3×3 rectangle) and a closing operation (structuring element is a 5×5 ellipse) on the initial specular mask in sequence, so as to balance the connectivity of the region and the regularity of the boundary.
[0072] Example 4:
[0073] In an optional embodiment, this application also provides reflection suppression processing based on a specular mask in S3, including:
[0074] Step 1: Input the three-channel image corresponding to the ROI and the target specular mask as at least four channels into the reflection suppression network, and output the texture representation image with lighting decoupled.
[0075] The three-channel image is an RGB image of the effective analysis area of the tank surface obtained after S1 preprocessing and S2 segmentation; the target specular mask is a binary mask optimized by morphological operations as determined in Example 3, where the area with a pixel value of 1 represents the specular area that needs to be suppressed, and the area with a pixel value of 0 represents the normal texture area that does not need to be suppressed; the at least four-channel input means that the three-channel image and the single-channel target specular mask are spliced in the channel dimension to form a tensor with a shape of H×W×4, where the fourth channel is used as a mask guide channel to explicitly indicate the area of interest of the network; this input structure enables the specular suppression network to distinguish between specular and non-spectral areas and apply differential reconstruction constraints to the two in subsequent feature learning;
[0076] In one alternative implementation, the reflection suppression method can be: using a variant of the U-Net structure, wherein the encoding path contains 4 levels of downsampling, each level containing two 3×3 convolutions and ReLU activations, the decoding path corresponds to 4 levels of upsampling, each level of upsampling is concatenated with the encoded features of the same scale by channel, and then processed by two 3×3 convolutions; the target specular mask, in addition to serving as the input of the 4th channel, is also copied and expanded into an attention mask of the same size as the feature maps of each decoding layer, and spatial gating is applied to the skip connections during the feature fusion stage;
[0077] Step 2: The reflection suppression network consists of an encoder and a decoder. The encoder contains multiple convolutional layers and downsampling to extract multi-scale features, and the decoder contains upsampling and skip connections to restore spatial details.
[0078] In this context, the "encoder" refers to a feature abstraction module composed of multiple convolutional blocks. Each convolutional block contains at least one layer of convolutional operations, a normalization layer, and a non-linear activation function. Its function is to improve channel dimension and semantic expressiveness while reducing spatial resolution, thereby capturing multi-granular texture information from local edges to global structure. The "decoder" refers to a feature reconstruction module composed of multiple upsampling blocks. Each upsampling block contains at least one layer of upsampling operations (such as bilinear interpolation or transposed convolution), feature fusion operations (such as channel concatenation or element-wise addition), and convolutional refinement. Its function is to fuse shallow positional information while improving spatial resolution to ensure the spatial fidelity of the output image. The "skip connection" refers to directly passing the feature map output from a certain layer of the encoder to the corresponding layer of the decoder to compensate for the loss of positional information caused by downsampling. This allows the network to utilize high-level semantic guidance while retaining low-level detail support during reconstruction. In this embodiment, the skip connection is established at the same spatial scale and does not introduce additional trainable parameters; it serves only as a feature reuse path.
[0079] Step 3: The loss function during the training of the reflection suppression network should include at least the following: structure preservation loss for non-highlight regions, used to constrain the output to maintain structural consistency with the input in non-highlight regions; mask-weighted reconstruction loss for highlight regions, used to enhance the recovery of texture details in highlight regions; and a smoothing regularization term, used to suppress pseudo-texture noise in the output.
[0080] Among them, "structure preservation loss" is a pixel-level reconstruction error calculated under the constraint of inverting the target specular mask (i.e., non-spectral region mask), such as L1 loss or perceptual loss. Its function is to ensure that the network faithfully preserves the geometric structure, edge contours and texture distribution of the original image in areas not affected by reflection interference, and avoids overall texture distortion due to overfitting to specular regions. "Mask weighted reconstruction loss" is a weighted reconstruction error calculated under the masking of the target specular mask. Its weight matrix is strictly aligned with the target specular mask, so that the loss function gives higher gradient update intensity at the pixels in the specular region, thereby driving the network to prioritize the quality of texture detail restoration in this region. "Smoothing regularization term" is a constraint term applied to the gradient domain of the output image, such as the total variation (TV) regularization term. Its function is to suppress high-frequency artifacts, ringing effects or isolated noise points in the output, and improve the visual naturalness of the texture representation image and the stability of subsequent feature extraction.
[0081] Step 4: The ratio of the loss weight for highlight areas to the loss weight for non-highlight areas is 2 to 10.
[0082] The "loss weight for highlight regions" refers to the loss amplification factor applied to the pixel position where the target highlight mask value is 1 in the mask-weighted reconstruction loss; the "loss weight for non-highlight regions" refers to the base loss factor applied to the pixel position where the target highlight mask value is 1 after inversion in the structure preservation loss. This ratio is set to 2 to 10, which means that the error penalty intensity for highlight regions is significantly higher than that for non-highlight regions during model training, thereby forcing the network to allocate the main learning resources to the most difficult-to-recover reflective occlusion regions in the optimization direction. This ratio can be adaptively adjusted according to the dynamic range of the actual acquisition device, the ambient light intensity, and the reflectivity of the tank material. For example, a higher value (8 to 10) is taken in strong sunlight scenes, and a lower value (2 to 4) is taken in cloudy and weak reflective scenes.
[0083] Example 5:
[0084] In an optional embodiment, this application further provides a method based on the unique block identifier corresponding to the analysis block, extracting image blocks with the same block identifier from at least two viewpoint images as positive sample pairs, and extracting image blocks with different block identifiers as negative sample pairs; applying a metric learning loss to the positive and negative sample pairs, such that the feature distance d⁺ of the positive sample pairs satisfies d⁺ ≤ τ⁺, and the feature distance d⁻ of the negative sample pairs satisfies d⁻ ≥ τ⁻, where τ⁺ takes values from 0.2 to 0.8, and τ⁻ takes values from 1.0 to 2.5; during the inference stage, calculating a consistency score C for the multi-view feature similarity of the same block identifier, and when C is below a threshold range of 0.55 to 0.85, using the corresponding block as a candidate block for patching disguise suspicion identification in S6, including:
[0085] Step 1: Based on the unique block identifier corresponding to the analysis block, extract image blocks with the same block identifier from at least two viewpoint images as positive sample pairs, and extract image blocks with different block identifiers as negative sample pairs;
[0086] Here, "unique block identifier" refers to the index label assigned to each analysis block in Example 2 for unique spatial location representation. It can be in the form of integer number, hash code, or coordinate code, and is used to establish a mapping relationship of the same physical surface region between cross-view images. "Image block with the same block identifier" refers to the local image region in different view images that corresponds to the set of pixel indexes covered by the same block identifier after ROI alignment and coordinate mapping. "Image block with different block identifiers" refers to image blocks in the same or different view images where the block identifiers are different and do not share spatial overlap. This mapping mechanism enables the network to construct semantically consistent positive and negative sample pairs without relying on pixel-level registration.
[0087] In one alternative implementation, the extraction method may be as follows: First, based on the set of pixel indices of each analysis block recorded in S2, crop out image blocks of the corresponding size within the ROI of each viewpoint image; then, complete the combination of positive sample pairs by matching block identifiers, and randomly sample or select negative sample pairs according to a strategy based on spatial distance.
[0088] Step 2: Apply metric learning loss to positive and negative sample pairs such that the feature distance d⁺ of positive sample pairs satisfies d⁺ ≤ τ⁺, and the feature distance d⁻ of negative sample pairs satisfies d⁻ ≥ τ⁻, where τ⁺ is between 0.2 and 0.8, and τ⁻ is between 1.0 and 2.5.
[0089] Among them, "metric learning loss" is a supervised loss function used to optimize the spatial structure of feature embeddings. Its goal is to cluster similar samples (positive sample pairs) in the feature space and separate dissimilar samples (negative sample pairs). "Feature distance d⁺ / d⁻" is any one of Euclidean distance, cosine distance, or Mahalanobis distance, used to quantify the degree of difference between two feature vectors output by the same texture encoder. "τ⁺" is the maximum tolerable distance threshold for positive sample pairs, with a value ranging from 0.2 to 0.8, indicating that the model is constrained to organize multi-view features at the same location in a relatively compact space. "τ⁻" is the minimum necessary separation distance threshold for negative sample pairs, with a value ranging from 1.0 to 2.5, ensuring that features at different spatial locations have sufficient discriminative power and avoiding semantic confusion.
[0090] In one alternative implementation, the metric learning loss can be a variant of the triplet loss, which consists of an anchor image patch, a positive sample labeled in the same patch, and a negative sample labeled in a different patch. The joint constraint of d⁺ and d⁻ is achieved by adjusting the boundary interval.
[0091] Step 3: During the inference phase, calculate the consistency score C for the multi-view feature similarity of the same block identifier. When C is below the threshold range of 0.55 to 0.85, the corresponding block is selected as a candidate block for patching up the disguised suspect identification in S6.
[0092] Among them, the "consistency score C" is a scalar index that reflects the degree of intrinsic matching of texture features under the same identifier from multiple perspectives. It can be calculated by cosine similarity, normalized dot product, or the maximum probability of Softmax after temperature scaling. "C below the threshold range of 0.55 to 0.85" indicates that the feature expression of the block under multiple perspectives is significantly inconsistent, exceeding the fluctuation range caused by normal lighting and perspective changes, suggesting that its texture may have been artificially interfered with. The judgment result directly serves the identification of suspected disguise in S6, and is only used as a candidate input. It does not replace the final judgment based on the fusion of multiple evidences such as texture boundaries and statistical distribution.
[0093] In one alternative implementation, the consistency score C can be calculated as follows: the cosine similarity is calculated pairwise for the N viewpoint feature vectors of the same identifier, and the average value is taken as C; when N=2, C is the single-pair similarity; when N≥3, C reflects the overall clustering stability.
[0094] Example 6:
[0095] In an optional embodiment, this application also provides S5 for feature extraction and fusion of texture features at at least two spatial scales, including:
[0096] Step 1: Construct an image pyramid of at least two scales for the analysis block, including the original scale and at least one downsampling scale;
[0097] Here, "image pyramid" refers to a set of image sequences with different spatial resolutions generated by downsampling the texture representation images corresponding to the same analysis block. This structure is used in computer vision to realize multi-scale feature modeling. Its inherent function is to enable the model to have both global context awareness and local detail resolution capabilities. In this embodiment, the image pyramid is used to provide a multi-granular texture representation basis for each analysis block. The original scale retains pixel-level texture structure information, and the downsampling scale (e.g., 1 / 2, 1 / 4) compresses spatial redundancy, enhances sensitivity to large-scale degradation trends (such as overall coating roughening, macro color difference), and serves as the input source for subsequent cross-scale feature alignment and fusion.
[0098] Step 2: Perform feature encoding on the texture representation image at each scale to obtain the texture features at the corresponding scale;
[0099] "Feature encoding" refers to using a convolutional neural network to perform nonlinear mapping on the input image to extract discriminative high-dimensional semantic features. This operation is typically used in the relevant technical field to convert the original pixel space into a task-oriented feature space. In this embodiment, images at each scale are independently input to a shared weight or scale-adaptive encoder branch, which outputs a texture feature tensor of the corresponding scale. This ensures that features at different scales can reflect the degradation patterns unique to that scale. For example, features at the original scale are more likely to respond to the response of fine crack edges, while features at the downsampled scale are more likely to respond to changes in the density of pitting corrosion at the regional level. The encoding processes at each scale do not interfere with each other, maintaining the independence and integrity of feature expressions between scales.
[0100] Step 3: Align the features from the non-original scale to the original scale through upsampling and coordinate mapping;
[0101] "Upsampling" refers to restoring the spatial size of low-resolution features through interpolation (such as bilinear interpolation or transposed convolution); "coordinate mapping" refers to strictly aligning the upsampled feature map to the original scale coordinate system based on the pixel index set of the analysis block in the ROI, ensuring a one-to-one correspondence in spatial positions. This technique is often used in image processing to achieve spatial consistency alignment of multi-scale features. In this embodiment, its function is to eliminate the spatial offset introduced by downsampling, so that features of different scales can be operated on point by point under the same spatial grid, providing a geometric premise for subsequent attention-weighted fusion. For example, after upsampling, each pixel of a 1 / 2 scale feature corresponds to a 2×2 neighborhood of the original scale, and then coordinate mapping is used to locate it to the precise pixel position within the corresponding analysis block, thereby supporting pixel-level fusion decisions.
[0102] Step 4: Based on attention weights, perform weighted fusion of features at each scale to obtain multi-scale fused features, and generate a degradation heatmap from the multi-scale fused features;
[0103] Here, "attention weight" refers to dynamically calculating the importance score of features at each scale at each spatial location through a lightweight sub-network (such as a channel attention module or a spatial attention module). This mechanism is widely used in deep learning to enhance key features and suppress irrelevant responses. In this embodiment, attention weight is applied between the original scale and the feature tensors aligned with each downsampled scale to achieve adaptive weighting per channel or per spatial location. For example, in areas with suspected dense pitting, the model assigns higher weights to the original scale to capture tiny holes; while in areas with large-area orange peel texture abnormalities, the weight of the half-scale is increased to strengthen the regional consistency response. The resulting multi-scale fusion feature retains the spatial accuracy of the original scale and incorporates the robust discrimination capability of the downsampled scale. Furthermore, this fusion feature is mapped to a single-channel degradation heatmap by a lightweight decoding head (such as 1×1 convolution + sigmoid activation), where each pixel value represents the intensity of the probability of early degradation occurring at the corresponding location.
[0104] In one alternative implementation, the method for constructing the image pyramid is as follows: for the texture representation image corresponding to each analysis block, average pooling and convolution downsampling with a stride of 2 are applied sequentially to generate a three-layer pyramid with the original scale, 1 / 2 scale and 1 / 4 scale; wherein, the downsampling operation synchronously records the mapping relationship of each pixel in the original scale to support subsequent coordinate mapping.
[0105] In one alternative implementation, the feature encoding method is as follows: each scale image is input into a lightweight CNN encoder with shared parameters. This encoder contains 3 layers of convolution + BN + ReLU, and the number of output channels is 64. Finally, scale-level feature vectors are generated by global average pooling and then back-interpolated back to the spatial dimension.
[0106] In one alternative implementation, the upsampling and coordinate mapping method is as follows: bilinear interpolation is used to upsample the 1 / 2 scale features to the original size, and invalid regions are cropped according to the pixel index set of the analysis block, retaining the spatial domain response that belongs only to the analysis block.
[0107] In one alternative implementation, the attention weights are generated by concatenating the scale-aligned features along the channel dimension, inputting them into the SE (Squeeze-and-Excitation) module, outputting the channel weights for each scale, and then normalizing them by scale for weighting.
[0108] Example 7:
[0109] In an optional embodiment, this application further includes, after outputting the degradation heatmap in S5, the following steps:
[0110] Step 1: Binarize the degradation heatmap with a first threshold to obtain the first candidate degradation region. The first threshold is set as a low threshold for detecting early and weak degradation.
[0111] The first threshold refers to a lower threshold value set within the dynamic range of the degradation heatmap values. Its value is not fixed, but is adaptively adjusted according to the overall response intensity of the image. For example, it can be set to the 5th to 15th percentile of the global pixel values of the degradation heatmap. The purpose of setting this threshold is to retain weak but spatially continuous early degradation signals and avoid directly filtering out early signs such as pitting and fine cracks due to excessively high thresholds. In this embodiment, the threshold is not used for final judgment, but only as a basis for coarse-grained initial screening. The first candidate degradation region output by it usually includes the real degradation region and some false positive pixels caused by noise, local texture abrupt changes, or lighting residuals.
[0112] Step 2: Perform consistency matching on candidate degradation regions between degradation heatmaps at different scales, and retain regions that are marked at at least two scales as second candidate degradation regions;
[0113] Among them, the degradation heatmaps at different scales refer to the degradation heatmaps generated by the multi-scale feature fusion process, corresponding to at least two resolutions such as the original scale, 1 / 2 scale, and 1 / 4 scale; consistency matching refers to the logical intersection judgment of the response status of the same spatial location in heatmaps at different scales. Specifically, after binarizing each scale heatmap with a first threshold, resampling and aligning at the pixel level or analysis block level, and then performing position-by-position Boolean AND operation or voting mechanism; only when a connected region is marked as a degradation response in the binarized heatmaps at at least two scales is it included in the second candidate degradation region; this operation utilizes the physical characteristic that real degradation signs have consistent responses at multiple scales, while random noise or single-scale artifacts are difficult to simultaneously meet the low threshold response conditions at multiple scales, thereby effectively suppressing isolated false alarms.
[0114] Step 3: Constrain the degradation intensity or connected region area of the second candidate degradation region with the second threshold, remove small isolated noise regions, and obtain the target degradation region for calculating the degradation index;
[0115] The second threshold is a dual constraint parameter of morphology and intensity, distinct from the first threshold. Degradation intensity refers to the average or maximum response value of pixels within the second candidate degradation region on the original degradation heatmap. Connected region area refers to the number of pixels or corresponding analysis blocks occupied by each independent degradation region after being marked with connected regions. The value range of the second threshold can be set according to the typical degradation morphology of the tank surface. For example, the connected region area threshold can be set to no less than 3×3 pixels or no less than 2 adjacent analysis blocks, and the degradation intensity threshold can be set to no less than 1.2 to 2.0 times the first threshold. This step further eliminates sporadic false detection regions caused by high-frequency noise, edge ringing, or non-degradation texture disturbances by introducing spatial structure priors and intensity confidence constraints, ensuring that the final output target degradation region has interpretable spatial coherence and physical rationality, thereby supporting the stable calculation of the subsequent degradation index.
[0116] In one alternative implementation, the consistency matching method may be: performing bilinear interpolation upsampling on the binarized heatmaps at each scale to a uniform resolution, aligning them based on pixel coordinate mapping, and then generating a consistency mask using a pixel-by-pixel logical AND operation;
[0117] In one alternative implementation, the operation of removing small isolated noise regions can be: performing connected component analysis on the second candidate degraded region, eliminating connected components with an area smaller than a preset pixel threshold, and performing morphological closing operations on the remaining connected components to repair local breaks.
[0118] Example 8:
[0119] In an optional embodiment, this application also provides that the degradation index is obtained by combining at least two of the following:
[0120] Step 1: Weighted integral of degradation heatmap intensity within the target degradation region
[0121] The "weighted integral of degradation heatmap intensity within the target degradation area" refers to the numerical integration of pixel values in the degradation heatmap within the target degradation area determined after processing by S5, based on different weights applied according to their spatial location, scale level, or local confidence level. Terminology clarification layer: The "degradation heatmap" is a two-dimensional spatial distribution image generated in S5, where each pixel value represents the relative probability intensity of early coating degradation at the corresponding location. Technical feature inherent function layer: Heatmap intensity integration is commonly used in image analysis to quantify the spatial cumulative effect of abnormal responses, reflecting the overall severity of degradation. Functional layer in this embodiment: The weighted integral result serves as the first component of the degradation index, directly characterizing the energy concentration and intensity distribution non-uniformity of the degradation signal within the target area. A higher value indicates more severe and concentrated local degradation. This integration uses the target degradation area as the integration domain, excluding background and non-degradation interference, ensuring that the index focuses on the true risk area.
[0122] In one alternative implementation, the weighted integral method may be: for each pixel within the target degradation region, multiply its original intensity value in the degradation heatmap by the attention weight of the corresponding scale level (e.g., the original scale weight is 1.0 and the downsampling scale weight is 0.6), and then sum over all weighted pixel values.
[0123] Step 2: The proportion of the target degraded region to the ROI area
[0124] Among them, "the ratio of the target degradation area to the ROI area" refers to the dimensionless ratio obtained by dividing the total number of pixels in the target degradation area by the total number of pixels in the effective analysis area ROI on the tank surface; Terminology clarification layer: "ROI" stands for "Region of Interest", which specifically refers to the area to be processed in machine vision and image processing, delineated from the image being processed in the form of boxes, circles, ellipses, irregular polygons, etc. In this application, it specifically refers to the continuous tank surface area that can be used for texture analysis after being segmented by S2 and filtered twice by S7; Inherent function layer of technical features: The area ratio is used to measure the spatial coverage of abnormal areas in defect detection and is a key geometric indicator for assessing the risk diffusion trend; Function layer in this embodiment: This ratio, as the second component of the degradation index, reflects the overall spread of degradation phenomena on the tank surface. The larger the value, the wider the range of degradation impact. Even if the intensity of a single point is not high, it may indicate systemic aging or increased environmental erosion; This ratio complements the above weighted integral - the former represents "breadth" and the latter represents "depth".
[0125] In one alternative implementation, the area ratio calculation method may be: performing connected component labeling on the target degraded region, counting the total number of pixels in all labeled regions, and comparing it with the total number of pixels in the ROI mask.
[0126] Step 3: Calculate texture attribute indices based on multi-scale fusion features
[0127] Among them, "texture attribute index calculated based on multi-scale fusion features" refers to extracting quantitative texture descriptors with clear physical meaning from the multi-scale fusion features F_ms obtained by attention-weighted fusion in S6; Terminology clarification layer: "Multi-scale fusion features" is a unified representation obtained by upsampling and aligning texture features of the original scale and at least one downsampling scale and then performing attention-weighted fusion in S5; Inherent function layer of technical features: Texture attribute index is used to characterize the microstructure state in material surface analysis, such as pitting density reflecting local corrosion activity, crack direction consistency reflecting stress distribution uniformity, and texture roughness spectrum energy reflecting surface processing quality or wear degree; Role layer in this embodiment: As the third component of the degradation index, this index provides mechanistic-level interpretation capabilities beyond the intensity and area of the heat map, making the degradation index not only statistically significant but also engineering interpretable; Its input comes from the fused multi-scale features, so it is naturally compatible with degradation performance at different scales and enhances sensitivity to subtle early signs.
[0128] In one alternative implementation, the texture attribute index can be calculated by: encoding the multi-scale fusion features in the spatial domain using Local Binary Pattern (LBP) encoding, and statistically analyzing the frequency of high-response patterns in the LBP histogram within the unit analysis block as a proxy index for pitting density.
[0129] Step 4: The degradation index is normalized to a preset numerical range using linear weighting or nonlinear mapping.
[0130] The phrase "the degradation index is normalized to a preset numerical range through linear weighting or nonlinear mapping" refers to mapping the aforementioned three indicators to a unified numerical range after function transformation. The preset numerical range is, for example, an integer range of [0, 1], [0, 100], or [1, 5], used to output the degradation risk level. The terminology clarification layer states that "linear weighting" refers to summing each indicator after assigning it a fixed coefficient. "Nonlinear mapping" includes, but is not limited to, Sigmoid compression, piecewise linear mapping, threshold grading based on lookup tables (LUT), or lightweight neural network regression. The inherent functional layer of the technical features states that normalization is a common technique for fusing multi-source heterogeneous indicators, aiming to eliminate dimensional differences, improve cross-sample comparability, and adapt to downstream decision-making interfaces. The role layer in this embodiment states that the normalization operation, as the final step in generating the degradation index, ensures a unified output format, clear semantics, and system integrability. Its input consists of three complementary indicators, and its output is a single scalar, facilitating rapid understanding of the risk level by inspection personnel and supporting subsequent joint judgment with the suspected repair index.
[0131] In one alternative implementation, the normalization method can be: setting weight coefficients w_1=0.4, w_2=0.3, w_3=0.3, and then weighting and summing the results obtained above three times, followed by Min-Max linear scaling to [0, 100].
[0132] Example 9:
[0133] In an optional embodiment, this application also provides a method for generating a suspected repair heatmap based on texture boundary discontinuities, including:
[0134] Step 1: Calculate the texture feature gradient or degradation heatmap gradient on the analysis block, and extract pixels or blocks with gradient magnitude greater than a preset threshold as boundary candidates;
[0135] Among them, "texture feature gradient" refers to the direction-sensitive response obtained by performing a first-order differential operation on the viewpoint-decoupled texture feature F output by S4 in the spatial dimension. It is used to characterize the degree of change of texture structure in a local area. Its inherent function is to locate the position of structural abrupt change in the image domain or feature domain, without depending on the absolute brightness or color value. In this embodiment, the gradient response is used as the initial boundary detector, and its output serves as the spatial anchor point for subsequent distribution comparison, providing a geometric positioning basis for identifying unnatural texture jumps caused by human intervention.
[0136] "Degradation heatmap gradient" refers to the result obtained by performing the same spatial differentiation operation on the degradation heatmap H_deg output by S5. Its semantics point to the local rate of change of degradation intensity in space. In this embodiment, this gradient is used to supplement the capture of abnormal jumps at the edge of degradation distribution, which is especially suitable for the case where the degradation has not yet formed a significant pixel-level intensity difference, but a sudden change in spatial distribution gradient has occurred. Its function is to expand the coverage of boundary candidates and avoid the missed detection of weak boundaries caused by the smoothing process of degradation heatmap.
[0137] The "preset threshold" is a gradient magnitude criterion used to distinguish between significant texture jumps and natural undulations. Its setting does not depend on a fixed value, but is dynamically determined based on the statistical distribution of gradient magnitudes within the analysis block. For example, the 85th to 95th percentiles are taken as the adaptive threshold. In this embodiment, the threshold plays the role of screening high-confidence boundary positions, ensuring that subsequent distribution comparisons are only performed on candidate positions with sufficient structural abrupt change intensity, thereby controlling computational overhead and improving robustness.
[0138] In one alternative implementation, the gradient calculation method can be: applying the Sobel operator to the texture feature F along the horizontal and vertical directions respectively to synthesize a gradient magnitude map G_F=√(G_x^2+G_y^2), where G_x is the horizontal coordinate of the pixel in the texture feature and G_y is the vertical coordinate of the pixel in the texture feature, and then performing threshold determination after block normalization.
[0139] Step 2: Statistically analyze the texture feature distribution on both sides of the candidate boundary and calculate the distribution distance between the two sides. The distribution distance includes any one or more of KL divergence, Bhattacharyya distance, or cosine distance.
[0140] Here, "both sides of the candidate boundary" refers to two adjacent regions defined by extending orthogonally along the gradient direction with the peak position of the extracted gradient magnitude as the center. The spatial range can be a fixed pixel window (such as 8×8) or a local neighborhood of the adaptive matching analysis block scale. In this embodiment, this division method is used to isolate potential heterogeneous texture regions on both sides of the boundary, providing a structural basis for quantifying their statistical differences.
[0141] "Texture feature distribution" refers to the probability density approximation obtained by statistically modeling the set of texture feature vectors falling into the two sides. Its form can be histogram, kernel density estimation, Gaussian mixture model parameters or feature clustering centers in low-dimensional embedding space. This distribution reflects the degree of consistency of texture semantics in the local area. In this embodiment, it serves as the core criterion for judging whether human intervention has occurred. Natural textures usually show a gradual transition, while the paint-touching area often shows a significant separation of the two sides.
[0142] The Kullback-Leibler divergence is an information-theoretic metric that measures the asymmetric difference between two probability distributions. It is defined as follows: , and These are two probability distributions whose similarity needs to be measured. and These are the first and second probability distributions under the corresponding probability distributions. The larger the value of each element, the more significant the distribution difference. In this embodiment, the KL divergence is used to characterize the unpredictability of the texture pattern on one side of the boundary to the other side, which is particularly suitable for cases where the degradation and repair coatings have a unidirectional shift in the spectral energy distribution.
[0143] The Bhattacharyya distance is a symmetric measure of the similarity between two probability distributions, defined as follows: , and These are two probability distributions whose similarity needs to be measured. and These are the first and second probability distributions under the corresponding probability distributions. The larger the value of each element, the smaller the distribution overlap. In this embodiment, this distance is more sensitive to the differences in the tails of the distribution on both sides, which is helpful in identifying the structural deviation between the touch-up paint layer and the original coating in the low-frequency texture components.
[0144] "Cosine distance" is a geometric measure of the difference in the directions of two vectors, defined as... u and v are two vectors that need to be measured to determine the cosine distance. When applied to the feature mean vector, the consistency of the overall texture tendency of the two regions can be quickly evaluated. In this embodiment, the distance calculation has low overhead and strong robustness, and is suitable for edge deployment scenarios with high real-time requirements.
[0145] In one alternative implementation, the distribution distance calculation method may be: extract the mean vectors of texture features μ_L and μ_R from the two sides respectively, and calculate the cosine distance between them as a preliminary screening index;
[0146] Step 3: When the distribution distance is greater than the preset distance threshold, the corresponding boundary candidate is confirmed as a suspected repair boundary and superimposed on the suspected repair heatmap;
[0147] The "preset distance threshold" is an empirical criterion used to determine whether the difference in texture distribution reaches the typical level of artificial repair. Its value is not fixed, but is set according to the statistical distribution of the known repair samples and natural texture samples in the training data. For example, the 99th percentile of the distance distribution of natural texture samples is taken as the upper limit of the threshold. In this embodiment, the threshold plays a role in binarization decision-making, transforming the continuous distance measurement into a discrete "suspected repair" label, providing a logical basis for subsequent heatmap overlay.
[0148] "Suspected repair boundary" refers to a spatial boundary line segment or pixel chain that is determined above to have significantly inconsistent texture statistical characteristics on both sides and conforms to the typical characteristics of artificial repair. In this embodiment, it serves as direct visual evidence of repair camouflage, which is different from the material state changes reflected by the degradation heatmap and has a stronger attribution explanation ability.
[0149] "Overlaying onto the suspected repair heatmap" refers to injecting the confirmed suspected repair boundaries into the global suspected repair heatmap H_sus in a weighted manner. The injection intensity can be positively correlated with the distribution distance value or uniformly assigned weight. In this embodiment, this operation realizes the spatial alignment and intensity fusion of multi-source evidence, so that the final heatmap reflects both the boundary position and the degree of anomaly.
[0150] Step 4: Apply connectivity and morphological constraints to suspected repair boundaries, and remove boundary segments whose length is less than the threshold or whose curvature changes do not meet the constraints, in order to reduce false alarms caused by natural texture undulations.
[0151] Among them, "connectivity constraint" refers to performing connected component analysis on suspected repair boundaries and retaining only boundary segments with a pixel connection number greater than the minimum connected length (such as 15 pixels). In this embodiment, this constraint is used to filter out isolated noise points or short pseudo-boundaries, which is consistent with the prior knowledge that manual repair usually forms continuous boundary lines.
[0152] "Morphological constraints" include a quantitative evaluation of the geometric properties of boundary segments. Among them, "length threshold" is used to exclude excessively short non-structural transitions, and "curvature variation constraint" refers to calculating the curvature derivative of the boundary trajectory to eliminate segments with frequent curvature oscillations (such as natural orange peel texture or weld ripples) or excessively large absolute curvature values (such as sharp mechanical scratches). In this embodiment, this constraint utilizes the fact that artificially repaired boundaries typically have geometric features of moderate length and gentle curvature changes, which significantly suppresses systematic false alarms caused by inherent texture undulations on the tank surface.
[0153] In one alternative implementation, the morphological constraint method can be: fitting a cubic spline curve to the boundary segment, calculating its curvature standard deviation, and determining that it does not conform to the morphological characteristics of the repair boundary when the standard deviation is greater than 0.3 rad / pixel.
[0154] Example 10:
[0155] In an optional embodiment, this application also provides a method for generating a suspected repair heatmap based on the decrease in texture feature consistency at the same spatial location under different viewpoints, including:
[0156] Step 1: For the same unique block identifier, extract the corresponding texture features from at least two viewpoint images to form a feature set;
[0157] Among them, "same unique block identifier" refers to the unique index defined in Example 2, which is used to characterize a certain analysis block within the ROI. This identifier corresponds one-to-one with the pixel index set of the analysis block, ensuring the geometric consistency of spatial position alignment in cross-view images; "texture features" refers to the depth feature vector extracted by the view decoupled texture encoder of Example 5 from the illumination decoupled texture representation image output by the reflection suppression network in Example 4. Its dimension is d (e.g., 128 or 256), which has the ability to maintain semantic stability for the same physical location under different imaging conditions; "feature set" is an ordered or unordered set composed of texture feature vectors corresponding to the same block identifier in at least two viewpoints. The number of its elements is equal to the number of viewpoints participating in the consistency judgment, and it is used for subsequent similarity calculation and statistical modeling.
[0158] In one alternative implementation, the extraction method may be: based on the block identifier, look up the corresponding pixel index set in the image of each viewpoint, crop out image blocks of the same spatial range, input them into the trained texture encoder, output the corresponding feature vectors respectively, and aggregate them into a set;
[0159] Step 2: Calculate the similarity between any two features within the feature set, and obtain the mean similarity and / or minimum similarity as the consistency index of the corresponding analysis block;
[0160] Among them, "similarity" refers to the measure of the semantic closeness between two texture feature vectors in the feature space. It can be calculated by cosine similarity, a normalized form of Euclidean distance, or a learnable metric function. "Mean similarity" reflects the overall consistency level of the analysis block under all view combinations and is suitable for evaluating the uniformity of systematic coatings. "Minimum similarity" reflects the degree of local anomaly of the analysis block under the most unfavorable view pair and is more sensitive to single-point repair or edge transition mismatch. The two can be used independently or weighted and fused together to form a robust consistency criterion.
[0161] In one alternative implementation, the similarity calculation method can be: for all unordered feature pairs in the feature set... i <j, and For each of the i-th and j-th features in the current unordered feature pair, calculate the cosine similarity. Then, take the arithmetic mean of all the results to obtain the mean similarity.
[0162] In another alternative implementation, the similarity calculation method may include: calculating only the similarity between each feature block and the features of the reference viewpoint (such as the main viewpoint), and taking the minimum value as the consistency index to reduce computational complexity;
[0163] Furthermore, this similarity calculation method can also employ the following approach: introducing a temperature scaling factor τ to calibrate the similarity, i.e. , and The i-th and j-th features in the current unordered feature pair are respectively used. After Softmax normalization, the maximum response probability is taken as the consistency score to enhance the discrimination granularity.
[0164] Step 3: When the consistency index is less than the preset consistency threshold, mark the corresponding analysis block as a suspected repair block and upgrade its suspected repair level;
[0165] Among them, the "preset consistency threshold" is an empirical boundary value used to distinguish between natural texture fluctuations and consistency damage caused by artificial repairs. Its value ranges from 0.55 to 0.85. This value range covers the lower limit of the similarity distribution of most normal coatings under multiple views, while avoiding accidental low similarity scenes caused by slight motion blur and small pose deviations. The "repair suspicion level" is a discretized confidence level that is superimposed and updated on the repair suspicion heatmap defined in Example 9. For example, it can be a three-level system (low / medium / high) or a five-level system (0 to 4). Its improvement operation does not change the original heatmap intensity, but adds weight coefficients or logic gating signals at the decision layer.
[0166] In one alternative implementation, the marking and boosting operation can be: adding a fixed intensity increment (e.g., +0.3) to the corresponding position of the suspected repair heatmap for analysis blocks with consistency indices below the threshold, and simultaneously marking "consistency_violation=True" in the block metadata;
[0167] In another alternative implementation, the marking and promotion operation may include: building a consistency anomaly detection module, receiving a sequence of consistency indicators, calculating the standard deviation multiple of its deviation from the historical mean through a sliding window, and triggering a level jump when it exceeds 2σ;
[0168] Furthermore, the marking and boosting operation can also be performed by combining the spatial gradient information of the degradation heatmap in Example 5, and only performing level boosting on blocks located in low degradation intensity regions and with abnormal consistency, so as to avoid confusion with the real degradation regions.
[0169] Step 4: When the intensity of the degradation heatmap of the analysis block is lower than the preset low degradation threshold and the suspected repair level is higher than the preset threshold, output the "suspected repair cover-up" label.
[0170] Among them, "degradation heatmap intensity" refers to the statistical representative quantity of pixel values in the analysis block area of the degradation heatmap H_deg generated by decoding the multi-scale fusion features in Example 6, such as mean, maximum or weighted center intensity; "preset low degradation threshold" is set as the upper limit of early degradation detection sensitivity, and the typical value is the 10th to 20th percentile of the global distribution of H_deg, to ensure that only weak signs that are not visually visible but have potential risks are captured; "preset threshold" is used to limit the trigger threshold of the repair suspicion level, for example, "high" level in the three-level system corresponds to level ≥3; "suspected repair cover" is a structured semantic label, which includes a type field ("suspected_patch_cover"), confidence (calculated based on the ratio of consistency index to degradation intensity), spatial location (block identifier and coordinate range) and suggested action field ("recommend_nondestructive_inspection").
[0171] In one alternative implementation, the identifier output operation can be: applying a special layer rendering to the analysis block in the visualization interface—for example, a two-color border (blue inside and red outside), a blinking animation, and a floating tooltip containing the content "Surface intact | Internal anomaly | Re-inspection recommended";
[0172] This application ensures the physical meaning of multi-view texture comparison by using the "same unique block identifier" as the geometric anchor point for cross-view feature alignment; by employing a complementary design of "mean similarity" and "minimum similarity", it maintains sensitivity to local anomalies while ensuring overall stability; by combining the dual constraints of "low degradation intensity" and "high repair suspicion level", it accurately identifies camouflage behavior where the surface appears normal but there is human intervention at the underlying layer; and finally outputs a structured "suspected repair cover-up" identifier, which not only provides qualitative judgment but also carries traceable spatial positioning, quantitative confidence and engineering treatment suggestions, significantly enhancing the interpretability and decision support capabilities of inspection results.
[0173] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
[0174] Figure 2 A schematic diagram of a deep learning-based vehicle tank surface texture analysis system provided in one embodiment of this application is shown below. Figure 2 As shown, the vehicle tank surface texture analysis system 300 based on deep learning in this embodiment includes: a data acquisition and preprocessing module 301, a tank area determination module 302, a strong reflection suppression and illumination decoupling module 303, a viewpoint decoupling texture encoding module 304, a multi-scale degradation early sign recognition module 305, a repair and camouflage suspicion recognition module 306, and a fusion output module 307.
[0175] The data acquisition and preprocessing module 301 is used to acquire surface images or video frames of the tank of a hazardous chemical transport vehicle, and preprocess the surface images or video frames, including any one or more of distortion correction, resolution normalization, and brightness / color normalization; the tank area determination module 302 is used to perform tank area segmentation on the preprocessed image to obtain the effective analysis area (ROI) of the tank surface; the strong reflection suppression and illumination decoupling module 303 is used to determine the candidate regions of highlights within the ROI and generate a highlight mask, and perform reflection suppression processing on the ROI based on the highlight mask to obtain an illumination-decoupled texture representation image; the viewpoint decoupled texture encoding module 304 is used to perform feature encoding on the texture representation image to obtain viewpoint decoupled texture features, wherein the texture features are obtained through... Learning is achieved by applying consistency constraints to multi-view image patches at the same spatial location, making the feature distance of the same spatial location less than the feature distance of different spatial locations under different viewpoints; a multi-scale degradation early sign identification module 305 is used to extract and fuse the texture features at at least two spatial scales, outputting a degradation heatmap and a degradation index to characterize the spatial distribution and severity of early signs of coating degradation; a repair camouflage suspicion identification module 306 is used to calculate a repair suspicion heatmap and a repair suspicion index based on the texture features and / or the degradation heatmap; a fusion output module 307 is used to output the tank surface texture analysis results based on the degradation index and the repair suspicion index, the analysis results including degradation risk level, repair suspicion level and corresponding visual annotation.
[0176] The system in this embodiment can be used to execute the methods of any of the above embodiments, and its implementation principle and technical effect are similar, so they will not be described again here.
Claims
1. A deep learning-based method for analyzing the surface texture of a vehicle tank, characterized in that, include: S1. Data Acquisition and Preprocessing: Acquire surface images or video frames of the tank of a hazardous chemical transport vehicle, and preprocess the surface images or video frames. The preprocessing includes any one or more of distortion correction, resolution normalization, and brightness / color normalization. S2. Tank Region Determination: Perform tank region segmentation on the preprocessed image to obtain the effective analysis region ROI on the tank surface; S3. Strong reflection suppression and illumination decoupling: Determine the candidate region of highlights within the ROI and generate a highlight mask. Perform reflection suppression processing on the ROI based on the highlight mask to obtain an illumination-decoupled texture representation image. S4. Viewpoint Decoupled Texture Encoding: The texture representation image is feature encoded to obtain viewpoint decoupled texture features. The texture features are learned by applying consistency constraints to multi-view image patches at the same spatial location, so that the feature distance at the same spatial location under different viewpoints is less than the feature distance at different spatial locations. S5. Multi-scale early signs of degradation identification: The texture features are extracted and fused at at least two spatial scales to output a degradation heatmap and degradation index, which are used to characterize the spatial distribution and severity of early signs of coating degradation. S6. Repairing and camouflage suspicion identification: Based on the texture features and / or the degradation heatmap, calculate the repair suspicion heatmap and the repair suspicion index; S7. Fusion Output: Output the surface texture analysis results of the tank based on the degradation index and the repair suspicion index. The analysis results include the degradation risk level, the repair suspicion level and the corresponding visual annotations. The reflection suppression process based on the high-brightness mask includes: The three-channel image corresponding to the ROI and the target specular mask are used as at least four-channel inputs to the reflection suppression network, and the output is a texture representation image with decoupled illumination. The reflection suppression network includes an encoder and a decoder. The encoder contains multiple convolutions and downsampling to extract multi-scale features, and the decoder contains upsampling and skip connections to recover spatial details. Furthermore, the loss function during training of the reflection suppression network includes at least: The structure preservation loss in non-highlight regions is used to constrain the output and input to maintain structural consistency in non-highlight regions. The mask-weighted reconstruction loss in the highlight areas is used to enhance the recovery of texture details in the highlight areas of the output. Smoothing regularization terms are used to suppress pseudo-texture noise in the output; The ratio of the loss weight of the highlight area to the loss weight of the non-highlight area is 2 to 10. The calculation of the suspected repair heatmap and the suspected repair index includes: generating a suspected repair heatmap based on texture boundary discontinuity and / or generating a suspected repair heatmap based on the decrease in texture feature consistency at the same spatial location under different viewpoints; The generation of the suspected repair heatmap based on texture boundary discontinuities specifically includes: Calculate the texture feature gradient or degradation heatmap gradient on the analysis block, and extract pixels or blocks with gradient magnitude greater than a preset threshold as boundary candidates; The texture feature distribution is statistically analyzed on both sides of the candidate boundary, and the distribution distance between the two sides is calculated. The distribution distance includes any one or more of KL divergence, Bhattacharyya distance or cosine distance. When the distribution distance is greater than a preset distance threshold, the corresponding boundary candidate is confirmed as a suspected repair boundary and superimposed on the suspected repair heatmap; Connectivity and morphological constraints are applied to suspected repair boundaries to remove boundary segments whose length is less than a threshold or whose curvature changes do not meet the constraints, thereby reducing false alarms caused by natural texture undulations. The method of generating a suspected repair heatmap based on the decrease in texture feature consistency at the same spatial location from different viewpoints specifically includes: For the same unique block identifier, extract the corresponding texture features from at least two viewpoint images to form a feature set; Calculate the similarity between any two features within the feature set, and obtain the mean similarity and / or minimum similarity as the consistency index of the corresponding analysis block; When the consistency index is less than the preset consistency threshold, the corresponding analysis block is marked as a suspected repair block and its suspected repair level is increased. When the degradation heatmap intensity of the analysis block is lower than the preset low degradation threshold and the suspected repair level is higher than the preset threshold, a "suspected repair cover-up" flag is output.
2. The method according to claim 1, characterized in that, After obtaining the effective analysis area (ROI) on the surface of the tank, S2 further includes: The ROI is divided into multiple analysis blocks by meshing according to a preset block size, or the ROI is superpixel segmented to obtain multiple adaptive analysis blocks; Assign a unique block identifier to each analysis block and record the coordinate range or set of pixel indices of the analysis block within the ROI; In particular, the learning, extraction, comparison and determination of texture features in S4 to S6 are all based on the analysis block as the basic unit, and the same spatial location used for multi-view consistency constraints is corresponding to its pixel index set through the block identifier.
3. The method according to claim 2, characterized in that, The process of identifying candidate regions for highlights and generating a highlight mask in S3 includes: Within the ROI, the brightness value, saturation value, and brightness gradient magnitude of each pixel are calculated. Pixels that meet at least two of the following conditions are identified as highlight candidate pixels: brightness value is greater than the first threshold, saturation value is less than the second threshold, and brightness gradient magnitude is greater than the third threshold. Merge the connected regions of the candidate pixels for highlighting to form a highlight mask; Perform at least one morphological operation, such as dilation, erosion, closure, or hole filling, on a specular mask to obtain a target specular mask for reflection suppression processing.
4. The method according to claim 2, characterized in that, Applying consistency constraints in S4 includes: Based on the unique block identifier corresponding to the analysis block, image blocks with the same block identifier are extracted from at least two viewpoint images as positive sample pairs, and image blocks with different block identifiers are extracted as negative sample pairs; A metric learning loss is applied to the positive and negative sample pairs such that the feature distance d⁺ of the positive sample pairs satisfies d⁺≤ the maximum tolerable distance threshold τ⁺ of the positive sample pairs, and the feature distance d⁻ of the negative sample pairs satisfies d⁻≥ the minimum necessary separation distance threshold τ⁻ of the negative sample pairs, where τ⁺ is 0.2~0.8 and τ⁻ is 1.0~2.5; During the inference phase, a consistency score C is calculated for the multi-view feature similarity of the same block identifier. When C is lower than the threshold range of 0.55 to 0.85, the corresponding block is used as a candidate block for repairing disguised suspect identification in S6.
5. The method according to claim 2, characterized in that, In S5, feature extraction and fusion of texture features at at least two spatial scales includes: Construct an image pyramid of at least two scales for the analysis block, including the original scale and at least one downsampling scale; Feature encoding is performed on the texture representation image at each scale to obtain the texture features at the corresponding scale; Features not at the original scale are upsampled and aligned to the original scale using coordinate mapping. Based on attention weights, features at each scale are weighted and fused to obtain multi-scale fused features, and degradation heatmaps are generated from the multi-scale fused features.
6. The method according to claim 2, characterized in that, After outputting the degradation heatmap in S5, it further includes: The degradation heatmap is binarized with a first threshold to obtain a first candidate degradation region. The first threshold is set as a low threshold for detecting early and weak degradation. Consistency matching is performed on candidate degradation regions between degradation heatmaps at different scales, and regions that are marked at at least two scales are retained as second candidate degradation regions; The degradation intensity or connected region area of the second candidate degradation region is constrained by a second threshold, and small isolated noise regions are removed to obtain the target degradation region for calculating the degradation index. The small-area isolated noise region is a connected component in the second candidate degradation region whose area is smaller than a preset pixel threshold.
7. The method according to claim 2, characterized in that, The degradation index is obtained by combining at least two of the following: The weighted integral of the intensity of the degradation heatmap within the target degradation region; The proportion of the target degraded region to the ROI area; Texture attribute indices obtained from multi-scale fusion feature calculation; The texture attribute indicators include any one or more of pitting density, crack direction consistency, and texture roughness spectrum energy. Furthermore, the degradation index is normalized to a preset numerical range through linear weighting or nonlinear mapping, and is used to output the degradation risk level.
8. A deep learning-based system for analyzing the surface texture of a vehicle tank, characterized in that, Applied to the method as described in any one of claims 1-7, comprising: The data acquisition and preprocessing module is used to acquire surface images or video frames of the tank of a hazardous chemical transport vehicle, and to preprocess the surface images or video frames. The preprocessing includes any one or more of distortion correction, resolution normalization, and brightness / color normalization. The tank region determination module is used to perform tank region segmentation on the preprocessed image to obtain the effective analysis region ROI on the tank surface. A strong reflection suppression and illumination decoupling module is used to determine the candidate region of highlights within the ROI and generate a highlight mask. Based on the highlight mask, the ROI is subjected to reflection suppression processing to obtain an illumination-decoupled texture representation image. A viewpoint decoupled texture encoding module is used to encode the texture representation image to obtain viewpoint decoupled texture features. The texture features are learned by applying consistency constraints to multi-view image patches at the same spatial location, so that the feature distance at the same spatial location under different viewpoints is less than the feature distance at different spatial locations. A multi-scale degradation early sign identification module is used to extract and fuse the texture features at at least two spatial scales, and output degradation heatmaps and degradation indices to characterize the spatial distribution and severity of early signs of coating degradation. A repair and disguise suspicion identification module is used to calculate a repair suspicion heatmap and a repair suspicion index based on the texture features and / or the degradation heatmap; The fusion output module is used to output the surface texture analysis results of the tank based on the degradation index and the repair suspicion index. The analysis results include the degradation risk level, the repair suspicion level and the corresponding visual annotation.