Metallographic sample defect identification and rating control method and device based on image quality analysis, equipment and medium
Patent Information
- Application Number
- CN202610404295.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-30
- Publication Date
- 2026-08-18
AI Technical Summary
[0005]本发明的主要目的在于提供了一种基于图像质量分析的金相制样缺陷识别及评级控制方法、装置、设备及介质,旨在解决现有技术中金相设备无法拦截制样不合格图像,导致评级结果偏差、检测数据可追溯性不足的技术问题
[0016] This invention acquires microscopic images of metallographic samples and records corresponding metadata to obtain standardized input images. Defect features are extracted and physical quality characteristics are calculated from these standardized input images to obtain deep learning and physical quality scores. Combined with dynamic judgment conditions, the standardized input images are used to determine their quality compliance. If they pass, metallographic grading is performed to generate a rating result; otherwise, the grading process is halted and a re-inspection prompt is generated. Because this invention uses dual-channel quality scoring to automatically identify sample preparation defects and quantify image quality, it achieves automatic identification and classification of sample preparation quality, significantly reducing the variability of human judgment and improving the consistency and objectivity of metallographic image quality evaluation. By using quality judgment as a prerequisite for grading, it effectively avoids grading deviations caused by sample preparation defects, preventing misjudgments of grain size or inclusions due to sample preparation defects. This improves the accuracy and traceability of metallographic testing results, while also automating the grading process and improving laboratory testing efficiency.
Smart Images

Figure CN122597256A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of metallographic inspection technology, and in particular to a method, apparatus, equipment and medium for metallographic sample preparation defect identification and rating control based on image quality analysis. Background Technology
[0002] Metallographic examination is the most fundamental and crucial testing method in steel material research and development, process optimization, and quality control. Core metallographic testing items such as grain size determination and non-metallic inclusion rating are highly sensitive to the quality of sample preparation. The polishing process, corrosion method, and corrosion time during sample preparation directly determine the appearance of the microstructure. Sample preparation defects such as residual polishing marks, abnormal corrosion, and surface contamination can lead to problems such as grain size deviation and misjudgment of inclusions. Therefore, the steel industry generally regards sample preparation quality control as the core link in the metallographic testing chain, following the basic principle that "sample preparation quality is higher than rating results."
[0003] With the development of automated microscopic inspection technology, various AI-powered metallographic microscopes with automated grain size determination and inclusion rating functions have been gradually applied in metallographic laboratories. These devices, designed with rating algorithms as their core concept, can automate the rating process in metallographic inspection. Meanwhile, metallographic laboratories included in the CNAS / ISO 17025 management system have stringent requirements for full-process data traceability, process control, and result reproducibility in metallographic inspection. These laboratories typically use data management devices to record and manage test data.
[0004] Existing AI-powered metallographic microscopic inspection systems directly execute rating algorithms after acquiring microscopic images, without setting up a separate sample preparation quality assessment step for the input images. In practical applications, defects such as residual polishing lines, uneven corrosion, or surface contamination may exist during sample preparation. These defects can interfere with image features, thereby affecting the accuracy of automatic rating results. Due to the lack of a reliable pre-assessment and screening mechanism for sample preparation quality, images that do not meet sample preparation standards may still enter the automatic rating process, leading to a decrease in the stability and reliability of the inspection results. Furthermore, because there is no pre-assessment of sample preparation, it is impossible to trace the true cause of rating anomalies later. Summary of the Invention
[0005] The main objective of this invention is to provide a method, apparatus, equipment, and medium for identifying and rating metallographic sample preparation defects based on image quality analysis. This invention aims to solve the technical problem in the prior art where metallographic equipment cannot intercept images of unqualified samples, resulting in biased rating results and insufficient traceability of test data.
[0006] To achieve the above objectives, this invention provides a method for metallographic sample preparation defect identification and rating control based on image quality analysis, the method comprising the following steps: Microscopic images of metallographic samples are acquired, and the metadata corresponding to the microscopic images is recorded to obtain a standardized input image; Defect features are extracted and physical quality features are calculated from the standardized input image to obtain a deep learning quality score and a physical quality score. Based on the deep learning quality score and the physical quality score, combined with dynamic judgment conditions, the quality of the standardized input image is judged to be qualified. If the quality of the standardized input image is acceptable, a metallographic rating operation is performed on the standardized input image to generate a corresponding rating result; If the quality of the standardized input image is unqualified, the metallographic grading process is blocked, and a re-inspection prompt message is generated.
[0007] Optionally, the step of extracting defect features and calculating physical quality features from the standardized input image to obtain a deep learning quality score and a physical quality score includes: The standardized input image is input into a pre-trained deep learning quality assessment model to extract sample preparation defect features from the standardized input image. The sample preparation defect features include insufficient corrosion, excessive corrosion, residual polishing marks, surface contamination, and particulate debris. Based on the sample preparation defect characteristics, a deep learning quality score is generated; Physical feature analysis is performed on the standardized input image to obtain multi-dimensional physical feature parameters, including image sharpness, grayscale distribution, local texture consistency, noise level, brightness and contrast distribution parameters. The physical feature parameters are normalized and weighted to generate a physical quality score.
[0008] Optionally, the step of determining the quality compliance of the standardized input image based on the deep learning quality score and the physical quality score, combined with dynamic judgment conditions, includes: Based on the metadata corresponding to the standardized input image, information on material type, magnification, and sample preparation process is obtained. A first quality threshold and a second quality threshold are generated based on the material type, magnification, and sample preparation process information, and dynamic judgment conditions are generated based on the first quality threshold and the second quality threshold. The standardized input image is assessed for quality compliance based on the dynamic judgment conditions, which include: If the deep learning quality score is greater than or equal to the first preset quality threshold and the physical quality score is greater than or equal to the second preset quality threshold, the standardized input image is determined to be of acceptable quality. If the deep learning quality score is less than the first preset quality threshold or the physical quality score is less than the second preset quality threshold, the standardized input image is determined to be of substandard quality.
[0009] Optionally, if the standardized input image is of acceptable quality, performing a metallographic grading operation on the standardized input image to generate a corresponding grading result includes: The standardized input image is used to identify tissue regions and locate the effective field of view. The effective field of view of the standardized input image is preprocessed to enhance tissue boundaries and inclusion contours; Based on the preset rating items, feature extraction is performed on the preprocessed effective field of view to obtain the corresponding tissue feature parameters; The organizational characteristic parameters are rated based on the rating criteria corresponding to the preset rating items, and the rating results are calculated.
[0010] Optionally, the step of rating the organizational characteristic parameters based on the rating criteria corresponding to the preset rating items and calculating the rating result includes: With the preset rating item being grain size determination, grain boundary detection and segmentation are performed on the pre-processed effective field of view. Extract the grain structure characteristic parameters corresponding to the segmented grains, including the morphology, area and perimeter of the grains; Calculate the equivalent grain diameter based on the aforementioned grain structure characteristic parameters; Based on the rating criteria corresponding to the equivalent grain diameter and the metal average grain size measurement, a rating result including the average grain size level is calculated.
[0011] Optionally, the step of rating the organizational characteristic parameters based on the rating criteria corresponding to the preset rating items and calculating the metallographic rating result includes: When the preset rating item is non-metallic inclusion rating, the inclusions are identified and classified within the pre-processed effective field of view. The identified inclusions are classified to determine the category corresponding to each inclusion. The categories include sulfides, oxides, silicates, spherical oxides, and single-particle spherical inclusions. Extract the inclusion feature parameters for each category, including length, quantity, distribution density, and area ratio; Based on the inclusion characteristic parameters and the rating criteria corresponding to the rating of non-metallic inclusions in steel, the rating results for each category of inclusions are obtained.
[0012] Optionally, if the standardized input image quality is unqualified, the metallographic grading process is blocked, and a re-inspection prompt message is generated, including: If the quality of the standardized input image is unqualified, the metallographic grading process for the standardized input image shall be terminated. Obtain the type and location information of the sample preparation defects corresponding to the standardized input image; Based on the type and location information of the sample preparation defects, corresponding re-inspection prompt information is generated. The re-inspection prompt information includes the type of sample preparation defect, the specific indicators of substandard quality score, the corresponding sample preparation process adjustment information, the image acquisition parameter optimization information, and the sample identification. The metadata, quality assessment results, sample preparation defect information, and re-inspection prompts of the standardized input image are uploaded to the laboratory data management device.
[0013] Furthermore, to achieve the above objectives, this invention also proposes a metallographic sample preparation defect identification and rating control device based on image quality analysis, which applies the image quality analysis-based metallographic sample preparation defect identification and rating control method described above. The device includes: The image processing module is used to acquire microscopic images of metallographic samples, record the metadata corresponding to the microscopic images, and obtain a standardized input image. The quality analysis module is used to extract defect features and calculate physical quality features from the standardized input image to obtain a deep learning quality score and a physical quality score. The quality assessment module is used to assess the quality of the standardized input image based on the deep learning quality score and the physical quality score, combined with dynamic assessment conditions. The rating execution module is used to perform metallographic rating operations on the standardized input image if the quality of the standardized input image is qualified, and generate the corresponding rating result; The blocking control module is used to block the metallographic grading process and generate a re-inspection prompt message if the quality of the standardized input image is unqualified.
[0014] Furthermore, to achieve the above objectives, this application also proposes a metallographic sample preparation defect identification and rating control device based on image quality analysis. The device includes: a memory, a processor, and a metallographic sample preparation defect identification and rating control program stored in the memory. The processor is used to run the metallographic sample preparation defect identification and rating control program, and the computer program is configured to implement the steps of the metallographic sample preparation defect identification and rating control method based on image quality analysis as described above.
[0015] In addition, to achieve the above objectives, this application also proposes a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the metallographic sample preparation defect identification and rating control method based on image quality analysis as described above.
[0016] This invention acquires microscopic images of metallographic samples and records corresponding metadata to obtain standardized input images. Defect features are extracted and physical quality characteristics are calculated from these standardized input images to obtain deep learning and physical quality scores. Combined with dynamic judgment conditions, the standardized input images are used to determine their quality compliance. If they pass, metallographic grading is performed to generate a rating result; otherwise, the grading process is halted and a re-inspection prompt is generated. Because this invention uses dual-channel quality scoring to automatically identify sample preparation defects and quantify image quality, it achieves automatic identification and classification of sample preparation quality, significantly reducing the variability of human judgment and improving the consistency and objectivity of metallographic image quality evaluation. By using quality judgment as a prerequisite for grading, it effectively avoids grading deviations caused by sample preparation defects, preventing misjudgments of grain size or inclusions due to sample preparation defects. This improves the accuracy and traceability of metallographic testing results, while also automating the grading process and improving laboratory testing efficiency. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a schematic diagram of the structure of a metallographic sample preparation defect identification and rating control device based on image quality analysis, which is part of the hardware operating environment of the embodiment of the present invention. Figure 2 This is a flowchart illustrating the first embodiment of the metallographic sample preparation defect identification and rating control method based on image quality analysis of the present invention. Figure 3 This is a flowchart illustrating the second embodiment of the metallographic sample preparation defect identification and rating control method based on image quality analysis of the present invention. Figure 4 This is a schematic diagram of the process for grain size determination and non-metallic inclusion grade evaluation in one embodiment of the metallographic sample preparation defect identification and rating control method based on image quality analysis of the present invention. Figure 5 This is a structural block diagram of the first embodiment of the metallographic sample preparation defect identification and rating control device based on image quality analysis of the present invention.
[0019] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0020] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.
[0021] Reference Figure 1 , Figure 1 This is a schematic diagram of the structure of a metallographic sample preparation defect identification and rating control device based on image quality analysis, which is part of the hardware operating environment of the embodiment of the present invention.
[0022] like Figure 1 As shown, the metallographic sample preparation defect identification and rating control device based on image quality analysis may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen and an input unit such as a keyboard; the user interface 1003 may also include standard wired and wireless interfaces. The network interface 1004 may optionally include standard wired and wireless interfaces (such as Wireless-Fidelity (Wi-Fi) interfaces). The memory 1005 may be high-speed random access memory (RAM) or stable non-volatile memory (NVM), such as a disk storage device. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001.
[0023] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on the metallographic sample preparation defect identification and rating control device based on image quality analysis. It may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0024] like Figure 1 As shown, the memory 1005, which is a computer-readable storage medium, may include an operating device, a network communication module, a user interface module, and a metallographic sample preparation defect identification and rating control program.
[0025] exist Figure 1In the metallographic sample preparation defect identification and rating control device based on image quality analysis shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and memory 1005 in the metallographic sample preparation defect identification and rating control device based on image quality analysis of the present invention can be set in the metallographic sample preparation defect identification and rating control device based on image quality analysis. The metallographic sample preparation defect identification and rating control device based on image quality analysis calls the metallographic sample preparation defect identification and rating control program stored in the memory 1005 through the processor 1001 and executes the metallographic sample preparation defect identification and rating control method based on image quality analysis provided in the embodiment of the present invention.
[0026] This invention provides a method for metallographic sample preparation defect identification and rating control based on image quality analysis, referring to... Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the metallographic sample preparation defect identification and rating control method based on image quality analysis of the present invention.
[0027] In this embodiment, the metallographic sample preparation defect identification and rating control method based on image quality analysis includes the following steps: Step S10: Acquire microscopic images of the metallographic sample, record the metadata corresponding to the microscopic images, and obtain a standardized input image.
[0028] It should be noted that this embodiment is applied to the pre-assessment of an AI-powered metallographic microscopic inspection system. Current AI-powered metallographic microscopic inspection systems lack reliable and accurate quality assessment methods, making the metallographic grading process difficult to control and unable to effectively intercept substandard images for grading, resulting in significant deviations and noise in the final grading results. To overcome the problems in existing technologies, such as the difficulty in objectively quantifying metallographic image quality, the impact of sample preparation defects on metallographic grading results, and the continued grading process even with substandard samples, this embodiment combines deep learning quality assessment with physical image quality indicators to achieve quantitative judgment of sample preparation quality and automated control of the grading process, thereby ensuring the accuracy, stability, and traceability of metallographic grading.
[0029] It should be understood that the executing entity of this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or a terminal electronic device capable of performing the above functions. The following description uses an image quality analysis-based metallographic sample preparation defect identification and rating control device (hereinafter referred to as the control device) as an example to illustrate this embodiment and the following embodiments.
[0030] It should be noted that metallographic specimens refer to metal (or alloy) samples that have undergone sample preparation processes such as grinding, polishing, and etching, and whose internal microstructure can be observed through microscopic equipment. They are the core object of metallographic analysis.
[0031] Microscopic images are images taken using equipment such as metallographic microscopes and microscopic imaging systems, which can clearly show the microscopic features of the internal grains, phase structure, defects, etc. of metallographic samples.
[0032] Metadata refers to auxiliary information related to microscopic images, which describes the image acquisition environment, parameters, and basic information of the sample. It may include optical parameters, equipment information, sample preparation information, and timestamps.
[0033] Standardized input images can be images obtained by uniformly calibrating the parameters of the original microscopic images, eliminating differences caused by different acquisition conditions, and providing a unified benchmark for subsequent processing.
[0034] Step S20: Extract defect features and calculate physical quality features from the standardized input image to obtain a deep learning quality score and a physical quality score.
[0035] Understandably, defect feature extraction refers to identifying and extracting feature information related to metallographic sample preparation defects (such as scratches, stains, oxide layers, cracks, unpolished areas, etc.) from standardized input images, and is the core step in defect identification. Physical quality feature calculation refers to the quantitative calculation of the physical properties of standardized input images, which directly reflect the image quality and sample preparation quality.
[0036] It should be understood that deep learning quality scoring can be based on a deep learning model to analyze extracted defect features, quantitatively assess the severity of sample defects in an image, and output a quantitative score. A higher score indicates fewer defects and better image quality. Physical quality scoring can be obtained by quantitatively calculating the physical quality features of an image (such as sharpness, contrast, grayscale uniformity, and edge sharpness). A higher score indicates better physical imaging quality.
[0037] In some embodiments, the control device may employ a convolutional neural network (CNN) model to extract features from a standardized input image. The model, through trained parameters, automatically identifies defective regions in the image and extracts key information such as the shape, size, grayscale distribution, and edge features of the defects, distinguishing between sample preparation defects and normal microstructure features.
[0038] In some embodiments, the control device may employ image processing algorithms to calculate the core physical indicators of the image: sharpness is calculated by using a gradient operator (such as the Sobel operator) to calculate the gray-level change amplitude at the image edges; contrast is calculated by using the difference between the maximum and minimum gray-level values of the image; gray-level uniformity is calculated by using the gray-level variance of the image; and edge sharpness is obtained by using the average value of the gray-level gradient of the edge pixels. Then, a physical quality score is obtained by weighted summation.
[0039] It is understood that this embodiment achieves accurate extraction of metallographic sample preparation defect features and quantitative evaluation of image physical quality, breaking through the subjectivity and limitations of traditional manual defect identification; through the dual quantification of deep learning scoring and physical quality scoring, it comprehensively reflects the sample preparation quality and imaging quality of the image, providing a scientific and objective quantitative basis for subsequent quality qualification judgment, and effectively improving the accuracy and efficiency of defect identification.
[0040] Furthermore, to improve the accuracy of dual-channel scoring, step S20 above may include: Step S201: Input the standardized input image into a pre-trained deep learning quality assessment model and extract the sample preparation defect features of the standardized input image. The sample preparation defect features include insufficient corrosion, excessive corrosion, polishing marks, surface contamination, and particulate debris. Step S202: Generate a deep learning quality score based on the sample preparation defect characteristics; Step S203: Perform physical feature analysis on the standardized input image to obtain multi-dimensional physical feature parameters, including image sharpness, grayscale distribution, local texture consistency, noise level, brightness and contrast distribution parameters; Step S204: Normalize and weightedly fuse the physical feature parameters to generate a physical quality score.
[0041] It should be noted that the pre-trained deep learning quality assessment model is a deep learning model (such as a CNN convolutional neural network) that has been trained and optimized in advance based on a large number of metallographic microscopic images of sample preparation defects. It has the ability to quickly identify and extract the features of sample preparation defects.
[0042] In some embodiments, the control device standardizes the input image and inputs it to a pre-trained deep learning quality assessment model via a system interface. It then calls the model's feature extraction module, setting the input image format to match the model's requirements. The model performs a secondary adaptation process on the standardized input image (slightly adjusting the grayscale range and normalizing pixel values) to ensure that the image features are consistent with the input standard used during model training, thereby improving feature extraction accuracy. The model processes the image layer by layer through convolutional and pooling layers, first locating regions in the image that may contain defects, and then extracting features for each region. For areas of insufficient or excessive corrosion, features such as uniformity of grayscale distribution and clarity of tissue boundaries are extracted to distinguish between insufficient corrosion (overall high grayscale and blurred boundaries) and excessive corrosion (local grayscale abrupt changes and tissue fragmentation). To address polishing marks, features such as the direction, density, and width of the marks are extracted to differentiate them from normal tissue texture. For surface contamination and particulate debris, the shape, size, gray value, distribution density and other features of the defects are extracted to distinguish between the two types of defects (contamination is mostly irregular patches, while debris is mostly fine discrete particles).
[0043] The model filters the extracted original defect features, removes invalid features (such as normal tissue features unrelated to sample preparation defects), retains the core features of the sample preparation defects, and outputs them in the form of feature vectors for subsequent scoring calculations.
[0044] In some embodiments, the control device performs multi-dimensional physical feature analysis on a standardized input image, including: Image sharpness: The Laplacian operator is used to calculate the gray-level gradient of the image edges. The average value of the gradient is the sharpness quantification parameter. The larger the gradient value, the higher the sharpness. Gray-level distribution: By statistically analyzing the gray-level values of all pixels in an image, the gray-level mean (the average of the gray-level values of all pixels) and gray-level variance (the average of the sum of squared deviations of the gray-level values from the mean) are calculated. Local texture consistency: Divide the image into several local regions (such as 32×32 pixel sub-regions), calculate the texture similarity within each sub-region, and take the average of the similarities of all sub-regions as the local texture consistency parameter; Noise level: Image noise is filtered using a Gaussian filtering algorithm. The pixel grayscale difference between the images before and after filtering is calculated. The average value of the difference is the noise level parameter. The smaller the difference, the less noise. Brightness and contrast distribution parameters: Calculate the average brightness (average of brightness quantization values) and average contrast (the difference between the maximum and minimum brightness of the image) of all pixels in the image.
[0045] The calculated physical characteristic parameters are organized into a parameter matrix, and the quantized value and unit of each parameter are labeled to ensure that the parameters are clear and traceable.
[0046] Step S30: Based on the deep learning quality score and the physical quality score, and combined with dynamic judgment conditions, determine the quality compliance of the standardized input image.
[0047] It should be noted that dynamic judgment conditions refer to the quality qualification judgment thresholds and logical rules that are dynamically adjusted according to different scenarios such as the material of the metallographic sample, the sample preparation standard, and the purpose of testing, rather than fixed judgment standards, to ensure the adaptability of the judgment results.
[0048] It should be noted that the quality compliance determination can be based on deep learning quality scores, physical quality scores, and dynamic judgment conditions to determine whether the standardized input image meets the quality requirements of subsequent metallographic grading, and is divided into two results: qualified and unqualified.
[0049] It is understandable that this embodiment, through the setting of dynamic judgment conditions, enables the quality compliance judgment to adapt to the detection needs of different scenarios, improves the flexibility and accuracy of the judgment results, and avoids misjudgments caused by fixed thresholds (such as missing defects in precision samples and overjudging in routine samples). Through the comprehensive judgment of dual scoring, it fully covers the two core dimensions of sample preparation defects and imaging quality, ensuring that only images that meet the quality requirements enter the subsequent rating process, thus guaranteeing the accuracy of the rating results.
[0050] Furthermore, to improve the accuracy of quality determination, step S30 above may include: Step S301: Obtain material type, magnification, and sample preparation process information based on the metadata corresponding to the standardized input image; Step S302: Generate a first quality threshold and a second quality threshold based on the material type, magnification and sample preparation process information, and generate dynamic judgment conditions based on the first quality threshold and the second quality threshold; Step S303: Determine the quality compliance of the standardized input image based on the dynamic determination conditions, wherein the dynamic determination conditions include: Step S304: If the deep learning quality score is greater than or equal to the first preset quality threshold and the physical quality score is greater than or equal to the second preset quality threshold, the standardized input image is determined to be of acceptable quality. Step S305: If the deep learning quality score is less than the first preset quality threshold or the physical quality score is less than the second preset quality threshold, the standardized input image is determined to be of unqualified quality.
[0051] It should be noted that the first quality threshold is a dynamic judgment threshold corresponding to the deep learning quality score, used to determine whether the severity of sample preparation defects meets the requirements. The threshold value is dynamically adjusted according to the material type, magnification, and sample preparation process information.
[0052] The second quality threshold is a dynamic judgment threshold corresponding to the physical quality score, used to determine whether the image imaging quality meets the requirements. The threshold value is also dynamically adjusted according to the material type, magnification, and sample preparation process information.
[0053] It should be noted that the control equipment can combine the three types of core information extracted, match the preset threshold rules, determine the first and second quality thresholds, and then formulate clear qualified and unqualified judgment logic based on the two thresholds to form dynamic judgment conditions adapted to the current sample.
[0054] In practical implementation, the control device can accurately match the material type, magnification, and sample preparation process information with the threshold range in the preset rule library to determine the first and second mass thresholds corresponding to the current sample. The two matched thresholds are calibrated, and the reasonableness and adaptability of the threshold setting are ensured by taking into account the actual situation of the current sample preparation process (such as appropriately reducing the first threshold by 2-3 points to avoid over-judgment if the concentration of corrosive agent in the sample preparation process is too high). Based on the calibrated first and second mass thresholds, a clear judgment logic is formulated to form dynamic judgment conditions.
[0055] Step S40: If the quality of the standardized input image is qualified, perform a metallographic rating operation on the standardized input image to generate a corresponding rating result.
[0056] In some embodiments, the control device can call the corresponding standard rating spectrum according to the sample material and testing requirements, and establish a comparison model between the standardized input image and the standard spectrum; through image recognition algorithms, it extracts the metallographic features (grain size, phase content, defect distribution) in the standardized input image, matches them with the various levels of microstructure features in the standard spectrum, and calculates the feature similarity; based on the standard level with the highest similarity, it determines the metallographic rating level of the sample; rating result generation: outputs the rating level, and automatically generates a rating report, which includes sample information, image acquisition parameters, defect features, physical quality score, deep learning quality score, and rating basis, stores it in the database, and can be synchronously pushed to the testing terminal.
[0057] Step S50: If the quality of the standardized input image is unqualified, the metallographic grading process is blocked, and a re-inspection prompt message is generated.
[0058] In practice, when a sample is deemed unqualified, a process blocking command is automatically triggered, stopping the metallographic grading operation in step four and locking the grading authority for that sample to prevent misoperation. Based on the reason for the unqualification (e.g., if the deep learning score is too low, a message will be displayed saying "too many sample preparation defects"; if the physical quality score is too low, a message will be displayed saying "insufficient image clarity"), standardized re-inspection prompts are generated, clearly indicating the unqualified items, relevant scores, and re-inspection suggestions. These prompts are pushed to the operator via system terminals, SMS, etc., and the prompt information and push time are recorded. After the operator completes the re-inspection (re-preparing the sample and re-acquiring the image) according to the prompts, the system restarts the entire process, processes the new standardized input image, and records the relevant data before and after the re-inspection, forming a complete traceability chain.
[0059] Understandably, this embodiment effectively prevents unqualified images from entering the rating process, prevents distorted rating results from affecting the judgment of metallographic sample quality, and reduces the time and labor costs caused by invalid ratings. The re-inspection prompt information clarifies the reasons for non-compliance and the direction for improvement, guides operators to carry out re-inspection work accurately, improves re-inspection efficiency, and the complete traceability chain facilitates the optimization of subsequent sample preparation processes and the investigation of quality problems.
[0060] Furthermore, to improve the efficiency and pass rate of re-inspection, the above step S50 may include: Step S501: If the quality of the standardized input image is unqualified, terminate the metallographic grading process of the standardized input image; Step S502: Obtain the type and location information of the sample preparation defects corresponding to the standardized input image; Step S503: Based on the type and location information of the sample preparation defect, generate corresponding re-inspection prompt information. The re-inspection prompt information includes the sample preparation defect type, specific indicators of substandard quality score, corresponding sample preparation process adjustment information, image acquisition parameter optimization information, and sample identification. Step S504: Upload the metadata, quality judgment results, sample preparation defect information and re-inspection prompt information of the standardized input image to the laboratory data management device.
[0061] It should be noted that the sample preparation defect type refers to the specific defect category identified in the defect feature extraction stage, including insufficient corrosion, excessive corrosion, residual polishing marks, surface contamination, and particulate debris. The sample preparation defect location information can be the specific coordinate range and distribution area of the defect in the standardized input image, presented in the form of a coordinate matrix, clearly defining the specific location of the defect on the sample and providing support for targeted adjustments during re-inspection.
[0062] In some embodiments, the control device can generate core modules for re-inspection prompts based on a preset template, including a defect information module, a scoring failure module, a process adjustment module, a data acquisition parameter optimization module, and a sample identification module, to ensure that the information is complete and without omissions; the completed re-inspection prompts are verified to confirm that the information is accurate, logically coherent, and the suggestions are feasible, so as to avoid information errors or unreasonable suggestions; after verification, a standardized re-inspection prompt document is generated.
[0063] Among them, the defect information module is used to fill in the sample preparation defect type and location information (such as "Defect type: excessive corrosion, surface contamination; excessive corrosion location: image edge (500,600)-(700,720), surface contamination location: image center (200,300)-(400,400)"). The "Unsatisfactory Scores" module is used to fill in the unsatisfactory scoring indicators, specific values, and corresponding thresholds (e.g., "Deep learning quality score 72 points (first threshold 75 points), physics quality score 68 points (second threshold 70 points), both are unsatisfactory"). The sample preparation process adjustment module is used to provide targeted suggestions based on the type of defect (such as "excessive corrosion: shorten the corrosion time from 30s to 20s, and adjust the corrosive agent concentration from 5% to 3%; surface contamination: perform ultrasonic cleaning on the sample before re-inspection to remove surface oil and impurities"). The parameter acquisition optimization module is used to provide suggestions based on the reasons for the failure of the physical quality score (such as "Insufficient sharpness: adjust the magnification from 100× to 200×, adjust the focal length to 10μm, and adjust the exposure time from 50ms to 60ms"). The sample identification module is used to fill in unique identification information such as sample number, material, and sample preparation time (e.g., "Sample number: JS-20240501-003, material: carbon steel, sample preparation time: 2024-05-01 09:30").
[0064] Compared with the prior art, the embodiments of the present invention have the following beneficial effects: (1) An automatic sample preparation defect identification mechanism was constructed to improve the consistency of quality judgment: This invention uses a deep learning model system to learn the characteristics of sample preparation defects such as uneven corrosion, residual polishing marks, and contamination particles, thereby achieving automatic identification and classification of sample preparation quality. This significantly reduces the differences in human judgment and improves the consistency and objectivity of metallographic image quality evaluation.
[0065] (2) Introduce a comprehensive quality assessment method with dynamic thresholds to enhance the system's adaptability: Traditional fixed thresholds are difficult to adapt to different materials, magnifications, and sample preparation conditions. This invention uses a dual-channel linkage of deep learning quality scoring and physical quality scoring, combined with historical data and experimental conditions, to dynamically adjust the judgment threshold, enabling the system to maintain stability and accuracy in various metallographic detection scenarios.
[0066] (3) Link sample preparation quality evaluation with artificial intelligence rating process to achieve automatic control of the rating process: This invention is the first to use image quality judgment as a prerequisite for artificial intelligence rating, realizing the process control logic of "prohibiting rating of unqualified images and automatically releasing qualified images", avoiding misjudgment of grain size or inclusion rating deviation caused by sample preparation defects, and ensuring the reliability of artificial intelligence automatic rating results from the source.
[0067] (4) Meets the CNAS / ISO17025 requirements for data integrity and quality control: This invention integrates image quality scores, defect determination results, threshold parameters, blocking records, and final rating results into the laboratory data management platform, forming a traceable detection chain that meets the CNAS laboratory requirements for original records, data traceability, and process consistency.
[0068] (5) Improve laboratory testing efficiency and automation level: By setting up an automated quality screening mechanism before the rating process, this invention reduces the need for artificial intelligence rating to make incorrect calculations of unqualified images and the need for manual re-inspection, thereby improving equipment utilization and task throughput. It is suitable for scenarios such as batch testing and rapid evaluation, and has a significant effect on improving the overall work efficiency of the laboratory.
[0069] refer to Figure 3 , Figure 3 This is a flowchart illustrating the second embodiment of the metallographic sample preparation defect identification and rating control method based on image quality analysis of the present invention.
[0070] Based on the first embodiment described above, in this embodiment, step S40 further includes: Step S401: Perform tissue region recognition on the standardized input image to locate the effective field of view.
[0071] In some embodiments, the control device may employ a semantic segmentation algorithm (such as the U-Net model) to identify tissue regions in a standardized input image that meets quality standards. The algorithm presets thresholds for the differences in grayscale and texture features between metallographic tissues and invalid regions to ensure recognition accuracy. The input image is analyzed pixel by pixel, and based on grayscale values and texture features, the image is divided into metallographic tissue regions, background regions, and invalid regions. The background region is the area without a sample at the image edge, and the invalid region is the interference region such as contamination or blank areas. The initially divided tissue regions are screened, and tissue regions that are too small (e.g., less than 5% of the total image area), have blurred edges, or have obvious interference are removed. Regions with complete outlines, clear tissues, and no obvious interference are retained as the effective field of view.
[0072] Step S402: Preprocess the effective field of view of the standardized input image to enhance tissue boundaries and inclusion contours.
[0073] It should be noted that the microstructure boundary can be the dividing line between different phases and grains in a metallographic structure. A clear microstructure boundary is key to distinguishing different microstructures and measuring grain size, directly affecting the accuracy of feature extraction. The inclusion profile can be the external outline of impurities, second-phase particles, and other inclusions present in the metallographic structure. The size and distribution of inclusions are important items in metallographic grading, and a clear profile facilitates the accurate extraction of their characteristic parameters.
[0074] In some embodiments, the control device may select a targeted preprocessing algorithm based on the characteristics of the effective field of view. The core algorithms include edge enhancement, noise reduction, and contrast adjustment to avoid over-processing that could lead to distortion of tissue features. A median filtering algorithm is used to perform noise reduction on the effective field of view, removing minor noise in the image (such as fine noise caused by residual particles and debris) while preserving tissue boundaries and inclusion contours to avoid noise interfering with feature extraction.
[0075] In some embodiments, the control device may employ the Canny edge detection algorithm to enhance the edges of the denoised effective field of view, thereby strengthening the grayscale differences between the tissue boundaries and making the boundaries between different grains and phases clearer, which facilitates subsequent boundary identification and size measurement. Through a contrast adaptive adjustment algorithm, the grayscale contrast between inclusions and matrix tissue in the effective field of view is improved, making the inclusion outlines more prominent and avoiding confusion between inclusions and matrix tissue, which facilitates subsequent inclusion feature extraction. After preprocessing, the enhanced effective field of view image is output for subsequent feature extraction.
[0076] Step S403: Based on the preset rating items, extract features from the preprocessed effective field of view to obtain the corresponding tissue feature parameters.
[0077] It should be noted that the preset rating items can be the core metallographic rating items set in advance based on the material type and testing standards of the metallographic sample, including grain size, inclusion content and distribution, phase composition ratio, and microstructure uniformity.
[0078] It should be noted that the organizational characteristic parameters can be quantitative indicators extracted from the preprocessed effective field of view and corresponding to the preset rating items. They are the basis for metallographic rating, and different rating items correspond to different characteristic parameters.
[0079] Step S404: Rating the organizational characteristic parameters based on the rating criteria corresponding to the preset rating items, and calculating the rating result.
[0080] It should be noted that the rating standard refers to the national or industry standard corresponding to the preset rating item, which clarifies the range of characteristic parameters corresponding to different levels of each rating item, and is the core basis for calculating the rating result.
[0081] Furthermore, in one embodiment where the preset rating item is grain size determination, step S404 may include: Step S4041: When the preset rating item is grain size determination, perform grain boundary detection and segmentation on the pre-processed effective field of view. Step S4042: Extract the grain structure characteristic parameters corresponding to the segmented grains, wherein the grain structure characteristic parameters include the morphology, area and perimeter of the grains; Step S4043: Calculate the equivalent grain diameter based on the grain structure characteristic parameters; Step S4044: Based on the rating criteria corresponding to the equivalent grain diameter and the metal average grain size measurement, calculate the rating result including the average grain size level.
[0082] In practice, the grain size determination process based on dual-channel image quality assessment is as follows: This embodiment uses a low-carbon steel sample as an example to demonstrate the application of the method of the present invention in the grain size determination scenario.
[0083] (1) Sample preparation and image acquisition: After the sample was ground and polished with sandpaper and etched with 4% nitric acid alcohol, microscopic images of the tissue were acquired under an optical microscope at 200× magnification.
[0084] The system automatically records the magnification (200×), optical parameters (exposure, brightness), equipment model and serial number, sample number and acquisition time, etc., as image metadata and writes them into the original record file.
[0085] (2) Calculation of deep learning quality score (Q): After the image is processed by the deep learning model, quality features such as insufficient etching, over-etching, and residual polishing marks are extracted, and a quality score Q (in the range of 0–1) is generated. Under the process conditions, the system adopts a reference threshold verified by experiments: Q_pass = 0.65. When Q ≥ Q_pass, it is determined that the tissue appearance quality meets the requirements for grain size measurement.
[0086] (3)Calculation of the physical imaging quality score (P): The system performs physical index calculations on the image, including: clarity (Laplacian texture sharpness), gray histogram distribution (used to judge etching uniformity), local texture consistency (degree of grain boundary appearance), imaging noise detection, and brightness / contrast range verification. These indexes are synthesized into an image after normalization. Among them, the quality score P (in the range of 0–1), and the system sets the reference threshold under this process: P_pass = 0.70.
[0087] If P ≥ P_pass, the imaging quality meets the requirements.
[0088] (4)Joint quality determination: The system makes a judgment according to the dual-channel quality determination rule of the present invention: If Q < Q_pass or P < P_pass → the field of view is unqualified, and it is prohibited from entering the grain size measurement.
[0089] If Q ≥ Q_pass and P ≥ P_pass → permission to continue with subsequent analysis.
[0090] In this embodiment, both Q and P meet the threshold requirements, so the field of view quality is qualified.
[0091] (5)AI grain size measurement (according to GB / T6394): When both Q and P pass the determination, the system automatically releases and enters the artificial intelligence grain size rating module. First, calculate the equivalent grain diameter according to the method of GB / T6394, and calculate the average grain size based on the measurement results of multiple fields of view.
[0092] (6)Result output and data management: The system writes the obtained grain size grade and metadata into a laboratory-standardized grain size report and uploads it to the laboratory data management platform to achieve a complete quality traceability chain.
[0093] This embodiment proves that the present invention can effectively screen out images with unqualified sample preparation quality during the grain size measurement process, reduce the rating deviation caused by sample preparation defects, realize the automation and standardization of the grain size rating process, ensure the accuracy and stability of the grade assessment, and improve the detection efficiency.
[0094] Furthermore, in one embodiment where the preset rating item is non-metallic inclusion rating, step S404 may include: Step S40411: When the preset rating item is non-metallic inclusion rating, perform inclusion identification and classification processing on the pre-processed effective field of view. Step S40412: Classify the identified inclusions and determine the category corresponding to each inclusion. The categories include sulfides, oxides, silicates, spherical oxides, and single-particle spherical inclusions. Step S40413: Extract the inclusion feature parameters for each category, including length, quantity, distribution density, and area ratio; Step S40414: Based on the inclusion characteristic parameters and the rating criteria corresponding to the rating of non-metallic inclusions in steel, obtain the rating result corresponding to each category of inclusions.
[0095] In practice, the non-metallic inclusion rating process based on dual-channel image quality evaluation is as follows: This embodiment uses an alloy steel sample as an example to illustrate the application of the present invention in the process of evaluating inclusion levels.
[0096] (1) Image acquisition and metadata recording: Metallographic specimens were prepared according to the requirements of GB / T10561—2023, and multiple fields of view were acquired under an optical microscope at 100× magnification.
[0097] The system automatically records the magnification (100×), light source conditions (bright field), equipment model and serial number, corrosion method (uncorroded / lightly corroded), field of view number, and acquisition time, and uploads all records to the laboratory data management platform.
[0098] (2) Deep learning quality score (Q): The deep learning model identifies whether there are defects in the sample preparation such as polishing marks, residual particles, debris, surface contaminants, and uneven lighting in the image. The model outputs a quality score Q (0–1) and uses a threshold of Q_pass=0.60 to determine whether the inclusion rating requirements are met.
[0099] (3) Imaging physical quality score (P): Based on the inclusion rating requirements for "sharp boundaries" and "low noise", the system calculates the image sharpness, brightness uniformity, noise level, local contrast, and background grayscale shift, and then obtains P(0–1) through weighted fusion, and adopts a reference threshold: P_pass=0.75.
[0100] (4) Joint quality assessment: If Q ≥ Q_pass and P ≥ P_pass, then the field of view quality is acceptable; if the conditions are not met, the system will automatically prompt for re-acquiring of the field of view.
[0101] In this embodiment, some fields of view fail the quality assessment. The system automatically marks them and prompts for re-acquisition. Qualified fields of view automatically enter the rating process.
[0102] (5) AI inclusion level assessment (based on GB / T10561—2023): The AI system first identifies and classifies inclusions into five categories: A (sulfides), B (oxides), C (silicates), D (spherical oxides), and DS (deformed silicates). Then, based on the measurement method of GB / T10561—2023, the system extracts characterization parameters such as length, quantity, and area ratio for each type of inclusion. Subsequently, it provides a rating for the five types of inclusions (A, B, C, D, and DS) according to the standard and automatically generates inclusion rating results.
[0103] (6) Output and archiving of results: After the rating is completed, the system automatically generates a standardized report containing metadata, field of view number, image quality evaluation results and rating results, and stores it in the laboratory data management system. At the same time, it establishes a corresponding relationship with the sample number to achieve full traceability.
[0104] Reference Figure 4 , Figure 4 This is a schematic diagram illustrating the process of grain size determination and non-metallic inclusion grade assessment in one embodiment. Figure 4 The demonstration showcases the execution path of field-of-view recognition, tissue visualization processing, feature extraction, and grade determination. The control equipment takes a metallographic image that has passed image quality assessment as input. First, it identifies the effective field of view through tissue region recognition. Then, through image preprocessing and tissue boundary extraction, it enhances grain boundary visibility and identifies inclusion contours. Subsequently, depending on the requirements, it selects either grain size determination (following GB / T6394) or inclusion rating (following GB / T10561-2023). The grain size determination process sequentially performs grain boundary detection and segmentation, calculates the equivalent grain diameter, and outputs the average grain size grade. The inclusion rating process classifies inclusions into five categories (A / B / C / D / DS), measures characteristic parameters, and outputs the corresponding rating results. Finally, it summarizes the two AI rating results to generate a standardized metallographic testing report conforming to the laboratory's unified template. The report is then written into the laboratory data management system to meet the CNAS / ISO17025 data traceability requirements.
[0105] This embodiment eliminates the influence of interference areas through effective field-of-view recognition; enhances the clarity of organizational features through targeted preprocessing; provides accurate quantitative basis through feature extraction by item; and ensures the scientificity and consistency of rating results through standardized rating calculation, thereby improving the operability and traceability of the rating process and effectively solving the problems of low efficiency, large error and inconsistent standards in traditional manual rating.
[0106] Furthermore, this embodiment of the invention also proposes a computer-readable storage medium storing a metallographic sample preparation defect identification and rating control program. When the metallographic sample preparation defect identification and rating control program is executed by a processor, it implements the steps of the metallographic sample preparation defect identification and rating control method based on image quality analysis as described above.
[0107] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor devices, apparatuses, or components, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution apparatus, device, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0108] The aforementioned computer-readable storage medium may be included in the metallographic sample preparation defect identification and rating control device based on image quality analysis; or it may exist independently and not assembled into the metallographic sample preparation defect identification and rating control device based on image quality analysis.
[0109] Furthermore, this invention also proposes a computer program product, including a metallographic sample preparation defect identification and rating control program. When the metallographic sample preparation defect identification and rating control program is executed by a processor, it implements the steps of the metallographic sample preparation defect identification and rating control method based on image quality analysis as described above.
[0110] The specific implementation of the computer program product of the present invention is basically the same as the embodiments of the above-mentioned metallographic sample preparation defect identification and rating control method based on image quality analysis, and will not be repeated here.
[0111] Reference Figure 5 , Figure 5 This is a structural block diagram of the first embodiment of the metallographic sample preparation defect identification and rating control device based on image quality analysis of the present invention.
[0112] like Figure 5 As shown, the metallographic sample preparation defect identification and rating control device based on image quality analysis proposed in this embodiment of the invention includes: Image processing module 10 is used to acquire microscopic images of metallographic samples, record metadata corresponding to the microscopic images, and obtain standardized input images; The quality analysis module 20 is used to extract defect features and calculate physical quality features from the standardized input image to obtain a deep learning quality score and a physical quality score. The quality assessment module 30 is used to assess the quality of the standardized input image based on the deep learning quality score and the physical quality score, combined with dynamic assessment conditions. The rating execution module 40 is used to perform metallographic rating operation on the standardized input image if the quality of the standardized input image is qualified, and generate a corresponding rating result; The blocking control module 50 is used to block the metallographic grading process and generate a re-inspection prompt message when the quality of the standardized input image is unqualified.
[0113] This embodiment acquires microscopic images of metallographic samples and records corresponding metadata to obtain standardized input images. Defect features are extracted and physical quality characteristics are calculated from these standardized input images to obtain deep learning and physical quality scores. Combined with dynamic judgment conditions, the standardized input images are used to determine their quality compliance. If they pass, metallographic grading is performed to generate a rating result; otherwise, the grading process is halted and a re-inspection prompt is generated. Because this embodiment uses dual-channel quality scoring to automatically identify sample preparation defects and quantify image quality, it achieves automatic identification and classification of sample preparation quality, significantly reducing the variability of human judgment and improving the consistency and objectivity of metallographic image quality evaluation. By using quality judgment as a prerequisite for grading, it effectively avoids grading deviations caused by sample preparation defects, preventing misjudgments of grain size or inclusions due to sample preparation defects, thus improving the accuracy and traceability of metallographic testing results. Simultaneously, it automates the grading process, improving laboratory testing efficiency.
[0114] The metallographic sample preparation defect identification and rating control device based on image quality analysis provided in this application adopts the metallographic sample preparation defect identification and rating control method based on image quality analysis in the above embodiments, and can solve the technical problem of metallographic sample preparation defect identification and rating control based on image quality analysis. Compared with the prior art, the beneficial effects of the metallographic sample preparation defect identification and rating control device based on image quality analysis provided in this application are the same as the beneficial effects of the metallographic sample preparation defect identification and rating control method based on image quality analysis provided in the above embodiments, and other technical features in the metallographic sample preparation defect identification and rating control device based on image quality analysis are the same as the features disclosed in the methods of the above embodiments, and will not be repeated here.
[0115] It should be understood that the above are merely illustrative examples and do not constitute any limitation on the technical solutions of the present invention. In specific applications, those skilled in the art can make settings as needed, and the present invention does not impose any restrictions on this.
[0116] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of this invention. In practical applications, those skilled in the art can select some or all of the workflow to achieve the purpose of this embodiment according to actual needs, and no restrictions are imposed here.
[0117] In addition, for technical details not described in detail in this embodiment, please refer to the metallographic sample preparation defect identification and rating control method based on image quality analysis provided in any embodiment of the present invention, which will not be repeated here.
[0118] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0119] It should be noted that the user information (including but not limited to user device information, user personal information, user location information, user behavior information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0120] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0121] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory / random access memory, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0122] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A method for metallographic sample preparation defect identification and rating control based on image quality analysis, characterized in that, The metallographic sample preparation defect identification and rating control method based on image quality analysis includes: Microscopic images of metallographic samples are acquired, and the metadata corresponding to the microscopic images is recorded to obtain a standardized input image; Defect features are extracted and physical quality features are calculated from the standardized input image to obtain a deep learning quality score and a physical quality score. Based on the deep learning quality score and the physical quality score, combined with dynamic judgment conditions, the quality of the standardized input image is judged to be qualified. If the quality of the standardized input image is acceptable, a metallographic rating operation is performed on the standardized input image to generate a corresponding rating result; If the quality of the standardized input image is unqualified, the metallographic grading process is blocked, and a re-inspection prompt message is generated.
2. The method for metallographic sample preparation defect identification and rating control based on image quality analysis as described in claim 1, characterized in that, The process of extracting defect features and calculating physical quality features from the standardized input image to obtain a deep learning quality score and a physical quality score includes: The standardized input image is input into a pre-trained deep learning quality assessment model to extract sample preparation defect features from the standardized input image. The sample preparation defect features include insufficient corrosion, excessive corrosion, residual polishing marks, surface contamination, and particulate debris. Based on the sample preparation defect characteristics, a deep learning quality score is generated; Physical feature analysis is performed on the standardized input image to obtain multi-dimensional physical feature parameters, including image sharpness, grayscale distribution, local texture consistency, noise level, brightness and contrast distribution parameters. The physical feature parameters are normalized and weighted to generate a physical quality score.
3. The method for metallographic sample preparation defect identification and rating control based on image quality analysis as described in claim 1, characterized in that, The process of determining the quality compliance of the standardized input image based on the deep learning quality score and the physical quality score, combined with dynamic judgment conditions, includes: Based on the metadata corresponding to the standardized input image, information on material type, magnification, and sample preparation process is obtained. A first quality threshold and a second quality threshold are generated based on the material type, magnification, and sample preparation process information, and dynamic judgment conditions are generated based on the first quality threshold and the second quality threshold. The standardized input image is assessed for quality compliance based on the dynamic judgment conditions, which include: If the deep learning quality score is greater than or equal to the first preset quality threshold and the physical quality score is greater than or equal to the second preset quality threshold, the standardized input image is determined to be of acceptable quality. If the deep learning quality score is less than the first preset quality threshold or the physical quality score is less than the second preset quality threshold, the standardized input image is determined to be of substandard quality.
4. The method for metallographic sample preparation defect identification and rating control based on image quality analysis as described in claim 1, characterized in that, If the standardized input image is of acceptable quality, a metallographic grading operation is performed on the standardized input image to generate a corresponding grading result, including: The standardized input image is used to identify tissue regions and locate the effective field of view. The effective field of view of the standardized input image is preprocessed to enhance tissue boundaries and inclusion contours; Based on the preset rating items, feature extraction is performed on the preprocessed effective field of view to obtain the corresponding tissue feature parameters; The organizational characteristic parameters are rated based on the rating criteria corresponding to the preset rating items, and the rating results are calculated.
5. The method for metallographic sample preparation defect identification and rating control based on image quality analysis as described in claim 4, characterized in that, The process of rating the organizational characteristic parameters based on the rating criteria corresponding to the preset rating items and calculating the rating result includes: With the preset rating item being grain size determination, grain boundary detection and segmentation are performed on the pre-processed effective field of view. Extract the grain structure characteristic parameters corresponding to the segmented grains, including the morphology, area and perimeter of the grains; Calculate the equivalent grain diameter based on the aforementioned grain structure characteristic parameters; Based on the rating criteria corresponding to the equivalent grain diameter and the metal average grain size measurement, a rating result including the average grain size level is calculated.
6. The metallographic sample preparation defect identification and rating control method based on image quality analysis as described in claim 4, characterized in that, The process of rating the organizational characteristic parameters based on the rating criteria corresponding to the preset rating items and calculating the metallographic rating result includes: When the preset rating item is non-metallic inclusion rating, the inclusions are identified and classified within the pre-processed effective field of view. The identified inclusions are classified to determine the category corresponding to each inclusion. The categories include sulfides, oxides, silicates, spherical oxides, and single-particle spherical inclusions. Extract the inclusion feature parameters for each category, including length, quantity, distribution density, and area ratio; Based on the inclusion characteristic parameters and the rating criteria corresponding to the rating of non-metallic inclusions in steel, the rating results for each category of inclusions are obtained.
7. The method for metallographic sample preparation defect identification and rating control based on image quality analysis as described in claim 1, characterized in that, If the quality of the standardized input image is unqualified, the metallographic grading process is blocked, and a re-inspection prompt message is generated, including: If the quality of the standardized input image is unqualified, the metallographic grading process for the standardized input image shall be terminated. Obtain the type and location information of the sample preparation defects corresponding to the standardized input image; Based on the type and location information of the sample preparation defects, corresponding re-inspection prompt information is generated. The re-inspection prompt information includes the type of sample preparation defect, the specific indicators of substandard quality score, the corresponding sample preparation process adjustment information, the image acquisition parameter optimization information, and the sample identification. The metadata, quality assessment results, sample preparation defect information, and re-inspection prompts of the standardized input image are uploaded to the laboratory data management device.
8. A metallographic sample preparation defect identification and rating control device based on image quality analysis, characterized in that, The device includes: The image processing module is used to acquire microscopic images of metallographic samples, record the metadata corresponding to the microscopic images, and obtain a standardized input image. The quality analysis module is used to extract defect features and calculate physical quality features from the standardized input image to obtain a deep learning quality score and a physical quality score. The quality assessment module is used to assess the quality of the standardized input image based on the deep learning quality score and the physical quality score, combined with dynamic assessment conditions. The rating execution module is used to perform metallographic rating operations on the standardized input image if the quality of the standardized input image is qualified, and generate the corresponding rating result; The blocking control module is used to block the metallographic grading process and generate a re-inspection prompt message if the quality of the standardized input image is unqualified.
9. A metallographic sample preparation defect identification and rating control device based on image quality analysis, characterized in that, The metallographic sample preparation defect identification and rating control device based on image quality analysis includes: a memory, a processor, and a metallographic sample preparation defect identification and rating control program stored in the memory. The processor is used to run the metallographic sample preparation defect identification and rating control program, which is configured to implement the metallographic sample preparation defect identification and rating control method based on image quality analysis as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a metallographic sample preparation defect identification and rating control program, which, when executed by a processor, implements the metallographic sample preparation defect identification and rating control method based on image quality analysis as described in any one of claims 1 to 7.