A strip steel surface defect classification method and device, electronic equipment and medium

By performing gradient data augmentation on the strip surface defect image set and utilizing feature fusion of a triplet network structure, the problem of poor detection performance in strip surface defect detection was solved, achieving higher classification accuracy and generalization ability.

CN116883344BActive Publication Date: 2026-03-20HUBEI UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-03
Publication Date
2026-03-20

Smart Images

  • Figure CN116883344B_ABST
    Figure CN116883344B_ABST
Patent Text Reader

Abstract

The present application relates to a strip steel surface defect classification method, device, electronic equipment and medium, the method comprises the following steps: obtaining a set of strip steel surface defect images; according to the data distribution of the set of strip steel surface defect images, gradient data enhancement is carried out on the set of strip steel surface defect images; the training set images in the image set are input into the preset deep learning model for training to obtain a strip steel surface defect classification model, the strip steel surface defect classification model comprises: a shared layer, an individual layer, a feature fusion layer and a classification layer; obtain the strip steel surface image to be identified, identify and classify the strip steel surface image to be identified based on the strip steel surface defect classification model, and obtain the defect classification result of the strip steel surface image to be identified. The present application improves the accuracy of strip steel surface quality defect detection and classification.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, and in particular to a strip steel surface defect classification method and device, electronic equipment and medium. BACKGROUND

[0002] With the development of economy and the progress of science and technology, China has become the world's largest steel producer, and China has the world's most complete steel industry chain system. Among steel products, the most representative is strip steel, which is an essential basic raw material in the fields of power electronics, automobile manufacturing, military industry and aerospace. However, in the production process of strip steel, due to factors such as rolling equipment and production process, surface defects such as white spots, holes, roll marks, scratches, corrosion, splicing, black spots and edge cracks inevitably occur. Strip steel surface defects not only affect the appearance of strip steel products, weaken the performance of product iron loss characteristics, fatigue resistance and corrosion resistance, but also cause strip steel cracking, surfacing and production line shutdown, and have an immeasurable economic and social impact on production enterprises.

[0003] In the development process of the steel industry for decades, many excellent detection methods have emerged, such as eddy current detection method, infrared detection method, magnetic flux leakage detection method, laser scanning detection method and machine vision. However, these methods usually need to be customized designed for specific production process and production environment. In the face of complex and variable actual industrial production conditions, such as changes in light and low contrast defects, traditional detection methods are difficult to achieve good detection results. With the development of intelligentization, the field of artificial intelligence based on big data has made great progress. However, there are still many difficulties and challenges in strip steel defect detection. On the one hand, the strip steel surface defect dataset from the real world is usually long-tailed distribution, which is very unfriendly to the training of deep learning models. On the other hand, due to the complexity of strip steel surface defects, such as low contrast, intra-class difference and inter-class similarity, existing methods are still difficult to achieve accurate, reliable and fast classification and prediction. SUMMARY

[0004] Therefore, it is necessary to provide a strip steel surface defect classification method to improve the accuracy of strip steel surface quality defect detection classification.

[0005] In order to achieve the above purpose, the present application provides a strip steel surface defect classification method, comprising:

[0006] obtaining a strip steel surface defect image set;

[0007] According to the data distribution of the strip steel surface defect image set, gradient data enhancement is performed on the strip steel surface defect image set;

[0008] inputting a training set image in the image set into a preset deep learning model for training to obtain a strip surface defect classification model, the strip surface defect classification model comprising: a shared layer, a personal layer, a feature fusion layer and a classification layer;

[0009] obtaining a to-be-identified strip surface image, identifying and classifying the to-be-identified strip surface image based on the strip surface defect classification model to obtain a defect classification result of the to-be-identified strip surface image;

[0010] The shared layer is configured to extract features of the to-be-identified strip surface image to obtain shallow features of the to-be-identified strip surface image.

[0011] The personal layer is configured to extract the input shallow features of the strip surface image to obtain deep features of two views of the to-be-identified strip surface image.

[0012] The feature fusion layer is configured to extract the deep features of the two views of the to-be-identified strip surface image to obtain corresponding multi-view features.

[0013] The classification layer is configured to classify the multi-view features to obtain a defect category of the to-be-identified strip surface image.

[0014] In some possible implementation manners, the gradient data augmentation on the strip surface defect image set comprises:

[0015] The gradient data augmentation on the strip surface defect image set is performed by using a gradient adaptive augmentation method.

