An interpretable ai-based copper tube atmospheric corrosion tracing visual diagnosis method

CN121978099BActive Publication Date: 2026-08-21INST OF METAL RESEARCH - CHINESE ACAD OF SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202512021593.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-30
Publication Date
2026-08-21
Estimated Expiration
2045-12-30

AI Technical Summary

Technical Problem

[0006]本发明的目的是为了提供一种基于可解释AI的铜管大气腐蚀溯源可视化诊断方法,以解决现有技术在面对真实工程场景中三维结构腐蚀图像时泛化能力不足、以及模型决策机理不透明的问题

Benefits of technology

高精度与强泛化能力:利用真实场景图像和鲁棒预处理,使模型对三维管状结构在现场复杂光照下的图像具有高分类精度(测试集准确率>96%),克服了传统方法对实验室标准图像的依赖。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121978099B_ABST
    Figure CN121978099B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of intelligent monitoring of material corrosion and artificial intelligence, and particularly discloses a copper pipe atmospheric corrosion tracing visualization diagnosis method based on an interpretable AI, which realizes rapid, in-situ and high-precision regional classification of corrosion morphology of the copper pipe under different atmospheric environments, and deeply reveals the physical and chemical correlation between visual features and microscopic corrosion mechanisms relied on the classification results, thereby providing a set of reliable and interpretable scientific tools for intelligent corrosion diagnosis and tracing of engineering structures. The present application has high precision and strong generalization ability, overcomes the dependence of traditional methods on laboratory standard images, and improves the reliability of the technology. For the first time, the present application quantitatively correlates the key visual features recognized by machine learning with microscopic mechanisms such as chemical composition and distribution heterogeneity of corrosion products, and realizes a new paradigm of reverse inference of corrosion environment and process through macroscopic images. The present application is suitable for rapid, in-situ corrosion state diagnosis and regional tracing in engineering sites.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent monitoring of material corrosion and artificial intelligence, and in particular to a visual diagnostic method for tracing the source of atmospheric corrosion of copper pipes based on interpretable AI. Background Technology

[0002] Copper and copper alloys are indispensable basic materials in construction, electronics, energy, and other fields. Corrosion in the atmospheric environment directly affects structural safety and service life. Traditional corrosion assessment methods mainly rely on the corrosion strip weight loss method, electrochemical testing techniques, and microstructural characterization methods under laboratory conditions. While these methods offer high accuracy, they typically have significant limitations: the corrosion strip method is time-consuming and cannot reflect real-time conditions; electrochemical testing often deviates from actual atmospheric environments, making it difficult to reproduce complex atmospheric-corrosion interface processes; and microscopic analysis methods such as scanning electron microscopy and X-ray diffraction require complex sample preparation and expensive equipment, lacking the capability for rapid on-site detection. Therefore, existing methods are insufficient to meet the urgent need for rapid, in-situ, and non-destructive identification of corrosion conditions in engineering projects.

[0003] In recent years, with the rapid development of artificial intelligence technology, especially the successful application of computer vision and machine learning in image recognition, new technical paths have been provided for corrosion monitoring. Researchers have attempted to transform corrosion morphology diagnosis into a classification and recognition problem based on macroscopic images, achieving efficient and objective intelligent assessment by establishing a mapping relationship between image features and corrosion state. Currently, this field mainly forms two technical paradigms: one is based on traditional image processing algorithms to quantitatively extract corrosion morphology features in a controlled laboratory environment, such as using gray-level co-occurrence matrix, local binary mode, and image entropy to construct a statistical model between corrosion degree and image features; the other is exploring the application of deep learning, especially convolutional neural networks, in corrosion image analysis, using end-to-end models to achieve tasks such as corrosion level classification and thickness prediction. Although these studies show good application prospects, they still have significant shortcomings when facing real and complex industrial scenarios. First, most existing models are built based on accelerated corrosion tests or standardized imaging conditions in the laboratory, and their image data differs significantly from the corrosion morphology formed by real outdoor atmospheric exposure. Furthermore, they do not consider interference factors such as uneven lighting, varying angles, and cluttered backgrounds in on-site shooting, resulting in weak generalization ability and poor robustness of the models in practical applications. It is particularly noteworthy that most studies are based on planar specimens, whose imaging conditions are relatively standardized. However, three-dimensional structures widely present in engineering (such as pipes and profiles) are difficult to image and exhibit significant deformation due to their curved surfaces and complex lighting interactions, making it difficult to directly transfer and apply existing models. Secondly, existing methods, especially deep learning models, are often in a "black box" state. Although they can achieve high classification accuracy, they cannot explain the physical basis of the model's decisions and lack an effective correlation between macroscopic image features and microscopic corrosion mechanisms. This results in a lack of reliable scientific explanation for the model's prediction results, hindering the widespread application of this technology in scenarios with high reliability requirements such as corrosion source tracing and lifetime prediction.

[0004] Therefore, there is an urgent need to develop an intelligent corrosion image analysis method based on real-world scene data, oriented towards 3D structures, and possessing both high classification performance and strong interpretability. This method should be able to adapt to complex on-site imaging conditions, extract stable and robust visual features, and, with the help of interpretable machine learning techniques, reveal the intrinsic relationship between model decisions and the chemical composition, spatial distribution, and morphological complexity of corrosion products. This will build a reliable bridge from "macroscopic images" to "microscopic mechanisms," propelling intelligent corrosion diagnostic technology from the laboratory to practical engineering applications. Summary of the Invention

[0005] This invention is applicable to the rapid identification of corrosion status, corrosion zone tracing, and visualization of corrosion mechanisms in copper and copper alloy pipes under complex atmospheric environments. It is particularly suitable for intelligent image analysis and mechanism correlation modeling of corrosion in three-dimensional tubular structures under complex lighting and geometric deformation conditions. Complex atmospheric environments include marine, industrial-marine, and urban atmospheres.

[0006] The purpose of this invention is to provide a visual diagnostic method for tracing the source of atmospheric corrosion of copper pipes based on interpretable AI, so as to solve the problems of insufficient generalization ability and opaque model decision mechanism when facing three-dimensional structural corrosion images in real engineering scenarios.

[0007] This invention utilizes commercial smartphones as image acquisition tools and combines them with interpretable machine learning models to achieve rapid, in-situ, and high-precision regional classification of corrosion morphology of copper pipes under different atmospheric environments. It also reveals in depth the physicochemical correlation between the visual features on which the classification results depend and the microscopic corrosion mechanisms (such as product composition and spatial distribution complexity), thereby providing a reliable and interpretable scientific tool for intelligent corrosion diagnosis and source tracing of engineering structures.

[0008] To achieve the above objectives, the present invention provides the following technical solution: Step 1: Outdoor exposure of three-dimensional specimens and acquisition of real-world scene images; Pure copper tubes were selected as typical three-dimensional structural samples and subjected to long-term outdoor exposure tests in three representative atmospheric environments: Wenchang (high temperature, high humidity, high salinity), representing a tropical marine atmosphere; Qingdao (medium temperature, medium humidity, SO2 pollution), representing an industrial marine atmosphere; and Chongqing (high temperature, high humidity), representing a high-temperature, high-humidity urban atmosphere. Exposure periods covered 2, 4, 6, 12, and 24 months to obtain samples at different corrosion stages. Image acquisition was conducted directly on-site, using commercial smartphones to simulate rapid engineering inspection scenarios. After each exposure period, a fixed number of valid macroscopic corrosion morphology images were collected at each location, ultimately constructing a raw dataset of corrosion images from multiple locations and time points.

[0009] Step 2: Robust image preprocessing for tubular structures; To overcome the unavoidable uneven illumination, geometric distortion, specular reflection, and complex background interference of tubular curved surface structures in on-site imaging, a standardized image preprocessing workflow is designed: Background uniformity acquisition: The retrieved copper tube sample was placed on a pure white paper background for photography to obtain the original RGB image.

[0010] Grayscale conversion and adaptive segmentation: The original image is converted into a grayscale image, its grayscale histogram is analyzed, and an adaptive threshold segmentation algorithm is used to binarize the image, initially separating the copper tube foreground and background.

[0011] Morphological optimization and precise localization: Morphological opening and closing operations are performed on the binary image to eliminate noise, fill holes, and enhance the connectivity of the target region. Subsequently, a contour detection algorithm is used to identify and select the connected region with the largest area as the precise mask for the copper tube body.

[0012] Target Extraction and Standardization: Apply the above mask to the original RGB image to precisely crop out the region containing only the copper pipe. Scale this region to a fixed size (e.g., 256×256 pixels). If the background area occupies more than 50% of the processed image, it is removed to ensure that the input image focuses on the eroded target.

[0013] Step 3: Quantitative extraction of multi-dimensional visual features; From the preprocessed standard image, the system extracts numerical feature vectors that characterize the erosion morphology, color, and texture information. All calculations are performed in the RGB color space, and a total of 24-dimensional features are extracted. Color statistical features (9 dimensions): Calculate the mean, standard deviation, and skewness of pixel values ​​for the R, G, and B color channels respectively. The mean reflects the overall hue of the corrosion products; the standard deviation quantifies the spatial fluctuation of the colors in each channel; the skewness characterizes the asymmetry of pixel value distribution and is used to capture distribution anomalies caused by localized corrosion (such as pitting) or product accumulation.

[0014] Texture and informational features (15 dimensions): Image entropy (1D): Calculate the Shannon entropy of an image as a comprehensive indicator of the complexity of image information and the irregularity of erosion morphology.

[0015] Gray-level co-occurrence matrix features (4D): GLCM is calculated and averaged in four directions: 1 pixel distance, 0°, 45°, 90°, and 135°, and then four texture descriptors, contrast, dissimilarity, homogeneity, and energy, are extracted.

[0016] Local binary pattern features (10-dimensional): A 10-dimensional LBP statistical histogram is generated using a uniform pattern, 8-neighborhood, and LBP operator with a radius of 1 to describe the local texture pattern caused by micro-morphological changes.

[0017] Step 4: Feature aggregation and interpretable machine learning modeling; Local Feature Aggregation: To capture the non-uniformity of erosion distribution within the image, a simple linear iterative clustering algorithm is first used to segment each image into a fixed number (e.g., 128) of superpixels. Within each superpixel, the aforementioned 24-dimensional features are calculated to form a local feature matrix. Subsequently, the mean, standard deviation, minimum, and maximum values ​​are aggregated along the feature dimensions to generate a fixed-length global feature vector, which serves as the input to the model.

[0018] Construction of the hybrid periodic dataset: In order to force the model to learn the region-specific erosion visual features that are not affected by exposure time, samples from all exposure periods (2-24 months) are mixed to form the training and testing datasets.

[0019] Model Training and Optimization: A variety of classic machine learning algorithms with strong interpretability, such as Support Vector Machines, Random Forests, K-Nearest Neighbors, Decision Trees, Multilayer Perceptrons, and Logistic Regression, were used for model training. A hyperparameter optimization framework was employed, with five-fold cross-validation targeting the macro-F1 score to determine the optimal parameter configurations for each algorithm. The final performance was then evaluated on independent test sets.

[0020] Step 5: Visual explanation and scientific connection of the model's decision-making mechanism Key feature identification: For the best-performing model (such as support vector machine), the key visual features that contribute the most to the region classification are quantified and identified by the feature importance ranking method.

[0021] Visual Attention Visualization: The test image is segmented using the same superpixel segmentation parameters as during the training phase. An occlusion sensitivity analysis method is employed, systematically occluding different superpixel regions and observing the changes in the model's output probability to generate a heatmap. This heatmap visually displays the image regions that the model prioritizes when making classification decisions, revealing its "attention" mechanism.

[0022] Feature Correlation Mapping Analysis: The Pearson correlation coefficient matrix among all 24-dimensional features is calculated and presented in the form of a heatmap. By analyzing the intrinsic relationships between features, this study reveals from a statistical perspective how different visual features synergistically characterize the unified physical essence of erosion morphology, such as the correlation between color fluctuations and texture complexity.

[0023] Macro-micro mechanism correlation: The results of the above interpretability analysis (key features, areas of attention) are compared and correlated with the results of traditional corrosion product characterization techniques (such as XRD phase analysis, SEM / EDS micro-morphology and composition analysis, and OM macro-morphology observation). The physical meaning of key image features (such as blue channel mean, red channel mean, blue channel standard deviation, image entropy, etc.) is clearly explained, and they are directly correlated with the specific chemical composition, spatial distribution pattern and morphological complexity of corrosion products formed under different environmental driving conditions, thereby constructing a complete and interpretable chain of evidence from "macro-visual fingerprint" to "micro-corrosion mechanism".

[0024] The beneficial effects of this invention are as follows: High accuracy and strong generalization ability: By utilizing real-world scene images and robust preprocessing, the model achieves high classification accuracy (test set accuracy > 96%) for images of 3D tubular structures under complex lighting conditions, overcoming the dependence of traditional methods on laboratory standard images.

[0025] Transparent and explainable decision-making: By analyzing the importance of features and visualizing heatmaps, the "black box" of the model is opened, giving classification decisions a clear scientific basis and enhancing the credibility of the technology.

[0026] A macro-micro correlation bridge: For the first time, key visual features identified by machine learning are systematically and quantitatively correlated with microscopic mechanisms such as the chemical composition and heterogeneity of corrosion products, realizing a new paradigm of inferring corrosion environment and process from macroscopic images.

[0027] Highly practical for engineering applications: The method is based on commercial smartphones and interpretable machine learning models, requiring no complex or expensive equipment, and is suitable for rapid, in-situ corrosion diagnosis and regional source tracing in engineering sites. Attached Figure Description

[0028] Figure 1 Image preprocessing flowchart; Figure 2a Confusion matrix, ROC curve and PR curve of classification results, (a) Support Vector Machine (SVM); Figure 2b Random Forest (RF) Figure 2c K-Nearest Neighbors (KNN) Figure 2d Decision Tree (DT) Figure 2e Multilayer perceptron (MLP) Figure 2f Logistic Regression (LR); Figure 3a Heatmap of the importance of SLIC superpixel blocks in Wenchang; Figure 3b Heatmap of the importance of superpixel blocks in Qingdao SLIC; Figure 3c Heatmap of the importance of Chongqing SLIC superpixel blocks. Detailed Implementation

[0029] The present invention will be further described below with reference to embodiments, but is not limited thereto.

[0030] This embodiment provides a specific implementation process for a visual diagnostic method for tracing the source of atmospheric corrosion in copper pipes based on interpretable AI. The data processing and model analysis process can be found in [reference needed]. Figure 1 .

[0031] Sample preparation and outdoor exposure: Industrial pure copper pipes were selected as the three-dimensional test samples. Outdoor exposure sites were established at three typical atmospheric environment sites: Wenchang, Hainan (representing tropical marine atmosphere), Qingdao, Shandong (representing industrial marine atmosphere), and Chongqing (representing high-temperature and high-humidity urban atmosphere). The copper pipe samples were exposed outdoors at these three sites for 2, 4, 6, 12, and 24 months to obtain samples at different stages of corrosion development.

[0032] Real-world scene image acquisition: At the end of each exposure cycle, images of the retrieved copper tube samples were captured on-site using a commercial smartphone (such as an iPhone 12 or equivalent). During image capture, the samples were placed against a uniform white printed paper background, and under natural light conditions, the shooting angle was kept as perpendicular to the sample axis as possible, while accepting unavoidable variations in ambient light. At least 50 valid images were captured at each location and during each exposure cycle, ultimately constructing an original dataset containing 3 (locations) × 5 (cycles) × 50 (images) = 1200 images.

[0033] Image preprocessing: All acquired images are processed using a standardized preprocessing workflow: a. Convert the original RGB image to a grayscale image.

[0034] b. Based on the grayscale histogram, an adaptive thresholding algorithm (such as the Otsu algorithm) is used to binarize the image and initially segment the foreground (copper pipe) and background.

[0035] c. Perform morphological operations on the binary image (first perform opening operations to remove noise points, then perform closing operations to fill small holes) to obtain the optimized copper pipe region mask.

[0036] d. Use contour detection algorithms (such as the findContours function in the OpenCV library) to identify connected regions in the mask and select the contour with the largest area as the accurate mask for the copper tube body.

[0037] e. Apply this precise mask to the original RGB image to extract the copper pipe region, and then crop and scale this region to a uniform size of 256 pixels × 256 pixels. If the background area occupies more than 50% of the processed image, discard the sample to ensure input quality.

[0038] Feature extraction: For each preprocessed standard image (I_input), extract 24-dimensional color and texture features: a. Color features (9 dimensions): In the RGB space, calculate the mean (mean_R, mean_G, mean_B), standard deviation (std_R, std_G, std_B), and skewness (skew_R, skew_G, skew_B) of all pixel values ​​in the R, G, and B channels respectively.

[0039] b. Texture features (15 dimensions): Image entropy (1D): After converting an image to grayscale, its Shannon entropy is calculated.

[0040] GLCM features (4D): The gray-level co-occurrence matrix is ​​calculated in four directions with an offset distance of 1 pixel and angles of 0°, 45°, 90° and 135°. After averaging the matrices in each direction, the contrast (glcm_contrast), dissimilarity (glcm_dissim), homogeneity (glcm_homogen) and energy (glcm_energy) are calculated.

