Metallographic carbide detection methods, apparatus and terminal equipment

By combining image analysis and deep learning, metallographic carbides are automatically identified and rated, solving the problem of large fluctuations in the results of manual inspection in existing technologies, and achieving highly accurate and efficient automated inspection.

CN117218093BActive Publication Date: 2026-01-06河钢数字技术股份有限公司 +3
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311217797.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-20
Publication Date
2026-01-06
Estimated Expiration
2043-09-20

AI Technical Summary

Technical Problem

Existing metallographic carbide detection methods rely on manual testing, resulting in large fluctuations in results. Furthermore, intelligent detection methods have poor applicability and are difficult to quantify.

Method used

By combining image analysis and deep learning, and integrating the YOLOv8 algorithm with DS evidence theory, we can automatically identify and rate carbides, and improve detection accuracy by combining traditional vision algorithms.

Benefits of technology

It achieves highly accurate and efficient automated carbide detection, reduces labor costs, lowers the skill requirements for testing personnel, and eliminates subjective influences.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117218093B_ABST
    Figure CN117218093B_ABST
Patent Text Reader

Abstract

This application relates to the field of metallographic testing technology, providing a method, apparatus, and terminal device for metallographic carbide detection. The method, disclosed in this embodiment, includes: first, acquiring an image to be tested; then, smoothing and filtering the image to obtain suspicious regions; next, performing carbide detection on the suspicious regions to obtain multiple classification levels; and finally, fusing the multiple classification levels to obtain a carbide classification. This embodiment of the invention uses image analysis to determine suspicious regions of metallographic carbides, acquires high-magnification images of these regions, and performs classification based on the high-magnification images. Therefore, the classification results are accurate and reliable, improving detection efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of metallographic testing technology, and in particular relates to metallographic carbide testing methods, apparatus and terminal equipment. Background Technology

[0002] Metallographic examination mainly uses the principles of quantitative metallography to determine the three-dimensional spatial morphology of alloy structures by measuring and calculating the metallographic microstructure of two-dimensional metallographic sample surfaces or thin films, thereby establishing a quantitative relationship between alloy composition, microstructure, and properties.

[0003] Metallographic carbide testing is a niche market segment. Traditional metallographic testing still relies on manual inspection, using human eyes to randomly sample and classify carbides. This method is overly dependent on the professional knowledge and working conditions of the inspectors. The randomness of sampling, the inaccuracy of human eye error, and the efficiency of testing result in large fluctuations in test results.

[0004] With the development of artificial intelligence, my country's testing industry will also usher in intelligentization. There are also testing methods on the market that use U-net neural networks for grading, but due to practical reasons such as different testing varieties and different microscope magnification, the applicability of this method is poor and it is not easy to quantify the results. Summary of the Invention

[0005] This application provides a method, apparatus, and terminal equipment for metallographic carbide detection, offering a highly applicable detection method that improves the accuracy and efficiency of metallographic carbide detection.

[0006] This application is achieved through the following technical solution:

[0007] In a first aspect, embodiments of this application provide a method for detecting metallographic carbides, including:

[0008] Acquire the image to be detected;

[0009] The image to be detected is smoothed and filtered to obtain the suspicious regions of the image to be detected;

[0010] Carbide detection is performed on suspicious areas of the image to be detected to obtain multiple levels of discrimination;

[0011] The multiple grade discriminations are fused to obtain the carbide grade.

[0012] In conjunction with the first aspect, in some possible implementations, the smoothing and filtering of the image to be detected to obtain the suspicious regions of the image to be detected specifically includes:

[0013] The image to be detected is subjected to grayscale and binarization processing to obtain a first image;

[0014] The first image is smoothed and filtered using Gaussian filtering to obtain the second image;

[0015] Based on the second image, calculate the connected regions of carbides in the second image;

[0016] Based on the connected regions of carbides in the second image, the edges of the connected regions are obtained;

[0017] Based on the edges of the connected regions, the suspicious regions of the image to be detected are obtained.

[0018] In conjunction with the first aspect, in some possible implementations, the step of performing carbide detection on the suspicious regions of the image to be detected to obtain multiple levels of discrimination specifically includes:

[0019] The suspicious region of the image to be detected is magnified to obtain an image of the suspicious region;

