Method and system for distinguishing polymer material fracture failure types based on deep learning

Through deep learning technology, intelligent identification of fracture failure types of polymer materials is carried out. Using convolutional neural networks and occlusion analysis, the problems of time-consuming and inefficient manual processing in existing technologies are solved, and efficient and accurate fracture failure type identification is achieved.

CN120411967BActive Publication Date: 2025-09-23NAT POLYMER MATERIALS IND INNOVATION CENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510918720.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-04
Publication Date
2025-09-23
Estimated Expiration
2045-07-04

AI Technical Summary

Technical Problem

Existing technologies rely on manual processing to determine the type of fracture failure of polymer materials, which is time-consuming and inefficient, making it difficult to meet the requirements of rapid response and accurate decision-making.

Method used

A convolutional neural network based on deep learning is used to intelligently identify the fracture failure types of polymer materials. The recognition efficiency and accuracy are improved by preprocessing, data enhancement and occlusion analysis of the original SEM images.

Benefits of technology

It achieves efficient and accurate identification of polymer material fracture failure types, reduces dependence on manual identification, improves identification efficiency and accuracy, and provides interpretable analysis of model prediction results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120411967B_ABST
    Figure CN120411967B_ABST
Patent Text Reader

Abstract

This application discloses a method and system for distinguishing the fracture failure type of polymer materials based on deep learning, belonging to the field of deep learning technology. The method includes: obtaining an image dataset by preprocessing the collected original SEM images of polymer materials; wherein the image dataset includes several sub-images after cropping the original SEM images; inputting the image dataset into a preset neural network model to predict the material fracture failure type, obtaining a model prediction result to represent the fracture failure type of the polymer material; then processing the original image using an occlusion method to obtain an interpretable analysis image to determine which areas in the sub-image the model used to obtain the model prediction result when making the prediction, providing data support for subsequent model improvement. This application uses a convolutional neural network to intelligently identify the fracture failure type of polymer materials, reducing reliance on manual identification and improving identification efficiency and accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of deep learning technology, and specifically relates to a method and system for distinguishing the fracture failure type of polymer materials based on deep learning. Background Art

[0002] Polymer Material Fracture Failure Analysis primarily involves an in-depth investigation of the causes of polymer material fracture. Through comprehensive analytical and testing methods, we help clients analyze the failure causes of polymer and composite materials, providing a scientific basis for addressing polymer material fracture, cracking, corrosion, discoloration, and other issues in research and production. This process includes fracture analysis, composition analysis, mechanical and thermal property comparisons, and failure reproduction / verification, providing a foundational basis for material selection and use.

[0003] The current method of determining fracture failure types is highly dependent on the practitioners' professional knowledge, practical experience, and judgment. In addition, when faced with complex and changeable failure modes, massive amounts of test data, and growing analysis needs, manual processing methods are often time-consuming and inefficient, making it difficult to meet the requirements of rapid response and accurate decision-making. Summary of the Invention

[0004] This application proposes a method and system for distinguishing the fracture failure types of polymer materials based on deep learning. The convolutional neural network is used to intelligently identify the fracture failure types of polymer materials, reduce dependence on manual identification, and improve identification efficiency and accuracy.

[0005] The first aspect of the present application provides a method for distinguishing the fracture failure type of polymer materials based on deep learning, the method comprising:

[0006] An image dataset is obtained by preprocessing the collected original SEM images of the polymer material; wherein the image dataset includes a plurality of sub-images obtained by cropping the original SEM images;

[0007] Input the image data set into the preset neural network model to predict the material fracture failure type and obtain the model prediction result;

[0008] The original SEM images are processed using an occlusion method to obtain an interpretability analysis image of each original SEM image, and a model judgment basis for determining a model prediction result is determined based on the interpretability analysis image.

[0009] The above scheme first performs preprocessing on the original SEM image, including cropping, to crop the original SEM image into multiple sub-images, expanding the size of the image dataset, enabling subsequent model predictions to use richer image data and improving the accuracy of the prediction results. A preset neural network model is then used to predict the type of material fracture failure, quickly obtaining more accurate model prediction results, improving the efficiency and accuracy of data category recognition, and reducing reliance on manual recognition. An occlusion method is then used to sequentially occlude each fixed-size area of ​​the sub-image in each original SEM image. These occluded areas are obtained by segmenting the sub-images. The impact of the occluded sub-images on the model prediction results of the original SEM image is analyzed, and an interpretability analysis image is obtained for each original SEM image. The interpretability analysis image clearly shows which areas in the image the model primarily relies on to derive the final model prediction results during the prediction process. Therefore, the interpretability analysis image can be used to evaluate the rationality of the model and provide data support for subsequent model improvements.

[0010] In a possible implementation method of the first aspect, an image dataset is obtained by preprocessing the collected original SEM images of the polymer material, specifically:

[0011] Scan the polymer materials that have experienced fracture failure using an electron microscope to obtain original SEM images of polymer materials with all fracture failure types;

[0012] The original SEM image is subjected to data cleaning, data cropping, and data enhancement to obtain a plurality of sub-images of preset sizes; wherein the data enhancement is to adjust the brightness, and / or contrast, and / or saturation of the image.

[0013] The above scheme performs data cropping and enhancement on the original SEM images, enriches the data volume and improves the data quality, and provides a large amount of high-quality training data for subsequent model prediction.

[0014] In a possible implementation method of the first aspect, data cleaning, data cropping, and data enhancement are performed on the original SEM image to obtain a plurality of sub-images of preset sizes, specifically:

[0015] Cutting out the information column in the original SEM image to complete data cleaning;

[0016] According to a preset size, the original SEM image after data cleaning is cropped and then an image label is added to obtain a plurality of sub-images, and then the sub-images are format converted and data enhanced; wherein the image label of each sub-image is the image label of the corresponding original SEM image.

[0017] In a possible implementation method of the first aspect, the image dataset is input into a preset neural network model to predict the material fracture failure type, and a model prediction result is obtained, specifically:

[0018] Inputting the image dataset into a preset neural network model for iterative training to obtain a label prediction model; wherein the image dataset includes a training set, a validation set, and a test set; the neural network model is a trained model obtained by parameter tuning and architecture modification of the transfer learning network;

[0019] Obtaining a first label for each subimage in the image dataset according to a label prediction model and an image dataset;

[0020] Determining the proportion of each first label in the original SEM image according to the sub-image corresponding to each original SEM image;

[0021] The first label with the highest proportion in each of the original SEM images is selected as the predicted label of each original SEM image to obtain the model prediction result.

[0022] The above solution first trains a neural network model using a large image dataset to obtain a trained label prediction model. The label prediction model is then used to predict labels for each sub-image. The proportion of each first label in each original SEM image is calculated, and the first label with the highest proportion is selected to represent the predicted label for the original SEM image, thereby obtaining more accurate model prediction results.

[0023] In a possible implementation method of the first aspect, the image dataset is input into a preset neural network model for iterative training to obtain a label prediction model, specifically:

