Method for identifying macro defects of continuous casting billets based on knowledge mask and visual transformer optimization model
Patent Information
- Application Number
- CN202310041123.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-13
- Publication Date
- 2026-09-08
- Estimated Expiration
- 2043-01-13
AI Technical Summary
铸坯表面缺陷和低倍组织缺陷二者虽有联系,但是在缺陷类型、形态特征和判级要求等多个方面存在不同,目前国内外尚未有工业应用的低倍组织缺陷识别系统公开报道
[0015] This invention presents a method for identifying low-magnification defects in continuously cast billets based on knowledge masks and ViT optimization models. Through big data analysis and mechanism analysis, a knowledge mask image is established and used in the image slicing process. The deep fusion of the knowledge mask and the original image improves the concentration of feature information. Combined with the ViT network under multi-scale segmentation, the accuracy and practicality of the model are effectively improved.
Smart Images

Figure CN118351043B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of steelmaking technology and intelligent detection technology, and in particular to a method for identifying low-magnification defects in continuously cast billets. This method employs an intelligent identification method for low-magnification defects in continuously cast billets based on a knowledge mask and a vision transformer (ViT) optimization model. Background Technology
[0002] Common surface defects in continuously cast billets during production typically include surface cracking, burrs, and rejoining. Low-magnification structural defects in continuously cast billets differ from conventional surface defects; they require analysis of the billet's microstructure and morphology after cleaning and etching. These defects mainly include shrinkage cavities, central cracks, subcutaneous cracks, intermediate cracks, central porosity, central segregation, subcutaneous bubbles, thin and uneven equiaxed grain zones, and non-metallic inclusions. In some steel enterprises, low-magnification structural defects in continuously cast billets primarily manifest as cracks and central segregation.
[0003] Existing surface inspection systems are used for online detection of surface defects in continuously cast slabs, cold-rolled strip steel production lines, hot-dip galvanizing production lines, and hot-rolled product defect detection. Most existing technologies focus on identifying surface defects in cast slabs, with little or no identification of low-magnification structural defects. While surface defects and low-magnification structural defects are related, they differ in defect type, morphological characteristics, and grading requirements. Currently, there are no publicly reported industrial applications of low-magnification structural defect identification systems, either domestically or internationally. Existing low-magnification structural defect detection relies on manual inspection, which is significantly affected by human factors such as the inspector's experience and knowledge, leading to fluctuations in inspection quality. Furthermore, it incurs high labor costs and makes standardization difficult.
[0004] Chinese patent CN201811162804.6 discloses an automatic identification and rating method for center segregation defects in low-magnification microstructure of continuously cast billets. It uses traditional image processing methods to extract features from the grayscale image of the low-magnification microstructure, and then applies a BP neural network classifier model to identify and rate the center segregation region. It mainly targets the classification and rating of two major defects (cracks and shrinkage cavities) in the low-magnification microstructure of continuously cast square billets. Its shortcoming is that the sample size is too small, and it is a laboratory result. Summary of the Invention
[0005] The purpose of this invention is to provide a method for identifying low-magnification defects in continuously cast billets based on a knowledge mask and a visual transformer optimization model. A knowledge mask image is established through big data analysis and mechanism analysis. The deep fusion of the knowledge mask and the original image improves the concentration of feature information. Combined with a ViT network under multi-scale segmentation, the accuracy and practicality of the model are effectively improved.
[0006] To achieve the above-mentioned technical objectives, the present invention adopts the following technical solution: A method for identifying low-magnification defects in continuously cast billets based on a knowledge mask and a vision transformer optimization model, comprising the following steps: S1. Establish an image dataset, perform image data enhancement processing on the on-site collected image samples, and expand the defect image dataset to meet the needs of statistical analysis. S2, through the analysis of on-site process parameters, equipment parameters and environmental parameters and mechanism analysis, extracts and identifies expert knowledge to predict the defect category and obtain a knowledge mask image; S3, In the classification and recognition process, the original set of images to be trained is multiplied by various knowledge mask images to obtain a preprocessed set of images; S4, preprocessing image reduction, adjusting image pixel values to the range of 0-255; S5, image multi-scale segmentation; S6, slice each sub-image block to form a sub-image sequence; S7, generate digital tokens from sub-image sequences through linear projection; S8 enters the Transformer layer, which is a multi-layer network that alternates between multiple MSA (Multi-Head Self-Attention) and MLP (Multi-Layer Perceptron); both MSA and MLP computations require LN (Layer Normalization) processing before completion. S9, calculates the classification probability value after passing through the MLP Head layer; S10, compare the classification results with the labels and calculate the loss; S11, reverse iterative calculation to update the weights of each deep neural network; S12, when the loss function value reaches its minimum, remains unchanged, or the accuracy no longer improves, the entire training and learning process is completed; S13, Finally, the learned deep network model parameters are applied to the actual testing process.
[0007] The process of digitizing and extracting expert knowledge is as follows: S2.1, feature extraction is performed from multiple dimensions such as the location, shape, color intensity, quantity, size, width, and angle of the defect; S2.2, the extracted features are transformed into a knowledge mask. The mask is a binary processing of the weight of the defect location, an enhancement of the color depth, an amplification of the color depth contrast, and a digital enhancement representation of other features such as size, width, shape, angle and quantity. S2.3, Predict the defect category. Use machine learning methods to pre-calculate the defect category. When the defect calculation index is greater than a certain threshold, a specific defect is identified.
[0008] The binarization process involves setting the weight of the defective parts to 1 and the weight of other parts to 0.
[0009] In the aforementioned color depth enhancement technology, the enhancement factor is between 0.5 and 2.0; in the aforementioned defect angle identification, the tolerance range of the angle is between ±5 and 15 degrees.
[0010] The machine learning methods mentioned include anomaly detection algorithms based on single-class support vector machines, local field methods, and isolated forest methods.
[0011] The original set of images to be trained is multiplied by various knowledge mask images, that is, the knowledge mask and the original image are subjected to dot product operation to complete the fusion of knowledge and actual image recognition technology; the dot product operation is to multiply the pixel value of each point in the knowledge mask with the corresponding position of the pixel value of each point in the original image to obtain a new knowledge fusion matrix, thereby obtaining a preprocessed image.
[0012] The size of the multi-scale image blocks is between 2*2 and 128*128; the number of layers in the multi-scale image blocks is between 2 and 8.
[0013] The size of the paired image block slices is between 3*3 and 128*128.
[0014] In step S9, the MLP Head layer is used to calculate the classification probability value and perform the final classification. The MLP head is a fully connected neural network layer. Based on the input parameters and initial weights of the network in the previous step, the network output layer is calculated. The deviation between the output and the target value is calculated in the output layer. This deviation is called the loss. If the deviation is too large or too small, the weights of each node of the neural network are adjusted according to the gradient, and the deviation is calculated again in a loop until the final deviation reaches a certain threshold.
[0015] This invention presents a method for identifying low-magnification defects in continuously cast billets based on knowledge masks and ViT optimization models. Through big data analysis and mechanism analysis, a knowledge mask image is established and used in the image slicing process. The deep fusion of the knowledge mask and the original image improves the concentration of feature information. Combined with the ViT network under multi-scale segmentation, the accuracy and practicality of the model are effectively improved.
[0016] The low-magnification defect identification method for continuously cast billets of this invention is a novel approach that integrates expert knowledge of production mechanisms within the ViT framework. This method maps process mechanism knowledge with low-magnification structural defects, establishes a knowledge mask image through big data analysis and mechanism analysis, and applies the expert knowledge mask to the ViT slicing process and the final classification decision stage. By optimizing the positional information of the knowledge mask and adjusting the decision weights, the accuracy and success rate of low-magnification defect identification and classification of continuously cast billets under specific conditions are effectively improved. This invention overcomes the shortcomings of existing methods for image recognition, classification, and classification of low-magnification structural defects in continuously cast billets, which suffer from low success rates.
[0017] The low-magnification defect identification method for continuously cast billets of the present invention can effectively improve the success rate of model identification and achieve the goal of reducing costs and increasing efficiency. Attached Figure Description
[0018] Figure 1 This is a schematic diagram of the calculation process of the present invention; Figure 2 This is a schematic diagram of the Transformer encoder structure of the present invention; Figure 3 The image shows a low-magnification original picture of the "corner crack" defect in a continuously cast billet, collected on-site. Figure 4 Image slices of the original image; Figure 5 To create a row of image slices after slicing; Figure 6 shows the image after multiplying the knowledge mask matrix with the original image. Detailed Implementation
[0019] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.
[0020] A method for low-magnification defect identification in continuously cast billets based on a knowledge mask and vision transformer optimization model includes the following steps: See Figure 1 ViT (Vision Transformer).
[0021] S1. Establish an image dataset and perform image data augmentation processing on the on-site collected image samples. After expanding the defect image dataset, it meets the requirements for statistical analysis. The image data augmentation method is to perform rotation, translation, mirroring, symmetry operations, noise addition and subtraction, and other methods and combinations thereof on the original image to expand the augmentation of a small number of images to a scale that deep learning can effectively apply.
[0022] S2 uses expert knowledge extracted from on-site process parameters, equipment parameters, environmental parameters, and mechanism analysis to predict defect categories and obtain a knowledge mask image.
[0023] The process of digitizing and extracting expert knowledge is as follows: S2.1, features are extracted from multiple dimensions such as the location, shape, color intensity, quantity, size, width, and angle of defects.
[0024] S2.2, the extracted features are transformed into a knowledge mask. The mask is a binary processing of the weights of the defect location, that is, the weight of the defect location is set to 1 and the weight of other locations is set to 0; the color depth is enhanced by amplifying the contrast of color depth; and other features such as size, width, shape, angle and quantity are digitally enhanced and represented. Among them, in the color depth enhancement technology, the enhancement factor is between 0.5 and 2.0; in the defect angle recognition, the tolerance range of the angle is between ±5 and 15 degrees.
[0025] S2.3, Predict the defect category. Machine learning methods are used to pre-calculate the defect category. When the calculated defect index exceeds a certain threshold, a specific defect is identified. The machine learning methods include anomaly detection algorithms such as single-class support vector machines, local field methods, and isolated forest methods.
[0026] For example, the defect category can be predicted based on on-site production process, equipment, and environmental parameters, including pulling speed fluctuation, liquid level fluctuation, crystallizer taper, arc opening, superheat, and heat flux density. The isolated forest anomaly detection algorithm is used to pre-calculate the defect category. When the defect calculation index is greater than a certain threshold, the occurrence of a specific defect is determined. Among them, the calculation index of corner cracks in isolated forest is 0.29, and the determination threshold is 0.23. That is, the calculation index is greater than the determination threshold, and the occurrence of corner cracks is finally predicted.
[0027] S3, during the classification and recognition process, the original training image set is multiplied by various knowledge mask images to obtain a preprocessed image set; that is, the knowledge mask and the original image are subjected to dot product operation to complete the fusion of knowledge and actual image recognition technology; the dot product operation is to multiply the pixel value of each point in the knowledge mask with the corresponding position of the pixel value of each point in the original image to obtain a new knowledge fusion matrix; thus, the final preprocessed image is obtained.
[0028] S4, preprocessing image reduction, adjusts the image pixel values to the range of 0-255.
[0029] S5, image multi-scale segmentation; the size of the image multi-scale segmentation is between 2*2 and 128*128; the number of layers of the image multi-scale segmentation is between 2 and 8.
[0030] S6, slice each sub-image block to form a sub-image sequence; the size of the sub-image block slice is between 3*3 and 128*128.
[0031] S7, generates digital tokens from the sub-image sequence through linear projection.
[0032] S8, entering the Transformer layer, is a multi-layer network where multiple MSA (Multi-Head Self-Attention) and MLP (Multi-Layer Perceptron) operations alternately; both MSA and MLP computations require LN (Layer Normalization) processing before completion; see [link to documentation]. Figure 2 .
[0033] S9, calculates the classification probability value after passing through the MLP Head layer; The MLP Head layer is used to calculate the classification probability value and perform the final classification. The MLP head is a fully connected neural network layer. Based on the input parameters and initial weights of the previous step, it calculates the network output layer. In the output layer, it calculates the deviation between the current output and the target value. This deviation is called the loss. If the deviation is too large or too small, the weights of each node in the neural network are adjusted according to the gradient, and the deviation is calculated again in a loop until the final deviation reaches a certain threshold.
[0034] S10 compares the classification results with the labels and calculates the loss.
[0035] S11, reverse iterative calculation to update the weights of each deep neural network.
[0036] S12: When the loss function value reaches its minimum, remains unchanged, or the accuracy no longer improves, the entire training and learning process is completed.
[0037] Steps S10-S12 describe the training of a neural network. The training process involves first setting up a network structure, then calculating the output of each layer of the network sequentially based on the input parameters and network weights, up to the final output layer. After reaching the output layer, the deviation between the current output and the target value is calculated; this deviation is called the loss. If the deviation is too large or too small, the weight matrix of each node in the neural network is adjusted according to the gradient, and the deviation is calculated again in a loop until the final deviation reaches a certain threshold. This is a training and learning process.
[0038] S13, the parameters of the finally learned deep network model are applied to the actual testing process; for the learned model, new actual data are input, the model is applied to perform calculations, and the number of correctly identified and incorrectly identified slabs in these new data (also called test set) is counted. Then, the success rate is obtained by dividing the number of correctly identified slabs by the total number of slabs, and the false positive rate is obtained in the same way.
[0039] This invention presents a method for identifying low-magnification defects in continuously cast billets based on knowledge masks and ViT optimization models. It summarizes defect mechanism knowledge into masks of different knowledge types, and effectively enhances the auxiliary role of expert knowledge in the classifier through deep fusion of knowledge masks and original images. At the same time, the method of learning ViT networks by combining multi-scale block segmentation effectively solves the problem of classifying low-magnification defects in continuously cast billets and improves the recognition success rate.
[0040] This invention improves the accuracy and success rate of identifying low-magnification defects in continuously cast billets under specific conditions by optimizing the location information of knowledge masks and adjusting decision weights. The optimization of location information is reflected in the knowledge mask, which is used to filter the parts where defects are most likely to occur. The decision weight adjustment is carried out in the knowledge mask processing stage, which highlights the feature information of important parts by multiplying by weight coefficients. Example
[0041] A method for low-magnification defect identification in continuously cast billets based on a knowledge mask and vision transformer optimization model, the steps of which are as follows: S1, for the standard map of defects detected at low magnification in continuous casting billets and the map collected on site, the original map collected on site is about 300 images. The dataset is expanded to 100,000 images by applying image data augmentation methods, of which 80,000 images are in the training set and 20,000 images are in the test set.
[0042] For example, consider dividing a raw image captured on-site into nine parts. See [link to relevant documentation]. Figure 3 and Figure 4 To rearrange the sliced images into a single row to complete the sliced image, see [link to relevant documentation]. Figure 5 In this way, one original image becomes nine images, and the same process is applied to other images. Other slicing methods can also be used, such as 16*16 slicing.
[0043] S2 extracts and identifies expert knowledge from the analysis of on-site process parameters, equipment parameters, and environmental parameters, as well as mechanism analysis, to predict the defect category and obtain a knowledge mask image. In other words, it performs big data analysis on the complete dataset of on-site process parameters, equipment parameters, and environmental parameters, and uses anomaly detection algorithms to predict the image to be trained and obtain a knowledge mask image, such as the obtained "corner crack defect".
[0044] The process of digitizing and refining expert knowledge (big data analysis) is as follows: S2.1, adopt process parameters, such as pulling speed fluctuation, liquid level fluctuation, argon flow rate and pressure, etc.; at the same time, adopt equipment parameters, such as crystallizer taper, opening, and arc alignment accuracy, etc.; summarize, clean and preprocess the above data.
[0045] S2.2, The cleaned data is fed into the isolated forest model for anomaly analysis and learning to find model parameters suitable for defect classification.
[0046] Isolation Forest is an anomaly detection algorithm. Since low-magnification defects such as cracks have a low probability of occurrence, they fall within the scope of anomaly detection. Therefore, the Isolation Forest algorithm is suitable for anomaly detection and defect determination. The principle of the Isolation Forest algorithm is that outliers are far from the normal distribution of points. Therefore, outliers can be "isolated" using a segmentation plane method, thereby detecting outlier points and determining whether a defect has occurred. Isolation Forest is an anomaly detection algorithm and is existing technology.
[0047] The Isolation Forest algorithm was proposed in 2008 at the 8th IEEE International Conference on Data Mining by Zhou Zhihua of Nanjing University and Fei Tony Liu and Kai Ming Ting of Monash University, Australia. The Isolation Forest algorithm defines anomalies as "outliers that are easily isolated," which can be understood as sparsely distributed points far from high-density clusters. In the data space, sparsely distributed regions indicate that the probability of data occurring in these regions is very low, and therefore, data falling into these regions can be considered anomalous. The algorithm uses a random hyperplane to divide the data space. Each division generates two subspaces, and then another random hyperplane is used to divide each subspace, repeating this process until each subspace contains only one data point. Since high-density clusters require many divisions before stopping, while low-density points are easily and quickly separated into a single subspace, outliers are thus filtered out.
[0048] S2.3, Apply the learned Isolation Forest model to predict the defect category for new field data parameters. Result: Predicts that the training image will have "corner crack defects".
[0049] S2.4, Based on the predicted defect categories, a knowledge mask image is built for deep learning model analysis and application. For different defects, such as corner cracks, the knowledge mask image is used to filter out key identification locations, such as... Figure 6 As shown, Figure 6 is the image after preprocessing.
[0050] To address the low-magnification defect of "corner cracks" in continuously cast billets, a knowledge mask image is established, where the pixel value of the mask image for the foot region is 1, and the pixel values for the mask images for the edge center and the center region of the image are 0; the color depth enhancement factor is set to 1.3.
[0051] The Isolation Forest algorithm is used to predict the type of defect, and then a knowledge mask image is formed based on the type of defect.
[0052] S3, multiply the knowledge mask image with the training data image set according to the pixel values to obtain the preprocessed image set.
[0053] S4 normalizes the dataset by linearly reducing the image pixels to the range of 0-255 according to the maximum and minimum ratios, thus reducing the resolution to 256*256.
[0054] The original image is processed using a knowledge mask to obtain a new preprocessed image: the knowledge mask image is multiplied by the original image, and important regions are selected, resulting in the following:
[0055] The image obtained after preprocessing by multiplying the knowledge mask image and the original image is shown in Figure 6.
[0056] S5 divides the preprocessed image (256, 256) into slices of size (16, 16), resulting in a total of (256 / 16) * (256 / 16) = 256 slices. Adding a class identifier, there are a total of 256 + 1 = 257 tokens.
[0057] S6, the pixel values of a slice will be projected to have 16*16*3=768 dimensions. In this way, after digital projection, a preprocessed image is transformed into a linear sequence of 257*768 dimensions, thus transforming image recognition into sequence recognition.
[0058] S7, perform linear projection to generate digital tokens; the linear projection is to connect the pixel values of each row in the image slice one by one to form a linear queue. Sometimes, this sequence is multiplied by a linear factor to adjust the range.
[0059] S8, entering the Transformer network layer, is a multi-layer network consisting of 8 alternating layers of MSA (multi-head self-attention) and MLP (multilayer perceptron). Both MSA and MLP are processed by LN (layer normalization) before computation; the LN output dimension remains 257x768. In multi-head self-attention, the input is first mapped to q, k, v. If there is only one head, the dimensions of qkv are all 257x768. In this embodiment, with 8 heads (768 / 8=96), the dimensions of qkv are 257x96, resulting in 8 sets of qkv. The outputs of these 8 sets are then concatenated, resulting in an output dimension of 257x768. This is followed by another LN layer, maintaining the dimension of 257x768. The MLP then scales the dimension up and down, from 257x768 to 257x3072, and then back down to 257x768. See [link to relevant documentation]. Figure 2 .
[0060] S9, calculate the classification probability value after passing through the MLP Head layer; the classification probability value calculated by MLP is integrated into the classifier as the final classification probability value by adjusting the weight coefficient of the knowledge mask; the coefficient adjustment of the knowledge mask is to set different values for different low-magnification defects and knowledge masks, among which, for the corner crack defect knowledge mask image, the weight coefficient is set to 1.2.
[0061] The MLP Head layer is used to calculate the classification probability value. The MLP Head is a fully connected neural network layer. Based on the input parameters and initial weights from the previous step, it calculates the network output layer. At the output layer, it calculates the deviation between the current output and the target value; this deviation is called the loss. If the deviation is too large or too small, the weights of each node in the neural network are adjusted according to the gradient, and the deviation is calculated again in a loop until the final deviation reaches a certain threshold. This is the training and learning process. After training, the weights are saved. During the testing phase, the model's weight matrix is applied to perform the final image classification output. When the classification accuracy is greater than 95%, training stops, and the weight matrix for this step is saved.
[0062] S10 compares the classification results with the labels and calculates the loss.
[0063] S11, reverse iterative calculation to update the weights of each deep neural network.
[0064] S12: When the loss function value reaches its minimum, remains unchanged, or the accuracy no longer improves, the entire training and learning process is completed.
[0065] Steps S10-S12 describe the training of a neural network. The training process involves first setting a network structure, then calculating the output of each layer sequentially based on the input parameters and network weights, up to the final output layer. After reaching the output layer, the deviation between the output and the target value is calculated; this deviation is called the loss. If the deviation is too large or too small, the weight matrix of each node in the neural network is adjusted according to the gradient, and the deviation is calculated iteratively until the final deviation reaches a certain threshold. This is the training and learning process. The training set consists of 80,000 images, with 25% used as the validation set. The actual training uses 60,000 images, and the validation set uses 20,000 images. Training and learning stop when the model's classification accuracy on the validation set exceeds 95%.
[0066] S13. The final learned deep network model parameters are applied to the actual testing process. For the learned model, new real-world data is input, and the model is used to calculate and count the number of correctly and incorrectly identified slabs in this new data (also called the test set). The success rate is then calculated by dividing the number of correctly identified slabs by the total number of slabs; the false positive rate is calculated similarly. In the test set of 20,000 images, 561 images showed cracks. Of these, 508 were correctly identified, resulting in a success rate of 508 / 561 = 90.6%. A total of 999 images were incorrectly identified, resulting in a false positive rate of 999 / 20,000 = 5%.
[0067] After training, a deep network model is obtained. This model is then used to calculate the probability of defects in each image in the test set. If the probability value is greater than a set threshold, such as 0.7, the image is determined to have a defect. The model has a corner crack recognition success rate of 90.6% and a false positive rate of 5%.
[0068] The above are merely preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Therefore, 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 low-magnification defect identification of continuously cast billets based on a knowledge mask and vision transformer optimization model, characterized by: Its steps as follows: S1. Establish an image dataset, perform image data enhancement processing on the on-site collected image samples, and expand the defect image dataset to meet the needs of statistical analysis. S2, through the analysis of on-site process parameters, equipment parameters and environmental parameters and mechanism analysis, extracts and identifies expert knowledge to predict the defect category and obtain a knowledge mask image; S3, In the classification and recognition process, the original set of images to be trained is multiplied by various knowledge mask images to obtain a preprocessed set of images; S4, preprocessing image reduction, adjusting image pixel values to the range of 0-255; S5, image multi-scale segmentation; S6, slice each sub-image block to form a sub-image sequence; S7, generate digital tokens from sub-image sequences through linear projection; S8, enters the Transformer layer, which is a multi-layer network that alternates between multiple MSA and MLP; both MSA and MLP require LN processing before computation; MSA is multi-head self-attention, MLP is multi-layer perceptron, and LN is layer normalization. S9 calculates the classification probability value after passing through the MLP Head layer; the MLP Head is a multilayer sensing head. S10, compare the classification results with the labels and calculate the loss; S11, reverse iterative calculation to update the weights of each deep neural network; S12, when the loss function value reaches its minimum, remains unchanged, or the accuracy no longer improves, the entire training and learning process is completed; S13, Finally, the learned deep network model parameters are applied to the actual testing process; The process of digitizing and extracting expert knowledge is as follows: S2.1, feature extraction is performed from multiple dimensions such as the location, shape, color intensity, quantity, size, width, and angle of the defect; S2.2, the extracted features are transformed into a knowledge mask. The mask is a binary processing of the weight of the defect location, an enhancement of the color depth, an amplification of the color depth contrast, and a digital enhancement representation of other features such as size, width, shape, angle and quantity. S2.3, Predict the defect category. Use machine learning methods to pre-calculate the defect category. When the defect calculation index is greater than a certain threshold, a specific defect is identified.
2. The method for low-magnification defect identification of continuously cast billets based on a knowledge mask and vision transformer optimization model as described in claim 1, characterized in that: The binarization process involves setting the weight of the defective parts to 1 and the weight of other parts to 0.
3. The method for low-magnification defect identification of continuously cast billets based on knowledge mask and vision transformer optimization model according to claim 1, characterized in that: In the color depth enhancement technology, the enhancement factor is between 0.5 and 2.0; in the defect angle identification, the tolerance range of the angle is between ±5 and 15 degrees.
4. The method for low-magnification defect identification of continuously cast billets based on knowledge mask and vision transformer optimization model according to claim 1, characterized in that: The machine learning methods mentioned include anomaly detection algorithms based on single-class support vector machines, local field methods, and isolated forest methods.
5. The method for low-magnification defect identification of continuously cast billets based on knowledge mask and vision transformer optimization model according to claim 1, characterized in that: The original set of images to be trained is multiplied by various knowledge mask images, that is, the knowledge mask and the original image are subjected to dot product operation to complete the fusion of knowledge and actual image recognition technology; the dot product operation is to multiply the pixel value of each point in the knowledge mask with the corresponding position of the pixel value of each point in the original image to obtain a new knowledge fusion matrix, thereby obtaining a preprocessed image.
6. The method for low-magnification defect identification of continuously cast billets based on knowledge mask and vision transformer optimization model according to claim 1, characterized in that: The size of the multi-scale image blocks ranges from 2*2 to 128*128; the number of layers in the multi-scale image blocks ranges from 2 to 8.
7. The method for low-magnification defect identification of continuously cast billets based on a knowledge mask and vision transformer optimization model according to claim 1, characterized in that: The size of the sub-image block slices ranges from 3*3 to 128*128.
8. The method for low-magnification defect identification of continuously cast billets based on a knowledge mask and vision transformer optimization model according to claim 1, characterized in that: In step S9, the MLP Head layer is used to calculate the classification probability value and perform the final classification. The MLP Head is a fully connected neural network layer. Based on the input parameters and initial weights of the network in the previous step, the network output layer is calculated. The deviation between the output and the target value is calculated in the output layer. This deviation is called the loss. If the deviation is too large or too small, the weights of each node of the neural network are adjusted according to the gradient, and the deviation is calculated again in a loop until the final deviation reaches a certain threshold.
Citation Information
Patent Citations
Method for automatically identifying and grading central segregation defect of low-magnification structure of continuous casting billet
CN109191459A
Sheet surface defect image recognition processing method based on convolutional neural network
CN113505865A
PCB defect detection method based on model compression
CN114897845A