Automatic positioning and recognition method of LED characters based on deep learning
Through deep learning technology, the combination of YOLOv4, PSENet and CRNN networks is used to realize automatic character positioning and recognition of LED dials, solving the problems of low reading efficiency and recognition errors of LED dials in the existing technology, and improving recognition accuracy and adaptability. sex.
Patent Information
- Application Number
- CN202210709461.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-21
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2042-06-21
AI Technical Summary
The existing LED digital meter reading recognition method is inefficient, relies on manual operation and has recognition errors. It is especially dangerous in high-voltage substations and power distribution stations, and cannot effectively identify LED characters that are tilted or affected by light.
Using a method based on deep learning, the YOLOv4 algorithm is used to locate the LED character area, and the PSENet and CRNN networks are combined to achieve end-to-end character positioning and recognition. The LED dial position is accurately detected through YOLOv4, PSENet performs image segmentation and feature fusion, and the CRNN network performs multi-line Character recognition does not require the design of different algorithms to solve different types of characters and adapt to changes in lighting and angles.
It realizes automatic reading recognition of LED dials, improves recognition efficiency and accuracy, is suitable for LED dial recognition in complex scenes, and reduces manual intervention and error rates.
Smart Images

Figure CN115035526B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent instruments, and in particular to an automatic positioning and recognition method for LED characters based on deep learning. Background Art
[0002] LED digital meters are commonly found in new intelligent meters. Compared with traditional mechanical meters, they have the advantages of simple installation, small engineering workload, high accuracy, and small size. They have been widely used in various control systems, substation automation, distribution automation, community power monitoring, intelligent distribution cabinets, and switch cabinets. However, this kind of meter reading method often relies on manual work, which is not only inefficient, but also requires a lot of manpower and energy. In high-voltage substations and distribution stations, manual reading of LED meters is required. These scenarios cannot be denied to have some dangerous factors, so it is necessary to develop an algorithm that can automatically identify LED meter readings.
[0003] At present, the reading recognition method of the digital LED instrument usually only recognizes the numbers 0-9, and there is no design for the recognition logic of the decimal point, the positive and negative sign, and the ABC three-phase. This method mainly segments and recognizes the characters of the LED instrument with a single background. When the background is complex, it usually causes the characters segmented to be incompletely displayed and cannot be recognized. There is also a method of designing different recognition logics for numbers, decimal points, positive and negative signs, and ABC three-phases. Usually, a pre-calibrated digital LED instrument image, a single character area in the LED instrument to be recognized, a possible decimal point area, etc. are used to locate the LED instrument character area to be recognized in the panoramic image using a traditional template matching method, and then the single character area and the decimal point area to be recognized are obtained according to the relative position relationship between the positioning frame and the target frame. The obtained single character area is respectively input into a trained convolutional neural network such as Alexnet for recognition, the brightness of the decimal point area is detected, and the detection result is post-processed. Finally, the final reading is obtained according to the recognition results of the character, decimal point, ABC three-phases, and the positive and negative sign. The disadvantage of this method is that it only recognizes single characters, and the effect of character segmentation seriously affects digital recognition. It is easy to have recognition errors for LED characters that are tilted, affected by lighting, or blurred in the photo. Summary of the invention
[0004] In order to solve the problems of the prior art, the present invention provides a method for automatic positioning and recognition of LED characters based on deep learning, which uses the YOLOv4 algorithm to locate the entire area of the LED characters to be recognized, and realizes the positioning of the digital character area of the LED dial from the panoramic view, and then uses the PSENet network to locate and detect single-line or multi-line characters, and finally uses the CRNN network to realize the recognition of LED multi-line characters. This method can not only realize the end-to-end positioning of the LED meter and detect the recognition process, but also does not need to design different algorithms according to different types for 0-9 numbers, decimal points, positive and negative signs, and ABC three-phases, but inputs the detected character area into the CRNN network for recognition. This method can also solve the problem of inaccurate recognition caused by tilted LED meters, blurred characters, etc.
[0005] The present invention will make full use of the powerful ability of deep learning, that is, first use the YOLOv4 network to locate the character area of the LED meter. The YOLO target detection network based on deep learning can accurately detect the position of the meter. There is no need to mark the meter position information in the picture taken by the camera. The taken picture can be directly input into the network for detection. After the ROI, that is, the region of interest, of the meter is detected, it is then input into the character detection network. The progressive expansion network PSENet is used to obtain the output with the same size as the original picture through downsampling, feature fusion, and upsampling, and finally obtain the final text connected domain, that is, locate the position of each row of characters in the LED meter. This network can locate single-line or multi-line character areas, that is, all character areas in the meter can be detected and located. Finally, the detected text character area is input into the text recognition network for recognition, and the CRNN network is used for automatic recognition, so as to complete the automatic positioning and recognition of multi-line characters of LED in an effective way.
[0006] The technical solution adopted by the present invention is a method for automatic positioning and recognition of LED characters based on deep learning, which is specifically implemented according to the following steps:
[0007] Step 1: The LED meter area positioning module uses the YOLOv4 target detection algorithm to detect the LED meter target in the substation scenario. In order to avoid interference from other areas of the dial on character recognition, only the digital character area where the LED meter is located is located;
[0008] Step 2: LED instrument character detection module, using the progressive scale expansion network PSENet algorithm as the digital LED instrument character detection module in the substation scenario, through image segmentation technology, pixel-level detection of LED character target area, to improve the model's detection performance under LED multi-line characters;
[0009] Step 3, the LED instrument character recognition module uses the CRNN network to train the features of the one or more lines of character target areas obtained in step 2, and finally uses the CTC algorithm to recognize specific characters to obtain the recognition results of the LED instrument.
[0010] Step 1 is implemented according to the following steps:
[0011] Step 1.1, enhance the LED sample data using the GridMask data enhancement method. GridMask is an information deletion method, which is implemented by randomly discarding an area on the image. This is equivalent to adding a regularization term to the network to avoid overfitting of the network, so as to achieve a balance between deleting information and retaining information. Random erasing, cutout, and hide-seek methods may result in the deletion or retention of all identifiable areas, which will introduce noise and be detrimental to model training.
[0012] A GridMask corresponds to four parameters, namely x, y, r, and d. These four parameters determine a specific set of Mask areas. During the actual training process, the Mask area is also rotated.
[0013]
[0014] Where k is the retention ratio of image information, W and H are the width and height of the original image, M is the number of pixels retained, k has no direct relationship with the above four parameters, and this parameter indirectly defines r, where the definition of r can be obtained by K conversion
[0015] k=1-(1-r) 2
[0016] x and y are defined as random in a certain area:
[0017] δ x (δ y ) = random(0,d-1)
[0018] In the task of detecting LED instruments, r of the four hyperparameters of GridMask is set to 0.4, and d is set to (96,224). During use, the training images are enhanced with GridMask with a probability of P = 0.6. This detection task is set to 0 at the beginning. As the number of training times increases, the GridMask enhancement of the training images gradually increases and finally becomes P.
[0019] Step 1.2, build a YOLOv4 target detection network to locate the position of the LED instrument dial character area in the picture. First, the learned high-level semantic information is passed to the low-level network through the FPN network, and then the high-level semantic information is integrated with the low-level high-resolution information to improve the detection effect. Then, the information transmission path from the low layer to the high layer is increased, and the feature information is enhanced through downsampling operations. Finally, the feature information of different convolutional layers is integrated to achieve the detection effect. The Mish activation function is used in the YOLOv4 backbone extraction network CSPDarknet53. The Mish function is a smooth curve. The smooth activation function can better input information into the neural network, thereby obtaining better accuracy and generalization, and can allow relatively small negative gradient input. Its function expression is:
[0020] Mish = x × tanh (ln (1 + e x ))
[0021] Step 1.3, define the target annotation box of the LED instrument dial character area that has been annotated in advance, and define the area as the Ground truth. Input the annotated target image and its annotation file into the YOLOv4 network for training, and use the trained YOLOv4 target detection network to achieve character area positioning of LED instruments with different characters.
[0022] Step 1.4: Use DIoU-NMS and consider the overlapping area and the center point distance between the two boxes at the same time to remove duplicate target boxes and finally obtain the digital character area of the LED instrument.
[0023] Step 2 is implemented as follows:
[0024] Step 2.1, feature extraction, the input image is passed through the Resnet50 residual network for feature extraction. ResNet50 has 50 conv2d layers, and the feature maps output by the Conv2, Conv3, Conv4 and Conv5 layers are extracted to construct a feature pyramid. The top-down and horizontal connection form is used to extract 4 layers of features P2, P3, P4, P5 to obtain 4 feature layers with 256 channels.
[0025] Step 2.2, feature fusion, fuse the four feature maps obtained in step 2.1, and perform feature cascade on feature layer P2 by upsampling P3, P4, and P5 by 2 times, 4 times, and 8 times respectively, and finally obtain a 1024-dimensional fused feature vector F. Fusion of high-level semantic features with low-level features can effectively perceive the distribution of LED characters and ensure more precise detection of character boundaries. The specific implementation method is:
[0026] F=C(P2, P3, P4, P5)=P2||U P×2 (P3)||U P×4 (P4)||U P×8 (P5)
[0027] Among them, “||” represents the concatenation operation, and upsampling is performed by 2 times, 4 times, and 8 times respectively.
[0028] Step 2.3: The fusion feature F obtained in step 2.2 is subjected to a 3×3 convolution, a BN layer, and a ReLU layer to obtain a feature map of 256 channels. This feature map is then input into a 1×1 convolution to obtain s1, s2, ..., s n The segmentation results are sorted in ascending order according to the kernel size.
[0029] Step 2.4. Finally, the PSENet algorithm is used to expand the scale starting from the smallest kernel. In order to solve the boundary conflict problem that occurs during scale expansion, a first-come-first-served solution is adopted, and finally a LED character detection result with clear boundaries is obtained.
[0030] Step 3 is implemented as follows:
[0031] Step 3.1, detect LED character feature extraction. The CNN part of the CRNN network uses the VGG structure. In order to make the model converge faster, considering the actual aspect ratio of the LED character, the image is first normalized to [240,50] size. Since the network not only has deep convolutional layers, but also recursive layers, both of which are difficult to train, a batch normalization layer BN layer is added after the fifth and sixth convolutional layers of the network. The use of batch normalization layers greatly speeds up the training speed. Finally, feature extraction is performed through the CNN network to obtain 240 / 4 512-channel feature sequences.
[0032] Step 3.2, LED character prediction part, using RNN network, input the feature map extracted by CNN network in step 3.1 into RNN network for character prediction. The CNN network used has four maximum pooling layers, and the window size of the last two pooling layers is changed from 2×2 to 1×2. This is because most of the LED character areas are small in height and long in width. Using 1×2 pooling window can ensure that information in the width direction is not lost as much as possible, which is more suitable for the recognition of English letters and numbers. Because the LED characters captured in the actual station will be blurred, in order to improve the accuracy of blurred LED character recognition, a deep bidirectional RNN network is used as the RNN network in CRNN. The RNN network is for the feature sequence x=x1,…,x output by CNN. t , for every input x t There is an output yt ; Due to different LED tables, the length of characters is different. In order to identify the phenomenon of indefinite length sequences, the long short-term memory unit LSTM is selected as the unit of RNN. At the same time, LSTM can also effectively prevent the gradient disappearance phenomenon of RNN network during training. First, the feature map of the text image is extracted based on the 7-layer CNN, and the feature map is split by column. Then each channel is input as a 512-dimensional time series into a two-layer bidirectional LSTM with 256 units each for classification.
[0033] Step 3.3, character transcription part, after the LED character sequence passes through the RNN network, the prediction result needs to be converted into a character label through the transcription layer CTC. CTC introduces the blank character ε, and the pauses in the character spacing all represent ε. CTC mainly involves removing repeated letters and removing ε. The present invention uses a dictionary-based CTC algorithm for character transcription. In the transcription layer, the error difference is propagated backward through the forward-backward algorithm. The prediction result based on the dictionary ultimately obtains the probability of all labels, and finally selects the corresponding label value with the largest probability as the recognition result.
[0034] The beneficial effects of the present invention are:
[0035] 1. The present invention is suitable for the identification of digital instruments in power distribution rooms and substations. On the one hand, it solves the problem of low efficiency of manually entering the current reading of the instrument. On the other hand, it can also obtain a higher recognition effect under the influence of external factors such as lighting, shooting angle, instrument shape, etc.
[0036] 2. The YOLO target detection network based on deep learning can accurately detect the location of the instrument. There is no need to mark the instrument location information in the pictures taken by the camera. The captured pictures can be directly input into the network for detection.
[0037] 3. The progressive scale expansion network (PSENet) algorithm is used as the character detection module for digital LED instruments in substation scenarios. This network can locate single-line or multi-line character areas, that is, all character areas in the instrument can be detected and located. Finally, the detected text character areas are input into the text recognition network for recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0039] Figure 1It is a schematic diagram of the working process of the present invention. DETAILED DESCRIPTION
[0040] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0041] The overall workflow of the present invention is as follows Figure 1 As shown in the figure, the character area of the LED meter is first located by using the YOLOv4 network. The YOLO target detection network based on deep learning can accurately detect the position of the meter. There is no need to mark the meter position information in the picture taken by the camera. The taken picture can be directly input into the network for detection. After the ROI of the meter, i.e. the region of interest, is detected, it is then input into the character detection network. The progressive expansion network PSENet is used to obtain the output with the same size as the original picture through downsampling, feature fusion, and upsampling, and finally obtain the final text connected domain, that is, locate the position of each row of characters in the LED meter. This network can locate single-line or multi-line character areas, that is, all character areas in the meter can be detected and located. Finally, the detected text character area is input into the text recognition network for recognition, and the CRNN network is used for automatic recognition, so as to complete the automatic positioning and recognition of multi-line characters of LED in an effective way.
[0042] The technical solution adopted by the present invention is a method for automatic positioning and recognition of LED characters based on deep learning, which is specifically implemented according to the following steps:
[0043] Step 1: LED instrument area positioning module, such as Figure 1 As shown in the LED instrument character area positioning module in the figure, the picture with a resolution of 1920*1080 taken by the camera is input into the target detection network. Because there are other interfering factors in the picture, such as indicator lights, other signboard characters, etc., in order to accurately detect the LED meter to be identified, the YOLOv4 target detection algorithm is used to detect the LED meter target in the substation scene. In order to avoid interference with character recognition caused by problems in other areas of the dial, only the digital character area where the LED meter is located is located, and the roi area where the character is located is output as the input of step 2;
[0044] Step 2: LED instrument character detection module, such as Figure 1As shown in the LED instrument character detection module in the figure, the digital character area output in step 1 is input into the network. As shown in the figure, there are 3 lines of character areas in the LED instrument. In order to accurately identify each line of area, each line of character area needs to be detected by the character detection module. Therefore, the progressive scale expansion network PSENet algorithm is used as the digital LED instrument character detection module in the substation scenario. Through image segmentation technology, the LED character target area is detected at the pixel level to improve the detection performance of the model under LED multi-line characters.
[0045] Step 3: LED instrument character recognition module, such as Figure 1 As shown in the LED instrument character recognition module, the multi-line character target areas detected in step 2 are input into the recognition network in sequence, and the features of the acquired one or more lines of character target areas are trained using the CRNN network. Finally, the CTC algorithm is used to recognize specific characters and obtain the recognition results of the LED instrument.
[0046] Step 1 is implemented according to the following steps:
[0047] Step 1.1, enhance the LED sample data using the GridMask data enhancement method. GridMask is an information deletion method, which is implemented by randomly discarding an area on the image. This is equivalent to adding a regularization term to the network to avoid overfitting of the network, so as to achieve a balance between deleting information and retaining information. Random erasing, cutout, and hide-seek methods may result in the deletion or retention of all identifiable areas, which will introduce noise and be detrimental to model training.
[0048] A GridMask corresponds to four parameters, namely x, y, r, and d. These four parameters determine a specific set of Mask areas. During the actual training process, the Mask area is also rotated.
[0049]
[0050] Where k is the retention ratio of image information, W and H are the width and height of the original image, M is the number of pixels retained, k has no direct relationship with the above four parameters, and this parameter indirectly defines r, where the definition of r can be obtained by K conversion
[0051] k=1-(1-r) 2
[0052] x and y are defined as random in a certain area:
[0053] δ x (δ y ) = random(0,d-1)
[0054] In the task of detecting LED instruments, r of the four hyperparameters of GridMask is set to 0.4, and d is set to (96,224). During use, the training images are enhanced with GridMask with a probability of P = 0.6. This detection task is set to 0 at the beginning. As the number of training times increases, the GridMask enhancement of the training images gradually increases and finally becomes P.
[0055] Step 1.2, build a YOLOv4 target detection network to locate the position of the LED instrument dial character area in the picture. First, the learned high-level semantic information is passed to the low-level network through the FPN network, and then the high-level semantic information is integrated with the low-level high-resolution information to improve the detection effect. Then, the information transmission path from the low layer to the high layer is increased, and the feature information is enhanced through downsampling operations. Finally, the feature information of different convolutional layers is integrated to achieve the detection effect. The Mish activation function is used in the YOLOv4 backbone extraction network CSPDarknet53. The Mish function is a smooth curve. The smooth activation function can better input information into the neural network, thereby obtaining better accuracy and generalization, and can allow relatively small negative gradient input. Its function expression is:
[0056] Mish = x × tanh (ln (1 + e x ))
[0057] Step 1.3, define the target annotation box of the LED instrument dial character area that has been annotated in advance, and define the area as the Ground truth. Input the annotated target image and its annotation file into the YOLOv4 network for training, and use the trained YOLOv4 target detection network to achieve character area positioning of LED instruments with different characters.
[0058] Step 1.4: Use DIoU-NMS and consider the overlapping area and the center point distance between the two boxes at the same time to remove duplicate target boxes and finally obtain the digital character area of the LED instrument.
[0059] Step 2 is implemented as follows:
[0060] Step 2.1, feature extraction, the input image is passed through the Resnet50 residual network for feature extraction. ResNet50 has 50 conv2d layers, and the feature maps output by the Conv2, Conv3, Conv4 and Conv5 layers are extracted to construct a feature pyramid. The top-down and horizontal connection form is used to extract 4 layers of features P2, P3, P4, P5 to obtain 4 feature layers with 256 channels.
[0061] Step 2.2, feature fusion, fuse the four feature maps obtained in step 2.1, and perform feature cascade on feature layer P2 by upsampling P3, P4, and P5 by 2 times, 4 times, and 8 times respectively, and finally obtain a 1024-dimensional fused feature vector F. Fusion of high-level semantic features with low-level features can effectively perceive the distribution of LED characters and ensure more precise detection of character boundaries. The specific implementation method is:
[0062] F=C(P2, P3, P4, P5)=P2||U P×2 (P3)||U P×4 (P4)||U P×8 (P5)
[0063] Among them, “||” represents the concatenation operation, and upsampling is performed by 2 times, 4 times, and 8 times respectively.
[0064] Step 2.3: The fusion feature F obtained in step 2.2 is subjected to a 3×3 convolution, a BN layer, and a ReLU layer to obtain a feature map of 256 channels. This feature map is then input into a 1×1 convolution to obtain s1, s2, ..., s n The segmentation results are sorted in ascending order according to the kernel size.
[0065] Step 2.4. Finally, the PSENet algorithm is used to expand the scale starting from the smallest kernel. In order to solve the boundary conflict problem that occurs during scale expansion, a first-come-first-served solution is adopted, and finally a LED character detection result with clear boundaries is obtained.
[0066] Step 3 is implemented as follows:
[0067] Step 3.1, detect LED character feature extraction. The CNN part of the CRNN network uses the VGG structure. In order to make the model converge faster, considering the actual aspect ratio of the LED character, the image is first normalized to [240,50] size. Since the network not only has deep convolutional layers, but also recursive layers, both of which are difficult to train, a batch normalization layer BN layer is added after the fifth and sixth convolutional layers of the network. The use of batch normalization layers greatly speeds up the training speed. Finally, feature extraction is performed through the CNN network to obtain 240 / 4 512-channel feature sequences.
[0068] Step 3.2, LED character prediction part, using RNN network, input the feature map extracted by CNN network in step 3.1 into RNN network for character prediction. The CNN network used has four maximum pooling layers, and the window size of the last two pooling layers is changed from 2×2 to 1×2. This is because most of the LED character areas are small in height and long in width. Using 1×2 pooling window can ensure that information in the width direction is not lost as much as possible, which is more suitable for the recognition of English letters and numbers. Because the LED characters captured in the actual station will be blurred, in order to improve the accuracy of blurred LED character recognition, a deep bidirectional RNN network is used as the RNN network in CRNN. The RNN network is for the feature sequence x=x1,…,x output by CNN. t , for every input x t There is an output y t ; Due to different LED tables, the length of characters is different. In order to identify the phenomenon of indefinite length sequences, the long short-term memory unit LSTM is selected as the unit of RNN. At the same time, LSTM can also effectively prevent the gradient disappearance phenomenon of RNN network during training. First, the feature map of the text image is extracted based on the 7-layer CNN, and the feature map is split by column. Then each channel is input as a 512-dimensional time series into a two-layer bidirectional LSTM with 256 units each for classification.
[0069] Step 3.3, character transcription part, after the LED character sequence passes through the RNN network, the prediction result needs to be converted into a character label through the transcription layer CTC. CTC introduces the blank character ε, and the pauses in the character spacing all represent ε. CTC mainly involves removing repeated letters and removing ε. The present invention uses a dictionary-based CTC algorithm for character transcription. In the transcription layer, the error difference is propagated backward through the forward-backward algorithm. The prediction result based on the dictionary ultimately obtains the probability of all labels, and finally selects the corresponding label value with the largest probability as the recognition result.
[0070] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, the above is only a preferred embodiment of the present invention. Since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited to this. Any technician familiar with the technical field is within the technical scope disclosed by the present invention. For ordinary technicians in the technical field, changes or replacements that can be easily thought of should be covered within the protection scope of the present invention without departing from the principle of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for automatic positioning and recognition of LED characters based on deep learning, characterized in that: First, the YOLOv4 algorithm is used to locate the entire area of the LED characters to be recognized, and the digital character area of the LED dial is located from the panoramic image. Then the recognized LED character area is input into the character detection network, and the PSENet network is used to locate and detect single-line or multi-line characters. Through downsampling, feature fusion, and upsampling, the output with the same size as the original image is finally obtained, and the final text connected domain is obtained. The position of each line of characters on the LED table is located, and finally the CRNN network is used to realize the recognition of LED multi-line characters; the specific steps include: Step 1) The LED meter area positioning module uses the YOLOv4 target detection algorithm to detect the LED meter target in the substation scenario, and only locates the digital character area where the LED meter is located, specifically: Step 1.1) Data enhancement is performed on the LED sample data using the GridMask data enhancement method. The GridMask data enhancement method belongs to the information deletion method, which is specifically implemented by randomly discarding an area on the image. A GridMask corresponds to 4 parameters, namely x, y, r, and d. A set of specific Mask areas are determined by these 4 parameters. In the actual training process, the Mask area is also rotated. Where k is the retention ratio of image information, W and H are the width and height of the original image, M is the number of pixels retained, k has no direct relationship with the above four parameters, and this parameter indirectly defines r, where the definition of r can be obtained by K conversion k=1-(1-r) 2 x and y are defined as random in a certain area: δ x (δ y )=random(0,d-1) In the task of detecting LED meters, r of the four hyperparameters of GridMask is set to 0.4, and d is set to (96,224). During use, the training images are enhanced with GridMask with a probability of P = 0.
6. This detection task is set to 0 at the beginning. As the number of training times increases, the number of GridMask enhancements for the training images gradually increases, and finally becomes P; Step 1.2, build a YOLOv4 target detection network to locate the position of the LED instrument dial character area in the picture, first pass the learned high-level semantic information to the low-level network through the FPN network, then fuse the high-level semantic information with the low-level high-resolution information to improve the detection effect, and then increase the information transmission path from the low layer to the high layer, enhance the feature information through downsampling operations, and finally fuse the feature information of different convolutional layers to achieve the detection effect; the Mish activation function is used in the YOLOv4 backbone extraction network CSPDarknet53. The Mish function is a smooth curve, and its function expression is: Mix=x×tanh(ln(1+e x )); Step 1.3, define the target annotation box of the LED instrument dial character area that has been annotated in advance, and define the area as Groundtruth. Input the annotated target image and its annotation file into the YOLOv4 network for training, and use the trained YOLOv4 target detection network to achieve character area positioning of LED instruments with different characters; Step 1.4: Use DIoU-NMS to consider the overlapping area and the center point distance between the two boxes to remove duplicate target boxes and finally obtain the digital character area of the LED instrument. Step 2) LED instrument character detection module, using the progressive scale expansion network PSENet algorithm as the digital LED instrument character detection module in the substation scenario, through image segmentation technology, pixel-level detection of LED character target area, improve the model's detection performance under LED multi-line characters, specifically: Step 2.1) Feature extraction: The input image is passed through the Resnet50 residual network for feature extraction. ResNet50 has 50 conv2d layers. The feature maps output by the Conv2, Conv3, Conv4 and Conv5 layers are extracted to construct a feature pyramid. The top-down and horizontal connection form is used to extract 4 layers of features P2, P3, P4, and P5 to obtain 4 feature layers with 256 channels. Step 2.2) Feature fusion: fuse the four feature maps obtained in step 2.1), and perform feature concatenation on the feature layer P2 by upsampling P3, P4, and P5 by 2, 4, and 8 times, respectively, to finally obtain a 1024-dimensional fused feature vector F; fuse the high-level semantic features with the low-level features. The specific implementation method is as follows: F=C(P2,P3,P4,P5)=P2||U P×2 (P3)||U P×4 (P4)||U P×8 (P5) Among them, "||" represents the concatenation operation, and upsampling is performed by 2 times, 4 times, and 8 times respectively; Step 2.3) The fusion feature F obtained in step 2.2) is subjected to 3×3 convolution, BN layer and ReLU layer to obtain a feature map of 256 channels, and then this feature map is input into 1×1 convolution to obtain s1, s2, ..., sn segmentation results, and the segmentation results are arranged in order from small to large according to the kernel size; Step 2.4) The PSENet algorithm is used to expand the scale from the smallest kernel in sequence, using a first-come, first-served scheme, and finally obtains the LED character detection result with clear boundaries; Step 3) The LED instrument character recognition module uses the CRNN network to train the features of the one or more lines of character target areas obtained in step 2), and finally uses the CTC algorithm to recognize specific characters to obtain the recognition results of the LED instrument, which are specifically: Step 3.1) Detect LED character feature extraction. The CNN part of the CRNN network uses the VGG structure. First, the image is normalized to a size of [240,50]. A batch normalization layer BN layer is added after the fifth and sixth convolutional layers of the network. Finally, feature extraction is performed through the CNN network to obtain a feature sequence of 240 / 4 512 channels. Step 3.2) In the LED character prediction part, the feature map extracted by the CNN network in step 3.1) is input into the RNN network for character prediction. The CNN network used has four maximum pooling layers, and the window size of the last two pooling layers is changed from 2×2 to 1×2; a deep bidirectional RNN network is used as the RNN network in the CRNN. The RNN network is for the feature sequence x=x1,…,x output by the CNN. t , for every input x t There is an output y t ; Select the long short-term memory unit LSTM as the unit of RNN, first extract the feature map of the text image based on the 7-layer CNN, split the feature map by column, and then input each channel as a 512-dimensional time series into a two-layer bidirectional LSTM with 256 units each for classification; Step 3.3) In the character transcription part, after the LED character sequence passes through the RNN network, the prediction results need to be converted into character labels through the transcription layer CTC. CTC introduces the blank character ε, and the pauses in the character spacing represent ε. CTC mainly involves removing repeated letters and removing ε. The dictionary-based CTC algorithm is used for character transcription. In the transcription layer, the error difference is propagated backward through the forward-backward algorithm. The prediction results based on the dictionary ultimately obtain the probabilities of all labels, and finally the corresponding label value with the largest probability is selected as the recognition result.
Citation Information
Cited By
A picture change perception trigger normalized cross-correlation and seven segment joint discrimination adaptive LED scoreboard real-time identification method and system
CN123094385A