[0024] Inputting the training set into a preset neural network model for training, and evaluating the training results of the neural network model using the validation set to obtain the prediction accuracy of the trained neural network model;

[0025] According to the optimal prediction accuracy, the corresponding trained neural network model is selected as the label prediction model.

[0026] In a possible implementation method of the first aspect, the image dataset is input into a preset neural network model for iterative training, specifically as follows:

[0027] When the neural network model loads the image dataset, the total number of samples of each image label in all sub-images is counted according to the image labels of the sub-images;

[0028] Determine the weight ratio of each image label according to the total number of sub-images and the total number of samples;

[0029] According to the weight ratio, the sub-images corresponding to each image label are resampled through the neural network model to perform model training.

[0030] The above solution uses resampling when loading the training set into the model to alleviate the problem of sample imbalance and prevent it from affecting prediction accuracy. The resampling weights are determined based on the number of samples corresponding to different image labels. This prevents an overabundance of data for a particular image label from leading to uneven sample distribution, which in turn affects the accuracy of subsequent data predictions.

[0031] In a possible implementation method of the first aspect, the original SEM image is processed using an occlusion method to obtain an interpretability analysis image of each original SEM image, specifically:

[0032] Constructing a sub-image relationship dictionary according to the position of the sub-image in the corresponding original SEM image;

[0033] Block the area in each sub-image respectively to obtain an impact analysis result of each sub-image;

[0034] According to the subgraph relationship dictionary, the position of each subgraph in the corresponding original SEM image is restored, and the impact analysis results of the subgraphs are spliced ​​according to the positions to obtain an interpretability analysis image of each original SEM image.

[0035] The above scheme constructs a subgraph relationship dictionary that describes the specific locations of subgraphs in the original SEM image. It then sequentially blocks fixed-size regions within each subgraph in the original SEM image. After each block, the impact of the blocked subgraph on the model's prediction results for that original SEM image is analyzed to determine the impact analysis results for each subgraph. The impact analysis results for each subgraph corresponding to each original SEM image are then concatenated based on the subgraph relationship dictionary. The resulting interpretability analysis image for the original SEM image can intuitively demonstrate which image regions the model primarily relied on to arrive at the final model prediction results. Therefore, the interpretability analysis image can be used to evaluate the rationality of the model and provide data support for subsequent model improvements.

[0036] In a possible implementation method of the first aspect, the area in each sub-image is blocked respectively to obtain an impact analysis result of each sub-image, specifically:

[0037] Blocking the area in each of the sub-images according to a preset sliding window with a preset step size, wherein the sliding window size is the size of the blocked area each time, and the sliding window step size is the step size of each blocking movement;

[0038] The influence of the blocked area on the prediction result of the model is analyzed to obtain the influence analysis result of each sub-image.

[0039] In a possible implementation method of the first aspect, interpretability analysis of an image is specifically performed as follows:

[0040] The interpretability analysis images include original SEM images, positive contribution heat maps, negative contribution heat maps and mask images;

[0041] Among them, the positive contribution heat map is used to display the occluded areas in the original SEM image that are positively correlated with the corresponding model prediction results; the negative contribution heat map is used to display the occluded areas in the original SEM image that are negatively correlated with the corresponding model prediction results; the mask image is used to display the key areas in the original SEM image that are related to the accuracy of the model prediction results.

[0042] A second aspect of the present application provides a polymer material fracture failure type identification system based on deep learning, the system comprising: a data preprocessing module, a data prediction module, and a data analysis module;

[0043] The data preprocessing module is used to obtain an image data set by preprocessing the collected original SEM images of the polymer material; wherein the image data set includes a plurality of sub-images obtained by cropping the original SEM images;

[0044] The data prediction module is used to input the image data set into a preset neural network model to predict the material fracture failure type and obtain a model prediction result;

[0045] The data analysis module is used to process the original SEM images using an occlusion method to obtain an interpretability analysis image of each original SEM image, and to determine a model judgment basis for a model prediction result based on the interpretability analysis image. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solution of the present application, the following is a brief introduction to the drawings required for use in the implementation. Obviously, the drawings described below are only some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0047] Figure 1 This is a schematic diagram of a specific process of a method for distinguishing the fracture failure type of polymer materials based on deep learning provided in the first embodiment of the present application;

[0048] Figure 2This is a schematic diagram of the original image cropping of a method for distinguishing the fracture failure type of polymer materials based on deep learning provided in the first embodiment of the present application;

[0049] Figure 3 This is a confusion matrix evaluation result diagram of a polymer material fracture failure type discrimination method based on deep learning provided in the first embodiment of the present application;

[0050] Figure 4 This is an interpretable analysis image of a method for distinguishing polymer material fracture failure types based on deep learning provided in the first embodiment of the present application;

[0051] Figure 5 This is a specific structural diagram of a polymer material fracture failure type discrimination system based on deep learning provided in the second embodiment of the present application;

[0052] Figure 6 This is a model GUI interface diagram of a method for distinguishing the fracture failure type of polymer materials based on deep learning provided in the second embodiment of the present application. DETAILED DESCRIPTION

[0053] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0054] It should be understood that the step numbers used herein are for convenience of description only and are not intended to limit the order in which the steps are performed. In the description of this application, unless otherwise specified, "several" means two or more.

[0055] First embodiment

[0056] The fracture of polymer materials can be divided into brittle fracture and ductile fracture. Brittle fracture is essentially related to the elastic properties of the material. The deformation before fracture is uniform, causing the crack of the specimen to quickly penetrate the plane perpendicular to the stress direction. Ductile fracture is caused by the shear stress component, and the fracture process is more complicated, involving multiple stages such as plastic deformation and crack initiation and expansion. Through cross-sectional analysis, the characteristic morphology of the crack surface can be clearly seen, laying an important foundation for the study of cracking problems. The existing identification of fracture failure types relies on the professional knowledge, practical experience and judgment of practitioners, but when the amount of data to be identified is too large, manual processing methods are often time-consuming and inefficient, and it is difficult to meet the requirements of rapid response and accurate decision-making. Therefore, it is necessary to use neural network technology to realize the rapid execution of material fracture failure type judgment and improve work efficiency.

[0057] like Figure 1 As shown, Figure 1 A specific flow chart of a method for distinguishing the fracture failure type of a polymer material based on deep learning is provided for one embodiment of the present application. The method for distinguishing the fracture failure type of a polymer material based on deep learning in this embodiment includes steps S1 to S4, which are described in detail as follows:

[0058] Step S1, obtaining an image data set by preprocessing the collected original SEM images of the polymer material.

[0059] In this example, scanning electron microscope images (SEM images) of polymer fracture surfaces were collected and preprocessed. This preprocessing process primarily involved data cropping and data augmentation, addressing the small size of the image dataset and providing rich data for subsequent model training and prediction.