[0016] In some possible implementation manners, the gradient data augmentation on the strip surface defect image set by using the gradient adaptive augmentation method comprises:

[0017] The image set is subjected to gradient data augmentation by using horizontal flipping, vertical flipping, horizontal and vertical flipping, brightness change, Gaussian noise, shifting and random cropping.

[0018] In some possible implementation manners, the preset deep learning model comprises one of ShufflenetV2, ResNet, FcaNet, RepVGG or EfficientNetV2_s.

[0019] In some possible implementation manners, the shared layer is configured to extract features of the to-be-identified strip surface image to obtain shallow features of the to-be-identified strip surface image, comprising:

[0020] The strip steel surface image to be identified is taken as a main view, and the main view is divided into a first auxiliary view and a second auxiliary view.

[0021] The main view, the first auxiliary view and the second auxiliary view are input to the shared layer for feature extraction, so as to obtain shallow features of the main view, the first auxiliary view and the second auxiliary view.

[0022] In some possible implementation manners, the individual layer is configured to extract input shallow features of a strip steel surface image, so as to obtain deep features of two views of the strip steel surface image to be identified, including:

[0023] The shallow features of the main view, the first auxiliary view and the second auxiliary view are input to the individual layer for feature extraction, so as to obtain deep features of the main view, the first auxiliary view and the second auxiliary view. In some possible implementation manners, the feature fusion layer is configured to extract deep features of two views of the strip steel surface image to be identified, so as to obtain corresponding multi-view features, including:

[0024] Based on the deep features of the main view, the deep features of the first auxiliary view and the deep features of the second auxiliary view, the main view, the first auxiliary view and the second auxiliary view are spliced according to a channel number and feature screening is performed by using a convolution block, so as to obtain a first multi-view feature;

[0025] Based on the first multi-view feature, a channel attention mechanism is used to strengthen the first multi-view feature, so as to obtain a multi-view feature.

[0026] In another aspect, the present application also provides a strip steel surface defect classification device, including:

[0027] An image set acquisition module is configured to acquire a strip steel surface defect image set.

[0028] A data enhancement module is configured to perform gradient data enhancement on the strip steel surface defect image set according to a data distribution of the strip steel surface defect image set.

[0029] A defect model acquisition module is configured to input training set images in the image set to a preset deep learning model for training, so as to obtain a strip steel surface defect classification model, the strip steel surface defect classification model including a shared layer, an individual layer, a feature fusion layer and a classification layer.

[0030] A defect classification module is configured to acquire a strip steel surface image to be identified, and perform identification and classification on the strip steel surface image to be identified based on the strip steel surface defect classification model, so as to obtain a defect classification result of the strip steel surface image to be identified.

[0031] The shared layer is configured to extract features of the to-be-identified strip steel surface image to obtain shallow features of the to-be-identified strip steel surface image.

[0032] The individual layer is configured to extract the input shallow features of the strip steel surface image to obtain deep features of two views of the to-be-identified strip steel surface image.

[0033] The feature fusion layer is configured to extract the deep features of the two views of the to-be-identified strip steel surface image to obtain corresponding multi-view features.

[0034] The classification layer is configured to classify the multi-view features to obtain a defect category of the to-be-identified strip steel surface image.

[0035] In another aspect, the present application also provides an electronic device comprising a memory and a processor, wherein,

[0036] The memory is configured to store a program.

[0037] The processor is coupled to the memory and is configured to execute the program stored in the memory to implement the steps of the strip steel surface defect classification method in any one of the above-mentioned implementation manners.

[0038] In another aspect, the present application also provides a computer readable storage medium for storing computer readable programs or instructions, which can implement the steps of the strip steel surface defect classification method in any one of the above-mentioned implementation manners when executed by a processor.

[0039] The beneficial effects of the above-mentioned embodiments are that the strip steel surface defect classification method provided by the present application uses a local compensation method to increase the multi-scale perception ability of the network, adopts a triad network structure to simultaneously extract feature information of a main view and an auxiliary view, and uses a feature fusion module to fuse the main view features and the auxiliary view features, thereby improving the representation learning ability of the network and the generalization ability of the network in the strip steel surface quality defect detection and classification task, and thus improving the accuracy of detection and classification. BRIEF DESCRIPTION OF DRAWINGS

[0040] Figure 1 A method flowchart of an embodiment of the strip steel surface defect classification method provided by the present application;

