A method and system for identifying and analyzing stainless steel pictures based on computer vision
Through a computer vision-based method, using deep learning models to analyze stainless steel pictures, the problems of inefficiency and difficulty in ensuring accuracy in the existing technology are solved, efficient and accurate identification and analysis of stainless steel pictures are achieved, and accurate monitoring of material quality is ensured.
Patent Information
- Application Number
- CN202411121891.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-15
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2044-08-15
Smart Images

Figure CN119006915B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical fields of computer vision and materials science, and particularly to a method and system for identifying and analyzing stainless steel pictures based on computer vision. Background Art
[0002] Analyzing the structure of stainless steel and evaluating its performance are of great significance for ensuring product quality, improving manufacturing processes, and optimizing performance. Understanding the structure of stainless steel can help us better understand its performance characteristics, which is conducive to reasonable material selection, process design, and product improvement. The existing methods for analyzing stainless steel mainly rely on metallographic analysis for identification. Metallographic analysis is an important means for detecting the internal structure of metals in materials science and an important method for studying whether metal materials fail. Traditional metallographic analysis methods usually rely on human eye observation and experience, with low efficiency and difficult to guarantee accuracy. Moreover, the inspection results need to be reviewed repeatedly, often affecting the project schedule, and a large amount of manpower is required. With the development of computer vision and artificial intelligence technologies, using these technologies to automatically analyze metallographic pictures is of great significance for the fields of materials engineering, manufacturing, and scientific research. Summary of the Invention
[0003] In order to overcome the deficiencies of the prior art, the purpose of the present invention is to provide a method and system for identifying and analyzing stainless steel pictures based on computer vision. By introducing computer vision and deep learning technologies, it can accurately and efficiently identify and analyze stainless steel pictures to reduce human errors, achieve precise monitoring of material quality, and ensure the quality and performance of stainless steel.
[0004] To achieve the above purpose, the present invention provides the following solution: A method for identifying and analyzing stainless steel pictures based on computer vision, comprising the following steps:
[0005] Obtain ordinary images and metallographic images of stainless steel samples and perform image preprocessing to obtain an image set, and then extract physical features and tissue features based on the image set;
[0006] Use the image set, the physical features, and the tissue features to select and train a machine model, and then integrate the trained machine model to obtain a deep learning model;
[0007] Use the deep learning model to analyze and predict newly input stainless steel pictures to obtain the evaluation results, loss conditions, and life predictions of the stainless steel pictures;
[0008] Generate a visualization report based on the analysis and prediction results.
[0009] Optionally, the image preprocessing includes grayscale processing, denoising processing, contrast enhancement processing, and image segmentation processing; the physical features include color, texture, and shape; the tissue features include phase boundaries, pores, and grains.
[0010] Optionally, the training process of the machine model includes appearance analysis training, performance analysis training, loss analysis training, and life prediction training.
[0011] Optionally, the process of the appearance analysis training is as follows:
[0012] Integrate the ordinary image and the physical features into an appearance image set, and perform spectral measurement, denoising processing, color correction processing, and white balance processing operations based on the appearance image set;
[0013] Based on the processed appearance image set, analyze and extract color histograms, brightness distributions, texture features, and glossiness to obtain spectral data;
[0014] Using the spectral data, select the first machine model to calculate the chromaticity data of the stainless steel samples and the color difference between different samples;
[0015] Evaluate the surface quality of the stainless steel based on the chromaticity data and the color difference to complete the appearance analysis training.
[0016] Optionally, the process of the performance analysis training is as follows:
[0017] Select the second machine model, and input the pores, the phase boundaries, and the grains into the second machine model for calculation and statistics;
[0018] Calculate the porosity of the pores and count the size, shape, and distribution of the pores, calculate the area and length of the phase boundaries and count the types of the phase boundaries, calculate the average size distribution of the grains and analyze the grain shape to obtain a performance data set;
[0019] Integrate the performance data set and the usage environment information of the stainless steel samples to obtain an initial performance report and complete the performance analysis training.
[0020] Optionally, the process of the loss analysis training is as follows:
[0021] Use the method of feature superposition to combine the physical features and tissue features to obtain a feature data set, and group and classify different features in the feature data set;
[0022] Select the third machine model, and use the feature data set to train the third machine model to obtain a wear model to achieve the loss analysis training;
[0023] Input the stainless steel samples into the wear model to obtain the wear degree and wear causes of each stainless steel sample; the wear causes are composed of various features;
[0024] Among them, local sensitivity analysis technology is introduced into the wear model to identify the feature combinations in the wear causes and the proportion of the wear degree of various features.
[0025] Optionally, the process of life prediction training is as follows:
[0026] Select the fourth machine model, preset the actual life value in the fourth machine model, and use the feature dataset to train the fourth machine model to obtain an initial prediction model;
[0027] Input the stainless steel samples into the initial prediction model for prediction and obtain the prediction results, and compare and calculate the prediction results with the actual life values to obtain the prediction difference;
[0028] Calculate and obtain the feature importance of the comprehensive dataset, and adjust and optimize the life prediction model in combination with the feature importance and the prediction difference to obtain the life prediction model, and complete the life prediction training.
[0029] Optionally, the process of integrating the trained machine models to obtain a deep learning model is as follows:
[0030] Design a deep learning framework with a multi-input and multi-output structure, and integrate the first machine model, the second machine model, the wear model and the life prediction model as sub-models into the deep learning framework to obtain an initial learning model;
[0031] Integrate the physical features, the tissue features, the wear data and the life data into a comprehensive dataset that meets the input requirements, and train and optimize the initial learning model in combination with the comprehensive dataset and the introduced optimizer to obtain the deep learning model;
[0032] Input the new stainless steel samples into the deep learning model for identification and analysis, and output the comprehensive performance evaluation results, the loss situation and the life prediction values.
[0033] The present invention also provides a stainless steel picture recognition and analysis system based on computer vision, including:
[0034] An image processing module, configured to obtain the ordinary image and the metallographic image of the stainless steel sample, perform image preprocessing to obtain an image set, and then extract physical features and tissue features based on the image set;
[0035] A model learning module, which is used to select and train a machine model by using the image set, the physical features, and the tissue features, and then integrate the trained machine model to obtain a deep learning model;
[0036] A picture analysis module, which is used to analyze and predict newly input stainless steel pictures by using the deep learning model to obtain the evaluation results, loss conditions, and life predictions of the stainless steel pictures;
[0037] A visualization module, which is used to generate a visualization report based on the analysis and prediction results.
[0038] By providing a method and system for stainless steel picture recognition and analysis based on computer vision, the present invention discloses the following technical effects:
[0039] 1. By combining the physical appearance features and key organizational structures of stainless steel for the recognition and analysis of stainless steel, the present invention can comprehensively and accurately identify and analyze stainless steel, improve the accuracy of the recognition and analysis results, and can specifically discover problems, achieve precise quality monitoring, and ensure the quality and performance of stainless steel.
[0040] 2. By introducing computer vision and establishing a deep learning model, the present invention can realize comprehensive performance evaluation, analyze the wear degree of materials, and predict the service life, can accurately and efficiently identify and analyze stainless steel pictures. Compared with traditional methods, the present invention has a high degree of automation, good accuracy and repeatability, improves the analysis efficiency of stainless steel, and reduces human errors.
[0041] The technical solution of the present invention will be further described in detail below through the accompanying drawings and embodiments. Description of the Drawings
[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required in the embodiments. Obviously, the following described drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0043] Figure 1 It is a flowchart of the method provided by the embodiment of the present invention;
[0044] Figure 2 It is a system architecture diagram provided by the embodiment of the present invention. Detailed Embodiments
[0045] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0046] To make the above objects, features, and advantages of the present invention more obvious and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0047] As Figure 1 shown, the present invention provides a method for identifying and analyzing stainless steel pictures based on computer vision, including the following steps:
[0048] 1. Obtain the ordinary image and metallographic image of the stainless steel sample and perform image preprocessing to obtain an image set, and then extract physical features and tissue features based on the image set.
[0049] 1.1 The image preprocessing includes:
[0050] Grayscale processing, converting the color image into a grayscale image to reduce noise and computational complexity;
[0051] Denoising processing, using methods such as Gaussian filtering, mean filtering, or median filtering for denoising;
[0052] Enhancing contrast processing, enhancing the image contrast through methods such as histogram equalization to make details clearer;
[0053] Image segmentation processing, automatically segmenting the image using methods such as Otsu thresholding and Canny edge detection to highlight the key structures.
[0054] 1.2 The physical features include color, texture, and shape.
[0055] 1.3 The tissue features include
[0056] Phase boundaries, using edge detection algorithms such as Sobel and Canny to extract phase boundaries, and using Harris corner detection or SIFT algorithm to extract phase boundary feature points;
[0057] Pores, using morphological operations such as opening and closing operations to identify pores, and applying the region growing algorithm to the low gray-level regions in the image to further refine the pore features;
[0058] Grains, using the watershed algorithm to segment the image, identify and label the grain boundaries, and calculate geometric features such as the area and perimeter of each grain.
[0059] 2. Using the image set, the physical features and the tissue features, select and train a machine model, and then integrate the trained machine model to obtain a deep learning model; the training process of the machine model includes appearance analysis training, performance analysis training, loss analysis training and life prediction training.
[0060] 2.1 The process of appearance analysis training is as follows:
[0061] Integrate the common image and the physical features into an appearance image set, and perform spectrum measurement, denoising, color correction and white balance processing operations based on the appearance image set;
[0062] Based on the processed appearance image set, the color histogram, brightness distribution, texture features and glossiness are analyzed and extracted to obtain spectral data; wherein, color histogram: the color channel is obtained by calculating the color histogram of the image. Brightness distribution: the brightness distribution histogram or cumulative distribution (CDF) representation of the image is analyzed. Texture features: the texture features of the surface are extracted by methods such as grayscale co-occurrence matrix (GL) and local binary pattern (LB). Gloss analysis: the glossiness of the material surface is analyzed by the size and shape of the reflected light spot of the image. A high glossiness usually indicates a high surface smoothness.
[0063] Using the spectral data, selecting a first machine model to calculate the chromaticity data of the stainless steel samples and the color difference between different samples;
[0064] The surface quality of the stainless steel is evaluated based on the chromaticity data and the color difference, thereby completing the appearance analysis training.
[0065] 2.2 The process of performance analysis training is as follows:
[0066] Selecting a second machine model, and inputting the pores, the phase boundaries and the grains into the second machine model for calculation and statistics;
[0067] Calculate the porosity of the pores (the ratio of pores to the total volume in the image) and count the size, shape and distribution of the pores; large pores and unevenly distributed pores usually reduce the strength and wear resistance of the material;
[0068] Calculate the area and length of the phase boundary. The longer the phase boundary, the easier it is for the material to slip and break under shear stress. And count the types of the phase boundary. Different phase boundaries will affect their durability. For example, the phase boundary between some phases (such as martensite and austenite) is more likely to become the source of fatigue cracks.
[0069] Calculating the average size distribution of the grains and analyzing the shape of the grains to obtain a performance data set; analyzing whether the shape of the grains is regular (such as round, circular), regular grains generally exhibit better mechanical properties;
[0070] Integrate the performance data set and the usage environment information of the stainless steel samples to obtain an initial performance report, and complete the performance analysis training.
[0071] The process of the loss analysis training described in 2.3 is as follows:
[0072] Combine the physical features and tissue features by means of feature superposition to obtain a feature data set, and group and classify different features in the feature data set;
[0073] Select a third machine model, and use the feature data set to train the third machine model to obtain a wear model, so as to achieve the loss analysis training;
[0074] Input the stainless steel samples into the wear model to obtain the wear degree and wear reasons of each stainless steel sample; the wear reasons are composed of various feature combinations;
[0075] Among them, introduce local sensitivity analysis technology into the wear model to identify the feature combinations in the wear reasons and the proportion of the wear degree of various features.
[0076] If the same wear degree may be caused by different feature combinations, it can be identified through the wear model. For example, interpretability techniques (such as SHAP values, local sensitivity analysis) can be used to understand which features have important effects on wear, so as to identify the specific feature combinations where the problems lie.
[0077] The process of the life prediction training described in 2.4 is as follows:
[0078] Select a fourth machine model, preset the actual life value in the fourth machine model, and use the feature data set to train the fourth machine model to obtain an initial prediction model;
[0079] Input the stainless steel samples into the initial prediction model for prediction and obtain the prediction results, and compare and calculate the prediction results with the actual life values to obtain a prediction difference;
[0080] Calculate and obtain the feature importance of the comprehensive data set, understand the influence degree of each feature on life prediction, and adjust and optimize the life prediction model (including adjusting feature selection, model structure or hyperparameter settings) in combination with the feature importance and the prediction difference to obtain a life prediction model, and complete the life prediction training.
[0081] The process of integrating the trained machine models to obtain a deep learning model in 2.5 is as follows:
[0082] Design a deep learning framework with a multi-input and multi-output structure, and integrate the first machine model, the second machine model, the wear model, and the life prediction model into the deep learning framework as sub-models. At the same time, consider how to transfer features and output information to obtain an initial learning model;
[0083] Integrate the physical features, the tissue features, the wear data, and the life data into a comprehensive dataset that meets the input requirements, and combine the comprehensive dataset and the introduced optimizer to train and optimize the initial learning model to obtain the deep learning model;
[0084] Input a new stainless steel sample into the deep learning model for identification and analysis, and output the comprehensive performance evaluation result, the loss situation, and the life prediction value.
[0085] 3. Use the deep learning model to analyze and predict newly input stainless steel pictures to obtain the evaluation result, the loss situation, and the life prediction of the stainless steel pictures.
[0086] 4. Generate a visualization report based on the analysis and prediction results.
[0087] As Figure 2 shown, the present invention also provides a stainless steel picture recognition and analysis system based on computer vision, including:
[0088] An image processing module, configured to obtain a normal image and a metallographic image of a stainless steel sample and perform image preprocessing to obtain an image set, and then extract physical features and tissue features based on the image set;
[0089] A model learning module, configured to use the image set, the physical features, and the tissue features to select and train a machine model, and then integrate the trained machine models to obtain a deep learning model;
[0090] A picture analysis module, configured to use the deep learning model to analyze and predict newly input stainless steel pictures to obtain the evaluation result, the loss situation, and the life prediction of the stainless steel pictures;
[0091] A visualization module, configured to generate a visualization report based on the analysis and prediction results
[0092] Therefore, by providing a stainless steel picture recognition and analysis method and system based on computer vision, the present invention can accurately and efficiently identify and analyze stainless steel pictures by introducing computer vision and deep learning technologies, reduce human errors, achieve precise monitoring of material quality, and ensure the quality and performance of stainless steel.
[0093] In this specification, the various embodiments are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. For the same or similar parts among the various embodiments, reference can be made to each other.
[0094] Specific examples are used in this article to elaborate on the principles and implementation manners of the present invention. The descriptions of the above embodiments are only used to help understand the method of the present invention and its core idea. At the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to the present invention.
Claims
1. A stainless steel image recognition and analysis method based on computer vision, characterized in that: The following steps are involved: Obtaining a common image and a metallographic image of a stainless steel sample and performing image preprocessing to obtain an image set, and then extracting physical features and organizational features based on the image set; Selecting and training a machine model using the image set, the physical features, and the tissue features, and integrating the trained machine models to obtain a deep learning model; Analyze and predict newly input stainless steel images using the deep learning model to obtain evaluation results, loss conditions, and life predictions of the stainless steel images; Generate visual reports based on analysis and prediction results; The training process of the machine model includes appearance analysis training, performance analysis training, loss analysis training and life prediction training; The process of loss analysis training is: Combining the physical features and the tissue features by means of feature superposition to obtain a feature data set, and grouping and classifying different features in the feature data set; Selecting a third machine model, training the third machine model using the feature data set to obtain a wear model, and implementing the wear analysis training; Input the stainless steel samples into the wear model to obtain the wear degree and wear cause of each stainless steel sample; the wear cause is composed of various characteristics; Among them, local sensitivity analysis technology is introduced into the wear model to identify the feature combination in the wear cause and the wear degree proportion of each feature.
2. The stainless steel image recognition and analysis method based on computer vision according to claim 1, characterized in that: The image preprocessing includes grayscale processing, denoising processing, contrast enhancement processing and image segmentation processing; the physical characteristics include color, texture and shape; the organizational characteristics include phase boundaries, pores and grains.
3. The stainless steel image recognition and analysis method based on computer vision according to claim 2 is characterized in that: The process of appearance analysis training is as follows: Integrate the common image and the physical features into an appearance image set, and perform spectrum measurement, denoising, color correction and white balance processing operations based on the appearance image set; Based on the processed appearance image set, analyzing and extracting color histogram, brightness distribution, texture features and glossiness to obtain spectral data; Using the spectral data, selecting a first machine model to calculate the chromaticity data of the stainless steel samples and the color difference between different samples; The surface quality of the stainless steel is evaluated based on the chromaticity data and the color difference, thereby completing the appearance analysis training.
4. The stainless steel image recognition and analysis method based on computer vision according to claim 3 is characterized in that: The process of the performance analysis training is as follows: Selecting a second machine model, and inputting the pores, the phase boundaries and the grains into the second machine model for calculation and statistics; Calculating the porosity of the pores and counting the size, shape and distribution of the pores, calculating the area and length of the phase boundary and counting the type of the phase boundary, calculating the average size distribution of the grains and analyzing the shape of the grains to obtain a performance data set; The performance data set and the use environment information of the stainless steel sample are integrated to obtain an initial performance report, thereby completing the performance analysis training.
5. The stainless steel image recognition and analysis method based on computer vision according to claim 4 is characterized in that: The process of life prediction training is as follows: selecting a fourth machine model, presetting an actual life value in the fourth machine model, and training the fourth machine model using the feature data set to obtain an initial prediction model; Inputting the stainless steel sample into the initial prediction model to perform prediction and obtain a prediction result, and comparing and calculating the prediction result with the actual life value to obtain a prediction difference; The feature importance of the feature data set is calculated and obtained, and the life prediction model is adjusted and optimized in combination with the feature importance and the prediction difference to obtain the life prediction model and complete the life prediction training.
6. The stainless steel image recognition and analysis method based on computer vision according to claim 5, characterized in that: The process of integrating the trained machine model to obtain a deep learning model is: Designing a deep learning framework with a multi-input and multi-output structure, and integrating the first machine model, the second machine model, the wear model, and the life prediction model as sub-models into the deep learning framework to obtain an initial learning model; Integrate the physical characteristics, the organizational characteristics, the wear data and the life data into a comprehensive data set that meets the input requirements, and train and optimize the initial learning model by combining the comprehensive data set and the introduced optimizer to obtain the deep learning model; New stainless steel samples are input into the deep learning model for identification and analysis, and comprehensive performance evaluation results, loss conditions and life prediction values are output.
7. A stainless steel image recognition and analysis system based on computer vision, characterized in that: include: An image processing module, used to obtain a common image and a metallographic image of the stainless steel sample and perform image preprocessing to obtain an image set, and then extract physical features and organizational features based on the image set; A model learning module, for selecting and training a machine model using the image set, the physical features, and the tissue features, and then integrating the trained machine model to obtain a deep learning model; An image analysis module, used to analyze and predict newly input stainless steel images using the deep learning model to obtain evaluation results, loss conditions, and life predictions of the stainless steel images; The visualization module is used to generate visualization reports based on the analysis and prediction results.
Citation Information
Patent Citations
Selective laser melting forming 316L stainless steel wear prediction method based on machine learning
CN114117684A
Stainless steel tablet press surface quality evaluation method based on optical means
CN114627125A
Intelligent identification and rating method for nonmetallic inclusions in steel based on deep learning
CN114694144A
Single crystal metal material fatigue life prediction method based on machine learning
CN117421982A