[0020] The suspicious region image was analyzed using the YOLOV8 algorithm to determine the carbide composition, resulting in a first-level discrimination.

[0021] The suspicious area image is classified into second-level discrimination by performing carbide classification using a visual algorithm.

[0022] The carbide classification is obtained by fusing multiple classification criteria, specifically including:

[0023] The carbide classification is obtained by fusing the first-level and second-level classifications using the DS theory.

[0024] In conjunction with the first aspect, in some possible implementations, the YOLOv8 algorithm is used to perform carbide classification on the image of the suspicious region to obtain a first-level discrimination, specifically including:

[0025] Based on the position loss function in the YOLOV8 algorithm, the position loss of the image of the suspicious region is calculated;

[0026] The suspicious region image is segmented based on the location loss to obtain the carbide region;

[0027] Based on the sigmoid loss function in the YOLOV8 algorithm and the carbide region, calculate the carbide category loss of the carbide region;

[0028] The first level of discrimination is obtained based on the loss of the carbide category.

[0029] In conjunction with the first aspect, in some possible implementations, the fusion of the first-level discrimination and the second-level discrimination using DS theory to obtain the carbide classification specifically includes:

[0030] The suspicious region image is classified by carbide determination using the YOLOV8 algorithm to obtain multiple first-level discriminations;

[0031] Based on multiple first-level discriminations, a first-level discrimination containing carbide is obtained;

[0032] The first-level discrimination of the carbide-containing classification yields multiple carbide regions;

[0033] Multiple carbide regions belonging to the same carbide are spliced ​​together and then re-cut to obtain the first detection image;

[0034] The first detected image is subjected to carbide classification using the YOLOV8 algorithm to obtain a third-level discrimination.

[0035] The carbide classification is obtained by fusing the first-level discrimination, the third-level discrimination, and the second-level discrimination using the DS theory.

[0036] In conjunction with the first aspect, in some possible implementations, the fusion of the first-level discrimination, the third-level discrimination, and the second-level discrimination using DS theory to obtain the carbide classification specifically includes:

[0037] Determine the highest value of the carbide classification among multiple first-level discriminations and third-level discriminations, and use the first-level discrimination or the third-level discrimination corresponding to the highest value of the carbide classification as the neural network discrimination;

[0038] Based on the Dempster synthesis rule of the DS theory, the neural network discrimination and the second-level discrimination are fused to obtain the carbide classification.

[0039] In conjunction with the first aspect, in some possible implementations, the step of performing carbide classification on the image of the suspicious region using a visual algorithm to obtain a second-level discrimination specifically includes:

[0040] The image of the suspicious region is subjected to grayscale and binarization processing to obtain a third image;

[0041] The third image is smoothed and filtered using the Gaussian filter to obtain the fourth image;

[0042] Based on the fourth image, the carbide connected regions in the suspicious region image are obtained;

[0043] Based on the connected regions of the carbide, the density and length of the carbide are obtained;

[0044] The second level of discrimination is obtained based on the density of the carbide, the length of the carbide, and the carbide grading criteria.

[0045] Secondly, embodiments of this application provide a metallographic carbide detection device, comprising:

[0046] The acquisition module is used to acquire the image to be detected;

[0047] The filtering module performs smoothing and filtering on the image to be detected to obtain the suspicious regions of the image to be detected;

[0048] The discrimination module is used to perform carbide detection on suspicious areas of the image to be detected and obtain multiple levels of discrimination.

[0049] The fusion module is used to fuse multiple grade discriminations to obtain a carbide grade.

[0050] Thirdly, embodiments of this application provide a terminal device, including: a processor and a memory, the memory being used to store a computer program, wherein the processor executes the computer program to implement the metallographic carbide detection method as described in any of the first aspects.

[0051] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the metallographic carbide detection method as described in any of the first aspects.

[0052] Fifthly, embodiments of this application provide a computer program product that, when run on a terminal device, causes the terminal device to execute the metallographic carbide detection method described in any one of the first aspects.

[0053] It is understood that the beneficial effects of the second to seventh aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here.

[0054] The beneficial effects of the embodiments of this application compared with the prior art are:

[0055] This invention discloses a method for detecting metallographic carbides, comprising: first, acquiring an image to be detected; then, smoothing and filtering the image to obtain suspicious regions; next, performing carbide detection on the suspicious regions to obtain multiple levels of discrimination; and finally, fusing the multiple levels of discrimination to obtain a carbide rating. This invention identifies suspicious regions of metallographic carbides through image analysis, acquires high-magnification images of these regions, and performs rating based on the high-magnification images. Therefore, the rating results are accurate and reliable, improving detection efficiency.

[0056] In addition to using traditional rating algorithms, the embodiments of this invention also introduce deep learning methods for rating. Finally, the rating results of both methods are combined to make a rating result, which is more accurate and reliable.

[0057] The present invention is an automated intelligent detection technology that reduces the labor costs of detection, lowers the skill requirements for detection personnel, eliminates the subjective influence of technical personnel, and lays the foundation for large-scale and efficient detection.

[0058] The detection method, which combines traditional visual algorithms with deep learning algorithms in parallel and uses DS evidence theory, can retain the advantages of both algorithms, such as the ability of traditional algorithms to quantify information and the adaptability of deep learning algorithms, and can further improve the accuracy of detection.

[0059] The YOLOv8 algorithm was improved by using the Sophia optimizer, which increased the algorithm's running efficiency, reduced the detection time, and improved the overall detection efficiency.

[0060] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this specification. Attached Figure Description

[0061] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0062] Figure 1 This is a schematic flowchart of a metallographic carbide detection method provided in an embodiment of this application;

[0063] Figure 2 This is a schematic diagram of the metallographic carbide detection principle provided in one embodiment of this application;

[0064] Figure 3 This is a YOLOv8 network structure diagram provided in an embodiment of this application;

[0065] Figure 4 This is a schematic diagram of the structure of a metallographic carbide detection device provided in an embodiment of this application;

[0066] Figure 5 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. Detailed Implementation

[0067] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0068] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0069] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0070] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."

[0071] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0072] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0073] Figure 1 This is a schematic flowchart of a metallographic carbide detection method provided in an embodiment of this application, with reference to... Figure 1The detailed description of this metallographic carbide detection method is as follows:

[0074] In step 101, the image to be detected is acquired;

[0075] In step 102, the image to be detected is smoothed and filtered to obtain the suspicious regions of the image to be detected;

[0076] In some implementations, step 102 includes:

[0077] The image to be detected is subjected to grayscale and binarization processing to obtain a first image;

[0078] The first image is smoothed and filtered using Gaussian filtering to obtain the second image;

[0079] Based on the second image, calculate the connected regions of carbides in the second image;

[0080] Based on the connected regions of carbides in the second image, the edges of the connected regions are obtained;

[0081] Based on the edges of the connected regions, the suspicious regions of the image to be detected are obtained.

[0082] For example, regarding image acquisition, the present invention is implemented by installing an automated microscope and acquiring samples, including the following steps:

[0083] First, connect the microscope's motion control platform, light source, image acquisition camera, and service equipment, and install the control software;

[0084] Then place the sample on the sample holder and select the area according to the scale on the sample holder;

[0085] Finally, based on the selected area, the sample was collected by controlling the microscope's motion control platform through software. The size of the collected image was 1500*1500.

[0086] The embodiments of the present invention are based on the analysis of suspicious areas to determine the metallographic carbide grade. In the embodiments of the present invention, firstly, suspicious areas are found through image analysis, and then, for the suspicious areas, image samples of the suspicious areas are re-acquired by adjusting the magnification of the microscope to complete the analysis of the metallographic carbide grade.

[0087] Regarding the detection of suspicious areas, in some application scenarios, the incoming low-magnification image is first processed by grayscale and binarization. Here, an adaptive threshold determination method is used, and the specific method is as follows;

[0088]

[0089]

[0090] in The foreground and background represent the proportion of pixels in the total image, and u is the global average pixel value. Given the average pixel values ​​of the foreground and background, iterate through pixel values ​​from 0 to 255, and find the pixel value corresponding to the largest g, which is the threshold value to be found.

[0091] Then, a large-kernel Gaussian filter is applied to the image to make the carbonized regions a single entity;

[0092]

[0093] in, The coordinates after filtering are (x,y) Image values, Set the filter value.

[0094] Next, the connected regions in the image are calculated, and the edges are found;

[0095] Finally, the image is meshed, and suspicious areas are marked.

[0096] In step 103, carbide detection is performed on the suspicious areas of the image to be detected to obtain multiple levels of discrimination.

