CN113112512A - AI (Artificial Intelligence) grain size identification method and device, computer equipment and storage medium - Google Patents

AI (Artificial Intelligence) grain size identification method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN113112512A
CN113112512A CN202110456704.XA CN202110456704A CN113112512A CN 113112512 A CN113112512 A CN 113112512A CN 202110456704 A CN202110456704 A CN 202110456704A CN 113112512 A CN113112512 A CN 113112512A
Authority
CN
China
Prior art keywords
image
detected
scale
grain size
grain
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110456704.XA
Other languages
Chinese (zh)
Inventor
皮晓宇
张国滨
孙成祥
陈睿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huihong Intelligent Technology Liaoning Co ltd
Original Assignee
Huihong Intelligent Technology Liaoning Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huihong Intelligent Technology Liaoning Co ltd filed Critical Huihong Intelligent Technology Liaoning Co ltd
Priority to CN202110456704.XA priority Critical patent/CN113112512A/en
Publication of CN113112512A publication Critical patent/CN113112512A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/12Edge-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/181Segmentation; Edge detection involving edge growing; involving edge linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10056Microscopic image
    • G06T2207/10061Microscopic image from scanning electron microscope
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30136Metal

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a method, a device, computer equipment and a storage medium for AI identification of grain size, wherein the method comprises the following steps: acquiring an image to be detected, wherein the image to be detected is a crystal grain image containing a scale; inputting an image to be detected into a preset first detection model, obtaining a plurality of identification results corresponding to the image to be detected, and determining the actual length of a scale in the image to be detected based on the plurality of identification results; inputting an image to be detected into a preset second detection model, obtaining a grain boundary diagram corresponding to the image to be detected, covering an auxiliary line on the grain boundary diagram, and obtaining intersection data information of the auxiliary line and the grain boundary; and acquiring the grain size grade corresponding to the image to be detected according to the information of the intersection data of the auxiliary line and the grain boundary and the actual length of the scale in the image to be detected. The invention can automatically identify and grade the grain size pictures with different grades, reduces the identification error caused by human subjective factors and ensures that the identification is more accurate and faster.

Description

