Background
The medium plate product mainly comprises structural steel, automobile girder plates, bridge plates, high-rise building steel, boiler container plates, low alloy steel, die steel and the like, and is widely applied to industries such as metallurgy, machinery, automobiles, bridges, ships, electric power, buildings and the like. The surface quality of the medium and thick plate is an important link influencing the quality of medium and thick plate products, the real-time effective control of the surface defects of the medium and thick plate, particularly the periodic defects, is a key technical key and a difficult point for efficiently producing the medium and thick plate with high quality, is a decisive link for preventing the occurrence of mass quality accidents, and is valued by scholars at home and abroad.
Due to the influence of high temperature and production process, the traditional detection method for the surface defects of the medium plate is mainly based on a human eye visual inspection method. In the current rolling production process, no good means is available for monitoring the surface quality conditions of the steel plates before and after the straightening machine on line, and the steel plates are generally subjected to spot inspection after reaching a cooling bed for cooling. When defects are found after the cooling bed inspection table is cooled, at least 25 steel plates are continuously produced if rolling defects are generated by a rolling mill or a straightening machine, the generation of the continuous defects has great influence on subsequent processes, and if the defects are serious, great economic loss is generated. The lower surface of the steel plate is difficult to directly check, and the detection is carried out by turning over the plate or arranging a lower surface reflector and arranging special personnel to adopt a sampling inspection mode. The steel plate is lifted away from a shearing line to a plate turnover machine for plate turnover inspection, the operation difficulty and the production efficiency of the production process are increased, and the plate turnover machine is positioned behind a cooling bed, so that mass quality defect plates can be caused once the defect problems of secondary scratch and the like occur on the lower surface. In summary, the detection results of manual visual inspection and spot inspection are affected by subjective factors of the detection personnel, and the detection results lack accuracy, reliability, continuity and integrity, cannot effectively detect and control periodic defects, and cannot avoid batch quality accidents.
With the development of artificial intelligence technology and CCD imaging technology, the surface detection technology based on machine vision is widely applied, and the patent "an online detection method for tiny defects on the surface of a metal plate strip" (201410137363. X), "a surface defect detection device and a surface defect detection method for a steel plate" (201680014977.6), "a steel plate surface defect detection method based on convolutional neural network multilevel characteristics" (201810338076.3) and the like provides an online detection method for surface defects of a steel plate, which can realize the non-artificial continuous detection, classification and recording of the surface defects, effectively analyze the detection result, extract useful information, further more accurately judge and evaluate the surface quality condition of the medium plate, effectively control the periodic defects by adopting a control strategy, and have very important practical significance for improving the product quality, the production efficiency and the core competitiveness of the product. The patent 'analysis method of periodic defects of strip steel (201710659994.1)' identifies defects through a meter inspection instrument and realizes the detection of periodic defects through the preset defect characteristics of three stages. In summary, the invention does not specially detect the periodic defects of the medium plate, and cannot realize the real-time control of the periodic defects based on the detection result. Therefore, the published documents do not report the real-time online detection and control of the periodic defects of the medium plate.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a method for controlling the periodic defects of the medium plate based on the real-time detection result, which aims to detect the periodic defects of the medium plate in real time, realize the periodic defect control, avoid mass quality accidents caused by the occurrence of the periodic defects such as roll marks, scratches and the like, and improve the production efficiency, the product quality and the economic benefit of the medium plate.
The method comprises the following steps:
(1) constructing a surface defect detection system and acquiring a defect image: and obtaining a defect image of the medium plate by a surface defect detection system arranged on the medium plate production line.
(2) Building a detection network and initializing parameters: a convolutional neural network model for detecting common defects on the surface of a medium plate and a long and short term memory network model for periodic defect detection are built, an input gate, a forgetting gate and an output gate are added into a long and short term memory network algorithm, and the three gates control information transfer in the network by utilizing a sigmoid activation function. And initial parameter setting is performed on the two networks.
(3) Acquiring common defect data: and extracting and classifying the characteristics of the surface defects in the medium plate image by adopting a convolutional neural network to obtain data such as defect types, positions, sizes, quantities and the like.
(4) And (3) generating a periodic defect detection model by off-line training: and (4) taking the roll mark, scratch and pockmark defect data obtained by the convolutional neural network in the step (3) as a training data set, and training the long-term and short-term memory network to generate a periodic defect detection model.
(5) Detecting periodic defects of the medium plate in real time: and (4) inputting the medium plate defect data obtained in the step (3) in real time on line into the periodic defect detection model based on the long and short term memory network in the step (4) to obtain the detection result of the medium plate periodic defect.
(6) And (3) a medium plate periodic defect control strategy: when the periodic defects are detected, the data processing end inputs the detection results into an auxiliary control console, a main control console and an MES production system of the control terminal, and the main control console determines a periodic defect control scheme so as to definitely eliminate the periodic defects through a coping process or stop roll changing operation, thereby realizing the effective control of the periodic defects of the medium plate.
Furthermore, the surface defect detection system related to the method consists of an image acquisition end, a data processing end and a control terminal, and comprises an upper surface detection unit, a lower surface detection unit, a parallel computer processing system, various servers, a control console, a cooling mechanism, a network data exchanger and the like. The image acquisition end comprises upper and lower surface detection units of the medium plate and the like, and the images of the upper and lower surfaces of the medium plate are obtained in real time by the image acquisition end.
Furthermore, a convolutional neural network model for detecting common defects on the surface of the medium plate and a long-short term memory network model for detecting periodic defects are built, data such as types, positions, sizes and quantities of the common defects of the medium plate are extracted by the convolutional neural network, and the convolutional neural network is composed of an input layer, a convolutional layer, a pooling layer and a full-connection layer and comprises 12 convolutional layers and 3 pooling layers. The long-short term memory network algorithm is added with an input gate, a forgetting gate and an output gate, and the three gates control information transfer in the network by using a sigmoid activation function. And initial parameter setting is performed on the two networks.
The periodic defect detection process of the long-short term memory network consists of four steps. The first step of deciding what information should be forgotten is executed by the Sigmod layer of the forget gate, and h is inputt−1And xtThen at Ct−1 Each neuron state of (a) outputs a number between 0 and 1. "1" means "completely retain this", "0" means "completely forget this"; second, it is decided what information is to be stored in the neuron cell, the "forgetting gate" Sigmod layer decides the value to be updated, and the tanh layer generates a new candidate value Ct˜, added to a neuronal state; third step multiplies the old state by ftForgetting the information to be forgotten, and adding a new candidate value it×Ct˜, as measured by how much to update the value of each state; fourthly, determining an output value, and determining which part of the neuron states are output by using a Sigmod layer; then, the state of the neuron is enabled to pass through a tanh layer (the output value is enabled to be between-1 and 1) and is multiplied by the output of a Sigmod threshold, and finally, only the result which is required to be output is output.
Further, the periodic defect detection model is generated through off-line training, roll mark, scratch and pockmark defect data obtained by the convolutional neural network are used as a training data set to be grouped, and the grouped feature vectors are input into the long-term and short-term memory network according to the time stamps. After each tagged set of feature vectors is input into the long-short term memory network, the input boolean value (H) of the last cell (cell) is taken as the result. When the value is 1, the input sample is a periodic defect sample, and the opposite is not.
Further, the processing steps of the periodic defect detection result of the medium plate are as follows: the method comprises the steps of collecting a medium plate defect image through a medium plate surface defect detection system, obtaining information such as types, positions and numbers of various defects by adopting a convolutional neural network, inputting the defect information into the long-short term memory network for off-line training to generate a periodic defect detection model, processing the medium plate defect image collected in real time on line through the convolutional neural network to form defect data, and inputting the real-time defect data into the periodic defect detection model to obtain a detection result of the medium plate periodic defects.
Further, when the defects of the roll mark, the scratch and the pockmark of the periodic defect are detected, determining a control strategy of the periodic defect according to the position, the size and the number of the defects, and if the roll mark appears, sending a command of stopping the roll to change the roll by the main control console so as to eliminate the influence of the roll mark on the quality of the medium and heavy plates in the subsequent batch; if a scratch occurs, the equipment factors of the scratch should be stopped to be inspected and eliminated so as to realize effective control of the periodic defects of the medium plate.
The technical scheme of the invention has the following beneficial effects:
according to the invention, the periodic defects of the medium plate can be detected on line in real time by building a long-short term memory network model, so that the periodic defects of the medium plate can be effectively controlled, the batch quality accidents caused by the occurrence of the periodic defects such as roll marks, scratches and the like can be avoided, and the production efficiency, the product quality and the economic benefit of the medium plate can be improved.
Detailed Description
In order to make the technical problems, technical solutions and advantages of the present invention more apparent, the following detailed description is given with reference to the accompanying drawings and specific embodiments.
The invention provides a method for detecting periodic defects of a medium plate based on a long-short term memory network, which is shown as a detection flow chart in figure 1 and comprises the following steps:
s1: constructing a surface defect detection system and acquiring a defect image: the surface defect detection system comprises an upper surface detection unit, a lower surface detection unit, a parallel computer processing system, various servers, a console, a cooling mechanism, a network data exchanger and the like. The system can obtain real-time images of the upper surface and the lower surface of the medium plate containing the defect information.
S2: building a detection network and initializing parameters: the method comprises the steps of building a convolutional neural network model for detecting common defects on the surface of the medium plate and a long-short term memory network model for detecting periodic defects, extracting data such as types, positions, sizes and quantities of the common defects of the medium plate by the convolutional neural network, wherein the convolutional neural network consists of an input layer, a convolutional layer, a pooling layer and a full-connection layer, and comprises 12 convolutional layers and 3 pooling layers. An input gate, a forgetting gate and an output gate are added in the long-term and short-term memory network algorithm, so that the self-circulating weight is changed, the network is allowed to forget the information which is accumulated currently, and the problem of gradient disappearance or gradient expansion is avoided.
Fig. 2 is a schematic diagram of an internal memory module of the long-term and short-term memory network, which includes a unit and three gates, i.e., an input gate, an output gate and a forgetting gate. All three gates adopt differentiable sigmoid functions which can ensure that the three gates are trained to obtain the optimal parameters. The three gates are used for indicating that the information gate controls the transmission of the information of the neuron, distributing how much new information to transmit to the current neuron and distributing how much information of the current neuron to the next neuron. These three gates are all non-linear summation units that contain activation functions inside and outside the memory block and control the activation functions of the units by multiplication. The black dots in the figure represent multiplication operations, the input gate and the output gate are multiplied by the input value and the output value of the cell, and the forgetting gate is multiplied by the state value before the cell. F represents the activation function of the gate, and a sigmoid function is usually used, so that the value of the activation function of the gate is between 0 and 1. G is the input function of the cell and h is the output function of the cell, which typically use a tanh function or a sigmoid function. The weight relationships between cells and gates are represented using dashed lines, with no weight relationships represented without dashed lines. The output values of the memory block to other structures of the network are provided by multiplication of output gates. In the long-short term memory network model, sigmoid functions are used in three gates, yielding values between 0 and 1. the tanh function is typically used to process data on state and output.
S3: acquiring common defect data: and extracting and classifying the characteristics of the surface defects in the medium plate image by adopting a convolutional neural network to obtain data such as defect types, positions, sizes, quantities and the like.
S4: and (3) generating a periodic defect detection model by off-line training: and (3) taking roll mark, scratch and pockmark defect data obtained by the convolutional neural network in the step (2) as a training data set, and training the long-term and short-term memory network, wherein the specific steps are as follows:
(1) and (5) extracting picture features by using a convolutional neural network, wherein the dimension of the feature vector is (12, 120, 64). The input format according to the long-short term memory network is { batch size, timing, dims }, wherein batch size is a training batch, timing is the time sequence input of the long-short term memory network, and dims is the input data to be trained.
(2) The second dimension 12 of the feature vector, i.e. the time in the long-short term memory network input, the result of the 1 st and 3 rd dimension multiplication is the content of the dims time point input. The positions of the 1 st and 2 nd dimensions are switched to {12, 12 x 64} at reshape. The feature vector input into the network image is then a set of {12, 12 × 64}, {12, 12 × 64} … … {12, 12 × 64} } with 10 step features. The conversion of Img2Text is completed.
(3) Shape of the feature vector is { batch _ size, w, h, kernals }. The feature vector is equally divided into suitable parts, each elongated rectangular vector is the input of each step of the long-short term memory network, i.e. each vector is X0,X2。。。Xt,Xt+2。
(4) And inputting the grouped feature vectors into the long-term and short-term memory network according to the time stamps. After each tagged set of feature vectors is input into the long-short term memory network, the input boolean value (H) of the last cell (cell) is taken as the result. When the value is 1, the input sample is a periodic defect sample, and the opposite is not. And training a defect identification network according to the rules to finally generate a periodic defect detection model.
S5: outputting a real-time detection result of the periodic defects of the medium plate: and (4) inputting the real-time medium plate defect data acquired in the step (3) into the periodic defect detection model based on the long and short term memory network in the step (4) to obtain a real-time detection result of the periodic defect of the medium plate.
S6: and (3) a medium plate periodic defect control strategy: when the periodic defect is detected, the data processing end inputs the detection result into an auxiliary control console, a main control console and an MES production system of the control terminal, and the main control console determines a periodic defect control scheme. When the roll mark, the scratch and the pockmark defects of the periodic defects are detected, determining a control strategy of the periodic defects according to the positions, the sizes and the number of the defects, and if the roll mark appears, sending a command of stopping the roll changing by a main control console so as to eliminate the influence of the roll mark on the quality of the medium plates in the subsequent batches; if a scratch occurs, the equipment factors of the scratch should be stopped to be inspected and eliminated so as to realize effective control of the periodic defects of the medium plate.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention as defined in the appended claims.