CN115909312A - Slab number real-time detection and identification method based on deep learning - Google Patents
Slab number real-time detection and identification method based on deep learning Download PDFInfo
- Publication number
- CN115909312A CN115909312A CN202211480113.7A CN202211480113A CN115909312A CN 115909312 A CN115909312 A CN 115909312A CN 202211480113 A CN202211480113 A CN 202211480113A CN 115909312 A CN115909312 A CN 115909312A
- Authority
- CN
- China
- Prior art keywords
- slab
- image
- plate blank
- model
- real
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing systems specially adapted for manufacturing
Landscapes
- Image Analysis (AREA)
Abstract
The invention discloses a slab number real-time detection and identification method based on deep learning, which belongs to the field of continuous casting production informatization, and comprises the steps of collecting a large number of slab images containing backgrounds through a camera arranged beside a field roller way, obtaining an image detection model by training improved YOLOv5, and making a slab number image data set; preprocessing a slab number image, segmenting the slab number image into character images, making a character image data set, and training MobileNet 2 to obtain a character recognition model; detecting and extracting the plate blank number image on the roller way in real time by using an image detection model, identifying the plate blank number image in real time by using a character identification model and outputting a character string result; and comparing the result with the slab number information of the slab scheduling system, if the result is consistent with the slab number information, identifying the result accurately, and otherwise popping up warning information to remind a worker to correct the result. The invention realizes the real-time detection and accurate identification of the continuous casting slab number by using the computer vision technology and the deep learning method, and lays a good foundation for the subsequent production of continuous casting.
Description
Technical Field
The invention relates to the technical field of continuous casting production informatization, in particular to a slab number real-time detection and identification method based on deep learning.
Background
The method is characterized in that a unique identification number (slab number) is sprayed on a continuous casting formed slab according to the production requirement, the slab is transported by a roller way under the production scheduling of an MES (manufacturing execution system), the slab number needs to be identified before reaching the inlet of a hot rolling area, and the identified slab number information is compared with the information in a slab production plan, so that the comparison between the slab and the production information which are about to enter the next production stage is correct, and the hot charging and hot delivery of the slab are guaranteed effectively.
At present, the method for comparing the slab number information is mainly to compare the slab number information manually, namely, workers are arranged on two sides of a roller way to visually observe and match communication equipment such as an interphone and the like to track the slab, because the production of continuous casting slabs is continuous, the manual comparison method has large manpower input and low efficiency, and the slab number information is inevitably compared for a long time, so that fatigue is generated, and the conditions of comparison errors, omission and the like are caused. If the slab number information comparison fails, accurate execution of the subsequent continuous rolling production process cannot be ensured, so that efficient and stable operation of the whole production plan is affected. In order to replace the mode of manually comparing the plate blank numbers, workers are liberated from heavy, repeated and single production processes, steel mills at home and abroad already explore and use machine vision and machine learning methods to identify the plate blank numbers, but because of the complex field environment of a factory area and the fuzzy spraying condition of the plate blank numbers, the method of simply using vision and image processing cannot meet the requirements of real-time property and accuracy of identification. Therefore, it is necessary to develop a slab number real-time detection and identification method based on deep learning.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a slab number real-time detection and identification method based on deep learning, machine vision, image processing and deep learning are combined, the real-time performance and accuracy of slab number identification are effectively improved, and the slab number real-time detection and identification of slabs in the running process of a roller way are realized.
In order to solve the technical problems, the technical scheme adopted by the invention is as follows:
a slab number real-time detection and identification method based on deep learning comprises the following steps:
step 1, combining the reality of a field continuous casting slab conveying roller way, installing 1 camera beside the slab conveying roller way at an inlet of a hot rolling area, continuously collecting a large number of slab images containing backgrounds on the roller way, marking a front section slab number area, and manufacturing a slab image data set containing the backgrounds;
step 3, performing image enhancement, gaussian filtering, graying, binarization and Hough transform on the obtained front section slab number image dataset image, dividing each image into n character images by using a histogram segmentation method, and manufacturing a character image dataset in batch; training a MobileNetv2 model by using a character image data set to obtain an optimized plate blank number character recognition model; n is the number of the character digits of the slab number;
step 4, when a certain slab passes through a camera beside a continuous casting roller way at an inlet of a hot rolling area, intercepting a slab image containing a background by the camera, and detecting and extracting in real time to obtain a front section slab number image through an online operation optimized slab number image detection model;
step 5, performing image enhancement, gaussian filtering, graying, binarization and Hough transformation on the obtained front section plate blank number image, dividing each front section plate blank number image into n character images by using a histogram segmentation method, and identifying the current frame plate blank number character information in real time by using an optimized plate blank number character identification model; comparing and checking the identified plate blank number character string with plate blank information in a plate blank scheduling system, if the two are consistent, identifying the plate blank number accurately, sending the plate blank information to the plate blank scheduling system, and simultaneously resetting the comparison times; and if the two are not consistent, adding 1 to the comparison frequency, judging whether the comparison frequency is less than 3, if so, turning to the step 4, and otherwise, popping up warning information through a slab scheduling system to remind manual correction and correction.
The technical scheme of the invention is further improved as follows: in step 1, the manufacturing of the slab image data set containing the background specifically comprises: after 1 camera is installed on site, acquiring a video, extracting frames of the acquired video, cutting out pictures, selecting a plurality of pictures containing backgrounds and slab numbers in the whole period, and labeling the pictures into a type of slab number integral images with a labeling software LabelImg, wherein the labeling names are 'slabs'; when in marking, the marking frame is required to just frame the whole image target of the slab number, and after a picture is marked, the LabelImg generates an 'xml' file which comprises the information of the slab number category, the size of the marking frame and the coordinates; since the training set of the improved YOLOv5 model requires the format of the VOC data set, the ". Xml" format file is converted to a ". Txt" format file.
The technical scheme of the invention is further improved as follows: in step 2, the improved YOLOv5 model specifically includes: the input end of the improved YOLOv5 model adopts Mosaic data enhancement, self-adaptive anchor frame calculation and self-adaptive picture scaling; a backbone network of a YOLOv5 model is improved by using lightweight MobileNet, an attention mechanism CBAM is added into the backbone network, a deep separable convolution is added into a characteristic fusion network part, and a SiLU function is adopted as an activation function; a characteristic pyramid network and a pixel aggregation network structure are used between the backbone network and the final output layer; and a CIOU Loss function and a non-maximum inhibition algorithm screened by a prediction box are used in the final output layer.
The technical scheme of the invention is further improved as follows: in step 2, training the improved YOLOv5 model by using a slab image data set containing a background to obtain an optimized slab number image detection model, wherein the main flow is as follows:
(1) Intercepting a slab image containing a background by using a camera, carrying out adaptive scaling on the resolution of the image to 640 x 640 after the Mosaic data is enhanced, and then taking the set minipatch as the input of a convolution network;
(2) Carrying out feature extraction, feature fusion and prediction classification sequentially through a backbone network, a feature fusion network and a prediction network to obtain the position, the size and the category of a front section slab number image prediction frame;
(3) Calculating the deviation between the plate blank number image prediction frame and the plate blank number image target frame by using a loss function;
(4) Iteratively updating the matrix weight and the bias in the network along the gradient descending direction of the loss function, and reducing the loss between the plate blank number image prediction frame and the plate blank number image target frame;
(5) In different iteration processes of each round of training, matrix weight and bias parameters when the weighted average precision is highest after the steps (2) to (4) are completed are obtained;
(6) Repeating the process steps (2) - (5) for 300 rounds to obtain the matrix weight and the bias parameter with the optimal training precision, and using the matrix weight and the bias parameter as parameters of a real-time detection stage to obtain the prediction information of the image of the plate blank number to be detected;
and detecting the slab number image of the slab image containing the background by using the optimized slab number image detection model, and extracting the slab number image from the original image.
The technical scheme of the invention is further improved as follows: in step 3, the slab number image preprocessing and the production of the slab number character image data set specifically include: a plurality of front section slab number images are extracted by the slab number image detection model, and each slab number image is preprocessed, including: removing noise except the plate blank number in the picture by Gaussian filtering, converting the colored picture into gray by graying, converting the plate blank number in the picture into white by binarization and converting other areas into black by binarization; inputting the preprocessed picture into a histogram segmentation algorithm, calculating by using pixels in the picture by using the histogram segmentation algorithm, positioning clusters in the picture at the peaks and the troughs of the histogram, and segmenting the slab number and the alphabetic characters by using color and intensity as a measuring method.
The technical scheme of the invention is further improved as follows: in step 3, the MobileNetv2 model is a light-weight classification network model based on deep learning, the purpose of character recognition is achieved by utilizing the classification function of the MobileNetv2 model, the dimensionality is expanded through an expansion layer, the features are extracted by using deep separable convolution, and then the data is compressed by using a prediction layer, so that the network is reduced again; and training the MobileNetv2 model by using the slab number character data set to obtain the optimal model weight, and using the training optimized model weight for recognizing the segmented slab number characters.
The technical scheme of the invention is further improved as follows: the real-time detection and identification method for the plate blank number shoots a transmission image through the camera, and a real-time plate blank number image detection model and a plate blank number character identification model run on a workstation computer to form a real-time plate blank number detection and identification system, so that the real-time detection of the plate blank number image on the position of a roller way and the accurate identification of the plate blank number can be realized.
Due to the adoption of the technical scheme, the invention has the technical progress that:
1. the invention uses the computer vision technology and the deep learning method to realize the real-time detection and accurate identification of the slab number in the transportation process of the slab roller, the slab number image detection model adopts an improved YOLOv5 model, the model uses light MobileNet to optimize the backbone network of the YOLOv5, an attention mechanism CBAM is added into the backbone network, and a deep separable convolution is added into a characteristic fusion network, so that the identification precision is higher and the detection speed is higher than that of the YOLOv5 model; the problem that manual rechecking of the slab number is high in human resource investment and prone to error after long-time work is solved.
2. The method comprises the steps of preprocessing a front section plate blank number image extracted by a plate blank number image detection model, wherein the preprocessing comprises image enhancement, gaussian filtering noise removal, image graying binarization processing and Hough transformation inclined correction plate blank number, so that image characters are clearer and separable, and the segmentation of character images by a subsequent histogram method is facilitated; the slab number character recognition model adopts a MobileNetv2 model based on deep learning, achieves the character recognition effect by utilizing the classification function of the model, and is lighter in weight, so that the recognition speed and accuracy can meet the actual project requirements.
3. The invention provides a real-time detection and identification method of a slab number, which is an end-to-end detection and identification method of the slab number, namely, a real-time slab image containing a background and shot by a camera is input, and an identified result of a slab number character string is output; only 1 high-performance workstation computer and 1 high definition digtal camera are needed, the maintenance and the replacement are easy, and the use cost is lower compared with the manual checking of the plate blank number.
4. The invention combines machine vision, image processing and deep learning, detects and identifies the front section plate blank number of the plate blank running on the roller way in real time, interacts with a plate blank scheduling system in real time, achieves the purpose of comparing with production information, and lays a good foundation for the subsequent high-efficiency production of hot continuous rolling.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts;
FIG. 1 is a schematic diagram of a slab number real-time detection and identification method based on deep learning according to the present invention;
FIG. 2 is a schematic view of a camera mounting position in an embodiment of the present invention;
FIG. 3 is a structural diagram of an improved YOLOv5 model in an embodiment of the present invention;
FIG. 4 is a diagram illustrating a structure of a character recognition model according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a process of identifying a slab number on line in real time in the embodiment of the invention.
Detailed Description
It should be noted that the terms "comprises" and "comprising," and any variations thereof, in the description and claims of the present invention and the above-described drawings, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The embodiment of the application solves the problems that manual comparison of plate blank numbers in the existing continuous casting production is large in human resource investment and prone to error in long-time work by providing a plate blank number real-time detection and identification method based on deep learning, and workers are liberated from heavy, repeated and single production processes. The general idea is as follows: the method combining machine vision, image processing and deep learning is used for realizing real-time detection and identification of the slab number in the running process of the slab roller way, and real-time interaction with a slab scheduling system is realized, so that the purpose of comparison with production information is achieved, the identification precision is higher, the detection speed is higher, and a good foundation is laid for follow-up high-efficiency production of hot rolling.
The invention is further described in detail below with reference to the drawings and examples:
as shown in fig. 1, a slab number real-time detection and identification method based on deep learning includes the following steps:
step 1, combining the reality of a field continuous casting slab conveying roller way, installing 1 camera beside the slab conveying roller way at an inlet of a hot rolling area, continuously collecting a large number of slab images containing backgrounds on the roller way, labeling a front section slab number area, and manufacturing a slab number image data set containing the backgrounds;
step 3, performing image enhancement, gaussian filtering, graying, binarization and Hough transform on the obtained front section slab number image dataset image, dividing each image into n character images by using a histogram segmentation method, and manufacturing a character image dataset in batch; training a MobileNetv2 model by using a character image data set to obtain an optimized plate blank number character recognition model; n is the number of the character digits of the slab number;
specifically, the method comprises the following steps: the method comprises the steps of carrying out image enhancement, gaussian filtering, graying and binarization processing on a front section slab number image dataset image to obtain a clear binarized image, then carrying out Hough transformation on the binarized image to correct an inclined front section slab number image, and dividing each slab number image containing numbers and letters into n independent character pictures (each slab number image is composed of n numbers or letters) by utilizing a histogram division method. Dividing a large number of front section plate blank number images, and manually dividing the numbers and the letter images into corresponding categories to obtain a plate blank number character data set. And training a MobileNetv2 model by using the slab number character data set, classifying n character images, and fully training and optimizing to obtain a slab number character recognition model.
Step 4, when a certain slab passes through a camera beside a continuous casting roller way at an inlet of a hot rolling area, intercepting a slab image containing a background by the camera, and detecting and extracting in real time to obtain a front section slab number image through an online operation optimized slab number image detection model;
step 5, performing image enhancement, gaussian filtering, graying, binarization and Hough transformation on the obtained front section plate blank number image, dividing each front section plate blank number image into n character images by using a histogram segmentation method, and identifying the current frame plate blank number character information in real time by using an optimized plate blank number character identification model; comparing and checking the identified plate blank number character string with plate blank information in a plate blank scheduling system, if the two are consistent, identifying the plate blank number accurately, sending the plate blank information to the plate blank scheduling system, and simultaneously resetting the comparison times; and if the two are not consistent, adding 1 to the comparison frequency, judging whether the comparison frequency is less than 3, if so, turning to the step 4, and otherwise, popping up warning information through a slab scheduling system to remind manual correction and correction.
Example (b):
training of off-line slab number image detection model and slab number character recognition model
1. Installation of on-site camera
In this embodiment, 1 camera is installed beside a slab conveying roller way at an inlet of a hot rolling area, and the specific positions are as shown in fig. 2: the camera can take a clear front section slab number image and all slabs in the hot rolling production plan pass through the camera.
2. Production of slab number image detection dataset
After 1 camera is installed on site, acquiring a video, extracting frames of the acquired video, cutting out pictures, selecting about 3000 pictures containing backgrounds and slab numbers in the whole period, and labeling the pictures into a type of slab number integral images with a labeling software LabelImg, wherein the labeling names are 'slabs'; and during marking, the marking frame is just framed on the whole image target of the slab number as much as possible, and after a picture is marked, the LabelImg generates an xml file which comprises the information of the slab number type, the size of the marking frame and the coordinates. Since the training set of the improved yollov 5 model requires the format of the VOC data set, the ". Xml" format file is converted to a ". Txt" format file.
3. Introduction of the improved Yolov5 model
The improved YOLOv5 model algorithm is an Anchor frame-based target detection algorithm, the Anchor point size of the Anchor is calculated by adopting a K-means clustering algorithm, anchor frames with different specifications are generated in advance to serve as prior candidate frames, and then a target frame is inferred.
The improved YOLOv5 model structure diagram is shown in fig. 3, and the input end of the improved YOLOv5 model structure diagram adopts Mosaic data enhancement, adaptive anchor frame calculation and adaptive picture scaling; a backbone network of a YOLOv5 model is improved by using lightweight MobileNet, an attention mechanism CBAM is added into the backbone network, a deep separable convolution is added into a characteristic fusion network part, and a SiLU function is adopted as an activation function; a characteristic pyramid network (FPN) and a Pixel Aggregation Network (PAN) structure are used between the backbone network and the final output layer; and a CIOU Loss function and a non-maximum inhibition algorithm screened by a prediction box are used in the final output layer. Wherein:
the loss function for the modified YOLOv5 is as follows:
(1) The classification Loss and confidence Loss use the following Focal Loss function:
wherein alpha and gamma are two parameters for solving the problem of unbalance between positive and negative samples, gamma is more than or equal to 0,wherein m is the number of positive samples, n is the number of negative samples, namely the size of alpha is set according to the distribution of the positive and negative samples; p' refers to the predicted value of the sample; y refers to the sample category, y =1 indicates the category, and y =0 indicates the category.
(2) The bounding box loss uses the following CIoULoss loss function:
wherein b refers to the prediction block, b gt Refers to the target box, p 2 (b,b gt ) C represents the minimum rectangle containing the prediction frame and the target frame;used for measuring the consistency of relative proportion of two rectangular frames, wherein w and h respectively refer to the width and height of the rectangular frames; />Are the weight coefficients.
The improved YOLOv5 detection model is trained by updating matrix weight and bias parameters in a network through gradient descent iteration to reduce loss between a prediction frame and a target frame, and finally solving the weight matrix and the bias parameters when a loss function is minimum under a preset iteration number.
The model for locating the slab number image may also adopt other deep learning detection models such as the YOLO series and variants thereof, in addition to the improved yollov 5.
4. Training of slab number image detection model and extraction of slab number image
As shown in fig. 3, the improved YOLOv5 model is trained by using slab images containing backgrounds, and the main process for obtaining the slab number image detection model is as follows:
(1) Intercepting a slab image containing a background by using a camera, adaptively scaling the image resolution to 640 x 640 after the image is enhanced by Mosaic data, and then taking the set minipatch as the input of a convolution network;
(2) Carrying out feature extraction, feature fusion and prediction classification sequentially through a backbone network, a feature fusion network and a prediction network to obtain the position, the size and the category of a front section slab number image prediction frame;
(3) Calculating the deviation between the plate blank number image prediction frame and the plate blank number image target frame by using a loss function;
(4) Iteratively updating the matrix weight and the offset in the network along the gradient descending direction of the loss function, and reducing the loss between the plate blank number image prediction frame and the plate blank number image target frame;
(5) In different iteration processes of each round of training, matrix weight and bias parameters when the weighted average precision is highest after the steps (2) to (4) are completed are obtained;
(6) And (5) repeating the process steps (2) to (5) for 300 rounds to obtain the matrix weight and the bias parameter with the optimal training precision, and using the matrix weight and the bias parameter as parameters of a real-time detection stage to obtain the prediction information of the image of the plate blank number to be detected.
And detecting the slab number image of the slab image containing the background by using the optimized slab number image detection model, and extracting the slab number image from the original image.
5. Slab number image preprocessing and production of slab number character image data set
About 3000 front section slab number images are extracted by a slab number image detection model, and each slab number image is preprocessed, wherein the preprocessing comprises the following steps: and removing noise except the slab number in the picture by Gaussian filtering, converting the colored picture into gray by graying, converting the slab number in the picture into white by binarization, and converting other areas into black by binarization. Inputting the preprocessed picture into a histogram segmentation algorithm, calculating by using pixels in the picture, positioning clusters in the picture at the peaks and the troughs of the histogram, and segmenting the slab number and the alphabetic characters by using color and intensity as a measuring method. Each slab number region picture is divided into n =11 character pictures.
As can be seen from the naming rule of the slab number in the order information, the slab number in this embodiment is composed of n =11 bits, wherein there are 14 types of characters, which are "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "B", "C", and "D", respectively, and all the slab number character images obtained by segmenting about 3000 front section slab number images are manually classified into corresponding categories to create a slab number character data set for training the subsequent slab number character recognition model.
6. Training of slab number character recognition model
In the embodiment, the slab number recognition model uses a MobileNetv2 model, after the accurate segmentation of the characters is completed, the MobileNetv2 model is used for training a classification model, the segmented character pictures are classified and recognized, and finally the character pictures are combined into the slab number character string to be output.
The MobileNet v2 model is a light-weight classification network model and can be used for character recognition after image segmentation. The structure of the MobileNetv2 model is shown in fig. 4, and the dimension is first expanded by the Expansion Layer (Expansion Layer), the features are extracted by using depth separable Convolution (Depthwise Convolution), and then the data is compressed by the prediction Layer (Projection Layer) to make the network become smaller again. Because both the expansion layer and the prediction layer have learnable parameters, the entire network structure can learn how to better expand and compress data.
And training the MobileNetv2 model by using the slab number character data set to obtain the optimal model weight, and using the training optimized model weight for recognizing the segmented slab number characters.
The MobileNet v2 model for identifying the slab number characters is based on deep learning, achieves the purpose of character identification by utilizing the classification function of the model, and can be replaced by other deep learning models such as ResNet, mobileNet v3 and the like.
(II) on-line real-time identification of slab number
The improved YOLOv5 slab number image detection model and the improved MobileNetv2 slab number character recognition model are integrated, and real-time detection and recognition of the slab number are realized. When a certain slab passes through a camera above a continuous casting roller way at an inlet of a hot rolling area, intercepting an image of the slab by using the camera, detecting the intercepted image in real time by using a slab number image detection model, and extracting a detected front section slab number image, as shown in fig. 5 (a); the slab number image is preprocessed, and the preprocessing comprises the following steps: removing noise except the slab number in the picture by Gaussian filtering, converting a colored picture into gray by graying treatment as shown in fig. 5 (b), converting the slab number in the picture into white by binarization treatment, and converting other areas into black by binarization treatment as shown in fig. 5 (c); inputting the preprocessed pictures into a histogram segmentation algorithm, and segmenting each slab number region picture into n character pictures as shown in fig. 5 (d); and (5) classifying and identifying the segmented character pictures by using a slab number character identification model, and finally combining the character pictures into a slab number character string for outputting, as shown in fig. 5 (e). And comparing the identification result with the slab information in the slab production scheduling system, otherwise popping up warning information through the slab scheduling system to remind manual correction and correction.
The technical solutions of the present invention can also be combined appropriately to form other embodiments that can be understood by those skilled in the art, and all the equivalent changes made in the claims of this patent are the protection scope of the claims of this application.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.
Claims (7)
1. A slab number real-time detection and identification method based on deep learning is characterized in that: the method comprises the following steps:
step 1, combining the reality of a field continuous casting slab conveying roller way, installing 1 camera beside the slab conveying roller way at an inlet of a hot rolling area, continuously collecting a large number of slab images containing backgrounds on the roller way, marking a front section slab number area, and manufacturing a slab image data set containing the backgrounds;
step 2, training the improved YOLOv5 model by using a slab image dataset containing a background to obtain an optimized slab number image detection model, and extracting a front section slab number image dataset corresponding to the slab image dataset containing the background by using the model;
step 3, performing image enhancement, gaussian filtering, graying, binarization and Hough transform on the obtained front section slab number image dataset image, dividing each image into n character images by using a histogram segmentation method, and manufacturing a character image dataset in batch; training a MobileNetv2 model by using a character image data set to obtain an optimized plate blank number character recognition model; n is the number character digit of the plate blank;
step 4, when a certain slab passes through a camera beside a continuous casting roller way at an inlet of a hot rolling area, intercepting a slab image containing a background by the camera, and detecting and extracting in real time to obtain a front section slab number image through an online operation optimized slab number image detection model;
step 5, performing image enhancement, gaussian filtering, graying, binarization and Hough transformation on the obtained front section plate blank number image, dividing each front section plate blank number image into n character images by using a histogram segmentation method, and identifying the current frame plate blank number character information in real time by using an optimized plate blank number character identification model; comparing and checking the identified plate blank number character string with plate blank information in a plate blank scheduling system, if the two are consistent, identifying the plate blank number accurately, sending the plate blank information to the plate blank scheduling system, and simultaneously resetting the comparison times; and if the two are not consistent, adding 1 to the comparison times, judging whether the comparison times are less than 3, if so, turning to a step 4, otherwise, popping up warning information through a slab scheduling system to remind manual proofreading and correction.
2. The slab number real-time detection and identification method based on deep learning of claim 1, characterized in that: in step 1, the manufacturing of the slab image data set including the background specifically includes: after 1 camera is installed on site, acquiring a video, extracting frames of the acquired video, cutting out pictures, selecting a plurality of pictures containing backgrounds and slab numbers in the whole period, and labeling the pictures into a type of slab number integral images with a labeling software LabelImg, wherein the labeling names are 'slabs'; when in marking, the marking frame is required to just frame the whole image target of the slab number, and after a picture is marked, the LabelImg generates an 'xml' file which comprises the information of the slab number category, the size of the marking frame and the coordinates; since the training set of the improved yollov 5 model requires the format of the VOC data set, the ". Xml" format file is converted to a ". Txt" format file.
3. The slab number real-time detection and identification method based on deep learning of claim 1, characterized in that: in step 2, the improved YOLOv5 model specifically includes: the input end of the improved YOLOv5 model adopts Mosaic data enhancement, self-adaptive anchor frame calculation and self-adaptive picture scaling; a backbone network of a YOLOv5 model is improved by using lightweight MobileNet, an attention mechanism CBAM is added into the backbone network, a deep separable convolution is added into a characteristic fusion network part, and a SiLU function is adopted as an activation function; a characteristic pyramid network and a pixel aggregation network structure are used between the backbone network and the final output layer; and a CIOU Loss function and a non-maximum inhibition algorithm screened by a prediction box are used in the final output layer.
4. The slab number real-time detection and identification method based on deep learning of claim 1, characterized in that: in the step 2, the improved YOLOv5 model is trained by using a slab image data set containing a background, and the main flow of the optimized slab number image detection model is as follows:
(1) Intercepting a slab image containing a background by using a camera, adaptively scaling the image resolution to 640 x 640 after the image is enhanced by Mosaic data, and then taking the set minipatch as the input of a convolution network;
(2) Carrying out feature extraction, feature fusion and prediction classification sequentially through a backbone network, a feature fusion network and a prediction network to obtain the position, the size and the category of a front section slab number image prediction frame;
(3) Calculating the deviation between the plate blank number image prediction frame and the plate blank number image target frame by using a loss function;
(4) Iteratively updating the matrix weight and the offset in the network along the gradient descending direction of the loss function, and reducing the loss between the plate blank number image prediction frame and the plate blank number image target frame;
(5) In different iteration processes of each round of training, matrix weight and bias parameters when the weighted average precision is highest after the steps (2) to (4) are completed are obtained;
(6) Repeating the process steps (2) - (5) for 300 rounds to obtain the matrix weight and the bias parameter with the optimal training precision, and using the matrix weight and the bias parameter as parameters of a real-time detection stage to obtain the prediction information of the image of the plate blank number to be detected;
and detecting the slab number image of the slab image containing the background by using the optimized slab number image detection model, and extracting the slab number image from the original image.
5. The slab number real-time detection and identification method based on deep learning of claim 1, characterized in that: in step 3, the slab number image preprocessing and the production of the slab number character image data set specifically include: a plurality of front section slab number images are extracted by the slab number image detection model, and each slab number image is preprocessed, including: removing noise except the plate blank number in the picture by Gaussian filtering, converting the colored picture into gray by graying, converting the plate blank number in the picture into white by binarization and converting other areas into black by binarization; inputting the preprocessed picture into a histogram segmentation algorithm, calculating by using pixels in the picture by using the histogram segmentation algorithm, positioning clusters in the picture at the peaks and the troughs of the histogram, and segmenting the slab number and the alphabetic characters by using color and intensity as a measuring method.
6. The slab number real-time detection and identification method based on deep learning of claim 1, characterized in that: in step 3, the MobileNet v2 model is a light-weight classification network model based on deep learning, the purpose of character recognition is achieved by utilizing the classification function of the MobileNet v2 model, the dimensionality is expanded through an expansion layer, features are extracted by using deep separable convolution, and then a prediction layer is used for compressing data to reduce the network again; and training the MobileNetv2 model by using the slab number character data set to obtain the optimal model weight, and using the training optimized model weight for recognizing the segmented slab number characters.
7. The slab number real-time detection and identification method based on deep learning of claim 1, characterized in that: the real-time detection and identification method for the plate blank number shoots a transmission image through the camera, and a real-time plate blank number image detection model and a plate blank number character identification model run on a workstation computer to form a real-time plate blank number detection and identification system, so that the real-time detection of the plate blank number image on the position of a roller way and the accurate identification of the plate blank number can be realized.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211480113.7A CN115909312A (en) | 2022-11-24 | 2022-11-24 | Slab number real-time detection and identification method based on deep learning |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211480113.7A CN115909312A (en) | 2022-11-24 | 2022-11-24 | Slab number real-time detection and identification method based on deep learning |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115909312A true CN115909312A (en) | 2023-04-04 |
Family
ID=86490833
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211480113.7A Pending CN115909312A (en) | 2022-11-24 | 2022-11-24 | Slab number real-time detection and identification method based on deep learning |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115909312A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117173716A (en) * | 2023-09-01 | 2023-12-05 | 湖南天桥嘉成智能科技有限公司 | Deep learning-based high-temperature slab ID character recognition method and system |
-
2022
- 2022-11-24 CN CN202211480113.7A patent/CN115909312A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117173716A (en) * | 2023-09-01 | 2023-12-05 | 湖南天桥嘉成智能科技有限公司 | Deep learning-based high-temperature slab ID character recognition method and system |
CN117173716B (en) * | 2023-09-01 | 2024-03-26 | 湖南天桥嘉成智能科技有限公司 | Deep learning-based high-temperature slab ID character recognition method and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106683073B (en) | License plate detection method, camera and server | |
CN109858480A (en) | Digital instrument identification method | |
CN112307919B (en) | Improved YOLOv 3-based digital information area identification method in document image | |
CN110781882A (en) | License plate positioning and identifying method based on YOLO model | |
CN113947570B (en) | Crack identification method based on machine learning algorithm and computer vision | |
CN115909312A (en) | Slab number real-time detection and identification method based on deep learning | |
CN112669269A (en) | Pipeline defect classification and classification method and system based on image recognition | |
CN114299394A (en) | Intelligent interpretation method for remote sensing image | |
CN114219773A (en) | Pre-screening and calibration method for bridge crack detection data set | |
CN115908774A (en) | Quality detection method and device of deformed material based on machine vision | |
CN113421223B (en) | Industrial product surface defect detection method based on deep learning and Gaussian mixture | |
CN116259008A (en) | Water level real-time monitoring method based on computer vision | |
CN110991434A (en) | Self-service terminal certificate identification method and device | |
CN117690086A (en) | Flood prevention gate identification and control method and system based on 5G and AI technology | |
CN110502605B (en) | Electric power asset LCC cost collection system based on artificial intelligence technology | |
CN115082923B (en) | Milk packing box production date identification method based on machine vision | |
CN112734807A (en) | Method for automatically tracking plate blank on continuous casting roller way based on computer vision | |
CN115862021B (en) | Automatic hydropower station gate identification method based on YOLO | |
CN113971774B (en) | Water delivery structure surface limnoperna lacustris spatial distribution characteristic identification method | |
CN114092410B (en) | Mobile phone surface defect accurate identification method based on multi-scale convolutional neural network | |
CN110135274A (en) | A kind of people flow rate statistical method based on recognition of face | |
CN108734158B (en) | Real-time train number identification method and device | |
CN114820582A (en) | Mobile phone surface defect accurate classification method based on mixed attention deformation convolution neural network | |
CN114155421A (en) | Automatic iteration method of deep learning algorithm model | |
CN114648738A (en) | Image identification system and method based on Internet of things and edge calculation |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |