Method, device and medium for identifying a metallic material
By combining the first and second neural networks to create a recognition model, the problems of limited application scope and poor computing performance in existing technologies are solved, and high-precision recognition of metal materials such as scrap steel is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- YONYOU NETWORK TECH CO LTD
- Filing Date
- 2023-06-16
- Publication Date
- 2026-06-02
AI Technical Summary
Existing identification models have limited application scope in scrap steel recycling, poor computational performance, and insufficient identification accuracy.
A feature extraction network is established using a first neural network and a second neural network. A recognition model is created by combining the target feature fusion module. Images with different feature quantities are processed through different feature extraction networks, thereby expanding the application scope and optimizing computational performance.
It improves the recognition accuracy and computational performance of the recognition model, and enhances the recognition accuracy of quality grades of metal materials such as scrap steel.
Smart Images

Figure CN116824153B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and more specifically, to a method, apparatus, and medium for identifying metallic materials. Background Technology
[0002] At present, the scrap steel recycling industry is booming. In the process of scrap steel recycling, the quality level of scrap steel and other metal materials can be identified by identification models, thereby ensuring the recycling efficiency of scrap steel and other metal materials. However, conventional identification models have problems such as limited application scope and poor computing performance. Summary of the Invention
[0003] The present invention aims to solve at least one of the technical problems existing in the prior art or related art.
[0004] Therefore, the first aspect of the present invention is to propose a method for creating a recognition model.
[0005] The second aspect of the present invention is to provide a method for identifying metallic materials.
[0006] A third aspect of the invention is to provide an apparatus for creating a recognition model.
[0007] A fourth aspect of the present invention is to provide a device for identifying metallic materials.
[0008] The fifth aspect of the present invention is to provide a readable storage medium.
[0009] In view of this, according to a first aspect of the present invention, a method for creating an identification model is proposed. The identification model is used to identify metallic materials. The method for creating the identification model includes: obtaining a first neural network and a second neural network; establishing a first feature extraction network based on the first neural network and the second neural network; establishing a second feature extraction network based on the first neural network; creating a target feature fusion module for metallic materials based on the second neural network; and creating an identification model for metallic materials based on the first feature extraction network, the second feature extraction network, and the target feature fusion module.
[0010] The recognition model creation method in this technical solution establishes a first feature extraction network based on the characteristics of the first neural network and the second neural network. Then, based on the first neural network, a second feature extraction network is established. Based on the second neural network, a target feature fusion module for metallic materials is created. The first feature extraction network, the second feature extraction network, and the target feature fusion module are combined to create a recognition model for metallic materials. Through the first and second feature extraction networks, the application scope of the recognition model is expanded, the computational performance of the recognition model is optimized, and the recognition accuracy of the recognition model is improved.
[0011] According to a second aspect of the present invention, a method for identifying metallic materials is proposed. The method includes: acquiring data images of metallic materials; determining image feature quantities of the data images through an identification model; if the image feature quantities are less than or equal to a preset threshold, extracting features from the data images through a first feature extraction network of the identification model to obtain a first material feature; if the image feature quantities are greater than the preset threshold, extracting features from the data images through a second feature extraction network of the identification model to obtain a second material feature; and determining the quality level of the metallic material based on the first material feature or the second material feature.
[0012] The method for identifying metallic materials in this technical solution acquires data images of metallic materials, identifies image features in the data images through an identification model, and extracts features from the data images through the first feature extraction network of the identification model when the image feature is less than or equal to a preset threshold to obtain the first material feature. When the image feature is greater than the preset threshold, it extracts features from the data images through the second feature extraction network of the identification model to obtain the second material feature. Then, based on the first or second material feature, the quality level of the metallic material is determined, ensuring the accuracy of metallic material identification and improving the precision of metallic material quality level identification.
[0013] According to a third aspect of the present invention, an apparatus for creating a recognition model is provided, comprising a processor and a memory, wherein the memory stores a program or instructions, which, when executed by the processor, implement the steps of the recognition model creation method as described in any of the above-described technical solutions. Therefore, this apparatus for creating a recognition model possesses all the beneficial effects of the recognition model creation method in any of the above-described technical solutions, and will not be elaborated further here.
[0014] According to a fourth aspect of the present invention, a metal material identification device is provided, comprising a processor and a memory, wherein the memory stores a program or instructions, which, when executed by the processor, implement the steps of the metal material identification method as described in any of the above-described technical solutions. Therefore, this metal material identification device possesses all the beneficial effects of the metal material identification method in any of the above-described technical solutions, and will not be elaborated further here.
[0015] According to a fifth aspect of the present invention, a readable storage medium is provided on which a program or instructions are stored, which, when executed by a processor, implement the method for creating an identification model as described in any of the above-described technical solutions and the method for identifying metallic materials as described in any of the above-described technical solutions. Therefore, this readable storage medium possesses all the beneficial effects of the method for creating an identification model as described in any of the above-described technical solutions and the method for identifying metallic materials as described in any of the above-described technical solutions, which will not be elaborated further here.
[0016] Additional aspects and advantages of the invention will become apparent in the following description or may be learned by practice of the invention. Attached Figure Description
[0017] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:
[0018] Figure 1 One of the flowcharts illustrating the method for creating a recognition model according to an embodiment of the present invention is shown;
[0019] Figure 2 A second schematic flowchart of the method for creating the recognition model in an embodiment of the present invention is shown;
[0020] Figure 3 The third schematic flowchart of the method for creating the recognition model in an embodiment of the present invention is shown;
[0021] Figure 4 The fourth flowchart illustrates the method for creating the recognition model in an embodiment of the present invention.
[0022] Figure 5 The fifth flowchart illustrates the method for creating the recognition model in an embodiment of the present invention;
[0023] Figure 6 A schematic flowchart of a method for identifying metallic materials according to an embodiment of the present invention is shown;
[0024] Figure 7 A second schematic flowchart of the method for identifying metallic materials according to an embodiment of the present invention is shown;
[0025] Figure 8 A structural block diagram of an apparatus for creating an identification model according to an embodiment of the present invention is shown;
[0026] Figure 9 A schematic diagram of one of the apparatuses for creating an identification model according to an embodiment of the present invention is shown;
[0027] Figure 10 A second schematic diagram of the recognition model creation device in an embodiment of the present invention is shown;
[0028] Figure 11 A third schematic diagram of the recognition model creation device in an embodiment of the present invention is shown;
[0029] Figure 12 A fourth schematic diagram of the apparatus for creating an identification model in an embodiment of the present invention is shown;
[0030] Figure 13One of the structural block diagrams of a metal material identification device according to an embodiment of the present invention is shown;
[0031] Figure 14 A second structural block diagram of the recognition model creation device in an embodiment of the present invention is shown;
[0032] Figure 15 A second structural block diagram of a metal material identification device according to an embodiment of the present invention is shown. Detailed Implementation
[0033] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments of the present invention and the features thereof can be combined with each other.
[0034] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.
[0035] The following is combined Figures 1 to 15 The present application provides a detailed description of the method for creating the recognition model and the method, apparatus and medium for recognizing metallic materials through specific embodiments and application scenarios.
[0036] The technical solution for creating a recognition model provided by this invention can be executed by a creation device, or it can be determined according to actual usage requirements, and no specific limitation is made here. To more clearly describe the method for creating a recognition model provided by this invention, the following description uses a creation device as the execution subject.
[0037] In one embodiment according to this application, such as Figure 1 As shown, a method for creating a recognition model is proposed, which includes:
[0038] Step 102: Obtain the first neural network and the second neural network, and establish the first feature extraction network based on the first neural network and the second neural network;
[0039] Step 104: Based on the first neural network, establish the second feature extraction network;
[0040] Step 106: Based on the second neural network, create a target feature fusion module for metallic materials;
[0041] Step 108: Create a recognition model for metallic materials based on the first feature extraction network, the second feature extraction network, and the target feature fusion module.
[0042] In this embodiment, a method for creating an identification model is provided. The identification model is used to identify metallic materials, wherein the identification model is a data model capable of identifying the quality grade of metallic materials.
[0043] For example, the metallic material may specifically be scrap steel.
[0044] The device acquires a first neural network and a second neural network, and establishes a first feature extraction network based on the characteristics of the first neural network and the second neural network. The first neural network and the second neural network are preset neural networks, and the first feature extraction network is a neural network capable of extracting features from an image.
[0045] For example, the first neural network can be a CNN (Convolutional Neural Network) network, and the second neural network can be a Transformer (a network based on an attention mechanism) network.
[0046] For example, the first feature extraction network may be specifically a feature extraction network for simple images.
[0047] The device creates a second feature extraction network based on the first neural network, wherein the second feature extraction network is a neural network capable of extracting features from an image.
[0048] For example, the second feature extraction network may specifically be a feature extraction network for complex images.
[0049] The device creates a target feature fusion module for metallic materials based on a second neural network. The target feature fusion module is a module capable of fusing features.
[0050] For example, the target feature fusion module can be specifically a module that performs fusion processing on multiple image features.
[0051] The device combines a first feature extraction network, a second feature extraction network, and a target feature fusion module to create a recognition model for metallic materials.
[0052] For example, the identification model can be a data model for identifying the quality grade of scrap steel materials.
[0053] The recognition model creation method in this embodiment establishes a first feature extraction network based on the characteristics of the first neural network and the second neural network, then establishes a second feature extraction network based on the first neural network, and creates a target feature fusion module for metallic materials based on the second neural network. The first feature extraction network, the second feature extraction network, and the target feature fusion module are combined to create a recognition model for metallic materials. By using the first feature extraction network and the second feature extraction network, the application scope of the recognition model is expanded, the computational performance of the recognition model is optimized, and the recognition accuracy of the recognition model is improved.
[0054] In one embodiment according to this application, such as Figure 2 As shown, a method for creating a recognition model is proposed, which includes:
[0055] Step 202: Obtain the first neural network and the second neural network. Based on the network structure of the first neural network, determine the convolutional layer structure, convolutional kernel parameters, and running function of the first neural network.
[0056] Step 204: Update the network structure of the second neural network according to the convolutional layer structure, convolutional kernel parameters and running function to obtain the first feature extraction network;
[0057] Step 206: Based on the first neural network, establish the second feature extraction network;
[0058] Step 208: Based on the second neural network, create a target feature fusion module for metallic materials;
[0059] Step 210: Create a recognition model for metallic materials based on the first feature extraction network, the second feature extraction network, and the target feature fusion module.
[0060] In this embodiment, the creation device determines the network structure of the first neural network, and based on the network structure of the first neural network, determines the convolutional layer structure, convolutional kernel parameters, and running function of the first neural network. The convolutional layer structure is the structure of the convolutional layer in the first neural network, the convolutional kernel parameters are the parameters of the convolutional kernel in the first neural network, and the running function is the running function inside the first neural network.
[0061] For example, the convolution kernel parameters can specifically include parameter size.
[0062] For example, the running function can be specifically the activation function of the first neural network.
[0063] The device optimizes and updates the network structure of the second neural network based on the convolutional layer structure, convolutional kernel parameters, and running function to obtain the first feature extraction network.
[0064] For example, the device can replace the internal components and parameters of the second neural network according to the convolutional layer structure, convolutional kernel parameters, and running functions.
[0065] The recognition model creation method in this embodiment determines the convolutional layer structure, convolutional kernel parameters, and running function of the first neural network based on the network structure of the first neural network. Then, based on the convolutional layer structure, convolutional kernel parameters, and running function, the network structure of the second neural network is optimized and updated to obtain the first feature extraction network. This optimizes the computational performance of the first feature extraction network and improves its running efficiency.
[0066] In one embodiment according to this application, such as Figure 3 As shown, a method for creating a recognition model is proposed, which includes:
[0067] Step 302: Obtain the first neural network and the second neural network, and establish the first feature extraction network based on the first neural network and the second neural network;
[0068] Step 304: Create a data sliding window for the first neural network and add the data sliding window to the first neural network to obtain the second feature extraction network;
[0069] Step 306: Based on the second neural network, create a target feature fusion module for metallic materials;
[0070] Step 308: Create a recognition model for metallic materials based on the first feature extraction network, the second feature extraction network, and the target feature fusion module.
[0071] In this embodiment, the creation device creates a data sliding window for the first neural network, wherein the data sliding window is a data window for selecting data from the input data of the second feature extraction network.
[0072] The device creates a sliding window of data and adds it to the first neural network to obtain the second feature extraction network.
[0073] For example, a data sliding window may specifically include non-overlapping local windows and overlapping cross-windows.
[0074] The recognition model creation method in this embodiment creates a data sliding window for the first neural network and adds the data sliding window to the first neural network to obtain the second feature extraction network. This optimizes the computational performance of the second feature extraction network and improves its operating efficiency.
[0075] In one embodiment according to this application, such as Figure 4As shown, a method for creating a recognition model is proposed, which includes:
[0076] Step 402: Obtain the first neural network and the second neural network, and establish the first feature extraction network based on the first neural network and the second neural network;
[0077] Step 404: Based on the first neural network, establish the second feature extraction network;
[0078] Step 406: Obtain the initial feature fusion module of the second neural network;
[0079] Step 408: Create the feature channels of the second neural network and add the feature channels to the initial feature fusion module to obtain the target feature fusion module;
[0080] Step 410: Create a recognition model for metallic materials based on the first feature extraction network, the second feature extraction network, and the target feature fusion module.
[0081] In this embodiment, the device creates an initial feature fusion module for the second neural network, which is the feature fusion module corresponding to the second neural network.
[0082] For example, the initial feature fusion module can be specifically the feature fusion module corresponding to the CNN network.
[0083] The device creates feature channels for a second neural network and adds these feature channels to an initial feature fusion module to obtain a target feature fusion module. Here, the feature channels are the data channels for the input features, and the initial feature fusion module is the feature fusion module of the second neural network.
[0084] For example, the device creates a new feature channel based on the initial feature fusion module to obtain the target feature fusion module.
[0085] The recognition model creation method in this embodiment obtains the initial feature fusion module of the second neural network, creates the feature channels of the second neural network, and adds the feature channels to the initial feature fusion module to obtain the target feature fusion module, thereby improving the computational performance of the target feature fusion module and ensuring the computational performance of the recognition model.
[0086] In one embodiment according to this application, such as Figure 5 As shown, a method for creating a recognition model is proposed, which includes:
[0087] Step 502: Obtain the first neural network and the second neural network, and establish the first feature extraction network based on the first neural network and the second neural network;
[0088] Step 504: Based on the first neural network, establish the second feature extraction network;
[0089] Step 506: Based on the second neural network, create a target feature fusion module for metallic materials;
[0090] Step 508: Based on the first feature extraction network and the second feature extraction network, establish a feature extraction module for metallic materials;
[0091] Step 510: Combine the feature extraction module and the target feature fusion module to obtain the recognition model.
[0092] In this embodiment, the device combines the first feature extraction network and the second feature extraction network into a feature extraction module for metallic materials, and then combines the feature extraction module and the target feature fusion module to obtain a recognition model.
[0093] For example, the feature extraction module can be a component module of the recognition model.
[0094] The recognition model creation method in this embodiment combines the first feature extraction network and the second feature extraction network into a feature extraction module for metallic materials. Then, the feature extraction module and the target feature fusion module are combined to obtain the recognition model, which expands the application scope of the feature extraction module and thus expands the application scope of the recognition model.
[0095] The technical solution of the metal material identification method provided by this invention can be implemented by an identification device, or it can be determined according to actual usage requirements, and no specific limitation is made here. In order to more clearly describe the metal material identification method provided by this invention, the following description uses an identification device as the implementation subject.
[0096] In one embodiment according to this application, such as Figure 6 As shown, a method for identifying metallic materials is proposed, which includes:
[0097] Step 602: Acquire data images of the metallic material, and determine the image feature quantities of the data images through the recognition model;
[0098] Step 604: When the image feature quantity is less than or equal to a preset threshold, the data image is extracted by the first feature extraction network of the recognition model to obtain the first material feature.
[0099] Step 606: When the number of image features is greater than a preset threshold, the second feature extraction network of the recognition model is used to extract features from the data image to obtain the second material features.
[0100] Step 608: Determine the quality level of the metallic material based on the first material characteristic or the second material characteristic.
[0101] In this embodiment, a method for identifying metallic materials is provided. The identification device acquires data images of metallic materials and identifies image features in the data images through an identification model. The identification model is a model created by the identification model creation method in any of the above embodiments, the data image is an image of metallic materials, and the image features are features in the data image.
[0102] For example, the metallic material can be specifically scrap iron, and the data image can be specifically a two-dimensional image of the scrap iron.
[0103] If the number of image features is less than or equal to a preset threshold, it indicates that the number of features in the data image is small. The recognition device extracts features from the data image through the first feature extraction network of the recognition model to obtain the first material feature. The first material feature is the material feature determined by the first feature extraction network, and the preset threshold is a preset threshold for the number of features.
[0104] If the number of image features is greater than a preset threshold, it indicates that the number of features in the data image is large. The recognition device extracts features from the data image through the second feature extraction network of the recognition model to obtain the second material features, wherein the second material features are the material features determined by the second feature extraction network.
[0105] The identification device determines the quality level of the metallic material based on the first material characteristic or the second material characteristic, wherein the quality level is a parameter that can represent the material grade of the metallic material.
[0106] For example, the quality level can be specifically steel grade 1, steel grade 2, or steel grade 3.
[0107] For example, the identification device identifies a first material feature or a second material feature using an identification model, thereby determining the quality level.
[0108] The metal material identification method in this embodiment acquires data images of metal materials, identifies image features in the data images through an identification model, and extracts features from the data images through the first feature extraction network of the identification model when the image feature quantity is less than or equal to a preset threshold to obtain a first material feature. When the image feature quantity is greater than the preset threshold, it extracts features from the data images through the second feature extraction network of the identification model to obtain a second material feature. Then, based on the first or second material feature, the quality level of the metal material is determined, ensuring the accuracy of metal material identification and improving the precision of metal material quality level identification.
[0109] In one embodiment according to this application, such as Figure 7 As shown, a method for identifying metallic materials is proposed, which includes:
[0110] Step 702: Acquire data images of the metallic material, and determine the image feature quantities of the data images through the recognition model;
[0111] Step 704: When the image feature quantity is less than or equal to a preset threshold, the data image is feature extracted through the first feature extraction network of the recognition model to obtain the first material feature.
[0112] Step 706: When the number of image features is greater than a preset threshold, the second feature extraction network of the recognition model is used to extract features from the data image to obtain the second material features.
[0113] Step 708: Information identification is performed on the first material feature or the second material feature to obtain the material information of the metallic material;
[0114] Step 710: Determine the material information to obtain the quality level of the metallic material.
[0115] In this embodiment, the identification device identifies the first material feature or the second material feature to obtain the material information of the metal material, and then performs information judgment on the material information to determine the quality level of the metal material. The material information is information that can represent the quality of the metal material.
[0116] For example, the identification device uses an identification model to determine the material information and thus the quality level of the metallic material.
[0117] The metal material identification method in this embodiment identifies information based on a first material feature or a second material feature to obtain the material information of the metal material. Then, it performs information judgment on the material information to determine the quality level of the metal material, thus ensuring the accuracy of the material information data and improving the accuracy of the identification of the quality level of the metal material.
[0118] like Figure 8 As shown, an embodiment of the present invention provides a recognition model creation device 800, which includes:
[0119] The first processing module 802 is used to acquire a first neural network and a second neural network, and to establish a first feature extraction network based on the first neural network and the second neural network.
[0120] The first processing module 802 is also used to establish a second feature extraction network based on the first neural network;
[0121] The first processing module 802 is also used to create a target feature fusion module for metallic materials based on the second neural network;
[0122] The first processing module 802 is also used to create a recognition model for metallic materials based on the first feature extraction network, the second feature extraction network, and the target feature fusion module.
[0123] In this embodiment, an apparatus 800 for creating an identification model is provided. The identification model is used to identify metallic materials, wherein the identification model is a data model capable of identifying the quality grade of the metallic materials.
[0124] For example, the metallic material may specifically be scrap steel.
[0125] The first processing module 802 acquires the first neural network and the second neural network, and establishes a first feature extraction network based on the characteristics of the first neural network and the second neural network. The first neural network and the second neural network are preset neural networks, and the first feature extraction network is a neural network that can extract features from an image.
[0126] For example, the first neural network can be a CNN (Convolutional Neural Network) network, and the second neural network can be a Transformer (a network based on an attention mechanism) network.
[0127] For example, the first feature extraction network may be specifically a feature extraction network for simple images.
[0128] The first processing module 802 establishes a second feature extraction network based on the first neural network, wherein the second feature extraction network is a neural network capable of extracting features from an image.
[0129] For example, the second feature extraction network may specifically be a feature extraction network for complex images.
[0130] The first processing module 802 creates a target feature fusion module for metallic materials based on the second neural network, wherein the target feature fusion module is a module capable of fusing features.
[0131] For example, the target feature fusion module can be specifically a module that performs fusion processing on multiple image features.
[0132] The first processing module 802 combines the first feature extraction network, the second feature extraction network, and the target feature fusion module to create a recognition model for metallic materials.
[0133] For example, the identification model can be a data model for identifying the quality grade of scrap steel materials.
[0134] In this embodiment, the recognition model creation device 800 establishes a first feature extraction network based on the characteristics of the first neural network and the second neural network, then establishes a second feature extraction network based on the first neural network, and creates a target feature fusion module for metallic materials based on the second neural network. The first feature extraction network, the second feature extraction network, and the target feature fusion module are combined to create a recognition model for metallic materials. Through the first feature extraction network and the second feature extraction network, the application scope of the recognition model is expanded, the computational performance of the recognition model is optimized, and the recognition accuracy of the recognition model is improved.
[0135] In one embodiment of this application, the recognition model creation apparatus 800 further includes:
[0136] The first processing module 802 is also used to determine the convolutional layer structure, convolutional kernel parameters and running function of the first neural network based on the network structure of the first neural network.
[0137] The first processing module 802 is also used to update the network structure of the second neural network according to the convolutional layer structure, convolutional kernel parameters and running function, so as to obtain the first feature extraction network.
[0138] In this embodiment, the recognition model creation device 800 determines the convolutional layer structure, convolutional kernel parameters, and operating function of the first neural network based on the network structure of the first neural network. Then, based on the convolutional layer structure, convolutional kernel parameters, and operating function, it optimizes and updates the network structure of the second neural network to obtain the first feature extraction network. This optimizes the computational performance of the first feature extraction network and improves its operating efficiency.
[0139] In one embodiment of this application, the recognition model creation apparatus 800 further includes:
[0140] The first processing module 802 is also used to create a data sliding window for the first neural network and add the data sliding window to the first neural network to obtain the second feature extraction network.
[0141] The data sliding window is a data window used to select data from the input data of the second feature extraction network.
[0142] In this embodiment, the recognition model creation device 800 creates a data sliding window for the first neural network and adds the data sliding window to the first neural network to obtain the second feature extraction network. This optimizes the computational performance of the second feature extraction network and improves its operating efficiency.
[0143] In one embodiment of this application, the recognition model creation apparatus 800 further includes:
[0144] The first processing module 802 is also used to obtain the initial feature fusion module of the second neural network;
[0145] The first processing module 802 is also used to create feature channels of the second neural network and add the feature channels to the initial feature fusion module to obtain the target feature fusion module.
[0146] In this embodiment, the recognition model creation device 800 acquires the initial feature fusion module of the second neural network, creates the feature channels of the second neural network, and adds the feature channels to the initial feature fusion module to obtain the target feature fusion module, thereby improving the computational performance of the target feature fusion module and ensuring the computational performance of the recognition model.
[0147] In one embodiment of this application, the recognition model creation apparatus 800 further includes:
[0148] The first processing module 802 is also used to establish a feature extraction module for metallic materials based on the first feature extraction network and the second feature extraction network.
[0149] The first processing module 802 is also used to combine the feature extraction module and the target feature fusion module to obtain the recognition model.
[0150] For example, in the intelligent classification of scrap steel, the first processing module 802 introduces some of the latest ideas and technologies of the Transformer network into the existing modules of the CNN network, thereby combining the advantages of the two networks and improving the performance of the CNN network.
[0151] like Figure 9 As shown, the recognition model may include Conv2d(K4, s4) (a network function), Layer Norm, Downsample (sampling rate function), and ConvNeXt Block (a convolutional neural network module), with Image as the input to the recognition model.
[0152] The recognition model also includes:
[0153] Depth convolutions, unlike the bottleneck-like "thick at both ends and thin in the middle" structure of ResNet (a residual network), employ depth-wise convolutions. This increases the number of output feature channels in the main stem of the network.
[0154] Inverted bottleneck, inspired by the MLP (Multi-Layer Perceptron) module in Transformer (a network based on an attention mechanism) and the Inverted bottleneck module in MobileNet V2 (a lightweight deep neural network), is designed as a similar structure to Invertedbottleneck. This structure can improve the overall performance of the model, and its structure is as follows: Figure 10 As shown, d3X3 and 1X1 are the convolution parameters.
[0155] Large kernel size (convolution kernel parameters): In classic CNN networks, 3×3 convolution kernels are generally used, while ConvNeXt uses 7×7 convolution kernels, which achieves the optimal balance between network accuracy and parameter size.
[0156] Micro-designs (other minor adjustments): Traditional CNN networks typically use ReLU (Rectified Linear Unit) as the network's activation function. This embodiment replaces ReLU with GELU (Gaussian Error Linear Unit). Secondly, the use of activation functions is reduced; only one activation function is used per module. Thirdly, the use of regularization functions is reduced; only one regularization function is used per module, after the first layer. Finally, the regularization function BN (BatchNorm, vertical normalization) is replaced with LN (LayerNorm, horizontal normalization).
[0157] It should be noted that the Swin Transformer (a network framework) addresses the problems of the traditional Transformer by proposing a data operation that incorporates sliding windows and features a hierarchical network structure. The sliding window operation includes non-overlapping local windows and overlapping cross-windows. Restricting attention computation to a single sliding window introduces the locality of CNN convolution operations while simultaneously saving computational resources. Its network structure is as follows: Figure 11As shown, specifically, it includes an Architecture and Two Successive Swin Transformer Blocks. The Architecture includes Stage 1, Stage 2, Stage 3, Stage 4, and PatchPartition. Stage 1 includes Linear Embedding and 2 Swin Transformer Blocks. Stage 2 includes Patch Merging and 2 Swin Transformer Blocks. Stage 3 includes Patch Merging and 6 Swin Transformer Blocks. Image is the input image. In the Architecture, H is the height of the input image, W is the width of the input image, and C is the number of channels. The Two Successive Swin Transformer Blocks include MLP, LN, W-MSA (Window Multi-head Self-Attention, a type of window module), and SW-MSA (Shifted-Window Multi-head Self-Attention, a type of window module). x is the input variable.
[0158] For example, current algorithms for intelligent scrap steel grading employ Feature Pyramid Networks (FPNs) as their feature fusion module. However, their average accuracy on small objects is relatively lower than their average accuracy on medium and large objects. This is because deeper layers in a CNN, used as feature extraction layers, lead to information loss. This embodiment proposes a novel FPN scale sequence (S... 2 This paper proposes a feature extraction method to enhance the feature information of small targets. The advantage of this technical solution lies in enhancing the features of small targets, which can improve the average accuracy of small targets, and also improve the average accuracy of other scales. Its network structure is as follows: Figure 12As shown, the target feature fusion module specifically includes a Backbone, Neck, One-stage Head, Two-stage Head, and General View. The Backbone includes layers C1, C2, C3, C4, and C5, the Neck includes layers P3, P4, and P5, and the Two-stage Head includes RPN (Region Proposal Network) and Rol Head (Discrimination Head). There is a 1×1 convolutional connection between the One-stage Head and the Two-stage Head. The target feature fusion module also includes functions such as resize, Unsqueeze, and Concat. The target feature fusion module also includes 3DConv (3D convolution), BatchNorm (acceleration module), LeakyReLU (activation function), and AvgPool3d (3D average pooling).
[0159] In this embodiment, the recognition model creation device 800 combines the first feature extraction network and the second feature extraction network into a feature extraction module for metallic materials. Then, it combines the feature extraction module and the target feature fusion module to obtain a recognition model, thereby expanding the application scope of the feature extraction module and thus expanding the application scope of the recognition model.
[0160] like Figure 13 As shown, an embodiment of the present invention provides a metal material identification device 1300, which includes:
[0161] The second processing module 1302 is used to acquire data images of metallic materials and determine the image feature quantities of the data images through a recognition model.
[0162] The second processing module 1302 is also used to extract features from the data image through the first feature extraction network of the recognition model when the image feature quantity is less than or equal to a preset threshold, so as to obtain the first material feature.
[0163] The second processing module 1302 is also used to extract features from the data image through the second feature extraction network of the recognition model when the image feature quantity is greater than a preset threshold, so as to obtain the second material features.
[0164] The second processing module 1302 is also used to determine the quality level of the metallic material based on the first material characteristics or the second material characteristics.
[0165] In this embodiment, a metal material identification device 1300 is provided. The second processing module 1302 acquires data images of the metal material and identifies image features in the data image through an identification model. The identification model is a model created by the identification model creation method in any of the above embodiments, the data image is an image of the metal material, and the image features are features in the data image.
[0166] For example, the metallic material can be specifically scrap iron, and the data image can be specifically a two-dimensional image of the scrap iron.
[0167] If the number of image features is less than or equal to a preset threshold, it indicates that the number of features in the data image is small. The second processing module 1302 extracts features from the data image through the first feature extraction network of the recognition model to obtain the first material feature. The first material feature is the material feature determined by the first feature extraction network, and the preset threshold is a preset threshold for the number of features.
[0168] If the number of image features is greater than a preset threshold, it indicates that the number of features in the data image is large. The second processing module 1302 extracts features from the data image through the second feature extraction network of the recognition model to obtain the second material features, wherein the second material features are the material features determined by the second feature extraction network.
[0169] The second processing module 1302 determines the quality level of the metallic material based on the first material characteristic or the second material characteristic, wherein the quality level is a parameter that can represent the material grade of the metallic material.
[0170] For example, the quality level can be specifically steel grade 1, steel grade 2, or steel grade 3.
[0171] For example, the identification device identifies a first material feature or a second material feature using an identification model, thereby determining the quality level.
[0172] In this embodiment, the metal material identification device 1300 acquires data images of metal materials. Through an identification model, it identifies image feature quantities in the data images. When the image feature quantity is less than or equal to a preset threshold, the first feature extraction network of the identification model extracts features from the data images to obtain first material features. When the image feature quantity is greater than the preset threshold, the second feature extraction network of the identification model extracts features from the data images to obtain second material features. Then, based on the first or second material features, the quality level of the metal material is determined, ensuring the accuracy of metal material identification and improving the precision of metal material quality level identification.
[0173] In one embodiment of this application, the metal material identification device 1300 further includes:
[0174] The second processing module 1302 is also used to identify information about the first material feature or the second material feature in order to obtain material information of the metallic material;
[0175] The second processing module 1302 is also used to determine the material information in order to obtain the quality level of the metal material.
[0176] In this embodiment, the metal material identification device 1300 identifies the first material feature or the second material feature to obtain the material information of the metal material, and then performs information judgment on the material information to determine the quality level of the metal material, thereby ensuring the accuracy of the material information data and improving the identification accuracy of the quality level of the metal material.
[0177] In one embodiment according to this application, such as Figure 14 As shown, a recognition model creation apparatus 1400 is proposed. The recognition model creation apparatus 1400 includes a processor 1402 and a memory 1404. The memory 1404 stores a program or instructions, which, when executed by the processor 1402, implement the steps of the recognition model creation method as described in any of the above embodiments. Therefore, the recognition model creation apparatus 1400 possesses all the beneficial effects of the recognition model creation method in any of the above embodiments, which will not be elaborated further here.
[0178] In one embodiment according to this application, such as Figure 15 As shown, a metal material identification device 1500 is proposed. The metal material identification device 1500 includes a processor 1502 and a memory 1504. The memory 1504 stores a program or instructions, which, when executed by the processor 1502, implement the steps of the metal material identification method as described in any of the above embodiments. Therefore, the metal material identification device 1500 possesses all the beneficial effects of the metal material identification method in any of the above embodiments, which will not be elaborated further here.
[0179] In one embodiment of this application, a readable storage medium is provided, on which a program is stored. When the program is executed by a processor, it implements the method for creating an identification model as described in any of the above embodiments and the method for identifying metallic materials as described in any of the above embodiments, and thus has all the beneficial technical effects of the method for creating an identification model as described in any of the above embodiments and the method for identifying metallic materials as described in any of the above embodiments.
[0180] Among them, readable storage media include read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0181] It should be clarified that in the claims, description, and accompanying drawings of this invention, the term "plural" refers to two or more. Unless otherwise explicitly defined, the terms "upper," "lower," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing the invention and simplifying the description process, not to indicate or imply that the device or element referred to must have the described specific orientation, or be constructed and operated in a specific orientation. Therefore, these descriptions should not be construed as limiting the invention. The terms "connection," "installation," "fixing," etc., should be interpreted broadly. For example, "connection" can be a fixed connection between multiple objects, a detachable connection between multiple objects, or an integral connection; it can be a direct connection between multiple objects or an indirect connection between multiple objects through an intermediate medium. For those skilled in the art, the specific meaning of the above terms in this invention can be understood based on the specific circumstances of the above data.
[0182] In the claims, description, and accompanying drawings of this invention, the terms "one embodiment," "some embodiments," "specific embodiment," etc., refer to a specific feature, structure, material, or characteristic described in connection with that embodiment or example, which is included in at least one embodiment or example of the invention. In the claims, description, and accompanying drawings of this invention, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0183] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for identifying metallic materials, characterized in that, The method for identifying the metallic material includes: Data images of the metallic material are acquired, and image feature quantities of the data images are determined through a recognition model; When the image feature quantity is less than or equal to a preset threshold, the data image is subjected to feature extraction through the first feature extraction network of the recognition model to obtain the first material feature. If the number of image features is greater than the preset threshold, the second feature extraction network of the recognition model is used to extract features from the data image to obtain the second material features. The quality level of the metallic material is determined based on the first material characteristic or the second material characteristic; The method for creating the recognition model includes: Obtain a first neural network and a second neural network, and establish a first feature extraction network based on the first neural network and the second neural network; Based on the first neural network, a second feature extraction network is established; Based on the second neural network, a target feature fusion module for the metallic material is created; The identification model of the metallic material is created based on the first feature extraction network, the second feature extraction network, and the target feature fusion module.
2. The method for identifying metallic materials according to claim 1, characterized in that, The step of establishing the first feature extraction network based on the first neural network and the second neural network specifically includes: Based on the network structure of the first neural network, determine the convolutional layer structure, convolutional kernel parameters, and running function of the first neural network; The network structure of the second neural network is updated based on the convolutional layer structure, the convolutional kernel parameters, and the running function to obtain the first feature extraction network.
3. The method for identifying metallic materials according to claim 1, characterized in that, The step of establishing a second feature extraction network based on the first neural network specifically includes: Create a data sliding window for the first neural network, and add the data sliding window to the first neural network to obtain the second feature extraction network; The data sliding window is a data window used to select data from the input data of the second feature extraction network.
4. The method for identifying metallic materials according to any one of claims 1 to 3, characterized in that, The step of creating the target feature fusion module for the metallic material based on the second neural network specifically includes: Obtain the initial feature fusion module of the second neural network; The feature channels of the second neural network are created and added to the initial feature fusion module to obtain the target feature fusion module.
5. The method for identifying metallic materials according to any one of claims 1 to 3, characterized in that, The step of creating the recognition model for the metallic material based on the first feature extraction network, the second feature extraction network, and the target feature fusion module specifically includes: Based on the first feature extraction network and the second feature extraction network, a feature extraction module for the metallic material is established; The feature extraction module and the target feature fusion module are combined to obtain the recognition model.
6. The method for identifying metallic materials according to claim 1, characterized in that, Determining the quality level of the metallic material based on the first material characteristic or the second material characteristic specifically includes: Information identification is performed on the first material feature or the second material feature to obtain the material information of the metallic material; The material information is analyzed to determine the quality level of the metallic material.
7. A device for identifying metallic materials, characterized in that, include: processor; A memory containing a program or instructions, wherein the processor, when executing the program or instructions in the memory, implements the steps of the method for identifying metallic materials as described in any one of claims 1 to 6.
8. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the method for identifying metallic materials as described in any one of claims 1 to 6.