AI (Artificial Intelligence) grain size identification method and device, computer equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for AI grain size identification, a computer device, and a storage medium.
Background
In the field of metallographic structure analysis, grain size detection is an extremely important detection item, and grain size level has direct influence on qualification of products. At present, two main modes are available for the detection and grading of the grain size, firstly, manual photographing is used for comparing a picture with a standard picture in a national standard, and the manual comparison method is obviously influenced by subjective consciousness through naked eye comparison and grading, has larger error and is not uniform in different personnel standards; secondly, the traditional image processing software is used for manually selecting the intercept points, the number of the intercept points is used for calculation, the traditional software intercept point method is complicated in steps and long in time consumption, and an effective solution is not provided at present.
Disclosure of Invention
In order to solve the technical problems, the invention provides a method, a device, computer equipment and a storage medium for AI grain size identification, which can automatically identify and grade grain size pictures of different grades, reduce identification errors caused by artificial subjective factors, and enable the identification to be more accurate and faster, and the technical scheme is as follows:
a method for AI to identify grain size comprises the following steps:
acquiring an image to be detected, wherein the image to be detected is a crystal grain image containing a scale;
inputting an image to be detected into a preset first detection model, obtaining a plurality of identification results corresponding to the image to be detected, and determining the actual length of a scale in the image to be detected based on the plurality of identification results;
inputting an image to be detected into a preset second detection model, obtaining a grain boundary diagram corresponding to the image to be detected, covering an auxiliary line on the grain boundary diagram, and obtaining intersection data information of the auxiliary line and the grain boundary;
and acquiring the grain size grade corresponding to the image to be detected according to the information of the intersection data of the auxiliary line and the grain boundary and the actual length of the scale in the image to be detected.
In one embodiment, the inputting the image to be detected into a preset first detection model, obtaining a plurality of recognition results corresponding to the image to be detected, and determining the actual length of the scale in the image to be detected based on the plurality of recognition results specifically includes the following steps,
identifying a numerical value area graph and a line segment area graph in a scale area graph corresponding to the image to be detected, and segmenting;
inputting the divided numerical value area graph into a preset detection submodel to obtain a numerical value result represented by the numerical value area graph;
zooming the image to be measured to correspond to the numerical result to obtain the zooming ratio between the image to be measured and the standard graph;
extracting the line segment outline in the segmented line segment area graph and calculating the pixel point length of the line segment outline;
and combining the scaling with the pixel point length of the line segment outline to obtain an actual numerical value represented by the corresponding line segment, thereby obtaining the actual length of the scale.
In one embodiment, the extracting the line segment outline in the segmented line segment area map comprises the following steps,
carrying out edge detection on the segmented line segment area graph to obtain an edge detection result;
and carrying out skeleton extraction on the edge result, and extracting the outline of the outgoing line section.
In one embodiment, the method further comprises the steps of:
and preprocessing the grain boundary image corresponding to the image to be detected, wherein the preprocessing is to binarize the grain boundary image by adopting an adaptive threshold binarization method based on the gray level difference between the grain boundary and the surrounding area in the image to be detected.
In one embodiment, the obtaining of the grain size rating corresponding to the image to be measured according to the intersection data information of the auxiliary line and the grain boundary and the actual length of the scale in the image to be measured includes the following steps:
and calculating the number of section lines and/or the number of intercept points under the unit length according to the number of intersection points of the auxiliary lines and the grain boundaries, and calculating the corresponding grain size grade based on the number of the section lines and/or the number of the intercept points and the actual length of the ruler in the image to be measured.
In one embodiment, the obtaining of the grain size rating corresponding to the image to be measured according to the intersection data information of the auxiliary line and the grain boundary and the actual length of the scale in the image to be measured includes the following steps:
and calculating the number of section bars or section points under the unit length according to the number of intersection points of the auxiliary lines and the grain boundaries, calculating an average intercept value according to the number of the section bars or the number of the section points, and calculating the corresponding grain size grade or determining the corresponding grain size grade by referring to a corresponding grain size grade comparison table on the basis of the average intercept value and the actual length of the scale in the image to be measured.
In one embodiment, the first detection model and the second detection model are obtained by training through the following steps:
obtaining a sample data set to be trained, wherein each sample data in the sample data set comprises a crystal grain image of a scale and a corresponding annotation image;
preprocessing the sample data set to obtain a processed sample data set;
and performing machine learning on the processed sample data set by using a machine learning algorithm to generate a corresponding detection model.
An AI apparatus for identifying grain size, comprising:
the acquisition unit is used for acquiring an image to be detected, wherein the image to be detected is a crystal grain image containing a scale, and the image to be detected is input into the first identification model and the second identification model;
the device comprises a first input unit, a second input unit and a control unit, wherein the first input unit is used for inputting an image to be detected into a preset first detection model, obtaining a plurality of identification results corresponding to the image to be detected, and determining the actual length of a scale in the image to be detected based on the plurality of identification results;
the second input unit is used for inputting the image to be detected into a preset second detection model, obtaining a grain boundary diagram corresponding to the image to be detected, covering an auxiliary line on the grain boundary diagram, and obtaining intersection data information of the auxiliary line and the grain boundary;
and the processing unit is used for acquiring the grain size rating corresponding to the image to be detected according to the intersection data information of the auxiliary line and the grain boundary and the actual length of the scale in the image to be detected.
A computer device comprising a memory and a processor, the memory having stored therein computer readable instructions which, when executed by the processor, cause the processor to perform the steps of a method of AI identification of grain size as described above.
A storage medium storing computer readable instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of a method of AI identification grain size as described above.
Based on the technical scheme, the invention has the beneficial effects that: the method overcomes the defects of the prior art, can adapt to grain size pictures of different levels, does not need manual intervention, automatically carries out high-precision identification on the grain size pictures of the golden picture of different levels, reduces identification errors caused by human subjective factors to the maximum extent, and leads the identification to be more accurate and faster.
Drawings
The following describes embodiments of the present invention in further detail with reference to the accompanying drawings.
FIG. 1: an application environment diagram of a method of AI identification of grain size in one embodiment;
FIG. 2: in one embodiment, a flow diagram of a method for identifying grain size by AI;
FIG. 3: a schematic diagram of grains and grain boundaries in an image to be measured in one embodiment;
FIG. 4: a schematic illustration of an auxiliary line in one embodiment;
FIG. 5: in one embodiment, the auxiliary line is covered on the image to be detected and is intersected with the grain boundary;
FIG. 6: a structural block diagram of a metallographic structure recognition apparatus in one embodiment;
FIG. 7: one embodiment is an internal block diagram of a computer device.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
The method for identifying the grain size by the AI provided by the embodiment of the present application can be applied to the application environment shown in fig. 1. As shown in FIG. 1, the application environment includes a computer device 110. The computer device 110 may obtain an image to be measured, which is a crystal grain image containing a scale; the computer device 110 may input the image to be detected into a preset first detection model, obtain a plurality of recognition results corresponding to the image to be detected, and determine the actual length of the scale in the image to be detected based on the plurality of recognition results; the computer device 110 may input the image to be detected into a preset second detection model, obtain a grain boundary diagram corresponding to the image to be detected, cover the auxiliary line on the grain boundary diagram, and obtain intersection data information of the auxiliary line and the grain boundary; the computer device 110 may obtain a grain size level corresponding to the image to be measured according to the intersection data information of the auxiliary line and the grain boundary and the actual length of the scale in the image to be measured, where the computer device 110 may be, but is not limited to, various personal computers, notebook computers, robots, tablet computers, and the like.
In one embodiment, as shown in fig. 2, a method for AI to identify grain size is provided, which includes the following steps:
step 202, acquiring an image to be detected, wherein the image to be detected is a crystal grain image containing a scale;
in this embodiment, a metallographic microscope may be used to observe the metal structure of a large number of metal material samples and to collect corresponding metallographic structure images, so that a grain image containing a scale may be obtained.
Step 204, inputting an image to be detected into a preset first detection model, obtaining a plurality of identification results corresponding to the image to be detected, and determining the actual length of a scale in the image to be detected based on the plurality of identification results;
in this embodiment, the computer device may input the image to be detected into a preset first detection model, obtain a plurality of recognition results corresponding to the image to be detected, and determine the actual length of the scale in the image to be detected based on the plurality of recognition results, where the computer device may perform filtering processing and/or image enhancement processing on the image to be detected, so that the image to be detected is clearer, and the quality of the image to be detected may be improved.
Step 206, inputting an image to be detected into a preset second detection model, obtaining a grain boundary diagram corresponding to the image to be detected, covering an auxiliary line on the grain boundary diagram, and obtaining intersection data information of the auxiliary line and the grain boundary;
in this embodiment, the computer device may input the image to be detected into a preset second detection model, obtain a grain boundary diagram corresponding to the image to be detected, cover the auxiliary line on the grain boundary diagram, and obtain data information of intersection between the auxiliary line and the grain boundary, where the computer device may perform filtering processing and/or image enhancement processing on the image to be detected, so that the image to be detected is clearer, and the quality of the image to be detected may be improved.
And 208, acquiring the grain size grade corresponding to the image to be detected according to the intersection data information of the auxiliary line and the grain boundary and the actual length of the scale in the image to be detected.
In this embodiment, the computer device may determine the actual magnification factor of the image to be measured according to the actual length of the scale in the image to be measured; covering the grain boundary map with auxiliary lines (as shown in FIG. 4), intersecting the grain boundaries in the map as shown in FIG. 5, and acquiring the intersection data information (the number of intersection points P between the auxiliary lines and the binarized grain boundaries) by the computeriOr number of segments Ni) And checking a corresponding grain size level comparison table based on the actual magnification of the image to be detected and the intersection data information of the auxiliary line and the grain boundary, and determining to obtain the grain size level corresponding to the image to be detected.
In one embodiment, a metallographic structure identification method is provided, and includes a process of inputting an image to be detected into a preset first detection model and obtaining a plurality of identification results corresponding to the image to be detected, where the process includes the following steps: identifying a numerical value area graph and a line segment area graph in a scale area graph corresponding to the image to be detected, and segmenting; inputting the divided numerical value area graph into a preset detection submodel to obtain a numerical value result represented by the numerical value area graph; zooming the image to be measured to correspond to the numerical result to obtain the zooming ratio between the image to be measured and the standard graph; extracting the line segment outline in the segmented line segment area graph and calculating the pixel point length of the line segment outline; and combining the scaling with the pixel point length of the line segment outline to obtain an actual numerical value represented by the corresponding line segment, thereby obtaining the actual length of the scale.
In this embodiment, the computer device may identify and segment the numerical region map and the line segment region map in the scale region map corresponding to the image to be detected; the computer equipment inputs the divided numerical value area graph into a preset detection sub-model to obtain a numerical value result represented by the numerical value area graph; the computer equipment zooms the image to be measured to correspond to the numerical result, and the zoom ratio between the image to be measured and the standard graph is obtained; extracting the line segment outline in the segmented line segment area graph and calculating the length of pixel points of the line segment outline by the computer equipment; the computer equipment combines the scaling and the pixel point length of the line segment outline to obtain the actual numerical value represented by the corresponding line segment, so that the actual length of the scale is obtained, and the computer equipment can identify and grade the grain size pictures with different grades and sizes.
In one embodiment, a metallographic structure identification method is provided, which comprises a process of extracting a line segment outline in a segmented line segment area graph, wherein the process comprises the following steps of carrying out edge detection on the segmented line segment area graph to obtain an edge detection result; and carrying out skeleton extraction on the edge result, and extracting the outline of the outgoing line section.
In this embodiment, the computer device performs edge detection on the segmented line segment area map through a differential detection operator Canny, and the computer device performs skeleton extraction on the edge detection result by using a K3M algorithm to extract a line segment profile.
In one embodiment, a metallographic structure identification method is provided, which further includes the following steps: and preprocessing the grain boundary image corresponding to the image to be detected, wherein the preprocessing is to binarize the grain boundary image by adopting an adaptive threshold binarization method based on the gray level difference between the grain boundary and the surrounding area in the image to be detected, as shown in fig. 3.
In one embodiment, a metallographic structure identification method is provided, and includes a process of obtaining a grain size rating corresponding to an image to be detected according to intersection data information of an auxiliary line and a grain boundary and an actual length of a scale in the image to be detected, where the process includes the following steps: and calculating the number of section lines and/or intercept points under unit length according to the number of intersection points of the auxiliary lines and the grain boundaries, and determining the corresponding grain size level by referring to a corresponding grain size level comparison table on the basis of the number of the section lines and/or the intercept points and the actual length of the scale in the image to be measured.
In this embodiment, the computer device determines the example size of the image to be measured in combination with the actual length corresponding to the scale, and the method can adapt to the recognition work of grain size pictures with different levels and sizes, and covers the auxiliary line on the preprocessed image, as shown in fig. 5, so that the auxiliary line and the grain boundary in the image are intersected to calculate the intersection point number P of the standard auxiliary line and the binarized grain boundaryiOr number of segments NiThe computer equipment calculates the number N of the section lines under the unit lengthLOr number of intercept points PLWherein M is a multiple, L is the length of the test line, the formula is shown as follows,
Figure BDA0003040752810000061
Figure BDA0003040752810000062
and then, the computer equipment calculates the grain size level G and outputs the result, the whole process does not need manual intervention, the recognition error caused by human subjective factors is reduced to the maximum extent, and the recognition is more accurate and quicker.
G=6.643 856 lgNL-3.288
G=6.643 856 lgPL-3.288
In one embodiment, a metallographic structure identification method is provided, and includes a process of obtaining a grain size rating corresponding to an image to be detected according to intersection data information of an auxiliary line and a grain boundary and an actual length of a scale in the image to be detected, where the process includes the following steps: and calculating the number of section bars or section points under the unit length according to the number of intersection points of the auxiliary lines and the grain boundaries, calculating an average intercept value according to the number of the section bars or the number of the section points, and determining the corresponding grain size grade according to a corresponding grain size grade comparison table on the basis of the average intercept value and the actual length of the scale in the image to be measured.
In this embodiment, the computer device calculates the average intercept value
Figure BDA0003040752810000063
Then, the grain size grade G is calculated or obtained by referring to a grain size grade comparison table, which is shown as follows,
Figure BDA0003040752810000064
Figure BDA0003040752810000065
TABLE 1 grain size level comparison Table
Figure BDA0003040752810000071
In one embodiment, a first detection model and a second detection model in a metallographic structure identification method are provided, and are obtained by training through the following steps: obtaining a sample data set to be trained, wherein each sample data in the sample data set comprises: the grain image containing the scale and the corresponding annotation image; preprocessing the sample data set to obtain a processed sample data set; and performing machine learning on the processed sample data set by using a machine learning algorithm to generate a corresponding detection model.
In this embodiment, the sample data sources mainly include sample photographing, collection of historical detection data pictures and customer pictures, and the like, and then upload to a computer device for storage, so as to form a sample data set. The computer device preprocesses the sample data to obtain a processed sample data set, divides the sample data in the sample data set into a training sample set and a testing sample set according to a proportion, and performs machine learning on the training sample set by using a machine learning algorithm to generate a corresponding detection model. And inputting the test sample set into the detection model by the computer equipment for verification, and if the verification accuracy of the detection model does not reach a preset threshold value, increasing the sample data volume to train the detection model again until the verification accuracy reaches or exceeds the preset threshold value. When the number of training samples is 500, the test accuracy can reach 98%, and the existing sample data set is trained by an artificial intelligence-based method without manual intervention and automatically identified.
It should be understood that, although the steps in the above-described flowcharts are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in the above-described flowcharts may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps
In one embodiment, as shown in fig. 6, an AI apparatus for identifying grain size includes: an acquisition unit 310, a first input unit 320, a second input unit 330, and a processing unit 340, wherein,
an obtaining unit 310, configured to obtain an image to be detected, where the image to be detected is a crystal grain image including a scale, and input the image to be detected into the first identification model and the second identification model;
the first input unit 320 is configured to input an image to be detected into a preset first detection model, obtain a plurality of identification results corresponding to the image to be detected, and determine an actual length of a scale in the image to be detected based on the plurality of identification results;
the second input unit 330 is configured to input the image to be detected into a preset second detection model, obtain a grain boundary diagram corresponding to the image to be detected, cover the auxiliary line on the grain boundary diagram, and obtain intersection data information of the auxiliary line and the grain boundary;
and the processing unit 340 is configured to obtain a grain size rating corresponding to the image to be measured according to the intersection data information of the auxiliary line and the grain boundary and the actual length of the scale in the image to be measured.
Those skilled in the art will appreciate that the apparatus, modules, or units described in the foregoing embodiments may be implemented by a computer chip or device or by a product with certain functions, that the structure shown in fig. 7 is only a block diagram of a part of the structure related to the present application and does not constitute a limitation to the computer device to which the present application applies, and that a particular computer device may include more or less components than those shown in the drawings, or may combine some components, or have different arrangements of components.
In one embodiment, there is provided a computer device comprising a memory and a processor, the memory having stored therein computer-readable instructions which, when executed by the processor, cause the processor to carry out the following steps when executing a computer program:
acquiring an image to be detected, wherein the image to be detected is a crystal grain image containing a scale;
inputting an image to be detected into a preset first detection model, obtaining a plurality of identification results corresponding to the image to be detected, and determining the actual length of a scale in the image to be detected based on the plurality of identification results;
inputting an image to be detected into a preset second detection model, obtaining a grain boundary diagram corresponding to the image to be detected, covering an auxiliary line on the grain boundary diagram, and obtaining intersection data information of the auxiliary line and the grain boundary;
and acquiring the grain size grade corresponding to the image to be detected according to the information of the intersection data of the auxiliary line and the grain boundary and the actual length of the scale in the image to be detected.
In one embodiment, a storage medium is provided having computer-readable instructions stored thereon which, when executed by one or more processors, cause the one or more processors to perform the following steps when executed:
acquiring an image to be detected, wherein the image to be detected is a crystal grain image containing a scale;
inputting an image to be detected into a preset first detection model, obtaining a plurality of identification results corresponding to the image to be detected, and determining the actual length of a scale in the image to be detected based on the plurality of identification results;
inputting an image to be detected into a preset second detection model, obtaining a grain boundary diagram corresponding to the image to be detected, covering an auxiliary line on the grain boundary diagram, and obtaining intersection data information of the auxiliary line and the grain boundary;
and acquiring the grain size grade corresponding to the image to be detected according to the information of the intersection data of the auxiliary line and the grain boundary and the actual length of the scale in the image to be detected.
Storage media for computer-readable instructions, including both permanent and non-permanent, removable and non-removable media, may implement the information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
The embodiments in the present specification are all described in a progressive manner, and the same and similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.

