,
Research Institute,Baoshan Iron & Steel Co.,Ltd.,Shanghai 201999,China
Abstract: Character recognition has always been a hot topic in the field of computer vision.However,it is often difficult to obtain high-precision results in the actual scene owing to factors such as lighting conditions and imaging angle.Aiming at the problem of handwritten billet identification in the steel industry,this paper proposes the use of the canny edge extraction method to enhance the contour characteristics of characters.This technique is combined with the object detection network to achieve the automatic identification of blank square numbers and solve the problem of automatic tracking of billet logistics in the production process.The proposed algorithm is applied to the site with more than 2 019 images containing characters in the test set.Results show that the proposed algorithm has good practical application potential.
Key words: billet character recognition; character rotation mechanism; canny operator; deep learning network
Handwritten number recognition is a challenging machine-learning problem,which is mainly manifested in multistyle writing,broken strokes,join-up writing,and high recognition accuracy[1].In multistyle writ-ing,although there are only ten types of numbers and the strokes are simple,the same number-writing style is in endless variety,leading to the problem that the writing is not standardized and cannot meet printing requirements[2].Characters with broken strokes lose some crucial information,particularly the contour features,causing the original model to produce wrong results.Join-up writing is an unavoidable habit in the process of writing characters;however,it is one of the main factors that reduce recognition accuracy[3].On the one hand,the combination of strokes increases the types of digital strokes.On the other hand,the combination of strokes increases some redundant strokes,making it difficult to accu-rately extract the characteristics of specific numbers and increasing the error recognition accuracy[4].For high recognition accuracy,the result of number recognition is usually used as the only standard of identity authentication in the practical application scene,which is different from other applications in the field of computer vision in terms of fault tolerance.Therefore,it is necessary to achieve a high recognition rate,zero error recognition rate,and low missed-detection rate.
In this paper,an algorithm based on the edge repair mechanism is proposed for the handwritten number recognition at the end of the billet,which has achieved good results in the actual production process.The remainder of the paper is organized as follows.Section 2 introduces the algorithm frame-work for handwritten billet number recognition focusing on a character rotation mechanism and a canny edge extraction method for characters with broken strokes.Section 3 presents the algorithm ex-periments on more than 2 000 billet images,includ-ing the number recognition effect on some billet images and the statistical results of number recogni-tion accuracy on all billet images.The subjective and objective experiments show the effectiveness of the proposed algorithm in number recognition from billet images.Finally,Section 4 presents the conclu-sions and discusses future work.
Fig.1 shows the framework of the proposed character recognition method.
The target image recognized in this paper is a small square billet end image obtained in a real scene.Because of the actual production require-ments,the workers write the number of the billet with a brush,making the characters illegible and continuous.Furthermore,in the process of cooling,placing,and transportation in production,the end oxide scale often falls off,resulting in the fracture of individual characters.When these problems occur,the recognition accuracy of the YOLOv3 model for the characters at the end of the small square billet decreases rapidly.Therefore,the canny operator is used to extract the edge of the character.Then,a closed operation is used in the foreground to obtain a more continuous edge.Finally,the edge image and original image are superposed,and they are used as the input image of the YOLOv3 model.Fig.2 shows an example of the edge of the character extracted using a canny operator.
Fig.2 Result of character edge extraction
The handwritten characters at the end of the small square billet include the numbers 0-9.These numbers are regarded as ten different categories of targets,and their positions in the image are marked.Data amplification is an essential part of the training process of the deep learning model.There are several parameters in the existing deep-learning models.The parameters that can be trained in the general model are 10 thousand to one million levels,and it is very difficult to have so many training set samples.Here imgaug is used for image amplification.Imgaug is a library for image augmentation in machine learning experiments.It supports a wide range of augmentation techniques,such as image rotation,mirror,and blur.
In this paper,the target recognition deep learning network YOLOv3 is used to recognize the hand-written characters.YOLOv3 is a target detection model.It can detect the target quickly with high accuracy.It can also accurately distinguish the back-ground and target simultaneously.Fig.3 shows the principle of YOLOv3.The model divides the input image intoS·Sgrids.If the center of a target falls in a grid cell,the grid cell is responsible for de-tecting the target.Each grid cell predictsBcandidate boxes and their confidence and generates a feature vector of classification prediction.Then,the model outputs a tensor.After non-maximum suppression(NMS) filters,the candidate boxes with high con-fidence and their classification results are returned to the original image.The role of NMS is to delete the candidate boxes with high repetition rates.
Fig.3 Principle of YOLOv3
In the actual production site of the billet,the characters may not be upright (Fig.4).Moreover,as shown in Fig.5,the characters in the same line will have a large tilt angle even when the characters at the end of the billet are upright.The accuracy of the YOLOv3 model for character recognition at the end of the billet decreases when the two above-mentioned situations occur.Therefore,this study proposes a character rotation mechanism to ensure that the characters at the end of the billet are in the upright state,and the same line of characters is in the horizontal state before inputting to the YOLOv3 model.The effect is shown in Fig.6.The principle of the proposed character-rotation mechanism is as follows.First,the character image at the end of the small square billet is input into the YOLOv3 model to obtain the position box of each character.Then,the center point of each character position box is calculated and connected in a straight line.It is determined by the slope of this straight line whether to rotate the image and input it into the YOLOv3 model to predict the position box of each character again.
Fig.4 Unorthodox images
Fig.5 Images with characters skewed
Fig.6 Original and rotated images
In this study,the number of the end of the small square billet was identified,including the numbers 0-9.This section first describes the database and evaluation criteria used in the proposed algorithm.Then,it explains the experimental results of the proposed algorithm from the objective and sub-jective results.
Database:In this paper,the 2 019 images used in the algorithm experiment are from the actual pro-duction site of the billet.The image contains the number of the end of the small square billet,com-prising ten characters arranged in two lines.The image is obtained using an in-house imaging system.Fig.7 shows the structure of the imaging system.
Fig.7 Structure of the imaging system
Two normally bright light sources are used to frame the both sides of the square billet photo-graphing position.The end of the square billet is polished directly above,and a large angle is used to reduce the reflection.
Evaluation criterion:The evaluation standard of the proposed algorithm experiment adopts the traditional accuracy rate for evaluation:
p=a/t
(1)
where,pis the accuracy of the character recognition method;ais the number of correctly recognized small square end images;andtis the total number of small square end images.
Among them,each billet end image contains ten characters.Therefore,when ten characters are accurately recognized,the image is correctly recognized.
3.2.1 Objective experimental results
Of the 2 019 images,80% (1 615) and 20% (404) are used for training and testing,respectively.The recognition accuracy of the proposed algorithm according to the evaluation criteria proposed in Section 3.1 is given in Table 1 for the character image at the end of the billet.
Table 1 Recognition accuracy for the character image at the end of the billet
Remove images that are very blurry and hard for the naked eye to recognize;the accuracy of digital recognition can reach 97.6%.Fig.8 shows the images with strong noise.
Fig.8 Images with strong noise
3.2.2 Subjective experimental results
Fig.9 shows examples of character recognition at the small square billet end to better illustrate the effectiveness of the algorithm for small square billet end character image recognition.
Fig.9 Examples of character image recognition at the small square billet end
Aiming at the handwritten billet number in the iron and steel industry,this study employs the canny edge extraction method to reproduce the appearance characteristics of characters.The automatic recog-nition of the handwritten number characters at the end of the small billet is realized using the target detection network,which solves the problem of tracing the small billet process in the production process.In a future study,we will investigate the edge extraction using a deep learning network to replace the canny edge extraction method,which will be conducive to further improving the accuracy of the automatic recognition of the manual number characters at the end of the small square billet of the electric furnace.
Baosteel Technical Research2021年3期