[0097] In some implementations, step 102 includes:

[0098] The suspicious region of the image to be detected is magnified to obtain an image of the suspicious region;

[0099] The suspicious region image was analyzed using the YOLOV8 algorithm to determine the carbide composition, resulting in a first-level discrimination.

[0100] The suspicious area image is classified into second-level discrimination by performing carbide classification using a visual algorithm.

[0101] In some implementations, the YOLOv8 algorithm is used to perform carbide classification on the suspicious region image to obtain a first-level discrimination, specifically including:

[0102] Based on the position loss function in the YOLOV8 algorithm, the position loss of the image of the suspicious region is calculated;

[0103] The suspicious region image is segmented based on the location loss to obtain the carbide region;

[0104] Based on the sigmoid loss function in the YOLOV8 algorithm and the carbide region, calculate the carbide category loss of the carbide region;

[0105] The first level of discrimination is obtained based on the loss of the carbide category.

[0106] In some implementations, the step of performing carbide classification on the image of the suspicious region using a visual algorithm to obtain a second-level discrimination specifically includes:

[0107] The image of the suspicious region is subjected to grayscale and binarization processing to obtain a third image;

[0108] The third image is smoothed and filtered using the Gaussian filter to obtain the fourth image;

[0109] Based on the fourth image, the carbide connected regions in the suspicious region image are obtained;

[0110] Based on the connected regions of the carbide, the density and length of the carbide are obtained;

[0111] The second level of discrimination is obtained based on the density of the carbide, the length of the carbide, and the carbide grading criteria.

[0112] For example, in an embodiment of the present invention, the carbide level is determined by using a dual identification method of traditional algorithms and the Yolov8 model on the image of the suspicious area.

[0113] In some scenarios, traditional algorithms determine the grade of carbides through the following steps:

[0114] First, the input high-magnification image is processed by grayscale conversion and binarization.

[0115] Then, a large-kernel Gaussian filter is applied to the image to make the carbonized regions a single entity;

[0116] Next, calculate the connected regions in the image and find the smallest rectangle in the original image that covers the connected regions;

[0117] Finally, based on parameters such as the density and length of the carbides in the frame and referring to the carbide grading criteria, the carbides are graded and a score is given. In some scenarios, the grade determined by the traditional algorithm is B.

[0118] Since the YOLOv8 model is a deep learning model, it needs to be trained first to ensure the accuracy of its carbide classification. The training process in this embodiment includes:

[0119] First, images of metal samples under a high-powered microscope were collected on a large scale, and the samples were graded and labeled according to the evaluation criteria for carbides to create high-quality training, validation, and test sets.

[0120] Then, for the class loss BCE Loss, YOLOv8 adopts the same strategy as RetinaNet, FCOS, etc., using the sigmoid function to calculate the probability of each class and calculate the global class loss. Its learned labels are the target_scores given by TOOD, where the class label of positive samples is the IoU value, while all negative samples are 0.

[0121] Next, for the location loss, YOLOv8 divides it into two parts. The first part calculates the IoU between the predicted bounding box and the target bounding box, using CIoU loss as always. The second part is the Distribution Focal Loss, which can be seen as modeling a single Dirac distribution for the bounding box coordinates, and its expression is as follows:

[0122]

[0123] Next, the optimizer is replaced with Sophia (Second-order Clipped Stochastic Optimization), a lightweight second-order optimizer that uses a cheap stochastic estimate of the Hessian diagonal as a pre-conditioner and controls the update size in the worst case through a limiting mechanism. Two options for the diagonal Hessian estimator:

[0124] (a) An unbiased estimator using the Hessian vector product has a running time that is the same as that of the mini-batch gradient, which is a constant factor.

[0125] (b) A biased estimator that uses resampled labels for mini-batch gradient computation. Both estimators introduce only 5% overhead per step (on average).

[0126] At each step, Sophia updates the parameters by dividing the exponential moving average (EMA) of the gradient by the EMA estimated by the diagonal Hessian, and then prunes the parameters with a scalar.

[0127] Finally, the trained model is tested on the test set, and the model that performs best on the test set is selected. If the model does not meet the test requirements, the training iteration is repeated until a model that meets the requirements on the test set is trained.

[0128] By following the steps above, you can complete the training of the YOLOv8 model for carbide grading.

[0129] The trained model was used to make preliminary classifications of high-magnification images of multiple suspicious fields of view.

[0130] In step 104, the multiple grade discriminations are fused to obtain the carbide grade.

[0131] In some implementations, step 104 includes:

[0132] The carbide classification is obtained by fusing the first-level and second-level classifications using the DS theory.

[0133] In some embodiments, the fusion of the first-level discrimination and the second-level discrimination using DS theory to obtain the carbide classification includes:

[0134] The suspicious region image is classified by carbide determination using the YOLOV8 algorithm to obtain multiple first-level discriminations;

[0135] Based on multiple first-level discriminations, a first-level discrimination containing carbide is obtained;

[0136] The first-level discrimination of the carbide-containing classification yields multiple carbide regions;

[0137] Multiple carbide regions belonging to the same carbide are spliced ​​together and then re-cut to obtain the first detection image;

[0138] The first detected image is subjected to carbide classification using the YOLOV8 algorithm to obtain a third-level discrimination.

[0139] The carbide classification is obtained by fusing the first-level discrimination, the third-level discrimination, and the second-level discrimination using the DS theory.

[0140] In some embodiments, the fusion of the first-level discrimination, the third-level discrimination, and the second-level discrimination using DS theory to obtain the carbide classification specifically includes:

[0141] Determine the highest value of the carbide classification among multiple first-level discriminations and third-level discriminations, and use the first-level discrimination or the third-level discrimination corresponding to the highest value of the carbide classification as the neural network discrimination;

[0142] Based on the Dempster synthesis rule of the DS theory, the neural network discrimination and the second-level discrimination are fused to obtain the carbide classification.

[0143] For example, regarding the classification using the YOLOV8 algorithm, as mentioned above, the embodiments of the present invention first perform preliminary classification on multiple high-magnification images of suspicious fields of view, obtaining multiple preliminary classification results, such as A11, A12, ..., A1N. When one or more images among the multiple high-magnification images are located at the edge of a low-magnification image, it is necessary to stitch the high-magnification image located at the edge with the adjacent image. Then, the YOLOV8 algorithm is applied again to perform secondary classification based on the stitched image. For example, the obtained classification results are A21, A22, ..., A2N. Combining the above-obtained classification results A11, A12, ..., A1N, A21, A22, ..., A2N, the worst result is selected as the classification result A of the YOLOV8 algorithm.

[0144] As mentioned earlier, using a traditional algorithm, the classification result was determined to be B based on multiple high-magnification images.

[0145] According to Dempster's evidence theory, the final ranking result is obtained by fusing results A and B. For hypothesis A, the Dempster composition rule for the two quality functions m1 and m2 is as follows:

[0146]

[0147] The expression for the coefficient K is:

[0148]

[0149] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0150] This invention discloses a method for detecting metallographic carbides, comprising: first, acquiring an image to be detected; then, smoothing and filtering the image to obtain suspicious regions; next, performing carbide detection on the suspicious regions to obtain multiple levels of discrimination; and finally, fusing the multiple levels of discrimination to obtain a carbide rating. This invention identifies suspicious regions of metallographic carbides through image analysis, acquires high-magnification images of these regions, and performs rating based on the high-magnification images. Therefore, the rating results are accurate and reliable, improving detection efficiency.

[0151] In addition to using traditional rating algorithms, the embodiments of this invention also introduce deep learning methods for rating. Finally, the rating results of both methods are combined to make a rating result, which is more accurate and reliable.

[0152] The present invention is an automated intelligent detection technology that reduces the labor costs of detection, lowers the skill requirements for detection personnel, eliminates the subjective influence of technical personnel, and lays the foundation for large-scale and efficient detection.

[0153] The detection method, which combines traditional visual algorithms with deep learning algorithms in parallel and uses DS evidence theory, can retain the advantages of both algorithms, such as the ability of traditional algorithms to quantify information and the adaptability of deep learning algorithms, and can further improve the accuracy of detection.

[0154] The YOLOv8 algorithm was improved by using the Sophia optimizer, which increased the algorithm's running efficiency, reduced the detection time, and improved the overall detection efficiency.

[0155] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this specification.

[0156] Corresponding to the metallographic carbide detection method described in the above embodiments, Figure 4 A structural block diagram of the metallographic carbide detection device provided in the embodiments of this application is shown. For ease of explanation, only the parts related to the embodiments of this application are shown.

[0157] See Figure 4 The metallographic carbide detection device in this application embodiment may include:

[0158] Acquisition module 401 is used to acquire the image to be detected;

[0159] The filtering module 402 performs smoothing and filtering on the image to be detected to obtain the suspicious region of the image to be detected;

[0160] The discrimination module 404 is used to perform carbide detection on the suspicious areas of the image to be detected and obtain multiple levels of discrimination.

[0161] The fusion module 404 is used to fuse multiple grade discriminations to obtain a carbide grade.

[0162] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0163] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0164] This application also provides a terminal device, see [link to relevant documentation] Figure 5 The terminal device 500 may include at least one processor 510 and a memory 520, the memory 520 storing a computer program 521. When the processor 510 calls and runs the computer program 521 stored in the memory 520, it implements the steps in any of the above method embodiments, for example... Figure 1 In the illustrated embodiment, steps 101 to 104, or the processor 510 executing the computer program, implement the functions of each module / unit in the above-described device embodiments, for example... Figure 4 The functions of modules 401 to 404 are shown.

[0165] For example, computer program 521 may be divided into one or more modules / units, one or more of which are stored in memory 520 and executed by processor 510 to complete this application. The one or more modules / units may be a series of computer program segments capable of performing specific functions, which describe the execution process of the computer program in terminal device 500.

[0166] Those skilled in the art will understand that Figure 5 This is merely an example of a terminal device and does not constitute a limitation on the terminal device. It may include more or fewer components than shown, or combine certain components, or different components, such as input / output devices, network access devices, buses, etc.

[0167] The processor 510 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0168] The memory 520 can be an internal storage unit of the terminal device or an external storage device, such as a plug-in hard drive, a smart media card (SMC), a secure digital (SD) card, or a flash card. The memory 520 is used to store the computer program and other programs and data required by the terminal device. The memory 520 can also be used to temporarily store data that has been output or will be output.

[0169] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0170] The metallographic carbide detection method provided in this application embodiment can be applied to terminal devices such as computers, wearable devices, vehicle devices, tablet computers, laptops, netbooks, personal digital assistants (PDAs), augmented reality (AR) / virtual reality (VR) devices, and mobile phones. This application embodiment does not impose any restrictions on the specific type of terminal device.

[0171] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in the various embodiments of the metallographic carbide detection method described above.

[0172] This application provides a computer program product that, when run on a mobile terminal, enables the mobile terminal to execute the steps described in the various embodiments of the metallographic carbide detection method.

[0173] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying the computer program code to a photographing device / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks.

[0174] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0175] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0176] In the embodiments provided in this application, it should be understood that the disclosed apparatus / network devices and methods can be implemented in other ways. For example, the apparatus / network device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0177] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0178] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A metallographic carbide detection method characterized by, The method comprises the following steps: acquiring a to-be-detected image; performing smoothing and filtering processing on the to-be-detected image to obtain a suspicious region of the to-be-detected image; performing carbide detection on the suspicious region of the to-be-detected image to obtain multiple level discriminations; fusing the multiple level discriminations to obtain a carbide discrimination level; the step of performing smoothing and filtering processing on the to-be-detected image to obtain a suspicious region of the to-be-detected image specifically comprises: performing grayscale processing and binaryzation processing on the to-be-detected image to obtain a first image; performing smoothing and filtering processing on the first image through Gaussian filtering to obtain a second image; based on the second image, calculating a connected region of carbide in the second image; based on the connected region of carbide in the second image, obtaining an edge of the connected region; based on the edge of the connected region, obtaining the suspicious region of the to-be-detected image; the step of performing carbide detection on the suspicious region of the to-be-detected image to obtain multiple level discriminations specifically comprises: enlarging the suspicious region of the to-be-detected image to obtain a suspicious region image; performing carbide discrimination on the suspicious region image through a YOLOV8 algorithm to obtain a first level discrimination; performing carbide discrimination on the suspicious region image through a visual algorithm to obtain a second level discrimination; the step of fusing the multiple level discriminations to obtain a carbide discrimination level specifically comprises: fusing the first level discrimination and the second level discrimination through D-S theory to obtain the carbide discrimination level.

2. The metallographic carbide detection method of claim 1, wherein, the step of performing carbide discrimination on the suspicious region image through a YOLOV8 algorithm to obtain a first level discrimination specifically comprises: based on a position loss function in the YOLOV8 algorithm, calculating a position loss of the suspicious region image; based on the position loss, cutting the suspicious region image to obtain a carbide region; based on a sigmoid loss function in the YOLOV8 algorithm and the carbide region, calculating a carbide class loss of the carbide region; based on the carbide class loss, obtaining the first level discrimination.

3. The metallographic carbide detection method of claim 2, wherein, the step of fusing the first level discrimination, the third level discrimination and the second level discrimination through D-S theory to obtain the carbide discrimination level specifically comprises: performing carbide discrimination on the suspicious region image through a YOLOV8 algorithm to obtain multiple first level discriminations; based on the multiple first level discriminations, obtaining a first level discrimination containing a carbide discrimination level; based on the first level discrimination containing the carbide discrimination level, obtaining multiple carbide regions; splicing and re-cutting multiple carbide regions belonging to the same carbide to obtain a first detection image; performing carbide discrimination on the first detection image through a YOLOV8 algorithm to obtain a third level discrimination; fusing the first level discrimination, the third level discrimination and the second level discrimination through D-S theory to obtain the carbide discrimination level.

4. The metallographic carbide detection method of claim 3, wherein, the step of fusing the first level discrimination, the third level discrimination and the second level discrimination through D-S theory to obtain the carbide discrimination level specifically comprises: judging the highest value of the carbide judgment levels in the plurality of first-level judgments and the third-level judgments, and taking the first-level judgment or the third-level judgment corresponding to the highest value of the carbide judgment levels as a neural network judgment; fusing the neural network judgment and the second-level judgment based on a Dempster combination rule of the D-S theory to obtain the carbide judgment.

5. The metallographic carbide detection method of claim 1, wherein, The second-level judgment is obtained by performing carbide judgment on the suspicious region image through a visual algorithm, and specifically includes the following steps: performing gray-scale processing and binaryzation processing on the suspicious region image to obtain a third image; performing smoothing and filtering processing on the third image through the Gaussian filtering to obtain a fourth image; based on the fourth image, obtaining a carbide connected region in the suspicious region image; based on the carbide connected region, obtaining a density of the carbide and a length of the carbide; based on the density of the carbide, the length of the carbide and a carbide judgment standard, obtaining the second-level judgment.

6. A metallographic carbide detection device, characterized by, The method comprises the following steps: an acquisition module is configured to acquire a to-be-detected image; a filtering module is configured to perform smoothing and filtering processing on the to-be-detected image to obtain a suspicious region of the to-be-detected image; a judgment module is configured to perform carbide detection on the suspicious region of the to-be-detected image to obtain a plurality of level judgments; a fusion module is configured to fuse the plurality of level judgments to obtain a carbide judgment; the filtering module is further configured to: perform gray-scale processing and binaryzation processing on the to-be-detected image to obtain a first image; perform smoothing and filtering processing on the first image through Gaussian filtering to obtain a second image; based on the second image, calculate a connected region of carbide in the second image; based on the connected region of carbide in the second image, obtain an edge of the connected region; based on the edge of the connected region, obtain the suspicious region of the to-be-detected image; the judgment module is further configured to: enlarge the suspicious region of the to-be-detected image to obtain a suspicious region image; perform carbide judgment on the suspicious region image through a YOLOV8 algorithm to obtain a first-level judgment; perform carbide judgment on the suspicious region image through a visual algorithm to obtain a second-level judgment; fuse the plurality of level judgments to obtain a carbide judgment, specifically including the following steps: fuse the first-level judgment and the second-level judgment through the D-S theory to obtain the carbide judgment.

7. A terminal device comprising: a processor and a memory, the memory storing a computer program executable on the processor, and when the processor executes the computer program, the metallographic carbide detection method of any one of claims 1 to 5 is implemented.

8. A computer-readable storage medium storing a computer program, the computer-readable storage medium comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 7. The computer program is executed by the processor to implement the metallographic carbide detection method of any one of claims 1 to 5.

Citation Information

Patent Citations

  • Image classification method based on multi-scale and multi-level fusion

    CN112163599A

  • Metallographic structure automatic identification and grade determination method

    CN115984180A