Claims (10)

1. A method for AI to identify grain size is characterized by comprising the following steps:
acquiring an image to be detected, wherein the image to be detected is a crystal grain image containing a scale;
inputting an image to be detected into a preset first detection model, obtaining a plurality of identification results corresponding to the image to be detected, and determining the actual length of a scale in the image to be detected based on the plurality of identification results;
inputting an image to be detected into a preset second detection model, obtaining a grain boundary diagram corresponding to the image to be detected, covering an auxiliary line on the grain boundary diagram, and obtaining intersection data information of the auxiliary line and the grain boundary;
and acquiring the grain size grade corresponding to the image to be detected according to the information of the intersection data of the auxiliary line and the grain boundary and the actual length of the scale in the image to be detected.
2. The AI method according to claim 1, wherein the inputting of the image to be measured into a first predetermined detection model to obtain a plurality of recognition results corresponding to the image to be measured, and the determining of the actual length of the scale in the image to be measured based on the plurality of recognition results comprises the following steps,
identifying a numerical value area graph and a line segment area graph in a scale area graph corresponding to the image to be detected, and segmenting;
inputting the divided numerical value area graph into a preset detection submodel to obtain a numerical value result represented by the numerical value area graph;
zooming the image to be measured to correspond to the numerical result to obtain the zooming ratio between the image to be measured and the standard graph;
extracting the line segment outline in the segmented line segment area graph and calculating the pixel point length of the line segment outline;
and combining the scaling with the pixel point length of the line segment outline to obtain an actual numerical value represented by the corresponding line segment, thereby obtaining the actual length of the scale.
3. The AI method of claim 2, wherein said extracting the line segment outline in the segmented line segment region map comprises the following steps,
carrying out edge detection on the segmented line segment area graph to obtain an edge detection result;
and carrying out skeleton extraction on the edge result, and extracting the outline of the outgoing line section.
4. The AI method of claim 1, further comprising the steps of:
and preprocessing the grain boundary image corresponding to the image to be detected, wherein the preprocessing is to binarize the grain boundary image by adopting an adaptive threshold binarization method based on the gray level difference between the grain boundary and the surrounding area in the image to be detected.
5. The AI method of claim 1, wherein the step of obtaining the grain size rating corresponding to the image to be measured according to the information of the intersection data of the auxiliary line and the grain boundary and the actual length of the scale in the image to be measured comprises the steps of:
and calculating the number of section lines and/or the number of intercept points under the unit length according to the number of intersection points of the auxiliary lines and the grain boundaries, and calculating the corresponding grain size grade based on the number of the section lines and/or the number of the intercept points and the actual length of the ruler in the image to be measured.
6. The AI method of claim 1, wherein the step of obtaining the grain size rating corresponding to the image to be measured according to the information of the intersection data of the auxiliary line and the grain boundary and the actual length of the scale in the image to be measured comprises the steps of:
and calculating the number of section bars or section points under the unit length according to the number of intersection points of the auxiliary lines and the grain boundaries, calculating an average intercept value according to the number of the section bars or the number of the section points, and calculating the corresponding grain size grade or determining the corresponding grain size grade by referring to a corresponding grain size grade comparison table on the basis of the average intercept value and the actual length of the scale in the image to be measured.
7. The AI-based grain size recognition method according to any one of claims 1 to 6, wherein the first detection model and the second detection model are trained by the following steps:
obtaining a sample data set to be trained, wherein each sample data in the sample data set comprises a crystal grain image of a scale and a corresponding label image;
preprocessing the sample data set to obtain a processed sample data set;
and performing machine learning on the processed sample data set by using a machine learning algorithm to generate a corresponding detection model.
8. An AI apparatus for identifying grain size, comprising:
the acquisition unit is used for acquiring an image to be detected, wherein the image to be detected is a crystal grain image containing a scale, and the image to be detected is input into the first identification model and the second identification model;
the device comprises a first input unit, a second input unit and a control unit, wherein the first input unit is used for inputting an image to be detected into a preset first detection model, obtaining a plurality of identification results corresponding to the image to be detected, and determining the actual length of a scale in the image to be detected based on the plurality of identification results;
the second input unit is used for inputting the image to be detected into a preset second detection model, obtaining a grain boundary diagram corresponding to the image to be detected, covering an auxiliary line on the grain boundary diagram, and obtaining intersection data information of the auxiliary line and the grain boundary;
and the processing unit is used for acquiring the grain size rating corresponding to the image to be detected according to the intersection data information of the auxiliary line and the grain boundary and the actual length of the scale in the image to be detected.
9. A computer device comprising a memory and a processor, the memory having stored therein computer-readable instructions that, when executed by the processor, cause the processor to perform the steps of a method of AI identification grain size as claimed in any of claims 1 to 7.
10. A storage medium storing computer-readable instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of a method for AI identification of grain size as claimed in any of claims 1 to 7.
CN202110456704.XA 2021-04-27 2021-04-27 AI (Artificial Intelligence) grain size identification method and device, computer equipment and storage medium Pending CN113112512A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110456704.XA CN113112512A (en) 2021-04-27 2021-04-27 AI (Artificial Intelligence) grain size identification method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110456704.XA CN113112512A (en) 2021-04-27 2021-04-27 AI (Artificial Intelligence) grain size identification method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113112512A true CN113112512A (en) 2021-07-13