[0041] LBP features (10-dimensional): The LBP operator with uniform mode, 8 neighborhood, and radius of 1 is used to process and calculate its 10-dimensional statistical histogram (lbp_0 to lbp_9).

[0042] Feature aggregation and dataset construction: a. Using a simple linear iterative clustering algorithm, each 256×256 image is divided into 128 superpixels.

[0043] b. Calculate the above 24-dimensional features within each superpixel region to obtain a 128×24 local feature matrix.

[0044] c. Calculate the mean, standard deviation, minimum and maximum values ​​of the matrix along the feature dimensions (24 dimensions), and aggregate them into a 96-dimensional global feature vector representing the image.

[0045] d. Image samples from all three locations and all five exposure periods were mixed and randomly divided into a training set (70%), a validation set (15%), and a test set (15%). The dataset labels were the corresponding geographical regions (Wenchang, Qingdao, Chongqing).

[0046] Machine learning model training and optimization: Six classifiers were selected: Support Vector Machine, Random Forest, K-Nearest Neighbors, Decision Tree, Multilayer Perceptron, and Logistic Regression. The Optuna hyperparameter optimization framework was used, with the macro F1 score obtained through five-fold cross-validation as the optimization objective, to automatically optimize the parameters of each model. A fixed random seed (e.g., 42) was used to ensure the reproducibility of the results. After obtaining the optimal hyperparameters, each model was retrained on the complete training set.

[0047] Model performance and interpretability analysis: See Figures 2 and 3; a. Performance Evaluation: Each model was evaluated on an independent test set. Taking the Support Vector Machine (SVM) as an example, its classification accuracy reached 99.67%, while the accuracy of other models was all above 96%. The confusion matrix, ROC curve, and PR curve all show that the models have extremely strong discriminative ability for the erosion images of the three regions.

[0048] b. Feature Importance Analysis: The SVM models with the best performance were ranked by feature importance (e.g., based on model weights or permutation importance). The results showed that the blue channel mean (mean_B), red channel mean (mean_R), blue channel standard deviation (std_B), and image entropy were the four most important discriminative features.

[0049] c. Visualization of Decision Attention: Typical images from three regions were selected from the test set, and superpixel segmentation was performed using the same SLIC parameters. The contribution of each superpixel region to the model's correct classification was calculated using the occlusion method, generating a heatmap overlaid on the original image. The heatmap shows that the model's attention to the Wenchang sample is mostly concentrated in the non-reflective dark areas (where the pitting corrosion products are clearly detailed), its attention to the Qingdao sample is concentrated in the reflective bright areas (where the color characteristics of the continuous product film are significant), while its attention to the Chongqing sample is evenly distributed, which is consistent with the differences in the uniformity of corrosion products in different regions.

[0050] d. Feature Correlation Analysis: The Pearson correlation coefficient matrix among all 24-dimensional features was calculated and a heatmap was plotted. The analysis revealed that there were strong positive correlations among the means, standard deviations, and skewness of each color channel; at the same time, image entropy was also strongly positively correlated with features such as the standard deviation of each color channel and GLCM contrast, which together constituted a feature cluster characterizing "surface complexity and non-uniformity".

[0051] Verification of the correlation with the scientific mechanism of corrosion: The results of the above machine learning analysis were compared with the results of traditional corrosion characterization analysis of samples exposed during the same period: XRD analysis showed that the corrosion products of the Wenchang sample contained a large amount of copper chloride ore (Cu2Cl(OH)3), the Qingdao sample contained a small amount of copper chloride ore and copper sulfate pentahydrate (Cu4(SO4)(OH)6·2H2O), and the Chongqing sample mainly contained cuprous oxide (Cu2O). This explains the differences in the mean values ​​of the blue and red channels of samples from different regions.

[0052] SEM / EDS and OM analysis showed that the pitting and copper chloride spots on the surface of the Wenchang sample were large and densely distributed; the Qingdao sample had a continuous product film with a few spots; and the Chongqing sample had a uniform and dense surface. This is directly related to the differences in spatial distribution complexity quantified by features such as image entropy and color standard deviation.

[0053] The above correlation confirms that the key visual features (such as mean_B, std_B, and entropy) relied upon by the machine learning model have clear physicochemical significance, reflecting the chemical composition tendency, spatial distribution heterogeneity, and morphological complexity of corrosion products, respectively. This enables interpretable tracing from macroscopic image features to microscopic corrosion mechanisms.

[0054] This embodiment demonstrates that the method of the present invention can use smartphone images to perform high-precision regional classification of corrosion of three-dimensional copper pipes in real atmospheric environments, and provide decision-making insights with scientific basis for corrosion through interpretability technology, thus possessing significant engineering application value.

[0055] Matters not covered in this invention are common knowledge.

[0056] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their likenesses.

Claims

1. A visual diagnostic method for tracing the source of atmospheric corrosion in copper pipes based on interpretable AI, characterized in that: Includes the following steps: S1. Real-world image acquisition in multiple scenarios: Exposing the copper tube sample to outdoor environments in at least two different typical atmospheric conditions; Macroscopic corrosion images of the copper pipe surface after different exposure periods were collected on-site using mobile terminal devices to form the original image dataset; S2. Robust image preprocessing: The original image is preprocessed to eliminate background interference and accurately locate the main body area of ​​the copper tube, and a standardized target image is output. S3. Multi-dimensional visual feature extraction: Extract color statistical features and texture features from the standardized target image to form an initial feature vector; S4. Feature aggregation and model building: The standardized target image is segmented into superpixels, the initial feature vector is calculated in each superpixel, and feature statistics are aggregated to generate a global feature vector; samples from all exposure periods are mixed to form a training set and a test set, and an interpretable machine learning classification model is trained based on the global feature vector; S5. Decision Explanation and Mechanism Correlation: The interpretability analysis of the trained machine learning classification model is performed to identify key visual features that contribute highly to the classification of regions, and the key visual features are correlated with the microscopic mechanisms obtained through corrosion product characterization technology to construct an interpretable evidence chain from macroscopic image features to microscopic corrosion mechanisms. The robust image preprocessing described in step S2 specifically includes: S2.1 Background Unification Acquisition: The copper tube sample is placed on a uniform light-colored background and photographed to obtain the original RGB image; S2.2 Preliminary segmentation of foreground target: The original RGB image is converted into a grayscale image, and an adaptive threshold segmentation algorithm is used to obtain a binarized image, thus initially separating the foreground and background; S2.3 Morphological optimization and precise positioning: Morphological operations are performed on the binarized image to optimize the target region, and the contour detection algorithm is used to locate the connected region with the largest area as a precise mask for the copper tube body; S2.4 Target Extraction and Size Standardization: The copper pipe region is cropped from the original RGB image using the precise mask, and the image of this region is scaled to a preset size to obtain the standardized target image; The feature statistics aggregation in step S4 specifically involves: calculating the mean, standard deviation, minimum and maximum values ​​of the initial feature vector along the feature dimension, and concatenating these statistics to generate the global feature vector; The interpretable machine learning classification model mentioned in step S4 is one or more of the following: support vector machine, random forest, decision tree, K-nearest neighbor algorithm, logistic regression, or multilayer perceptron; The interpretability analysis described in step S5 includes at least one of the following techniques: S5.1 Feature Importance Ranking: Quantify and rank the contribution of each input feature to the model's classification decision; S5.2 Visual Attention Visualization: Generate and display heatmaps representing the image regions of interest for the model's decision-making; S5.3 Feature Correlation Analysis: Calculate and analyze the statistical correlation between different visual features.

2. The method for tracing the source of atmospheric corrosion in copper pipes based on interpretable AI, as described in claim 1, is characterized in that... The color statistical features mentioned in step S3 include: the mean, standard deviation, and skewness of pixel values ​​in the three color channels: red (R), green (G), and blue (B); the texture features include: image entropy, texture descriptor extracted based on gray-level co-occurrence matrix, and texture statistical histogram extracted based on local binary pattern.

3. The method for tracing the source of atmospheric corrosion in copper pipes using interpretable AI based on the visual diagnosis method described in claim 1, characterized in that, The corrosion product characterization techniques described in step S5 include one or more of X-ray diffraction analysis, scanning electron microscopy and energy dispersive spectroscopy, and optical microscopy.

4. The visual diagnostic method for tracing the source of atmospheric corrosion in copper pipes based on interpretable AI according to any one of claims 1-3, characterized in that, The mobile terminal device is a commercial smartphone.

5. The visual diagnostic method for tracing the source of atmospheric corrosion in copper pipes based on interpretable AI according to any one of claims 1-3, characterized in that, The typical atmospheric environments include marine atmospheric environments, industrial-marine atmospheric environments, and urban atmospheric environments.