Converter splash recognition method based on transfer learning and dual attention mechanism residual network
By adopting transfer learning and dual attention mechanism residual network in the converter metallurgy process, the problems of low accuracy and poor adaptability of converter splash degree recognition are solved, and the accuracy of accurate identification of converter splash degree and self-healing control are achieved.
Patent Information
- Application Number
- CN202410355686.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-27
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2044-03-27
AI Technical Summary
The prior art is difficult to accurately identify and classify splashing phenomena of varying degrees during converter metallurgy, resulting in low recognition accuracy and poor adaptability.
Transfer learning and dual attention mechanism residual network are adopted, and the first three residual blocks in the pre-trained ResNet18 network are used as feature extractors, and combined with spatial and channel attention mechanisms, the network's identification accuracy of the converter splash degree is improved.
It effectively improves the accuracy of deep neural networks to identify the degree of converter splash and the adaptability of the model, realizes the accurate identification of the degree of converter splash and enhances the accuracy of splash self-healing control.
Smart Images

Figure CN118196519B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of intelligent control process technology for industrial production, and specifically relates to a method for identifying converter splashing using a transfer learning and dual attention mechanism residual network. Background Art
[0002] Splashing is an abnormal phenomenon in the converter process, which will affect the stability of the converter process and endanger the safety of operators. Splashing will also cause the loss of molten steel temperature and slag, directly affecting the final quality of molten steel. Large-scale splashing may even pose a serious threat to production safety. Studies have shown that scalding accidents caused by converter splashing account for more than 80% of scalding accidents in front of the furnace; the metal loss rate caused by converter splashing is 0.5% to 5%. When severe splashing occurs, the loss of metal material can even reach more than 10%. From the analysis of the loading system, slag making system, oxygen supply system, temperature system and other aspects, the main factors causing converter splashing include the depth of the molten pool, the content of silicon and phosphorus in the molten iron, the amount of slag added and the FeO content of the slag, the oxygen supply flow rate and pressure, the temperature of the molten iron, etc. There are many chain relationships between these factors, that is, the abnormal state of one factor may cause other factors to be in an abnormal state. Therefore, the occurrence of a converter splashing accident may be the result of the combined action of multiple factors. In the converter production process, audio slag, image recognition and other technologies can be used to identify possible splashing phenomena. In contrast, image-based recognition technology is expected to achieve visualization, be unaffected by on-site noise, and accurately identify different degrees of splashing. According to the recognition results, the gun can be raised to reduce the oxygen flow or lowered to increase the oxygen flow according to the different degrees of splashing. Or ore can be added to perform slag-forming operations to improve the viscosity and fluidity of the slag layer to inhibit further deterioration of splashing. Therefore, the use of intelligent networks to accurately identify different degrees of splashing is expected to provide an accurate recognition model for later image-based splashing self-healing control.
[0003] In recent years, various image recognition and processing technologies have been proposed, such as classification and recognition technology based on convolutional neural networks, image recognition technology based on support vector machines, and image classification and recognition technology based on residual networks. However, conventional or simple intelligent networks are difficult to fully handle the problems of data imbalance and type boundary fuzziness in converter splashing images, and cannot accurately identify converter splashing degree images, which limits the practical application value of these algorithms in the converter splashing process.
[0004] Therefore, it is urgent to provide an accurate method that can improve the image recognition and classification of converter splashing degree, so as to solve the problem of high-precision and high-adaptability splashing degree identification in converter metallurgical processes where standard and sufficient image data cannot be obtained. Summary of the invention
[0005] In response to the problems existing in the above-mentioned prior art, the present invention provides a method for identifying converter spattering using transfer learning and a dual attention mechanism residual network. The method can reduce the demand for image data resources and computing resources required for training network models, and can effectively improve the accuracy of the deep neural network for identifying the degree of converter spattering and the adaptability of the model, thereby achieving accurate identification of the degree of converter spattering.
[0006] In order to achieve the above object, the present invention provides a converter splash recognition method based on transfer learning and dual attention mechanism residual network, comprising the following steps:
[0007] Step 1: Obtain a converter image dataset with different spattering degrees;
[0008] An industrial camera installed opposite the furnace mouth was used to capture images of different degrees of converter splashing. The specific process is as follows:
[0009] S11: Based on the phenomenon that the brightness of the converter furnace mouth area changes when the furnace mouth flame changes, the brightness range is determined to determine whether splashing occurs, and after confirming that splashing occurs, an image is captured at a set short interval;
[0010] S12: In the case where no splashing occurs, a long interval is set manually to take snapshots according to the actual situation;
[0011] S13: For the collected images, classify them according to expert experience and label them to meet the requirements of supervised learning;
[0012] Step 2: Preprocess the acquired image data. The specific process is as follows:
[0013] S21: Undersample the data and delete some images of categories with a large number to prevent the network model from paying too much attention to categories with a large number;
[0014] S22: compress and randomly crop the image, compress the image to a uniform size of 256×256, and then randomly crop an image of 224×224 size from it;
[0015] S23: in training mode, randomly changing the brightness of the image within a pixel range of 0.8 to 1.2;
[0016] S24: In training mode, randomly rotate the image within a range of 90 degrees;
[0017] S25: In training mode, randomly flip the image horizontally with a probability of 0.5;
[0018] S26: Divide the data set into a training set and a test set in a ratio of 8:2, and then extract 50% of the test set as a validation set;
[0019] Step 3: Build a network model based on fusion transfer learning and residual network with dual attention mechanism. The specific process is as follows:
[0020] S31: Select the first three residual blocks in the ResNet18 network pre-trained on the ImageNet dataset as the preliminary feature extractor of this network;
[0021] S32: Construct the spatial attention mechanism and the channel attention mechanism, and connect them in parallel. The specific process is as follows:
[0022] C1: Construct a spatial attention mechanism. The specific steps are as follows:
[0023] C11: Feature fusion; according to formulas (1) and (2), the feature maps are aggregated along the channel direction using maximum pooling and mean pooling to generate two two-dimensional feature maps. Specifically, the feature map F obtained by maximum pooling along the channel direction is obtained using formula (1). max (i, j), and use formula (2) to obtain the feature map F obtained by mean pooling along the channel direction avg (i,j);
[0024] F max (i,j)=max(F c (i,j))(1);
[0025]
[0026] In the formula, is the input feature map, i,j are spatial positions; c is the channel index; H is the pixel height of the image; W is the pixel width of the image;
[0027] C12: Spatial feature weight generation; F max (i,j) and F avg The two feature maps (i, j) are concatenated in the channel dimension, and then a convolutional layer is used to generate a spatial attention map. Finally, the result is passed through the Sigmoid function to obtain the spatial feature weight W. spatial Specifically, the spatial feature weight W is generated using formula (3) spatial ;
[0028] W spatial =σ(f([F max ; F avg ]))(3);
[0029] Where, [;] is the concatenation operation in the channel dimension; σ is the Sigmoid activation function;
[0030] C13: Feature map weighting; the spatial feature weight W spatial Applied to the original input features to learn the importance of different regions in the space. Specifically, the weighted feature map is calculated using formula (4):
[0031]
[0032] In the formula, is element-wise multiplication;
[0033] C2: Construct a channel attention mechanism. The specific steps are as follows:
[0034] C21: Feature compression; use global maximum pooling and global average pooling methods on the feature map to capture the average information within the channel and the most significant feature response at the same time. Specifically, the global average value of the Cth channel is calculated according to formula (5): According to formula (6), the global maximum value of the Cth channel is calculated
[0035]
[0036] C22: Feature excitation: A fully connected layer with a 2-layer bottleneck structure and a Sigmoid function are used to generate weights for each feature channel to explicitly model the correlation between feature channels. Specifically, the weight coefficient S of each channel is calculated using formula (7):
[0037] S=σ(g(Z,W))=σ(W2δ(W1Z))(7);
[0038] Where Z is the global feature vector obtained by the Squeeze operation; W1 is the weight of the first fully connected layer, and its dimension is For dimensionality reduction; δ is the ReLU activation function; W2 is the weight of the second fully connected layer, and its dimension is Used for dimension upgrading;
[0039] C23: Feature map weighting: After obtaining the weight of each feature channel, the weight is applied to each original feature channel to learn the importance of different channels. Specifically, the feature map after channel attention weighting is calculated using formula (8);
[0040]
[0041] In the formula, S C is the weight coefficient of the Cth channel;
[0042] C3: Construct a dual attention mechanism; divide the feature map into two branches, which are weighted by the spatial attention mechanism and the channel attention mechanism respectively, and then combine the two sets of weighted features in an additive manner to obtain a weighted feature map of the dual attention mechanism;
[0043] S33: Map the final feature representation f to the sample's label space through the fully connected layer. The mapping process is completed by the weight matrix W and the bias term b. Specifically, the output vector z after mapping is calculated using formula (9);
[0044] z=W·f+b(9);
[0045] S34: Obtain the probability distribution vector of the corresponding mark of the mapped output vector z according to formula (10) Then, the classification results are obtained according to the size of the probability;
[0046]
[0047] Step 4: Use the training set data to train the constructed network model. The specific process is as follows:
[0048] S41: Use formula (11) to construct the target loss function FL(p t );
[0049] FL(p t )=-α t (1-p t ) γ log(p t )(11);
[0050] In the formula, p t It is the probability value of the output result of the network model classification after softmax; (1-p t ) γ is a modulation factor used to reduce the loss contribution of easy-to-classify samples; α t is the class weight coefficient to improve the loss of minority samples;
[0051] S42: Network training: The training set data is input into the network model for training in batch training mode. The batch size is set to 32. The Adam optimizer is used to continuously update the network parameters to minimize the value of the loss function.
[0052] S43: saving the network weight parameters and testing them on the test set to obtain a converter splashing degree recognition model;
[0053] Step 5: In the actual converter production process of the factory, the converter splashing image is collected by an industrial camera, and then the converter splashing image is identified by the converter splashing degree recognition model, and then the obtained recognition result is output to the display for real-time display.
[0054] As a preferred embodiment, in step 4 S42, the update rule of Adam is as shown in formula (12);
[0055]
[0056] In the formula, θ t are model parameters; η is the learning rate; ε is a small constant added for numerical stability; is the first-order moment estimate correction, is the first moment estimate of the gradient, is the second-order moment estimate correction, is the second-order moment estimate of the gradient, g t is the gradient of the current iteration; β1 and β2 are the decay rates of the first-order and second-order moment estimates, respectively, and are usually taken as 0.9 and 0.999.
[0057] As a preference, in step one, the shooting distance is 25 m; in step one S11, the short interval time is set to 2 s; and in step one S12, the long interval time is set to be greater than 2 s.
[0058] As a preferred embodiment, in step 2 S26, before dividing the data set, the data is first standardized by formula (13);
[0059]
[0060] Where x is the original pixel value; μ is the mean value of the image pixel; σ is the standard deviation of the image pixel.
[0061] In the converter smelting process, splashing is a common abnormal condition, which not only causes the loss of molten steel slag and temperature fluctuations, affects the stability of the reaction and the quality of molten steel, but also poses a potential threat to production safety. Based on the transfer learning technology, the present invention proposes a method for constructing an image classification model by fusing a residual neural network with a dual attention mechanism to achieve high-precision automatic recognition of the degree of splashing of converter flames. In order to solve the problem of insufficient splashing type image data in actual production, the transfer learning technology is adopted, and the first three residual blocks in the pre-trained ResNet18 network are used as feature extractors, and the knowledge that the network has been trained in the source domain is used to reduce the demand for image data resources and computing resources required for training the network model, and improve the generalization ability of the network model. At the same time, a dual attention mechanism is designed, and the extracted preliminary features are extracted in parallel in the spatial and channel dimensions using the spatial channel dual attention mechanism to improve the network model's ability to extract important information in the spatial and channel dimensions, thereby further improving the network's ability to capture key features. In order to solve the problem of unbalanced distribution of image samples, a Focal Loss function is introduced to give higher weights to categories with fewer numbers, thus solving the problem of unbalanced sample distribution. The method of the invention improves the accuracy of splash recognition in the actual converter production process.
[0062] The present invention provides a method for identifying the degree of spattering of a converter based on a residual network that integrates transfer learning technology and a dual attention mechanism, which effectively improves the accuracy of the deep neural network for identifying the degree of spattering of the converter and the adaptability of the model, and achieves accurate identification of the degree of spattering of the converter. The present invention effectively solves the shortcomings of poor classification effect and adaptability of traditional networks, accurately identifies the degree of spattering of the converter, and provides an accurate identification model for the subsequent image-based spattering self-healing control. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 is a flow chart of the present invention;
[0064] Figure 2 It is a training set accuracy curve diagram of the network model in the present invention;
[0065] Figure 3 It is a validation set accuracy curve diagram of the network model in the present invention;
[0066] Figure 4 is a training set loss curve diagram of the network model in the present invention;
[0067] Figure 5 It is a validation set loss curve diagram of the network model in the present invention. DETAILED DESCRIPTION
[0068] The present invention will be further described below in conjunction with the accompanying drawings.
[0069] like Figures 1 to 5 As shown, the present invention provides a method for identifying converter splashing using transfer learning and a dual attention mechanism residual network, comprising the following steps:
[0070] Step 1: Obtain a converter image dataset with different spattering degrees;
[0071] An industrial camera installed opposite the furnace mouth was used to capture images of different degrees of converter splashing. The specific process is as follows:
[0072] S11: Based on the phenomenon that the brightness of the converter furnace mouth area changes when the furnace mouth flame changes, the brightness range is determined to determine whether splashing occurs, and after confirming that splashing occurs, an image is captured at a set short interval;
[0073] S12: In the case where no splashing occurs, a long interval is set manually to take snapshots according to the actual situation;
[0074] S13: For the collected images, classify them according to expert experience and label them to meet the requirements of supervised learning;
[0075] Step 2: Preprocess the acquired image data. The specific process is as follows:
[0076] S21: Undersample the data and delete some images of categories with a large number to prevent the network model from paying too much attention to categories with a large number;
[0077] S22: compress and randomly crop the image, compress the image to a uniform size of 256×256, and then randomly crop an image of 224×224 size from it;
[0078] S23: in training mode, randomly changing the brightness of the image within a pixel range of 0.8 to 1.2;
[0079] S24: In training mode, randomly rotate the image within a range of 90 degrees;
[0080] S25: In training mode, randomly flip the image horizontally with a probability of 0.5;
[0081] S26: Divide the data set into a training set and a test set in a ratio of 8:2, and then extract 50% of the test set as a validation set;
[0082] Step 3: Build a network model based on fusion transfer learning and residual network with dual attention mechanism, and integrate the dual attention mechanism into the pre-trained ResNet network model. The specific process is as follows:
[0083] S31: The first three residual blocks in the ResNet18 network pre-trained on the ImageNet dataset are selected as the preliminary feature extractors of this network; the main structural parameters of the selected ResNet18 are shown in Table 1;
[0084] Table 1 Main structural parameters of ResNet18
[0085]
[0086]
[0087] The basic residual block (BasicBlock) in ResNet18 is the basic building block of the residual network, which is used to build a deep network structure. This BasicBlock block introduces a residual connection to alleviate the gradient vanishing problem in deep network training, making it easier for the model to learn the identity mapping.
[0088] The basic residual block consists of two layers of convolutional structures:
[0089] The first convolutional layer uses a 3x3 convolution kernel with a stride of 1, which does not change the size of the input. The BatchNormalization layer is used to speed up the training process. ReLU (Rectified Linear Unit) is used as the nonlinear activation function to increase the nonlinear mapping capability, as shown in formula (a);
[0090] conv1=ReLU(BatchNorm(Conv(input)))(a);
[0091] Compared with the first layer, the second convolution removes the nonlinear activation function, as shown in formula (b);
[0092] conv2=BatchNorm(Conv(conv1))(b);
[0093] The residual connection forms the output of the residual block by adding the input to the convolution output through a shortcut path. If the dimension of the input is different from the dimension of the convolution output, an additional convolution layer is required to adjust it, as shown in formula (c);
[0094] output = conv2 + h(input)(c);
[0095] In the formula, h(input) is a transformation of input, usually selected as h(input) = input. This can make the network converge faster and more easily approach the optimal value.
[0096] The specific reasons are given by the following deduction:
[0097] Rewrite formula (c) as formula (d);
[0098] X l+1 =h(X l )+F(X l ,W l )(d);
[0099] In the formula, X l is the input of the lth residual block; X l+1 is the output of the lth residual block; F is the residual function.
[0100] Assume h(X l )=λ l X l , then formula (d) can be written as formula (e);
[0101] X l+1 =λ l X l +F(X l ,W l )(e);
[0102] For a deeper network structure, there is formula (f);
[0103]
[0104] Where L is the number of residual blocks stacked;
[0105] Formula (f) can be simplified to formula (g);
[0106]
[0107] To simplify the problem, only consider The loss function ε is the loss function of X l Taking partial derivatives we get formula (h);
[0108]
[0109] It can be obtained that when λ l > 1, gradient explosion is likely to occur; when λ l <1, gradient disappearance is likely to occur; and if h(X l ) is a more complex formula, where becomes It also affects the information transfer during the back propagation of the residual network. l Can only be 1.
[0110] The design of the basic residual block allows information to propagate more freely in the network, which helps to alleviate the gradient vanishing problem and improve the training effect of the network.
[0111] S32: Construct the spatial attention mechanism and the channel attention mechanism, and connect them in parallel. The specific process is as follows:
[0112] C1: Construct a spatial attention mechanism. The specific steps are as follows:
[0113] C11: Feature fusion; according to formulas (1) and (2), the feature maps are aggregated along the channel direction using maximum pooling and mean pooling to generate two two-dimensional feature maps. Specifically, the feature map F obtained by maximum pooling along the channel direction is obtained using formula (1). max (i, j), and use formula (2) to obtain the feature map F obtained by mean pooling along the channel direction avg (i,j);
[0114] F max (i,j)=max(F c (i,j))(1);
[0115]
[0116] In the formula, is the input feature map, F max , i,j are spatial positions; c is the channel index; H is the pixel height of the image; W is the pixel width of the image;
[0117] C12: Spatial feature weight generation; F max (i,j) and F avg The two feature maps (i, j) are concatenated in the channel dimension, and then a convolutional layer is used to generate a spatial attention map. Finally, the result is passed through the Sigmoid function to obtain the spatial feature weight W. spatial Specifically, the spatial feature weight W is generated using formula (3) spatial ;
[0118] W spatial =σ(f([F max ; F avg ]))(3);
[0119] Where, [;] is the concatenation operation in the channel dimension; σ is the Sigmoid activation function;
[0120] C13: Feature map weighting; the spatial feature weight W spatial Applied to the original input features to learn the importance of different regions in the space. Specifically, the weighted feature map is calculated using formula (4):
[0121]
[0122] In the formula, is element-wise multiplication;
[0123] C2: Construct a channel attention mechanism. The specific steps are as follows:
[0124] C21: Feature compression; use global maximum pooling and global average pooling methods on the feature map to capture the average information within the channel and the most significant feature response at the same time. Specifically, the global average value of the Cth channel is calculated according to formula (5): According to formula (6), the global maximum value of the Cth channel is calculated
[0125]
[0126] C22: Feature excitation: A fully connected layer with a 2-layer bottleneck structure (first dimension reduction and then dimension increase) and a Sigmoid function are used to generate weights for each feature channel to explicitly model the correlation between feature channels. Specifically, the weight coefficient S of each channel is calculated using formula (7):
[0127] S=σ(g(Z,W))=σ(W2δ(W1Z))(7);
[0128] Where Z is the global feature vector obtained by the Squeeze operation; W1 is the weight of the first fully connected layer, and its dimension is For dimensionality reduction; δ is the ReLU activation function; W2 is the weight of the second fully connected layer, and its dimension is Used for dimension upgrading;
[0129] C23: Feature map weighting: After obtaining the weight of each feature channel, the weight is applied to each original feature channel to learn the importance of different channels. Specifically, the feature map after channel attention weighting is calculated using formula (8);
[0130]
[0131] In the formula, S C is the weight coefficient of the Cth channel;
[0132] C3: Construct a dual attention mechanism; divide the feature map into two branches, which are weighted by the spatial attention mechanism and the channel attention mechanism respectively, and then combine the two sets of weighted features in an additive manner to obtain a weighted feature map of the dual attention mechanism;
[0133] S33: Map the final feature representation f to the sample's label space through the fully connected layer. The mapping process is completed by the weight matrix W and the bias term b. Specifically, the output vector z after mapping is calculated using formula (9);
[0134] z=W·f+b(9);
[0135] S34: To obtain the probability distribution vector corresponding to the mark Use the softmax function to transform z. Specifically, according to formula (10), the probability distribution vector of the corresponding label of the mapped output vector z is obtained: Then, the classification results are obtained according to the size of the probability;
[0136]
[0137] In the formula, Where C is the total number of markers.
[0138] This probability distribution vector represents the likelihood that the sample belongs to each label and is used for classification tasks.
[0139] Step 4: Use the training set data to train the constructed network model. The specific process is as follows:
[0140] S41: Use formula (11) to construct the target loss function FL(p t );
[0141] FL(p t )=-α t (1-p t ) γ log(p t ) (11);
[0142] In the formula, p t It is the probability value of the output result of the network model classification after softmax; (1-p t ) γ is a modulation factor used to reduce the loss contribution of easy-to-classify samples; α t is the class weight coefficient to improve the loss of minority samples;
[0143] S42: Network training: The training set data is input into the network model for training in batch training mode. The batch size is set to 32. The Adam optimizer is used to continuously update the network parameters to minimize the value of the loss function.
[0144] S43: saving the network weight parameters and testing them on the test set to obtain a converter splashing degree recognition model;
[0145] Step 5: In the actual converter production process of the factory, an industrial camera is used to collect the converter splashing image, and then the converter splashing image is identified using the converter splashing degree recognition model. The obtained recognition result is then output to the display for real-time display, so that the operator can take corresponding measures in time according to the recognition result, such as raising the gun to reduce the oxygen flow or lowering the gun to increase the oxygen flow, and slagging operation can also be performed by adding ore to improve the viscosity and fluidity of the slag layer to inhibit further deterioration of the splashing.
[0146] As a preferred embodiment, in step 4 S42, the update rule of Adam is as shown in formula (12);
[0147]
[0148] In the formula, θ t are model parameters; η is the learning rate; ε is a small constant added for numerical stability; is the first-order moment estimate correction, is the first-order moment estimate of the gradient, is the second-order moment estimate correction, is the second-order moment estimate of the gradient, g t is the gradient of the current iteration; β1 and β2 are the decay rates of the first-order and second-order moment estimates, respectively, and are usually taken as 0.9 and 0.999.
[0149] As a preference, in step one, the shooting distance is 25 m; in step one S11, the short interval time is set to 2 s; and in step one S12, the long interval time is set to be greater than 2 s.
[0150] As a preferred embodiment, in step 2 S26, before dividing the data set, the data is first standardized by formula (13);
[0151]
[0152] Where x is the original pixel value; μ is the mean value of the image pixel; σ is the standard deviation of the image pixel.
[0153] Experimental analysis:
[0154] This application takes the converter system for smelting Q195 steel as the object, and uses an industrial camera to collect image data of converter splashing during the converter production process in an actual factory. The collected data was handed over to experts for screening and classification, and a total of 719 pictures were obtained, which can be divided into 6 categories, including: 45 small flame jumping images, 44 large flame jumping images, 49 slag jumping and overflowing images, 151 splashing mid-term images, 130 splashing late-stage images, and 300 non-splashing images. Because in actual engineering production, the number of non-splashing cases is far greater than that of splashing, in the collected data, the number of non-splashing category data is far greater than that of other categories. Therefore, first of all, the undersampling method is adopted to sample the non-splashing type data into 147 pictures, so as to reduce the impact of sample offset to a certain extent.
[0155] For the data obtained after undersampling, the training set and the test set are divided in a ratio of 8:2, and 50% of the data in the test set is extracted as the validation set. Then, the training data is transformed and enhanced to expand the diversity of the training set. Through random cropping, random brightness change, random rotation, random left and right flipping and other operations, the model can better learn the features under different angles, lighting conditions, scales and other changes, and improve its classification accuracy of images in different situations. For the enhanced data, it is standardized to standardize the pixel values of the image to a uniform range, which helps to reduce the brightness and contrast differences between images and improve the robustness of the model to the input data. At the same time, it can accelerate the training convergence process of the model, making it easier for the model to learn the effective features of the data. And due to the sensitivity of neural networks to input data, image normalization can also effectively prevent problems such as model weight explosion or gradient disappearance. Specifically, according to the normalization formula (12), the normalized pixel value is obtained
[0156] For the problems with small flame amplitude, large flame fluctuation, and slag jumping and overflow, the Focal Loss function is used to give a small number of categories a higher weight. Adam is selected as the network optimizer, the learning rate is 0.001, the number of training rounds is 30, the first three residual blocks of the ResNet network are selected as the initial feature extractor, and the α in FocalLoss is t The training batch size is 32.
[0157] To verify the effectiveness of the proposed algorithm, a comparative test was conducted with the traditional ResNet18 and AlexNet. It is used to measure the proportion of correctly classified samples among all samples. i The number of samples that correctly predict the true classification i as classification i, FP iThe number of samples that mistakenly predict other categories as category i; Precision It is used to measure how many samples predicted as positive by the model are actually positive.
[0158] The calculation results of the evaluation indicators of each model are shown in Table 2. It can be seen that the proposed model shows better performance than other models in the evaluation indicators, which reflects the effectiveness and superiority of the proposed model. The training set and validation set accuracy curves of the model training process are shown in Table 2. Figure 1 and Figure 2 As shown in , it can be seen that the proposed model overcomes the overfitting effect in the training set, thus having a higher accuracy on the validation set, reflecting the generalization ability of the proposed model. The loss curves of the training set and validation set are shown in Figure 3 and Figure 4 As shown, it can be seen that the proposed model has a faster convergence speed.
[0159] Table 2 Calculation results of evaluation indicators of each model
[0160]
[0161] In the converter smelting process, splashing is a common abnormal condition, which not only causes the loss of molten steel slag and temperature fluctuations, affects the stability of the reaction and the quality of molten steel, but also poses a potential threat to production safety. Based on the transfer learning technology, the present invention proposes a method for constructing an image classification model by fusing a residual neural network with a dual attention mechanism to achieve high-precision automatic recognition of the degree of splashing of converter flames. In order to solve the problem of insufficient splashing type image data in actual production, the transfer learning technology is adopted, and the first three residual blocks in the pre-trained ResNet18 network are used as feature extractors, and the knowledge that the network has been trained in the source domain is used to reduce the demand for image data resources and computing resources required for training the network model, and improve the generalization ability of the network model. At the same time, a dual attention mechanism is designed, and the extracted preliminary features are extracted in parallel in the spatial and channel dimensions using the spatial channel dual attention mechanism to improve the network model's ability to extract important information in the spatial and channel dimensions, thereby further improving the network's ability to capture key features. In order to solve the problem of unbalanced distribution of image samples, a Focal Loss function is introduced to give higher weights to categories with fewer numbers, thus solving the problem of unbalanced sample distribution. The method of the invention improves the accuracy of splash recognition in the actual converter production process.
[0162] In summary, the present invention provides a method for identifying the degree of spattering of a converter based on a residual network that integrates transfer learning technology and a dual attention mechanism, which effectively improves the accuracy of the deep neural network for identifying the degree of spattering of the converter and the adaptability of the model, and achieves accurate identification of the degree of spattering of the converter. The present invention effectively solves the shortcomings of poor classification effect and adaptability of traditional networks, accurately identifies the degree of spattering of the converter, and provides an accurate identification model for the subsequent image-based spattering self-healing control.
Claims
1. A converter splash recognition method based on transfer learning and dual attention mechanism residual network, characterized in that: The steps include: Step 1: Obtain a converter image dataset with different spattering degrees; An industrial camera installed opposite the furnace mouth was used to capture images of different degrees of converter splashing. The specific process is as follows: S11: Based on the phenomenon that the brightness of the converter furnace mouth area changes when the furnace mouth flame changes, the brightness range is determined to determine whether splashing occurs, and after confirming that splashing occurs, an image is captured at a set short interval; S12: In the case where no splashing occurs, a long interval is set manually to take snapshots according to the actual situation; S13: For the collected images, classify them according to expert experience and label them to meet the requirements of supervised learning; Step 2: Preprocess the acquired image data. The specific process is as follows: S21: Undersample the data and delete some images of categories with a large number to prevent the network model from paying too much attention to categories with a large number; S22: compress and randomly crop the image, compress the image to a uniform size of 256×256, and then randomly crop an image of 224×224 size from it; S23: in training mode, randomly changing the brightness of the image within a pixel range of 0.8 to 1.2; S24: In training mode, randomly rotate the image within a range of 90 degrees; S25: In training mode, randomly flip the image horizontally with a probability of 0.5; S26: Divide the data set into a training set and a test set in a ratio of 8:2, and then extract 50% of the test set as a validation set; Step 3: Build a network model based on fusion transfer learning and residual network with dual attention mechanism. The specific process is as follows: S31: Select the first three residual blocks in the ResNet18 network pre-trained on the ImageNet dataset as the preliminary feature extractor of this network; S32: Construct the spatial attention mechanism and the channel attention mechanism, and connect them in parallel. The specific process is as follows: C1: Construct a spatial attention mechanism. The specific steps are as follows: C11: Feature fusion; according to formulas (1) and (2), the feature maps are aggregated along the channel direction using maximum pooling and mean pooling to generate two two-dimensional feature maps. Specifically, the feature map F obtained by maximum pooling along the channel direction is obtained using formula (1). max (i, j), and use formula (2) to obtain the feature map F obtained by mean pooling along the channel direction avg (i,j); F max (i,j)=max(F c (i,j))(1); In the formula, is the input feature map, i,j are spatial positions; c is the channel index; H is the pixel height of the image; W is the pixel width of the image; C12: Spatial feature weight generation; F max (i,j) and F avg The two feature maps (i, j) are concatenated in the channel dimension, and then a convolutional layer is used to generate a spatial attention map. Finally, the result is passed through the Sigmoid function to obtain the spatial feature weight W. spatial Specifically, the spatial feature weight W is generated using formula (3) spatial ; W spatial =σ(f([F max ;F avg ]))(3); In the formula, [; ] is the concatenation operation on the channel dimension; σ is the Sigmoid activation function; C13: Feature map weighting; the spatial feature weight W spatial Applied to the original input features to learn the importance of different regions in the space. Specifically, the weighted feature map is calculated using formula (4): In the formula, is element-wise multiplication; C2: Construct a channel attention mechanism. The specific steps are as follows: C21: Feature compression; use global maximum pooling and global average pooling methods on the feature map to capture the average information within the channel and the most significant feature response at the same time. Specifically, the global average value of the Cth channel is calculated according to formula (5): According to formula (6), the global maximum value of the Cth channel is calculated C22: Feature incentives; A fully connected layer with a 2-layer bottleneck structure and a Sigmoid function are used to generate weights for each feature channel to explicitly model the correlation between feature channels. Specifically, the weight coefficient S of each channel is calculated using formula (7): S=σ(g(Z,W))=σ(W2δ(W1Z))(7); Where Z is the global feature vector obtained by the Squeeze operation; W1 is the weight of the first fully connected layer, and its dimension is For dimensionality reduction; δ is the ReLU activation function; W2 is the weight of the second fully connected layer, and its dimension is Used for dimension upgrading; C23: Feature map weighting: After obtaining the weight of each feature channel, the weight is applied to each original feature channel to learn the importance of different channels. Specifically, the feature map after channel attention weighting is calculated using formula (8); In the formula, S C is the weight coefficient of the Cth channel; C3: Construct a dual attention mechanism; divide the feature map into two branches, which are weighted by the spatial attention mechanism and the channel attention mechanism respectively, and then combine the two sets of weighted features in an additive manner to obtain a weighted feature map of the dual attention mechanism; S33: Map the final feature representation f to the sample's label space through the fully connected layer. The mapping process is completed by the weight matrix W and the bias term b. Specifically, the output vector z after mapping is calculated using formula (9); z=W·f+b(9); S34: Obtain the probability distribution vector of the corresponding mark of the mapped output vector z according to formula (10) Then, the classification results are obtained according to the size of the probability; Step 4: Use the training set data to train the constructed network model. The specific process is as follows: S41: Use formula (11) to construct the target loss function FL(p t ); For the problems with small flame amplitude, large flame fluctuation, and slag jumping and overflow, the target loss function is used to give higher weights to the small number of categories; FL(p t )=-a t (1-p t ) γ log(p t )(11); In the formula, p t It is the probability value of the output result of the network model classification after softmax; (1-p t ) γ is a modulation factor used to reduce the loss contribution of easy-to-classify samples; α t is the class weight coefficient to improve the loss of minority samples; S42: Network training: The training set data is input into the network model for training in batch training mode. The batch size is set to 32. The Adam optimizer is used to continuously update the network parameters to minimize the value of the loss function. S43: saving the network weight parameters and testing them on the test set to obtain a converter splashing degree recognition model; Step 5: In the actual converter production process of the factory, the converter splashing image is collected by an industrial camera, and then the converter splashing image is identified by the converter splashing degree recognition model, and then the obtained recognition result is output to the display for real-time display.
2. The method for identifying converter splashing using transfer learning and dual attention mechanism residual network according to claim 1, characterized in that: In step 4, S42, the update rule of Adam is shown in formula (12); In the formula, θ t are model parameters; η is the learning rate; ε is a small constant added for numerical stability; is the first-order moment estimate correction, is the first moment estimate of the gradient, ' is the second-order moment estimate correction, is the second moment estimate of the gradient, g t is the gradient of the current iteration; β1 and β2 are the decay rates of the first-order and second-order moment estimates, respectively, and are usually taken as 0.9 and 0.
999.
3. The method for identifying converter splashing using a transfer learning and dual attention mechanism residual network according to claim 1 or 2, characterized in that: In step 1, the shooting distance is 25 m; in step 1 S11, the short interval time is set to 2 s; in step 1 S12, the long interval time is set to be greater than 2 s.
4. According to claim 3, a method for identifying converter splashing using transfer learning and dual attention mechanism residual network is characterized in that: In step 2, in S26, before dividing the data set, the data is first standardized by formula (13); Where x is the original pixel value; μ is the mean value of the image pixel; σ is the standard deviation of the image pixel.
Citation Information
Patent Citations
Steel surface defect detection method based on YOLOv7-ECD
CN116468716A