Family

ID=76720137

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110456704.XA Pending CN113112512A (en) 2021-04-27 2021-04-27 AI (Artificial Intelligence) grain size identification method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113112512A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1825158A (en) * 2005-02-25 2006-08-30 宝钢集团上海梅山有限公司 Digital metallurgical microscopic image enlarging multiplying power calibrating method
CN101413786A (en) * 2008-11-28 2009-04-22 首钢总公司 Method for measuring austenite crystal dimension by high temperature laser microscope
CN101949810A (en) * 2010-08-12 2011-01-19 中国石油天然气集团公司 Method for identifying and assessing needle-like ferrite pipe line steel tissues
CN106767426A (en) * 2016-11-15 2017-05-31 四川农业大学 Paddy rice plant and leaf shape assay method and its device
CN111325706A (en) * 2018-12-13 2020-06-23 阿里巴巴集团控股有限公司 Grain boundary extraction and grain boundary extraction model generation method and device
CN111611643A (en) * 2020-05-27 2020-09-01 电子科技大学中山学院 Family type vectorization data obtaining method and device, electronic equipment and storage medium
CN112396618A (en) * 2020-11-12 2021-02-23 北京科技大学 Grain boundary extraction and grain size measurement method based on image processing

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1825158A (en) * 2005-02-25 2006-08-30 宝钢集团上海梅山有限公司 Digital metallurgical microscopic image enlarging multiplying power calibrating method
CN101413786A (en) * 2008-11-28 2009-04-22 首钢总公司 Method for measuring austenite crystal dimension by high temperature laser microscope
CN101949810A (en) * 2010-08-12 2011-01-19 中国石油天然气集团公司 Method for identifying and assessing needle-like ferrite pipe line steel tissues
CN106767426A (en) * 2016-11-15 2017-05-31 四川农业大学 Paddy rice plant and leaf shape assay method and its device
CN111325706A (en) * 2018-12-13 2020-06-23 阿里巴巴集团控股有限公司 Grain boundary extraction and grain boundary extraction model generation method and device
CN111611643A (en) * 2020-05-27 2020-09-01 电子科技大学中山学院 Family type vectorization data obtaining method and device, electronic equipment and storage medium
CN112396618A (en) * 2020-11-12 2021-02-23 北京科技大学 Grain boundary extraction and grain size measurement method based on image processing

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
林金萱: "定量金相自动分析关键技术研究及应用", 《中国优秀硕士学位论文全文数据库 工程科技Ⅰ辑》, pages 17 - 26 *
谢希文: "现代金相技术(下)", 《金属材料与热加工工艺》, pages 61 - 63 *

Similar Documents

Publication Publication Date Title
JP7000627B2 (en) Target cell labeling methods, devices, storage media and terminal devices
CN110349145B (en) Defect detection method, defect detection device, electronic equipment and storage medium
JP2024509411A (en) Defect detection method, device and system
US11189019B2 (en) Method for detecting defects, electronic device, and computer readable medium
CN111242899B (en) Image-based flaw detection method and computer-readable storage medium
CN111598869B (en) Method, equipment and storage medium for detecting Mura of display screen
CN112883926B (en) Identification method and device for form medical images
CN108664970A (en) A kind of fast target detection method, electronic equipment, storage medium and system
CN112215217B (en) Digital image recognition method and device for simulating doctor to read film
CN116485779A (en) Adaptive wafer defect detection method and device, electronic equipment and storage medium
CN114612427A (en) Nameplate defect detection method and device, electronic equipment and storage medium
CN114299040A (en) Ceramic tile flaw detection method and device and electronic equipment
CN113112513A (en) Method and device for AI (artificial intelligence) recognition of banded tissue, computer equipment and storage medium
Zhou et al. An adaptive clustering method detecting the surface defects on linear guide rails
CN113112512A (en) AI (Artificial Intelligence) grain size identification method and device, computer equipment and storage medium
CN113112514B (en) Method, device, computer equipment and storage medium for identifying graphite size by AI
CN115588196A (en) Pointer type instrument reading method and device based on machine vision
CN115374517A (en) Testing method and device for wiring software, electronic equipment and storage medium
CN111325706A (en) Grain boundary extraction and grain boundary extraction model generation method and device
KR101782366B1 (en) Vision inspection method based on learning data using normalization of sample scale
CN109063601A (en) Cheilogramma detection method, device, computer equipment and storage medium
CN108010020B (en) Silicon wafer slide detection method and device
CN113794815A (en) Method, device and controller for extracting video key frame
CN116485350B (en) Intelligent production system of medium borosilicate glass based on image recognition
CN112926695B (en) Image recognition method and system based on template matching

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination