A metal property detection method and system based on neural network
Through the detection method based on neural network, the existing grain counting is solved, and the problem of time-consuming and poor accuracy is achieved, and the metal performance detection is achieved to meet the timeliness and accuracy requirements of detection.
Patent Information
- Application Number
- CN202411931028.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-04-01
AI Technical Summary
The existing grain counting is time-consuming and labor-intensive, and has poor accuracy, which in turn affects the timeliness and accuracy of metal performance detection.
Using a neural network-based detection method, the original captured image of metal grains is obtained through the die machine, pixel stretching and image binarization are performed, and the pre-trained neural network model is input for grain information detection, grain profile information is obtained, and geometric information calculation and grain number calculation are performed, and metal performance detection is finally carried out.
It achieves rapid and accurate acquisition of metal performance detection results, meeting the timeliness and accuracy requirements of metal performance detection.
Smart Images

Figure CN119741290A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of industrial intelligent quality inspection, and in particular to a metal property detection method and system based on a neural network. Background Art
[0002] In the production process of metal products, the main purpose of metal grain size detection is to understand the grain size of metal materials, which is of great significance for understanding the performance of materials and optimizing material preparation processes. Through grain size detection, the mechanical properties, physical properties and chemical properties of materials can be evaluated to ensure that the selection of metal materials can meet the requirements of metal products. The more grains there are per unit area, the finer the grains, the larger the grain boundary area, and the greater the impact on metal properties. Traditional grain counting uses manual counting, which is time-consuming and labor-intensive, and the counting accuracy is poor, which in turn affects the timeliness and accuracy of metal performance detection. Summary of the invention
[0003] The present invention provides a metal property detection method and system based on a neural network, which solves the problem that the existing grain counting is time-consuming and labor-intensive, has poor accuracy, and thus affects the timeliness and accuracy of metal property detection.
[0004] In a first aspect, an embodiment of the present invention provides a metal property detection method based on a neural network, the method comprising the following process:
[0005] The original photographed image of the metal grain is obtained through a grain machine, and the original photographed image is pixel stretched and image binarized;
[0006] Input the original captured image with pixel stretching and image binarization into the pre-trained neural network model for grain information detection to obtain grain contour information;
[0007] Calculate the grain geometry information based on the grain contour information to obtain the area information and center point information of the grain;
[0008] Calculate the number of grains based on the area information and center point information of the grains to obtain the number of grains;
[0009] Metal property testing is performed based on the grain quantity information to obtain metal property testing results.
[0010] In the above embodiment, the present invention adopts a combination of deep learning and machine vision to perform metal property detection. First, deep learning technology is used to detect grain information, and then machine vision technology is used in combination with the geometric characteristics of the grains to obtain the area information and center point information of the grains. Finally, the number of grains is calculated based on the area information and center point information of the grains, and the metal property is determined in combination with the actual metal property detection standards, which solves the problem that the existing grain counting is time-consuming, labor-intensive, and has poor accuracy, thereby affecting the timeliness and accuracy of metal property detection.
[0011] As some optional implementations of the present application, the process of pixel stretching and image binarization of the original captured image is as follows:
[0012] The original captured image is pixel stretched by using a pixel stretching formula to obtain a pixel stretched original captured image;
[0013] The pixel stretching formula is:
[0014]
[0015] Wherein, dist represents the pixel value of pixel stretching, src represents the pixel value of the original captured image, max(src) represents the maximum pixel value of the original captured image, and min(src) represents the minimum pixel value of the original captured image;
[0016] The pixel-stretched original captured image is subjected to image binarization processing to obtain a binarized original captured image.
[0017] In the above embodiment, the present invention adopts the Normalize method to perform pixel stretching on the original captured image to achieve contrast enhancement; and adopts image binarization to convert the grayscale image into a black and white image to simplify the image data.
[0018] As some optional implementations of the present application, the process of inputting the pixel stretched and image binarized original captured image into the pre-trained neural network model for grain information detection is as follows:
[0019] The original captured image with pixel stretching and image binarization is input into the pre-trained neural network model for image feature extraction to obtain a grain rectangular frame per unit area;
[0020] The grain outline is extracted based on the grain rectangular frame per unit area to obtain the grain outline information.
[0021] In the above embodiment, the present invention inputs the original captured image into a pre-trained neural network model, which can quickly and accurately locate and obtain grain contour information, thereby facilitating subsequent rapid and accurate metal property testing.
[0022] As some optional implementations of the present application, the process of calculating the grain geometry information based on the grain contour information is as follows:
[0023] The area information of each grain is obtained by using a statistical method of random sampling based on the grain contour information;
[0024] The center point information of each grain is obtained by calculating the endpoint coordinates based on the grain contour information.
[0025] In the above embodiment, the present invention can accurately obtain the area of each irregular grain by using a statistical method of random sampling, and can accurately obtain the center point coordinates of each grain and the distance between the center point and the image boundary by calculating the endpoint coordinates.
[0026] As some optional implementations of the present application, the process of obtaining the area information of each grain by a statistical method of random sampling based on the grain contour information is as follows:
[0027] Define a rectangle or complex bounding shape that contains an irregular shape, and calculate the area of the bounding shape Abounding;
[0028] Randomly generate n points inside the enclosing shape, and check whether each point falls inside the irregular-shaped grain to obtain the number m of points falling inside the irregular-shaped grain;
[0029] The proportion of points falling inside the irregular-shaped grain is calculated: p=m / n; and the area of the irregular-shaped grain is calculated based on the proportion: Area=p×Abounding.
[0030] As some optional implementations of the present application, the process of obtaining the center point information of each grain by calculating the endpoint coordinates based on the grain contour information is as follows:
[0031] According to the grain outline information, the upper left and lower right coordinates of the minimum circumscribed rectangle of each grain are obtained: (x min ,y min ,x max ,y max );
[0032] According to the upper left and lower right coordinates (x min ,y min ,x max ,y max ) Calculate the center coordinates of the grain:
[0033]
[0034] Based on the center point coordinates of the grain (c x ,cy ) Calculate the distance from the center point to the image boundary.
[0035] As some optional implementations of the present application, the process of calculating the number of grains based on the area information and center point information of the grains is as follows:
[0036] Perform weighted addition processing on the area information of the grain and the distance between the center point and the image boundary to obtain a comprehensive detection factor;
[0037] A threshold check is performed on the comprehensive detection factor, and the number of grains is calculated based on the threshold check result to obtain information on the number of grains per unit area.
[0038] In the above embodiment, the present invention uses a weighted approach to balance the influence of the area of the grain and the distance between the center point of the grain and the image boundary on the grain counting, so that the number of grains can be obtained more accurately.
[0039] In a second aspect, the present invention provides a metal property detection system based on a neural network, the system comprising:
[0040] An original image acquisition unit, wherein the original image acquisition unit acquires an original photographed image of a metal grain through a grain machine, and performs pixel stretching and image binarization on the original photographed image;
[0041] A neural network model unit, wherein the neural network model unit is used to input the original captured image with pixel stretching and image binarization into a pre-trained neural network model to perform grain information detection to obtain grain contour information;
[0042] A geometric information calculation unit, wherein the geometric information calculation unit calculates the geometric information of the grain based on the grain contour information to obtain the area information and the center point information of the grain;
[0043] A grain number calculation unit, wherein the grain number calculation unit calculates the number of grains based on the area information and the center point information of the grains to obtain the grain number information;
[0044] A metal property detection unit performs metal property detection based on grain quantity information to obtain a metal property detection result.
[0045] In a third aspect, the present invention provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the metal property detection method based on a neural network when executing the computer program.
[0046] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the neural network-based metal property detection method is implemented.
[0047] The beneficial effects of the present invention are as follows: The present invention adopts a combination of deep learning and machine vision to perform metal property detection. First, deep learning technology is used to detect grain information, and then machine vision technology is used in combination with the geometric characteristics of the grains to obtain the area information and center point information of the grains. Finally, the number of grains is calculated based on the area information and center point information of the grains, and the metal property is determined in combination with the actual metal property detection standards. The metal property determination results can be obtained quickly and accurately, meeting the timeliness and accuracy requirements of metal property detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0049] Figure 1 is a schematic diagram of the computer device structure of the hardware operating environment described in the embodiment of the present invention;
[0050] Figure 2 is a flow chart of the metal property detection method according to an embodiment of the present invention;
[0051] Figure 3 is a rectangular frame of a grain per unit area according to an embodiment of the present invention;
[0052] Figure 4 It is a structural block diagram of the metal property detection system described in an embodiment of the present invention. DETAILED DESCRIPTION
[0053] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0054] In order to solve the problem that the existing grain counting is time-consuming, labor-intensive, and has poor accuracy, which in turn affects the timeliness and accuracy of metal property detection, this application provides a metal property detection method and system based on a neural network. Before introducing the specific technical solution of this application, the hardware operating environment involved in the embodiment of this application is first introduced.
[0055] See also Figure 1 , Figure 1A schematic diagram of the computer device structure of the hardware operating environment involved in the embodiment of the present application.
[0056] like Figure 1 As shown, the computer device may include: a processor, such as a central processing unit (CPU), a communication bus, a user interface, a network interface, and a memory. Among them, the communication bus is used to realize the connection and communication between these components. The user interface may include a display screen (Display), an input unit such as a keyboard (Keyboard), and optionally, the user interface may also include a standard wired interface and a wireless interface. The network interface may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity interface). The memory may be a high-speed random access memory (Random Access Memory, RAM) memory, or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. The memory may optionally be a storage device independent of the aforementioned processor.
[0057] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the computer device, and may include more or less components than shown in the figure, or combine some components, or arrange the components differently.
[0058] like Figure 1 As shown, the memory as a storage medium may include an operating system, a data storage module, a network communication module, a user interface module and an electronic program module.
[0059] exist Figure 1 In the computer device shown, the network interface is mainly used for data communication with the network server; the user interface is mainly used for data interaction with the user; the processor and memory in the computer device of the present application can be set in the computer device, and the computer device calls the computer program product stored in the electronic program module through the processor, and executes the metal property detection method based on neural network provided in the embodiment of the present application.
[0060] Based on the hardware environment of the aforementioned embodiment, the embodiment of the present application provides a metal property detection method based on a neural network, please refer to Figure 2 , Figure 2 It is a flow chart of the metal property detection method, and the method flow is as follows:
[0061] (1) Obtaining the original photographed image of the metal grain through a grain machine, and performing pixel stretching and image binarization on the original photographed image. The grain machine is a device for processing and testing grains, and is one of the key equipment in the semiconductor manufacturing industry.
[0062] In the embodiment of the present invention, the process of pixel stretching and image binarization of the original captured image is as follows:
[0063] (1.1) The original captured image is pixel stretched using a pixel stretching formula to obtain a pixel stretched original captured image.
[0064] The pixel stretching formula is:
[0065]
[0066] Wherein, dist represents the pixel value of pixel stretching, src represents the pixel value of the original captured image, max(src) represents the maximum pixel value of the original captured image, and min(src) represents the minimum pixel value of the original captured image. Since the original captured image is invisible to the naked eye, and it is impossible to use a neural network model to detect grain information of the original captured image, the embodiment of the present invention adopts the Normalize standardization method to perform pixel stretching on the original captured image to achieve contrast enhancement; by performing pixel stretching on the original captured image, the pixel value of the original captured image can be uniformly stretched to between 0 and 255. At the same time, other image enhancement methods can also be used, such as grayscale conversion and frequency domain enhancement.
[0067] (1.2) Performing image binarization processing on the pixel-stretched original captured image to obtain a binary original captured image. The embodiment of the present invention uses image binarization processing to convert a grayscale image into a black-and-white image to simplify image data and facilitate subsequent rapid image contour extraction.
[0068] (2) The original captured image with pixel stretching and image binarization is input into the pre-trained neural network model for grain information detection to obtain grain contour information.
[0069] In an embodiment of the present invention, before the original captured image with pixel stretching and image binarization is input into the neural network model for grain contour information, it is necessary to train the neural network model, that is, first mark the grain contour area of the original captured image, and then input the marked original captured image into the neural network model, and automatically learn the grain contour features through the neural network model, so that the neural network model can identify the grain contour and locate the grain contour area, so that the small image containing the grain contour information can be detected by the pre-trained neural network model. Subsequent calculations of grain geometry information can be performed only on the small image, without the need to detect all areas of the entire large image. Specifically, the neural network model includes but is not limited to the use of Faster RCNN or YOLO.
[0070] In an embodiment of the present invention, the original captured image is input into a pre-trained neural network model, and the neural network model can quickly and accurately locate and obtain grain contour information, so as to facilitate subsequent rapid and accurate metal property testing.
[0071] Specifically, the process of inputting the pixel stretched and binarized original captured image into the pre-trained neural network model for grain information detection is as follows:
[0072] (2.1) The original captured image with pixel stretching and image binarization is input into a pre-trained neural network model for image feature extraction to obtain a grain rectangular frame per unit area; wherein the grain rectangular frame is a small image containing grain contour information.
[0073] (2.2) Extracting grain contours based on the grain rectangular frame per unit area to obtain grain contour information; that is, in the binary original captured image, using an edge detection algorithm to detect the edge of each pixel with a value of 0 or 255, including but not limited to the Sobel operator, Prewitt operator, and Canny edge detection algorithm, etc.; please refer to Figure 3 , Figure 3 is the rectangular frame of the grain per unit area.
[0074] (3) Calculate the grain geometry information based on the grain contour information to obtain the area information and center point information of the grain. The embodiment of the present invention uses a statistical method of random sampling to accurately obtain the area of irregular grains, and uses the calculation method of endpoint coordinates to accurately obtain the center point of each grain and the distance between the center point and the image boundary.
[0075] In an embodiment of the present invention, the process of calculating the grain geometry information based on the grain contour information is as follows:
[0076] (3.1) Based on the grain contour information, the area information of each grain is obtained by random sampling. Since the shape of each grain is irregular, how to quickly obtain the area information of the grain is the key to ensuring the timeliness of metal property testing.
[0077] Specifically, the process of obtaining the area information of each grain by using a statistical method of random sampling based on the grain contour information is as follows:
[0078] (3.11) Define a rectangle or complex bounding shape that contains an irregular shape, and calculate the area Abounding of the bounding shape.
[0079] (3.12) Randomly generate n points inside the enclosing shape, and check whether each point falls inside the irregular-shaped grain to obtain the number m of points falling inside the irregular-shaped grain.
[0080] (3.13) Calculate the proportion of points that fall inside the irregularly shaped grains: p = m / n; and the area of the irregularly shaped grains is calculated based on the ratio: Area = p × Abounding.
[0081] (3.2) Based on the grain contour information, the center point information of each grain is obtained by calculating the endpoint coordinates. By obtaining the center point information, the distance between the center point and the image boundary can be further obtained.
[0082] Specifically, the process of obtaining the center point information of each grain by calculating the endpoint coordinates based on the grain contour information is as follows:
[0083] (3.21) According to the grain contour information, the upper left and lower right coordinates of the minimum circumscribed rectangle of each grain are obtained: (x min ,y min ,x max ,y max ).
[0084] (3.22) According to the upper left and lower right coordinates (x min ,y min ,x max ,y max ) Calculate the center point coordinates of the grain.
[0085]
[0086] (3.23) Based on the coordinates of the center point of the grain (c x ,c y ) Calculate the distance between the center point and the image boundary. The distance between the center point and the image boundary is:
[0087] distance x =c x -x min or distance y =y max -c y
[0088] From distance x and distance y Choose the smaller one as the distance between the center point and the image boundary.
[0089] (4) Calculate the number of grains based on the area information and center point information of the grains to obtain the number of grains per unit area.
[0090] In an embodiment of the present invention, the process of calculating the number of grains based on the area information and center point information of the grains is as follows:
[0091] (4.1) The area information of the grain and the distance from the center point to the image boundary are weightedly added to obtain a comprehensive detection factor.
[0092] First, calculate the average area of all grains:
[0093]
[0094] Among them, Area represents the average area of all grains, area1, area2, ..., area k represents the area of the grain, and k represents the number of grains.
[0095] Then, the average distance between the center points of all grains and the image boundary is calculated:
[0096]
[0097] Wherein, Distance represents the average distance of all grains, distance1, distance2,..., represent the distance between the center of the grain and the image boundary, and k represents the number of grains.
[0098] Finally, the comprehensive detection factor is calculated:
[0099]
[0100] Among them, factor represents the comprehensive detection factor, area i represents the area of the i-th grain, distance i represents the distance between the center point of the i-th grain and the image boundary, weight1 represents the preset area weight, and weight2 represents the preset distance weight. Specifically, the predicted preset area weight weight1 and the preset distance weight weight2 can be set according to actual conditions, and the embodiment of the present invention does not limit this. Preferably, the area weight weight1 is generally smaller than the distance weight weight2.
[0101] (4.2) Perform threshold verification on the comprehensive detection factor, and calculate the number of grains based on the threshold verification result to obtain the information on the number of grains per unit area.
[0102] Specifically, if the comprehensive detection factor is greater than the threshold, the number of grains is increased by 1, otherwise, the number of grains is increased by 0.5; at the same time, the threshold can be set to multiple levels, thereby increasing the precision and accuracy of the threshold verification.
[0103] (5) Perform metal property detection based on the grain quantity information to obtain metal property detection results. Specifically, the metal property is determined according to the actual metal property detection standard, that is, the more the number of grains, the smaller the grain size, the higher the strength of the metal material, and the better the toughness. The embodiment of the present invention does not limit the standard for metal property determination, and it can be set according to actual conditions.
[0104] In summary, the present invention adopts a combination of deep learning and machine vision to perform metal property detection. First, deep learning technology is used to detect grain information, and then machine vision technology is used in combination with the geometric characteristics of the grains to obtain the area information and center point information of the grains. Finally, the number of grains is calculated based on the area information and center point information of the grains, and the metal property is determined in combination with the actual metal property detection standards. This solves the problem that the existing grain counting is time-consuming, labor-intensive, and has poor accuracy, which in turn affects the timeliness and accuracy of metal property detection.
[0105] In addition, in one embodiment, based on the same inventive concept as the above embodiment, the embodiment of the present invention provides a metal property detection system based on a neural network, and the system corresponds one-to-one with the method of embodiment 1, please refer to Figure 4 , Figure 4 The structural block diagram of the metal property detection system includes:
[0106] An original image acquisition unit, wherein the original image acquisition unit acquires an original photographed image of a metal grain through a grain machine, and performs pixel stretching and image binarization on the original photographed image;
[0107] A neural network model unit, wherein the neural network model unit is used to input the original captured image with pixel stretching and image binarization into a pre-trained neural network model to perform grain information detection to obtain grain contour information;
[0108] A geometric information calculation unit, wherein the geometric information calculation unit calculates the geometric information of the grain based on the grain contour information to obtain the area information and the center point information of the grain;
[0109] A grain number calculation unit, wherein the grain number calculation unit calculates the number of grains based on the area information and the center point information of the grains to obtain the grain number information;
[0110] A metal property detection unit performs metal property detection based on grain quantity information to obtain a metal property detection result.
[0111] It should be noted that each unit in the neural network-based metal property detection system in this embodiment corresponds one-to-one to each step in the neural network-based metal property detection method in the aforementioned embodiment. Therefore, the specific implementation method and technical effects achieved in this embodiment can refer to the implementation method of the aforementioned neural network-based metal property detection method, which will not be repeated here.
[0112] In addition, in one embodiment, the present application also provides a computer device, which includes a processor, a memory, and a computer program stored in the memory, and the computer program implements the method in the aforementioned embodiment when executed by the processor.
[0113] In addition, in one embodiment, the present application further provides a computer storage medium, on which a computer program is stored, and the computer program implements the method in the aforementioned embodiment when executed by a processor.
[0114] In some embodiments, the computer readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or various devices including one or any combination of the above memories. The computer may be various computing devices including intelligent terminals and servers.
[0115] In some embodiments, executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0116] As an example, executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).
[0117] By way of example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one site, or on multiple computing devices distributed across multiple sites and interconnected by a communication network.
[0118] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0119] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0120] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory / random access memory, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a multimedia terminal device (which can be a mobile phone, a computer, a television receiver, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0121] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A metal property detection method based on neural network, characterized in that: The method comprises the following steps: The original photographed image of the metal grain is obtained through a grain machine, and the original photographed image is pixel stretched and image binarized; Input the original captured image with pixel stretching and image binarization into the pre-trained neural network model for grain information detection to obtain grain contour information; Calculate the grain geometry information based on the grain contour information to obtain the area information and center point information of the grain; Calculate the number of grains based on the area information and center point information of the grains to obtain the number of grains; Metal property testing is performed based on the grain quantity information to obtain metal property testing results.
2. A metal property detection method based on neural network according to claim 1, characterized in that: The process of pixel stretching and image binarization of the original captured image is as follows: Performing pixel stretching on the original captured image to obtain a pixel-stretched original captured image; The pixel-stretched original captured image is binarized to obtain a binarized original captured image.
3. A metal property detection method based on neural network according to claim 1, characterized in that: The process of inputting the original captured image with pixel stretching and image binarization into the pre-trained neural network model for grain information detection is as follows: The original captured image with pixel stretching and image binarization is input into the pre-trained neural network model for image feature extraction to obtain a grain rectangular frame per unit area; The grain outline is extracted based on the grain rectangular frame per unit area to obtain the grain outline information.
4. A metal property detection method based on neural network according to claim 1, characterized in that: The process of calculating grain geometry information based on grain contour information is as follows: The area information of each grain is obtained by using a statistical method of random sampling based on the grain contour information; The center point information of each grain is obtained by calculating the endpoint coordinates based on the grain contour information.
5. A metal property detection method based on neural network according to claim 4, characterized in that: The process of obtaining the area information of each grain by random sampling based on the grain contour information is as follows: Define a rectangle or complex bounding shape that contains an irregular shape, and calculate the area of the bounding shape Abounding; Randomly generate n points inside the enclosing shape, and check whether each point falls inside the irregular-shaped grain to obtain the number m of points falling inside the irregular-shaped grain; Calculate the proportion of points that fall inside irregularly shaped grains: p = m / n; and the area of the irregularly shaped grains is calculated based on the ratio: Area = p × Abounding.
6. A metal property detection method based on neural network according to claim 1, characterized in that: The process of obtaining the center point information of each grain by calculating the endpoint coordinates based on the grain contour information is as follows: According to the grain outline information, the upper left and lower right coordinates of the minimum circumscribed rectangle of each grain are obtained: (x min ,y min ,x max ,y max ); According to the upper left and lower right coordinates (x min ,y min ,x max ,y max ) Calculate the center coordinates of the grain: Based on the center point coordinates of the grain (c x ,c y ) Calculate the distance from the center point to the image boundary.
7. A metal property detection method based on neural network according to claim 1, characterized in that: The process of calculating the number of grains based on the area information and center point information of the grains is as follows: Perform weighted addition processing on the area information of the grain and the distance between the center point and the image boundary to obtain a comprehensive detection factor; A threshold check is performed on the comprehensive detection factor, and the number of grains is calculated based on the threshold check result to obtain information on the number of grains per unit area.
8. A metal property detection system based on neural network, characterized in that: The system comprises: An original image acquisition unit, wherein the original image acquisition unit acquires an original photographed image of a metal grain through a grain machine, and performs pixel stretching and image binarization on the original photographed image; A neural network model unit, wherein the neural network model unit is used to input the original captured image with pixel stretching and image binarization into a pre-trained neural network model to perform grain information detection to obtain grain contour information; A geometric information calculation unit, wherein the geometric information calculation unit calculates the geometric information of the grain based on the grain contour information to obtain the area information and the center point information of the grain; A grain number calculation unit, wherein the grain number calculation unit calculates the number of grains based on the area information and the center point information of the grains to obtain the grain number information; A metal property detection unit performs metal property detection based on grain quantity information to obtain a metal property detection result.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the neural network-based metal property detection method described in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the neural network-based metal property detection method described in any one of claims 1 to 7 is implemented.