[0060] For example, the original SEM images in the embodiments of the present application were acquired by a HITACHI S-3400N scanning electron microscope. Acquisition conditions such as acceleration voltage, working distance, and magnification are adjusted according to different types of polymer materials. For example, if a polymer material has good conductivity, a high acceleration voltage can be selected during scanning, which helps to improve the resolution, signal-to-noise ratio, and contrast of the acquired image. The working distance is the distance between the electron microscope and the polymer material during scanning, which is related to the surface reflectivity of the polymer material and the environmental factors during scanning. If the surface properties of the polymer material, such as color, material, and surface roughness, result in a high surface reflectivity of the polymer material and can reflect more laser signals, the working distance can be increased. The magnification is related to the size of the polymer material. For smaller polymer materials, the magnification can be increased, and for larger polymer materials, the magnification can be reduced.

[0061] The polymer materials collected include polycarbonate parts, glass fiber reinforced materials, talc-filled polypropylene, high-impact polystyrene, polypropylene, reinforced polypropylene, and acrylonitrile-butadiene-styrene copolymers. All original SEM images, totaling 222, have a resolution of 1280×960 pixels and include SEM images of both brittle and ductile fracture failure modes. These images constitute a comprehensive database that can be used to provide information on failure characteristics for different polymer materials and under different testing conditions.

[0062] The original SEM images for brittle fracture include: 23 SEM images of various polycarbonate (PC) products, in .jpg format; 11 SEM images of various filled and reinforced materials, in .png format; 97 SEM images of various talc-filled polypropylene products, including 24 in .tif format and 73 in .jpg format; and 7 SEM images of various glass fiber-reinforced products, in .jpg format. The original SEM images for ductile fracture include: 35 SEM images of various acrylonitrile-butadiene-styrene (ABS) products, in .tif format; 25 SEM images of various high-impact polystyrene (HIPS) products, in .tif format; 13 SEM images of various polypropylene (PP) products, in .tif format; and 11 SEM images of various reinforced polypropylene products, in .tif format.

[0063] These raw SEM images were then preprocessed. The first step was data cleaning, which involved trimming the information bar from the raw SEM images. This was necessary because the information bar at the bottom of the image would have an unpredictable and meaningless impact on the model's predictions.

[0064] Optionally, the present embodiment uses the crop function of the Image class in the PIL library to perform the information bar cropping operation. The specific cropping concept is to observe that there is a color scale difference between the information bar and the main grayscale image in the original SEM image. The color scale of the information bar is pure black, which is reflected in the grayscale pixel value as 0. Based on this, a threshold of 1 is defined, and the entire original SEM image is traversed from bottom to top in pixels. A loop and loop conditions are established to calculate the pixel average of a traversed row. If it is less than the set threshold, the cropping operation is performed. The image resolution after the cropping operation is 1280×896 pixels. The operation is performed on a batch of images and classified and saved to the corresponding path as the original data set, with the fracture type name as the subfolder name.

[0065] The second step is to perform global settings on the original SEM image after cropping the information bar. Considering that the image data set should be evenly distributed to obtain more objective model prediction results, the data needs to be shuffled in the process of creating the data set. The embodiment of the present application uses the shuffle function of the random library and the loader creation process to pass the shuffle parameter to the DataLoader class to perform the shuffle operation. This is achieved by defining a global random number seed and then passing the global random number seed to the seed function of the random library and the manual_seed function of the torch library. Among them, the global random number seed is 42.

[0066] The third step is to perform data trimming to generate an initial dataset. Considering the relevant information required for model training, validation, evaluation, and interpretability analysis, this embodiment of the application uses the torch library's Dataset class as a parent class to customize the dataset class CustomDataset. The defined dataset class can implement additional functions based on the parent class, such as obtaining fracture types and indexes, obtaining all image paths, partitioning datasets, cropping images, creating datasets, and obtaining all image labels.

[0067] Furthermore, based on the removal of the information column, the scandir function of the os library is used to scan the original SEM image storage path and obtain the path name, thereby realizing the acquisition of the fracture type and index. In order to ensure that the sub-images derived from the same original SEM image after scrambling still exist in the same data set, the original SEM image should be divided before the cropping operation is performed, that is, the original SEM image is first divided into a training set, a validation set, and a test set, and then cropped and scrambled. This requires obtaining the path of all original SEM images. Based on the aforementioned acquisition of the fracture type, the listdir function of the os library is used to traverse all files in the subfolders named by all fracture types. The join function of the path class of the os library is used to splice the path parameters of all original SEM images. A loop is established to add all path parameters to the list.

[0068] Specifically, during the partitioning process, the dataset should be divided into a training set, a validation set, and a test set to meet different needs. This application implements a partitioning ratio of 8:1:1. Use the len function to calculate the number of all image paths obtained above, and obtain the image paths in different datasets according to the partitioning ratio. Considering the problem of the small size of the dataset and the image size requirements of the subsequent neural network (224×224 pixels), it is necessary to obtain a sufficient number of sub-images of appropriate size by cropping the original SEM image. By defining the width and height of the sub-image, establishing a loop, and using the crop function of the PIL library Image module to crop the image data, this solution defines the sub-image width as 256 pixels and the height as 224 pixels. At the same time, considering that the subsequent interpretability analysis step requires the reorganization of the sub-images to observe the attribution attribute distribution of the original image, the position of the upper left corner of each sub-image in the original SEM image is used as the coordinate. This position information comes from the actual parameters passed to the crop function during the cropping process, and the sub-image array and the position coordinates are added to the list together. Use the image paths contained in the different data sets obtained above to execute the data set creation process, pass the path parameter to the open function of the Image module of the PIL library to open the image. This function can open .jpg, .png, and .tif format images. Considering that the subsequent neural network architecture requires RGB format image input, pass the string RGB to the convert function to convert the image. Use the aforementioned cropping function to obtain the sub-image array and position coordinates, and add it together with the corresponding image label to the image data set. Considering that each sub-image needs to be traced back to the original SEM image during the model evaluation process, the path information is also added here. Each sub-image in the data set should contain four types of information, namely sub-image array, image label, image path, and position coordinates.

[0069] Figure 2 The following figure shows an original SEM image and the resulting subimages after cropping the information bar. (a) is an original SEM image, (b) is the original SEM image with the information bar removed, and (c) is the resulting subimages of (b) after cropping to predetermined sizes.

[0070] In addition, regarding the addition of image labels, considering that the original image labels of each sub-image will need to be obtained in the subsequent model performance evaluation process to obtain prediction accuracy, we chose to establish an image label acquisition method in the dataset composed of sub-images, create a class instance outside the class, and call this method to obtain the image label attributes. Specifically, a blank dictionary is established. Based on the information contained in the aforementioned dataset, the label and path information of all original SEM images are traversed, and the blank dictionary is filled with the path as the key and the label as the value. The dictionary is returned, and the image label is obtained by the image path information when the method is called. The image label of each sub-image is the image label of the corresponding original SEM image.

[0071] The fourth step is to perform format conversion and data enhancement on all sub-graphs. In the embodiment of the present application, because the pytorch deep learning framework of the neural network requires the dataset format to be in tensor format, the transforms module of the torchvision library is selected as the basis to create a format conversion function to perform different format conversion and image enhancement steps on the training set, validation set and test set. Specifically, the instantiation of the basic creation format conversion function can be passed in as the actual parameter of the custom dataset class. The specific implementation method is: make a conditional judgment. If it is a training set, randomly flip the image horizontally (default parameters), randomly flip the image vertically (default parameters), randomly rotate the image (rotation angle -10° to 10°), randomly crop the image (the size after cropping is 224×224 pixels), randomly adjust the brightness, contrast and saturation of the image (all three are passed in floating point numbers 0.4), convert the image to tensor format, and standardize the image array (mean = [0.485, 0.456, 0.406], standard deviation = [0.229, 0.224, 0.225]). These processes are implemented by the RandomHorizontalFlip, RandomVerticalFlip, RandomRotation, RandomResizedCrop, ColorJitter, ToTensor, and Normalize classes in the transforms module. For validation or test sets, the image is resized to 224×224 pixels, converted to tensor format, and the image array is normalized (mean = [0.485, 0.456, 0.406], standard deviation = [0.229, 0.224, 0.225]). These processes are implemented by the Resize, ToTensor, and Normalize classes in the transforms module. The custom dataset class and format conversion function are encapsulated in the dataset creation function. The dataset type and image path are set as parameters. A conditional check is performed to determine whether the dataset is a training set to perform different format conversions. The format conversion results are passed to the custom dataset class to create the corresponding dataset, ultimately resulting in a subgraph with format conversion and data augmentation completed.

[0072] Step S2: input the image data set into a preset neural network model to predict the material fracture failure type and obtain a model prediction result.

[0073] In an embodiment of the present application, a large number of sub-images in an image data set are used to iteratively train a preset neural network model to obtain a high-performance label prediction model, which is specifically achieved through the steps of model training and verification, model building, instantiating model building and training and saving training results, and hyperparameter tuning.

[0074] Exemplarily, the embodiment of the present application uses a model architecture based on ResNet18 to first build a transfer learning model, first load the resnet18 pre-trained model of the models module of the torchvision library, pass in the parameter weights='IMAGENET1K_V1', and freeze the pre-trained model parameters so that they will not be updated through back propagation. Because the image recognition prediction in the embodiment of the present application is a binary classification problem, the fully connected layer output of the pre-trained model is a 1000-dimensional vector. It is chosen to be modified into a two-dimensional vector to meet actual needs, specifically: obtain the feature number through the in_feature attribute of the fully connected layer, pass the pre-trained model feature number and the actual problem classification category number into the Linear class of the nn module of the torch library to realize the replacement of the fully connected layer, and return the transfer learning model.

[0075] After building the transfer learning model, instantiate the model and move it to the designated device for training. Then, perform hyperparameter tuning on the aforementioned neural network model. Specifically, define the loss function as the CrossEntropyLoss class from the nn module (with default parameters), define the optimizer as the SGD class from the optim module, and pass the model's fully connected layer parameters (obtained through the parameters attribute), learning rate (obtained from the hyperparameter dictionary), and momentum (obtained from the hyperparameter dictionary) to SGD. Define the learning rate scheduler as the StepLR class from the lr_scheduler library, passing in the model optimizer, adjustment step size (obtained from the hyperparameter dictionary), and adjustment factor (obtained from the hyperparameter dictionary). Instantiate the model training and validation functions and pass in the aforementioned transfer learning model, loss function, optimizer, and learning rate scheduler. Use the save function from the torch library to save the model parameters in .pth format.

[0076] The training set is loaded through the model to complete the resampling of the subgraphs in the training set. The subgraph is resampled, and the list of all label weights is obtained through the additionally defined weight calculation function to perform the resampling operation to alleviate the sample imbalance problem. The label weight list is extracted from the dataset composed of subgraphs using the pytorch deep learning framework with the data loader as the basic unit. The data loader function is created based on the DataLoader class of the torch library, and the dataset type, dataset, batch number, number of parallel subprocesses, and whether to shuffle are defined as parameters. The dataset type is used as a conditional judgment to create loaders with different parameters for different datasets. The default is the training set, and the remaining four parameters are used to pass into the DataLoader class. The batch number defaults to 32, the number of parallel subprocesses defaults to 4, and the shuffle defaults to the Boolean value False. The specific implementation method is: make a conditional judgment. If it is a training set, the label information in the dataset is extracted and added as a list, and additional definitions are defined. The defined weight calculation function obtains a list of all label weights and performs resampling to mitigate sample imbalance. The weight list is passed to the WeightedRandomSampler class in the torch library to create a sampler. The parameters passed in include the number of samples (the length of the weight list) and whether to repeat sampling (a Boolean value of True). The model, sampler, batch size, and number of parallel threads are passed to the DataLoader class with default values ​​to create and return the training set data loader. Shuffle is set to True by default in the DataLoader class. If the dataset is not a training set, the default values ​​for the dataset, batch size, shuffle, and number of parallel threads are passed to create and return the data loader without performing sampling. The Counter class in the collections library is then used to count the number of samples for each label in the list. The len function is used to calculate the total number of samples for each label. The weight ratio for each image label is the ratio of the total number of samples to the number of samples for that label, and a weight list is returned. Using these weight ratios, the subimages corresponding to each image label in the training set are resampled.

[0077] In addition, you need to pass various hyperparameter values ​​into the model to ensure the logical integrity of model building, training, and saving. You can encapsulate the model training and validation functions and the model building function. Complete model training through hyperparameter tuning.

[0078] Specifically, choose to use the tune module of the ray library to perform hyperparameter tuning. First, define the hyperparameter tuning class, then pass the class into the analysis function, and choose to return the best parameter combination. The hyperparameter tuning class defined in the embodiment of the present application is passed into the above-mentioned transfer learning model building function, select five-fold cross validation, and define the loss function as the cross entropy function nn.CrossEntropyLoss. The optimizer is the gradient descent method torch.optim.SGD with momentum. The learning rate scheduler is lr_scheduler.StepLR. At the same time, the above-mentioned resampler is used to create the loader, and all parameters are passed into the above-mentioned model training and evaluation functions, and the average accuracy of the five-fold cross validation is returned as an evaluation indicator of the quality of the model. The analysis function defined in the embodiment of the present application needs to specify the hyperparameter space and the hyperparameter tuning class and pass them into the run method of the tune module.

[0079] For example, the hyperparameter space defined in the embodiment of the present application is as follows: learning rate, with a step size of 1e-4 and a range of 1e-4 to 2e-3; batch size of [2, 4, 8, 16, 32]; momentum parameter in the gradient descent method, with a step size of 5e-3 and a range of 0.90 to 0.99; step size in the learning rate decay strategy of [2, 4, 6, 8, 10]; multiplication factor in the learning rate decay strategy of [0.1, 0.3, 0.5, 0.7, 0.9], and the number of iterative training rounds is set to 100. The optimal parameter combination finally obtained is: learning rate 7e-4, batch size 16, momentum 0.97, step size 6, decay rate 0.9, and average validation set accuracy of 92.05%.

[0080] Load the tuned transfer learning model, define the formal parameter model path and create a model instance, pass the model path parameter to the load function of the torch library to load the previously trained model parameters and use the load_state_dict method of the transfer learning model built based on the resnet18 pre-trained model to import the parameters into the model, move the model to the specified device and set the model to evaluation mode through the eval function, and return the set model, that is, the neural network model.

[0081] The training set is then input into the neural network model for training to obtain the training results. Specifically, the subgraph prediction value is first instantiated as an empty dictionary, the test set loader is traversed, the subgraph array and image path attributes are selected, the no_grad class of the torch library is used to disable gradient calculation, the subgraph array is passed into the model to obtain the subgraph prediction value array, and the argmax function of the torch library is used to obtain the training prediction label of the subgraph. The input parameter is the subgraph prediction value array, and the dimension is specified as 1. The zip class is used to combine the image path attribute and the subgraph prediction label into a new tuple. The tuple is traversed, and the training prediction label is added to the empty dictionary of subgraph prediction values ​​with the path as the key and the training prediction label as the value. The training prediction label needs to be converted from tensor format to Python data format using the item method before being added. Finally, the training result is obtained through the training prediction label of each subgraph.

[0082] These training results are then evaluated using the validation set. The prediction accuracy of the training results is calculated using the validation set under stratified five-fold cross-validation, and the trained neural network model with the best prediction accuracy is selected as the label prediction model.

[0083] Furthermore, the embodiment of the present application uses a test set and a confusion matrix to characterize the performance of the trained neural network model, mainly by comparing the training prediction label of each sub-graph with the real image label to obtain the accuracy. First, obtain the training prediction label and label value list by instantiating the training prediction label and image label acquisition function, use the zip class to combine the training prediction label and label value list into a new tuple, traverse the tuple to obtain each pair of training prediction label and label value, use the operator == to perform logical judgment and use the sum function to obtain the number of training prediction labels and label values ​​that are consistent, that is, obtain the number of training prediction labels that are consistent with the image label of the sub-graph. Pass the second label list (the label value list results are consistent) into the len function to obtain the total number, and the ratio of the two obtains the accuracy, and returns the accuracy.

[0084] The confusion matrix is ​​calculated by passing the training prediction labels and image labels to the function to obtain a list of training prediction labels and label values. The list is converted to a NumPy array using the array function in the numpy library. The confusion matrix is ​​then passed to the confusion_matrix function in the metrics module of the sklearn library to obtain the confusion matrix. The confusion matrix is ​​then visualized using the figure function in the pyplot module of the matplotlib library, with the dimensions (10, 7) passed in. The confusion matrix is ​​visualized using the heatmap function in the seaborn library, passing in the confusion matrix (actual parameter), whether to display numerical values ​​(Boolean value True), the display format ('d'), the color map ('Blues'), and the x- and y-axis tick labels (actual parameter category names). The xlabel, ylabel, and title functions in the pyplot module of the matplotlib library are used to define the x-axis label name ('Predicted'), the y-axis label name ('True'), and the figure title ('ConfusionMatrix'), respectively. Define a conditional judgment. If a save path is provided, pass the save path to the savefig function of the Matplotlib library's pyplot module to save the plot. If not provided, use the show function of the Matplotlib library's pyplot module to temporarily display the plot results. After the plot is completed, a visual confusion matrix is ​​obtained.

[0085] Figure 3 The confusion matrix evaluation results of the label prediction model on the test set are provided. In the figure, brittle represents brittle fracture, ductile represents ductile fracture, the horizontal axis represents the predicted result, and the vertical axis represents the true result. There are 23 samples in the test set. As shown in the figure, only one sample was mistakenly predicted as a ductile fracture instead of a brittle fracture, and most of the prediction results were correctly distributed on the main diagonal of the confusion matrix, that is, only one sample in the upper right corner was predicted as a ductile fracture, but it was actually a brittle fracture, and the number of samples in the lower left corner that were actually ductile fractures but were predicted as brittle fractures was 0, indicating that only one of the 23 samples was predicted incorrectly, with an accuracy rate of 95.65%. This shows that the model can effectively distinguish different fracture types and has a high accuracy rate. Specifically, Figure 3 The results show that the model achieved an accuracy of 95.65% on the test set, which is a very high metric. This high accuracy generally indicates that the model has learned useful features from the data during training and is able to generalize well to unseen data. In other words, the model is able to not only memorize the training data but also understand and apply it to new data.

[0086] The label prediction model then predicts the material fracture failure type for the image dataset, obtaining the first label for each sub-image in the image dataset. A voting method is then used to determine the predicted label for each sub-image. The sub-images contained in each original SEM image are first determined. Based on the first label of each sub-image, the proportion of each first label in each original SEM image is calculated. The first label with the highest proportion is selected as the predicted label for the corresponding original SEM image, thereby obtaining the model prediction result.

[0087] Specifically, the first label of each sub-image is used to vote to determine the predicted label for the original SEM image. Based on the type of first label for each sub-image in each original SEM image, the proportion of each first label in each original SEM image is determined. The first label with the highest proportion is then selected as the predicted label for each original SEM image to obtain the model prediction result. Specifically, the model prediction result is instantiated as an empty dictionary. The items method is used to return the sub-image prediction value dictionary as a list-like traversable array of tuples. The array of sub-image prediction value tuples is traversed to obtain the path and sub-image label list. The max function is passed the category array (obtained by the set class processing the sub-image label list) and the comparison principle (obtained by the count function processing the sub-image label list) as parameters. This returns the first label that appears the most times in the sub-image label list. Using the path as the key, the max function's return value is added to the final empty predicted value dictionary. The label value can be obtained using the image label acquisition method of the custom dataset class described above.

[0088] Step S3, using an occlusion method to process the original SEM image to obtain an interpretability analysis image of each original SEM image, and determining a model judgment basis for the model prediction result based on the interpretability analysis image.

[0089] In an embodiment of the present application, the position information in the image data set is first used to locate the position of each sub-image in the original SEM image and then combined to construct a sub-image relationship dictionary.

[0090] Specifically, an empty dictionary is instantiated, and each batch of the test set loader is iterated over. The subgraph array, original image path, and subgraph location information are extracted from each batch. The zip class is used to combine these three pieces of information into a new tuple, which is then iterated over. Considering that the model requires the subgraphs to be in the format (batch, channel, height, width), a parameter of 0 is passed to the unsqueeze function to add the batch dimension to the subgraph array. Considering that the location information is provided by the coordinates of the upper-left corner of the subgraph and that the information obtained from these coordinates is required to be in Python data format, all subgraph location information is iterated over, the location data format is converted using the item method, and then converted into a tuple using the tuple class. Using the original image path as the key, a new tuple consisting of the subgraph array and the subgraph location tuple is added to the corresponding empty dictionary as the value, resulting in a subgraph relationship dictionary.

[0091] The occlusion method is then used to determine the attribution attributes of the original SEM image, obtaining the impact analysis results for the preset regions within the original SEM image. A sub-image occlusion attribution attribute array is first constructed. Specifically, based on the sub-image relationship dictionary, regions of each sub-image within the original SEM image are occluded, and the change in the predicted label of the original SEM image after each occlusion is recorded. The predicted label changes are then compared with the model prediction results to obtain the impact analysis results for each sub-image. More specifically, the model parameters are passed to the Occlusion class of the attr module of the captum library to create an occlusion object, and the sub-image array (parameter), category index (the aforementioned index scalar), sliding window step ((3, 8, 8)), sliding window size ((3, 15, 15)), and baseline value (0) are passed to the attribute method of the occlusion object to obtain the corresponding sub-image occlusion attribution attribute array, where the sliding window step is the step size of each occlusion movement, and the sliding window size is the size of each occluded area. For example, when the sliding window size is ((3, 15, 15)), the occluded area is 15px×15px. Considering that the subimages were resized to 224×224 pixels during the test set creation process, to resize the stitched image to match the original SEM image size, we passed (224, 256) to the Resize class in the torchvision library's transforms module and applied it to the subimage occlusion attribution attribute array, resulting in a 224×256 pixel image. The default method used here was bilinear interpolation, which resulted in noticeable discontinuities at the stitched subimage boundaries. Considering that the subsequent visualization required NumPy arrays as arguments and that the image data format was (height, width, channels), we used the squeeze, cpu, detach, and numpy methods, respectively, to remove the batch dimension, move the device to the CPU, detach it from the computation graph, and convert it to a NumPy array. This resulted in a NumPy array with the data format (channels, height, width). This array and the dimension transformation order ((1, 2, 0)) were passed to the numpy library's transpose function to obtain the subimage occlusion attribution attribute array in the required format.

[0092] Optionally, in the embodiment of the present application, the size of the preset area is set to 15×15, and the step size of each occlusion movement is 8×8.

[0093] Then, the sub-image occlusion attribution attribute arrays of each original SEM image are spliced ​​according to the position of the sub-image in the original SEM image to obtain the interpretability analysis image of each original SEM image.

[0094] For example, if an original SEM image contains 20 sub-images, the occlusion method is used to block regions in these 20 sub-images multiple times. The impact of each blocked region on the model prediction results of the original SEM image generated by the model is analyzed to obtain the interpretability analysis results of the sub-images corresponding to the blocked regions. The interpretability analysis results of the 20 sub-images are then spliced ​​according to their positions in the original SEM image to obtain the interpretability analysis image of the entire original SEM image.

[0095] Finally, visualize the interpretability analysis images. Specifically, instantiate the canvas using the visualize_image_attr_multiple function in the visualization submodule of the attr module in the captum library. Pass in the interpretability analysis images, the original SEM images, the image type to display (original image, positive contribution heatmap, negative contribution heatmap, masked image), the attributes corresponding to each image type (all contributions, positive contributions, negative contributions, positive contributions), whether to display a color bar (True), the title of each image (["Original", "Positive Attribution", "NegativeAttribution", "Masked"]), the image size ((18, 6)), and whether to display (False). This yields the final interpretability analysis visualization image. Define a conditional judgment: if a save path is provided, pass it to the savefig method to save the image. Also passed in is the image boundary alignment ('tight') to ensure tight image boundaries.

[0096] The visualized interpretability analysis images include the original SEM image, positive contribution heat map, negative contribution heat map and mask image. Among them, the original SEM image is a sample that has not been processed in any way, and can be used as a reference image to compare the differences between the positive contribution heat map, the negative contribution heat map and the mask image; the positive contribution heat map is used to display the areas in the original SEM image that are positively correlated with the corresponding model prediction results, that is, the model can improve the model's prediction accuracy and the confidence of the model prediction by identifying these areas; the negative contribution heat map is used to display the areas in the original SEM image that are negatively correlated with the corresponding model prediction results, that is, these areas can reflect a negative effect on the model prediction results, which will reduce the confidence of the model prediction or lead to an increased probability of misclassification; the mask image is used to display the key areas in the original SEM image that are related to the accuracy of the model prediction results. When the neural network model makes a prediction on the original SEM image, even if other areas in the original SEM image except the key areas are blocked or missing, it will not affect the accuracy of the model prediction results of the original SEM image, indicating that the key areas represented by the mask image retain the most representative features of the image, which can help the model accurately identify the material fracture failure type of the original SEM image, and on this basis, the model can still maintain a high accuracy.

[0097] Figure 4 An interpretable analysis image of a raw SEM image is provided. From left to right, it shows the original SEM image, the positive contribution heatmap, the negative contribution heatmap, and the mask image. Darker areas in the positive contribution heatmap represent regions that contribute positively to the model's predictions. These areas are concentrated in the upper left corner, right side, and bottom of the image. These locations align with the distinct texture orientation in the raw SEM image, demonstrating that the model captures important features of the image's structural information.

[0098] The darker locations in the negative contribution heat map represent areas that have a negative impact on the model's prediction results. The model observes that these smooth areas lacking significant textures basically do not provide useful information for prediction, which further confirms that the model prefers to rely on complex texture features for classification.

[0099] The white areas in the mask image represent the most representative features in the original SEM image, which are concentrated in the areas with the most complex texture. This indicates that even if some of the less representative areas in the image are removed, the model can still maintain a high level of accuracy. This also suggests that the model has a certain degree of robustness and generalization ability, because it does not rely solely on a single or a few feature points, but instead comprehensively considers the overall texture characteristics.

[0100] therefore Figure 4Demonstrates how the trained label prediction model can effectively identify and utilize the complex texture structure in the original SEM images as a key marker for distinguishing brittle fracture from ductile fracture

[0101] In summary, by obtaining the impact analysis result of each sub-image, it is possible to determine why the label prediction model predicts the model prediction result of each original SEM image.

[0102] The implementation of the embodiments of the present application has the following beneficial effects:

[0103] The embodiment of the present application first performs preprocessing including cropping on the original SEM image, cropping an original SEM image into multiple sub-images, expanding the size of the image data set, enabling subsequent model predictions to use richer image data, and improving the accuracy of the prediction results. A preset neural network model is then used to predict the type of material fracture failure, quickly obtaining more accurate model prediction results, improving the efficiency and accuracy of data category recognition, and reducing reliance on manual recognition. An occlusion method is then used to occlude the areas of the sub-images in each original SEM image to obtain an interpretable analysis image for each original SEM image. The interpretable analysis image clearly shows which areas in the image the model primarily uses to derive the final model prediction results during the prediction process. Therefore, the interpretable analysis image can be used to evaluate the rationality of the model and provide data support for subsequent model improvements.

[0104] Second embodiment

[0105] Furthermore, in order to implement the polymer material fracture failure type discrimination system based on deep learning corresponding to the above method embodiment to achieve the corresponding functions and technical effects, Figure 5 A structural diagram of a polymer material fracture failure type discrimination system based on deep learning is provided. For ease of illustration, only the parts relevant to this embodiment are shown. The polymer material fracture failure type discrimination system based on deep learning provided in this embodiment of the application includes:

[0106] The data preprocessing module 201 is used to obtain an image data set by preprocessing the collected original SEM images of the polymer material; wherein the image data set includes a plurality of sub-images obtained by cropping the original SEM images.

[0107] In an embodiment of the present application, original SEM images of polymer materials of all fracture failure types are collected; data cleaning, data cropping, and data enhancement are performed on the original SEM images to obtain several sub-images of preset sizes.

[0108] The data prediction module 202 is used to input the image data set into a preset neural network model to predict the material fracture failure type and obtain a model prediction result.

[0109] In an embodiment of the present application, an image dataset is input into a preset neural network model for iterative training to obtain a label prediction model; based on the label prediction model and the image dataset, a first label for each subimage in the image dataset is obtained; based on the subimage corresponding to each original SEM image, the proportion of each first label in the original SEM image is determined; the first label with the highest proportion in each of the original SEM images is selected as the predicted label for each original SEM image to obtain a model prediction result.

[0110] The data analysis module 203 is used to process the original SEM images using an occlusion method to obtain an interpretability analysis image of each original SEM image, and to determine a model judgment basis for a model prediction result based on the interpretability analysis image.

[0111] In an embodiment of the present application, a sub-graph relationship dictionary is constructed based on the position of the sub-graph in the corresponding original SEM image; the area in each sub-graph is blocked respectively to obtain the impact analysis result of each sub-graph; based on the sub-graph relationship dictionary, the position of each sub-graph in the corresponding original SEM image is restored, and the impact analysis results of the sub-graphs are spliced ​​according to the position to obtain an interpretability analysis image of each original SEM image.

[0112] In some embodiments, the method further includes deploying a trained label prediction model.

[0113] In the embodiment of the present application, the label prediction model is encapsulated using the tkinter library, a GUI interface is created for the model, and the encapsulated label prediction model is packaged into an exe file for deployment on a Windows system. The label prediction model in the exe file format can be operated with one click to complete the label prediction of the image data and obtain the relevant interpretability analysis results, which is convenient for people without programming knowledge to use. The encapsulated label prediction model can be divided into an interface design module, an image preprocessing and model prediction module, an interpretability analysis module, an abnormal termination module, and packaging. Table 1 shows the relevant programming languages, integrated development environments, standard libraries, and third-party library versions involved in the embodiment of the present application.

[0114] Table 1

[0115]

[0116] Furthermore, the interface design module uses the Tk class from the tkinter library to create the GUI interface and the Menu class to create the menu bar. The add_cascade method of the Menu class is used to create a menu bar object ("File"). The add_command method is used to add a drop-down option "Open" to the "File" object. This option is bound to an open function to open and display the image (the principle of the open function is explained at the end of this section). The Button class is used to create three buttons: "Predict," "Interpretability Analysis," and "Abort," each bound to a corresponding function (each function is explained later). In the open function, considering the varying image formats in the dataset, the askopenfilename function from the filedialog module of the tkinter library is used to specify the image format that can be opened. The open function and convert method from the Image module of the PIL library are used to obtain a grayscale image array, and the array format is then converted using the ImageTk module. The Canvas module of the tkinter library is used to create a canvas, and the grid method is used to design the canvas layout. The create_image method of the Canvas module is used to add the selected image to the canvas. A conditional check is defined so that if the image does not already exist, it is added directly; if it does, it is overwritten. Finally, use the Scrollbar class of the tkinter library to add a vertical scroll bar to the interface, and use the bind method of the Canvas class to bind the middle mouse button to the scroll bar.

[0117] Figure 6 A model GUI interface is presented, providing three functions: prediction, explainability analysis, and terminating prediction / analysis. The left image shows the original SEM image to be predicted, and the right image shows that the predicted failure type of the original SEM image is brittle fracture failure. Through this interface, users can import the image to be analyzed and start the model for classification prediction with one click. The entire process does not require any additional configuration or command line operations, greatly reducing the threshold for use. In addition to providing prediction results, the application also integrates the occlusion method based on the captum library to generate heat maps to help users understand how the model makes decisions.

[0118] The model building, model loading, information bar removal, image preprocessing, and prediction functions in the image preprocessing and model prediction modules are implemented in the aforementioned functions. The Progressbar class from the ttk module of the tkinter library is used to add a progress bar to the prediction process. This progress bar appears in a top-level window created by the Toplevel class of the tkinter library. The progress bar's logic is implemented in a loop that iterates through each subgraph. The current progress is represented by the ratio of the current loop to the total number of subgraphs.

[0119] The interpretability analysis and visualization in the interpretability analysis module are derived from the aforementioned functions. A progress bar is added to the interpretability analysis process in the same way as the prediction process.

[0120] The abnormal termination module uses the Event class of the threading library to set the prediction process and the explainability analysis process as sub-threads, defines the stop function, uses the set method of the Event class to set the stop event, and uses the join method of the Thread class to block the calling thread until the sub-thread is completely stopped.

[0121] Run pyinstaller --onefile --noconsole GUI.py in the terminal to package all the code for model deployment into a single executable file. This command creates a dist folder in the current directory, and the exe file is located in that folder.

[0122] Specifically, when running the label prediction model in exe format, first open Figure 6 The GUI interface shown on the left displays three encapsulated model functions: label prediction, interpretability analysis of prediction results, and termination of model execution. The original SEM image set to be tested is input into the model. Clicking the "Predict" button invokes the image preprocessing and model prediction module to preprocess and predict the original SEM image set. This includes trimming the information bar of the original SEM image, loading the preprocessed image into the model, and performing label prediction on the loaded model, displaying the prediction progress in the form of a progress bar. By calling the image preprocessing and model prediction module, the model prediction results of the input image data are obtained, and the label prediction of the original SEM image is completed. The predicted failure type shown in the original SEM image is determined to be brittle fracture failure or ductile fracture failure.

[0123] After obtaining the model's prediction results for a set of raw SEM images, you can also use the "Interpretability Analysis" button to invoke the model's interpretability analysis module. This module analyzes the basis for the model's predictions for a specific raw SEM image and generates corresponding visualizations to more clearly demonstrate the underlying reasons. During the interpretability analysis process, a progress bar displays the current analysis progress.

[0124] In addition, there is an "Abort" button on the GUI interface, which can be used to call the abnormal termination module to interrupt the call of the image preprocessing and model prediction module and the interpretability analysis module.

[0125] The GUI allows users to quickly access various functions within the packaged label prediction model, performing classification prediction and interpretability analysis on raw SEM images without any additional configuration or command-line operations, significantly lowering the barrier to entry. In addition to providing prediction results, the application also integrates an occlusion method based on the Captum library to generate heatmaps, helping users understand how the model makes decisions.

[0126] The computer processor used in the embodiment of this application is a 12th Gen Intel(R) Core(TM) i3-12100 3.30 GHz, the GPU cloud platform is Google Colab, and the selected GPU is T4.

[0127] The implementation of the embodiments of the present application has the following beneficial effects:

[0128] The embodiment of the present application first performs preprocessing including cropping on the original SEM image, cropping an original SEM image into multiple sub-images, expanding the size of the image data set, enabling subsequent model predictions to use richer image data, and improving the accuracy of the prediction results. A preset neural network model is then used to predict the type of material fracture failure, quickly obtaining more accurate model prediction results, improving the efficiency and accuracy of data category recognition, and reducing reliance on manual recognition. An occlusion method is then used to occlude the areas of the sub-images in each original SEM image to obtain an interpretable analysis image for each original SEM image. The interpretable analysis image clearly shows which areas in the image the model primarily uses to derive the final model prediction results during the prediction process. Therefore, the interpretable analysis image can be used to evaluate the rationality of the model and provide data support for subsequent model improvements.

[0129] The specific embodiments described above further illustrate the purpose, technical solutions, and beneficial effects of this application. It should be understood that the above description is merely a specific embodiment of this application and is not intended to limit the scope of protection of this application. In particular, it should be noted that for those skilled in the art, any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of this application should be included in the scope of protection of this application.

Claims

1. A method for distinguishing the fracture failure type of polymer materials based on deep learning, characterized in that: include: An image dataset is obtained by preprocessing the collected original SEM images of the polymer material; wherein the image dataset includes a plurality of sub-images obtained by cropping the original SEM images; Input the image data set into the preset neural network model to predict the material fracture failure type and obtain the model prediction result; The original SEM image is processed by an occlusion method to obtain an interpretability analysis image of each original SEM image, and a model judgment basis for the model prediction result is determined based on the interpretability analysis image; wherein, obtaining the interpretability analysis image is specifically as follows: constructing a subgraph relationship dictionary according to the position of the subgraph in the corresponding original SEM image; occluding the area in each subgraph respectively to obtain the influence analysis result of each subgraph; restoring the position of each subgraph in the corresponding original SEM image according to the subgraph relationship dictionary, and splicing the influence analysis results of the subgraph according to the position to obtain the interpretability analysis image of each original SEM image; the interpretability analysis image includes the original SEM image, the positive contribution heat map, the negative contribution heat map and the mask image; Among them, the positive contribution heat map is used to display the occluded areas in the original SEM image that are positively correlated with the corresponding model prediction results; the negative contribution heat map is used to display the occluded areas in the original SEM image that are negatively correlated with the corresponding model prediction results; the mask image is used to display the key areas in the original SEM image that are related to the accuracy of the model prediction results.

2. The method for distinguishing polymer material fracture failure types based on deep learning according to claim 1, characterized in that: The image data set is obtained by preprocessing the collected original SEM images of the polymer material, specifically: Scan the polymer materials that have experienced fracture failure using an electron microscope to obtain original SEM images of polymer materials with all fracture failure types; The original SEM image is subjected to data cleaning, data cropping, and data enhancement to obtain a plurality of sub-images of preset sizes; wherein the data enhancement is to adjust the brightness, and / or contrast, and / or saturation of the image.

3. The method for distinguishing polymer material fracture failure types based on deep learning according to claim 2, characterized in that: The original SEM image is subjected to data cleaning, data cropping and data enhancement to obtain a plurality of sub-images of preset sizes, specifically: Cutting out the information column in the original SEM image to complete data cleaning; According to a preset size, the original SEM image after data cleaning is cropped and then an image label is added to obtain a plurality of sub-images, and then the sub-images are format converted and data enhanced; wherein the image label of each sub-image is the image label of the corresponding original SEM image.

4. The method for distinguishing polymer material fracture failure types based on deep learning according to claim 1, characterized in that: The image data set is input into a preset neural network model to predict the material fracture failure type, and the model prediction result is obtained, specifically: Inputting the image dataset into a preset neural network model for iterative training to obtain a label prediction model; wherein the image dataset includes a training set, a validation set, and a test set; the neural network model is a trained model obtained by parameter tuning and architecture modification of the transfer learning network; Obtaining a first label for each subimage in the image dataset according to a label prediction model and an image dataset; Determining the proportion of each first label in the original SEM image according to the sub-image corresponding to each original SEM image; The first label with the highest proportion in each of the original SEM images is selected as the predicted label of each original SEM image to obtain the model prediction result.

5. The method for distinguishing polymer material fracture failure types based on deep learning according to claim 4, characterized in that: The image dataset is input into a preset neural network model for iterative training to obtain a label prediction model, specifically: Inputting the training set into a preset neural network model for training, and evaluating the training results of the neural network model using the validation set to obtain the prediction accuracy of the trained neural network model; According to the optimal prediction accuracy, the corresponding trained neural network model is selected as the label prediction model.

6. The method for distinguishing polymer material fracture failure types based on deep learning according to claim 4, characterized in that: The image dataset is input into a preset neural network model for iterative training, specifically: When the neural network model loads the image dataset, the total number of samples of each image label in all sub-images is counted according to the image labels of the sub-images; Determine the weight ratio of each image label according to the total number of sub-images and the total number of samples; According to the weight ratio, the sub-images corresponding to each image label are resampled through the neural network model to perform model training.

7. The method for distinguishing polymer material fracture failure types based on deep learning according to claim 1, characterized in that: The region in each sub-image is blocked respectively to obtain the impact analysis result of each sub-image, specifically: Blocking the area in each of the sub-images according to a preset sliding window with a preset step size, wherein the sliding window size is the size of the blocked area each time, and the sliding window step size is the step size of each blocking movement; The influence of the blocked area on the prediction result of the model is analyzed to obtain the influence analysis result of each sub-image.

8. A polymer material fracture failure type identification system based on deep learning, characterized by: include: Data preprocessing module, data prediction module and data analysis module; The data preprocessing module is used to obtain an image data set by preprocessing the collected original SEM images of the polymer material; wherein the image data set includes a plurality of sub-images obtained by cropping the original SEM images; The data prediction module is used to input the image data set into a preset neural network model to predict the material fracture failure type and obtain a model prediction result; The data analysis module is used to process the original SEM image using an occlusion method to obtain an interpretability analysis image of each original SEM image, and to determine a model judgment basis for a model prediction result based on the interpretability analysis image; wherein, obtaining the interpretability analysis image is specifically as follows: constructing a subgraph relationship dictionary based on the position of the subgraph in the corresponding original SEM image; occluding the area in each subgraph respectively to obtain an influence analysis result of each subgraph; restoring the position of each subgraph in the corresponding original SEM image based on the subgraph relationship dictionary, and splicing the influence analysis results of the subgraphs based on the position to obtain an interpretability analysis image of each original SEM image; the interpretability analysis image includes an original SEM image, a positive contribution heat map, a negative contribution heat map, and a mask image; Among them, the positive contribution heat map is used to display the occluded areas in the original SEM image that are positively correlated with the corresponding model prediction results; the negative contribution heat map is used to display the occluded areas in the original SEM image that are negatively correlated with the corresponding model prediction results; the mask image is used to display the key areas in the original SEM image that are related to the accuracy of the model prediction results.

Citation Information

Patent Citations

  • Pathology microscopic image diagnosis method and device, model training method and device, equipment and medium

    CN111192678A

  • Industrial product surface defect positioning detection and attribution method

    CN119722631A