[0041] Figure 2 A gradient random enhancement block diagram of an embodiment of the strip steel surface defect classification method provided by the present application;

[0042] Figure 3 A raw data distribution diagram of a strip steel surface defect image set of an embodiment of the strip steel surface defect classification method provided by the present application;

[0043] Figure 4 A data distribution diagram of a strip steel surface defect image set after data preprocessing of an embodiment of a strip steel surface defect classification method provided by the present application;

[0044] Figure 5 A block diagram of network model training of an embodiment of a strip steel surface defect classification method provided by the present application;

[0045] Figure 6 A flowchart of strip steel surface defect detection and classification of an embodiment of a strip steel surface defect classification method provided by the present application;

[0046] Figure 7 A flowchart of an embodiment of a strip steel surface defect classification method provided by the present application;

[0047] Figure 8 A structural schematic diagram of an embodiment of a strip steel surface quality defect detection device provided by the present application;

[0048] Figure 9 A structural schematic diagram of an embodiment of an electronic device provided by the present application. DETAILED DESCRIPTION

[0049] The preferred embodiments of the present application will be described in detail below with reference to the accompanying drawings, which form a part of this application. The accompanying drawings and the embodiments together illustrate the principles of the present application, but are not intended to limit the scope of the present application.

[0050] Figure 1 A flowchart of an embodiment of a strip steel surface defect classification method provided by the present application is shown in FIG. 1, which comprises: Figure 1

[0051] S101, obtaining a set of strip steel surface defect images;

[0052] S102, performing gradient data enhancement on the set of strip steel surface defect images according to the data distribution of the set of strip steel surface defect images;

[0053] S103, inputting training set images in the image set into a preset deep learning model for training to obtain a strip steel surface defect classification model, the strip steel surface defect classification model comprising a shared layer, an individual layer, a feature fusion layer and a classification layer;

[0054] S104, obtaining a strip steel surface image to be identified, and identifying and classifying the strip steel surface image to be identified based on the strip steel surface defect classification model to obtain a defect classification result of the strip steel surface image to be identified;

[0055] ​The shared layer is configured to extract features of the to-be-identified strip steel surface image to obtain shallow features of the to-be-identified strip steel surface image.

[0056] The individual layer is configured to extract the input shallow features of the strip steel surface image to obtain deep features of two views of the to-be-identified strip steel surface image.

[0057] The feature fusion layer is configured to extract the deep features of the two views of the to-be-identified strip steel surface image to obtain corresponding multi-view features.

[0058] The classification layer is configured to classify the multi-view features to obtain a defect category of the to-be-identified strip steel surface image.

[0059] Compared with the prior art, the strip steel surface defect classification method provided in the embodiment uses a local compensation method to increase the multi-scale perception ability of the network, adopts a triad network structure to simultaneously extract feature information of a main view and auxiliary view, and uses a feature fusion module to fuse the main view features and the auxiliary view features, thereby improving the representation learning ability of the network and the generalization ability of the network in a strip steel surface quality defect detection and classification task, and thus improving the accuracy of detection and classification.

[0060] In some embodiments of the present application, the gradient data augmentation on the strip steel surface defect image set comprises:

[0061] The gradient data augmentation on the strip steel surface defect image set is performed by using a gradient adaptive augmentation method.

[0062] In some embodiments of the present application, Figure 2 A gradient random augmentation block diagram of an embodiment of the strip steel surface defect classification method provided in the present application, the gradient data augmentation on the strip steel surface defect image set is performed by using a gradient adaptive augmentation method, and the gradient data augmentation on the strip steel surface defect image set comprises:

[0063] The gradient data augmentation on the image set is performed by using horizontal flipping, vertical flipping, horizontal and vertical flipping, brightness change, Gaussian noise, shifting and random cropping.

[0064] In specific embodiments of the present application, Figure 3 A raw data distribution diagram of a strip steel surface defect image set of an embodiment of the strip steel surface defect classification method provided in the present application, Figure 4The data distribution diagram of the data preprocessed by the strip steel surface defect classification method provided by the application for an embodiment of a strip steel surface defect image set, and the preprocessing method of the strip steel surface defect image is used for data expansion and equalization operation on the collected 37 types of strip steel surface defect images. According to the data distribution characteristics of the 37 types of strip steel surface defects, gradient data enhancement is performed on the strip steel surface defect data by using horizontal flip, vertical flip, horizontal and vertical flip, brightness, Gaussian noise, shift and random cropping. Then, random down-sampling is used to equalize the data set on the data enhanced strip steel defect data set.

[0065] In specific embodiments of the application, the gradient adaptive enhancement method of the strip steel surface defect image is used for data expansion and equalization operation on the collected strip steel surface defect images. According to the data distribution characteristics of the strip steel surface defects, gradient data enhancement is performed on the strip steel surface defect data by using horizontal flip, vertical flip, horizontal and vertical flip, brightness, Gaussian noise, shift and random cropping. Then, random down-sampling is used to equalize the data set on the data enhanced strip steel defect data set. The gradient adaptive enhancement method is divided into two parts: gradient data expansion and mean down-sampling. Gradient data expansion is to combine the above data enhancement methods according to certain rules to obtain 7 gradient sample expansion methods, and the expansion multiples are [2, 3, 4, 5, 9, 17, 37] respectively. Then, the sample number of the tail class after expanding 37 times is taken as the data expansion reference value. The reference value is divided by the sample number of each class and rounded up to obtain the expansion factor.

[0066] In some embodiments of the application, Figure 5 The block diagram of network model training of an embodiment of the strip steel surface defect classification method provided by the application, the preset deep learning model includes one of ShufflenetV2, ResNet, FcaNet, RepVGG or EfficientNetV2_s. It can be understood that as long as the network model of the application can be used for training, it is not limited to any one of ShufflenetV2, ResNet, FcaNet, RepVGG or EfficientNetV2_s.

[0067] In specific embodiments of the application, Figure 6 The block diagram of network model training of an embodiment of the strip steel surface defect classification method provided by the application, in step S103, the training set images in the image set are input into the preset deep learning model for training to obtain a strip steel surface defect classification model, including the following steps:

[0068] Step one: collect a strip steel surface defect image set;

[0069] Step two: gradient data augmentation is performed on the data distribution of the collected strip surface defect image set by using a gradient adaptive enhancement method;

[0070] Step three: the strip surface defect image set after gradient data augmentation is equalized by using a random down-sampling method;

[0071] Step four: the equalized strip surface defect image set is divided into a training set and a test set according to a 6:4 ratio;

[0072] Step five: the training set of the strip surface defect image is sent to the shared layer to obtain shallow features, then the deep features of two views are obtained through the individual layer, and then the multi-view features are obtained through the feature fusion layer, and finally the reinforced multi-view features are obtained through the attention mechanism;

[0073] Step six: the reinforced multi-view features are sent to the classification network layer to complete the forward propagation of the network once;

[0074] Step seven: the self-adjusting class balanced loss function is used to complete the backward propagation once to update the parameters of the network model, and the training of the model is completed in turn and the optimal model weight and parameter setting are saved;

[0075] Step eight: the test set image of the strip surface defect is sent to the trained network model, and the deep features of the strip surface defect are extracted through the feature extraction layer;

[0076] Step nine: the extracted deep features of the strip surface defect are sent to the classification layer, and the defect category corresponding to the test image is output.

[0077] The strip surface defect classification model is obtained through the above steps.

[0078] In some embodiments of the present application, the shared layer is used to extract the features of the to-be-identified strip surface image to obtain the shallow features of the to-be-identified strip surface image, including:

[0079] The to-be-identified strip surface image is taken as a main view, and the main view is divided into a first auxiliary view and a second auxiliary view;

[0080] The main view, the first auxiliary view and the second auxiliary view are input to the shared layer for feature extraction to obtain the shallow features of the main view, the first auxiliary view and the second auxiliary view.

[0081] In some embodiments of the present application, the individual layer is used to extract the shallow features of the input strip surface image to obtain the deep features of two views of the to-be-identified strip surface image, including:

[0082] The shallow features of the main view, the first auxiliary view, and the second auxiliary view are input into the feature extraction layer to obtain the deep features of the main view, the first auxiliary view, and the second auxiliary view. In some embodiments of the present invention, the feature fusion layer is used to extract the deep features of the two views of the strip surface image to be identified to obtain corresponding multi-view features, including:

[0083] Based on the depth features of the main view, the depth features of the first auxiliary view, and the depth features of the second auxiliary view, the main view, the first auxiliary view, and the second auxiliary view are concatenated according to the number of channels and feature filtering is performed using convolutional blocks to obtain the first multi-view features;

[0084] Based on the first multi-view feature, a channel attention mechanism is used to enhance the first multi-view feature to obtain a multi-view feature.

[0085] In a specific embodiment of the present invention Figure 7 This is a flowchart of a specific embodiment of a strip steel surface defect classification method provided by the present invention. The shared layer is used to extract features from the strip steel surface image to be identified, obtaining shallow features of the strip steel surface image to be identified, specifically including the following steps:

[0086] Step 1: Divide the main view I1 into two auxiliary views I2 and I3 along its long side;

[0087] Step 2: Compress the resolution of I1, I2 and I3 to 224*224;

[0088] Step 3: Send the images together into the shared layer to extract shallow features from the main view and auxiliary view.

[0089] As shown in the following formula: f i =F(I i ,θ F ), i∈{1,2,3}, where F() represents all network layers in the shared layer, θ F I represents the parameters of these network layers. i Let f represent the i-th input. i Indicate I i Shallow features extracted from the shared layer.

[0090] Step 4: In a specific embodiment of the present invention, the shallow features extracted from the main view and the auxiliary view through the shared layer are f1, f2, and f3, respectively. These features are then fed into the individual layer to increase feature diversity and obtain deeper features, as shown in the following formula: In the formula, φ i This represents the i-th personality layer. f represents the parameter of the i-th personality layer.i ′ indicates that from f through the personality layer i Deep features extracted from it;

[0091] Step 5: The deep features extracted by the individual layer are fed into the feature fusion layer to obtain multi-view features: First, the main view features and the two auxiliary view features are concatenated by channel. Then, a convolutional block is used to filter the features, reducing the number of channels of the concatenated features to 1 / 3 of the original. The formula is shown below: In the formula, ψ() represents a convolution block, and θ ψ The parameters representing the convolutional block, This represents the features after feature filtering by the convolutional block.

[0092] Step 6: Utilize channel attention mechanisms to highlight the importance of different channels to enhance multi-view features and obtain the enhanced multi-view features. The formula is shown below: In the formula, sigmoid is the sigmoid function, FC represents the mapping function between two fully connected layers, and θ FC These are parameters for two fully connected layers; GAP represents the global pooling operation. channel Indicates attention weights, 'f' represents the full multiplication operation, and 'f'' represents the enhanced multi-view feature.

[0093] Step 7: The enhanced multi-view feature f″ is fed into the linear layer.

[0094] To better implement the strip steel surface defect classification method in this embodiment of the invention, based on a strip steel surface defect classification method, correspondingly, as follows: Figure 8 As shown, this embodiment of the invention also provides a strip steel surface defect classification device. A strip steel surface defect classification device 800 includes:

[0095] Image set acquisition module 801 is used to acquire a set of images of surface defects in strip steel;

[0096] Data augmentation module 802 is used to perform gradient data augmentation on the strip surface defect image set according to the data distribution of the strip surface defect image set;

[0097] The defect model acquisition module 803 is used to input the training set images in the image set into a preset deep learning model for training to obtain a strip steel surface defect classification model. The strip steel surface defect classification model includes: a shared layer, an individual layer, a feature fusion layer and a classification layer.

[0098] The defect classification module 804 is used to acquire the strip surface image to be identified, and to identify and classify the strip surface image based on the strip surface defect classification model to obtain the defect classification result of the strip surface image to be identified.

[0099] The shared layer is used to extract features from the surface image of the strip steel to be identified, thereby obtaining shallow features of the surface image of the strip steel to be identified.

[0100] The individual layer is used to extract the shallow features of the input strip surface image to obtain the deep features of the two views of the strip surface image to be identified.

[0101] The feature fusion layer is used to extract the deep features of the two views of the strip surface image to be identified, so as to obtain the corresponding multi-view features.

[0102] The classification layer is used to classify the multi-view features to obtain the defect category of the strip surface image to be identified.

[0103] The strip steel surface defect classification device 800 provided in the above embodiments can realize the technical solution described in the above embodiment of the strip steel surface defect classification method. The specific implementation principle of each module or unit can be found in the corresponding content of the above embodiment of the strip steel surface defect classification method, which will not be repeated here.

[0104] like Figure 9 As shown, the present invention also provides an electronic device 900. The electronic device 900 includes a processor 901, a memory 902, and a display 903. Figure 9 Only some components of the electronic device 900 are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0105] In some embodiments, processor 901 may be a central processing unit (CPU), microprocessor or other data processing chip, used to run program code stored in memory 902 or process data, such as a strip steel surface defect classification method in this invention.

[0106] In some embodiments, processor 901 may be a single server or a group of servers. The server group may be centralized or distributed. In some embodiments, processor 901 may be local or remote. In some embodiments, processor 901 may be implemented on a cloud platform. In one embodiment, the cloud platform may include a private cloud, public cloud, hybrid cloud, community cloud, distributed cloud, intranet, multi-cloud, etc., or any combination thereof.

[0107] The memory 902 can be an internal storage unit of the electronic device 900, such as a hard disk or a memory of the electronic device 900 in some embodiments. The memory 902 can also be an external storage device of the electronic device 900, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, and the like, equipped on the electronic device 900 in other embodiments.

[0108] Further, the memory 903 can include both an internal storage unit and an external storage device of the electronic device 900. The memory 902 is used to store application software and various data installed on the electronic device 900.

[0109] The display 903 can be an LED display, a liquid crystal display, a touch liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, and the like in some embodiments. The display 903 is used to display information of the electronic device 900 and to display a visualized user interface. The components 901-903 of the electronic device 900 communicate with each other through a system bus.

[0110] In an embodiment, when the processor 901 executes a strip surface defect classification program in the memory 902, the following steps can be implemented:

[0111] An image set of strip surface defects is obtained;

[0112] Gradient data augmentation is performed on the image set of strip surface defects according to a data distribution of the image set of strip surface defects;

[0113] A training set image in the image set is input into a preset deep learning model for training to obtain a strip surface defect classification model, the strip surface defect classification model including a shared layer, a personal layer, a feature fusion layer, and a classification layer;

[0114] An image of a strip surface to be recognized is obtained, and the image of the strip surface to be recognized is classified based on the strip surface defect classification model to obtain a defect classification result of the image of the strip surface to be recognized;

[0115] The shared layer is used to extract features of the image of the strip surface to be recognized to obtain shallow features of the image of the strip surface to be recognized;

[0116] The personal layer is used to extract the shallow features of the input image of the strip surface to obtain deep features of two views of the image of the strip surface to be recognized;

[0117] The feature fusion layer is configured to extract deep features of two views of the strip steel surface image to be identified, to obtain corresponding multi-view features.

[0118] The classification layer is configured to classify the multi-view features, to obtain a defect category of the strip steel surface image to be identified.

[0119] It should be understood that, in addition to the above functions, the processor 901 can also implement other functions when executing a strip steel surface quality defect detection program in the memory 902, and specific implementation can be referred to the description of the corresponding method embodiments.

[0120] Further, the type of the electronic device 900 is not specifically limited, and the electronic device 900 can be a mobile phone, a tablet computer, a personal digital assistant (PDA), a wearable device, a laptop, or the like. Exemplary embodiments of the portable electronic device include, but are not limited to, a portable electronic device running an IOS, android, microsoft, or other operating system. The above-mentioned portable electronic device can also be other portable electronic devices, such as a laptop having a touch-sensitive surface (e.g., a touch panel). It should also be understood that, in some other embodiments of the present application, the electronic device 900 can also not be a portable electronic device, but a desktop computer having a touch-sensitive surface (e.g., a touch panel).

[0121] Those skilled in the art can understand that all or part of the processes of the above-mentioned embodiments can be completed by a computer program instructing related hardware, and the program can be stored in a computer readable storage medium. The computer readable storage medium includes a magnetic disk, an optical disk, a read-only memory, a random access memory, or the like.

[0122] The above description is only a preferred embodiment of the present application, and the protection scope of the present application is not limited thereto. Any changes or replacements within the technical scope disclosed by the present application should be covered within the protection scope of the present application.

Claims

1. A method for classifying surface defects in strip steel, characterized in that, include: Acquire a set of images of surface defects in the strip steel; Gradient data augmentation is performed on the strip surface defect image set based on the data distribution of the strip surface defect image set; The training set images in the image set are input into a preset deep learning model for training to obtain a strip steel surface defect classification model. The strip steel surface defect classification model includes: a shared layer, an individual layer, a feature fusion layer and a classification layer. Obtain an image of the strip surface to be identified, and classify the image of the strip surface to be identified based on the strip surface defect classification model to obtain the defect classification result of the image of the strip surface to be identified; The shared layer is used to extract features from the strip surface image to be identified, and obtain shallow features of the strip surface image to be identified. This includes: taking the strip surface image to be identified as a main view, dividing the main view into a first auxiliary view and a second auxiliary view; and inputting the main view, the first auxiliary view, and the second auxiliary view into the shared layer for feature extraction to obtain shallow features of the main view, the first auxiliary view, and the second auxiliary view. The personalized layer is used to extract the shallow features of the input strip surface image to obtain the deep features of the two views of the strip surface image to be identified, including: inputting the shallow features of the main view, the first auxiliary view and the second auxiliary view into the personalized layer for feature extraction to obtain the deep features of the main view, the first auxiliary view and the second auxiliary view. The feature fusion layer is used to extract deep features from two views of the strip surface image to be identified, and obtain corresponding multi-view features, including: based on the depth features of the main view, the depth features of the first auxiliary view, and the depth features of the second auxiliary view, the main view, the first auxiliary view, and the second auxiliary view are concatenated according to the number of channels and feature filtering is performed using convolutional blocks to obtain the first multi-view features; based on the first multi-view features, the first multi-view features are enhanced using a channel attention mechanism to obtain multi-view features; The classification layer is used to classify the multi-view features to obtain the defect category of the strip surface image to be identified.

2. The method for classifying surface defects of strip steel according to claim 1, characterized in that, The gradient data augmentation of the strip surface defect image set includes: The gradient adaptive enhancement method is used to perform gradient data enhancement on the image set of surface defects of the strip steel.

3. The method for classifying surface defects of strip steel according to claim 2, characterized in that, The gradient adaptive enhancement method for enhancing the image set of surface defects on the strip steel includes: Gradient data augmentation is performed on the image set using horizontal flipping, vertical flipping, horizontal-vertical flipping, brightness variation, Gaussian noise, shifting, and random cropping.

4. The method for classifying surface defects of strip steel according to claim 1, characterized in that, The preset deep learning model includes: One of ShufflenetV2, ResNet, FcaNet, RepVGG, or EfficientNetV2_s.

5. A strip steel surface quality defect detection device, characterized in that, include: Image set acquisition module, used to acquire image sets of surface defects in strip steel; The data augmentation module is used to perform gradient data augmentation on the strip surface defect image set according to the data distribution of the strip surface defect image set; The defect model acquisition module is used to input the training set images in the image set into a preset deep learning model for training to obtain a strip steel surface defect classification model. The strip steel surface defect classification model includes: a shared layer, an individual layer, a feature fusion layer, and a classification layer. The defect classification module is used to acquire the surface image of the strip steel to be identified, and to identify and classify the surface image of the strip steel to be identified based on the surface defect classification model of the strip steel to be identified, so as to obtain the defect classification result of the surface image of the strip steel to be identified. The shared layer is used to extract features from the strip surface image to be identified, and obtain shallow features of the strip surface image to be identified. This includes: taking the strip surface image to be identified as a main view, dividing the main view into a first auxiliary view and a second auxiliary view; and inputting the main view, the first auxiliary view, and the second auxiliary view into the shared layer for feature extraction to obtain shallow features of the main view, the first auxiliary view, and the second auxiliary view. The personalized layer is used to extract the shallow features of the input strip surface image to obtain the deep features of the two views of the strip surface image to be identified, including: inputting the shallow features of the main view, the first auxiliary view and the second auxiliary view into the personalized layer for feature extraction to obtain the deep features of the main view, the first auxiliary view and the second auxiliary view. The feature fusion layer is used to extract deep features from two views of the strip surface image to be identified, and obtain corresponding multi-view features, including: based on the depth features of the main view, the depth features of the first auxiliary view, and the depth features of the second auxiliary view, the main view, the first auxiliary view, and the second auxiliary view are concatenated according to the number of channels and feature filtering is performed using convolutional blocks to obtain the first multi-view features; based on the first multi-view features, the first multi-view features are enhanced using a channel attention mechanism to obtain multi-view features; The classification layer is used to classify the multi-view features to obtain the defect category of the strip surface image to be identified.

6. An electronic device, characterized in that, Including memory and processor, among which, The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the strip steel surface defect classification method according to any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, Used to store computer-readable programs or instructions, which, when executed by a processor, can implement the steps in the strip steel surface defect classification method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Supervised Dropout method and equipment for detecting surface defects of strip steel

    CN114897850A

  • Strip steel surface defect detection method based on improved retinanet algorithm

    CN115760734A