A rapid rail vehicle number recognition method, device and storage medium
The vehicle license plate area is located by using illumination compensation of the data acquisition equipment and a deep learning algorithm model, and the vehicle license plate recognition is performed by combining the improved YOLOv3 and CNN network. This solves the problem of inaccurate vehicle license plate recognition under different lighting conditions and achieves efficient and accurate vehicle license plate recognition.
Patent Information
- Application Number
- CN202210915197.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-01
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2042-08-01
AI Technical Summary
The existing vehicle license plate recognition algorithm has unsatisfactory recognition rate and false alarm rate under different light intensities and insufficient generalization ability.
Data acquisition equipment is used for illumination compensation, the peak signal-to-noise ratio algorithm is used to find the front and rear images of the vehicle, the deep learning algorithm model is combined to locate the license plate area, and the improved YOLOv3 algorithm and CNN convolutional neural network are used for character recognition and splicing.
The accuracy and robustness of vehicle number recognition are improved, the impact of lighting factors is reduced, and the recognition rate and speed are improved.
Smart Images

Figure CN115359487B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle number recognition, and more particularly to a method, device and storage medium for recognizing vehicle numbers on a rapid rail. Background Art
[0002] Railway transportation is currently one of the main modes of transportation, playing a vital role in supporting sustainable economic development. As the unique identifier of a train, the train number is crucial for planning, scheduling, and testing. Therefore, accurate identification of the train number plays a vital role in railway transportation.
[0003] In the prior art, patent publication number CN109840523A discloses an image processing-based algorithm for recognizing train numbers on urban rail vehicles. The algorithm steps are as follows: acquiring an original image from a camera and smoothing the original image; highlighting the area where the train number characters are located based on the background color of the area where the train number characters are located, and binarizing the image; performing morphological processing on the resulting binary image; locating the area where the train number characters are located based on the characteristics of the connected domain of the area where the train number characters are located; performing a negation operation on the located train number character area image, analyzing the connected domain of the negated image, and segmenting individual characters based on the characteristics of the connected domain of the train number characters themselves; normalizing and binarizing the segmented individual characters; and employing an artificial neural network (ANN) for train number recognition. The present invention improves the accuracy of train number information collection, reduces the cost of the train number collection system, and has the advantages of good real-time performance and high train number recognition accuracy.
[0004] The vehicle license plate recognition algorithm disclosed in the above patent will train the corresponding text recognition model to realize vehicle license plate recognition, but its generalization ability is not strong, resulting in large differences in recognition rates under different light intensities, and both the recognition rate and false alarm rate are not ideal. Summary of the Invention
[0005] To overcome the above-mentioned deficiencies in the prior art, the present invention discloses a method, device, and storage medium for rapid rail vehicle number recognition. The purpose of the present invention is to address the problem that the vehicle number recognition algorithm in the prior art trains a corresponding text recognition model to achieve vehicle number recognition, but its generalization ability is weak, resulting in large differences in recognition rates under different light intensities, and unsatisfactory recognition rates and false alarm rates. The present invention uses a data acquisition device to capture images, and processes the images using peak signal-to-noise ratio and a deep learning algorithm to obtain the vehicle number recognition result of the current train. The method is less affected by lighting factors, does not require excessive consideration of vehicle number area characteristics, and has a relatively high recognition rate.
[0006] In order to achieve the above objectives, the present invention adopts the following technical solutions:
[0007] In a first aspect, the present invention provides a method for rapid rail vehicle number recognition, comprising the following steps:
[0008] S1, collecting train number images to be identified, forming a train number image dataset;
[0009] Preferably, in step S1, a data acquisition device is used to acquire an image of the train number to be identified. When the data acquisition device acquires the image of the train number to be identified, illumination compensation is performed according to on-site illumination conditions.
[0010] In the present invention, the data acquisition device can be a conventional camera equipped with an illumination compensation function, which captures images of the train. Because the data acquisition device incorporates illumination compensation, it compensates for each frame based on the on-site lighting conditions. Therefore, there's no need to overly consider illumination factors; instead, the only requirement is to ensure the integrity and high fidelity of the train image. This can be achieved by controlling the camera's shutter speed using a radar speedometer. In other words, integrity means that multiple captured images can be stitched together to create a panoramic view of the entire train, and high fidelity means that deformation of the train in the stitched panoramic view is controlled within ±1%, including stretching and / or compression.
[0011] S2. Using a peak signal-to-noise ratio algorithm, search for images of the front and / or rear of the vehicle in the image dataset of the vehicle number to be identified;
[0012] For trains, the train number is generally set on the front and / or rear of the train. A train has at least one train number and at most two train numbers. In the present invention, when one of the front and rear images is found, or when both images are found, the train number can be identified through subsequent processing.
[0013] Preferably, the peak signal-to-noise ratio is:
[0014]
[0015] Where n is the number of bits per pixel, and MSE is the mean square error of the pixel values between the two input images, which is specifically:
[0016]
[0017] Where col is the width of the input image, row is the height of the input image, I is the first input image, K is the second input image, and (i, j) are the coordinates of the corresponding pixels in the two images.
[0018] In the present invention, the role of the peak signal-to-noise ratio is to compare the two images before and after, and to determine whether the two current images contain the front or rear of the vehicle through the peak signal-to-noise ratio value.
[0019] Specifically, when the peak signal-to-noise ratio value is 40 or above, it can be determined that the current two images contain the front or rear of the vehicle.
[0020] In the present invention, the peak signal-to-noise ratio is used to determine whether the current two images contain the front or rear of the vehicle. Compared with the traditional structural similarity (SSIM) judgment method, its advantage is that the judgment rate is increased by about 3 times while ensuring the judgment accuracy.
[0021] S3. Using a deep learning algorithm model to locate the vehicle license plate area in the front and / or rear images;
[0022] Preferably, in the step S3, the traversal starts from the found front and / or rear images respectively, the images are spliced, and then the vehicle number area in the spliced images is located using a deep learning algorithm model.
[0023] During image capture, due to the relative distance between the data acquisition device and the train, as well as the timing of capture, the captured image may only capture the front and / or rear ends of the train, without capturing the vehicle number area at the front or rear end. In this case, images of the front and / or rear parts must be stitched together to connect the vehicle number area with the front and / or rear ends for easier identification. Stitching is also necessary to ensure the integrity and high fidelity of the train image.
[0024] In the present invention, the image stitching adopts the ORB (Oriented Fast and Rotated Brief) method.
[0025] S4. Extract the located vehicle number area, and use a deep learning algorithm model to locate the vehicle number character area on the extracted vehicle number area;
[0026] Preferably, in the steps S3 and S4, the deep learning algorithm models for locating the vehicle number area and locating the vehicle number character area are both YOLOv3 algorithm models.
[0027] The YOLOv3 algorithm model locates the vehicle license plate and character regions within the input image data, providing the image data foundation and verification basis for subsequent character recognition and splicing of the recognition results. Compared to traditional image processing algorithms used in existing technologies, its advantages include faster detection speed and higher accuracy.
[0028] Preferably, the COSFORMER algorithm is integrated into the YOLOv3 algorithm model, and the Leaky ReLU combined with the trigonometric function distance is used to replace the softmax activation function in the original YOLOv3 algorithm.
[0029] In this invention, the YOLOv3 algorithm model is improved: the COSFORMER algorithm is integrated into the YOLOv3 algorithm model. The main idea is to use Leaky ReLU combined with trigonometric function distance to replace the softmax activation function in the original YOLOv3 algorithm to enhance the generalization ability of YOLOv3.
[0030] The essence of COSFORMER is a new activation function, which is a nonlinear weighted scheme that can condense the attention matrix distribution, amplify local correlation and downstream generalization ability.
[0031] Softmax activation function formula:
[0032]
[0033] Among them, z i and z c are the confidence values of the predicted i / c-th category, C is the total number of categories, and the softmax value is between [0, 1].
[0034] The formula for Leaky ReLU is as follows:
[0035]
[0036] Among them, a i yes Fixed parameters within the interval.
[0037] The activation function of the YOLOv3 algorithm model after integrating COSFORMER is:
[0038]
[0039] Among them, Q is the input original vehicle number image, K is the feature map corresponding to the original vehicle number image, S is a function that can be linearly decomposed to measure the similarity between Q and K, that is, the process description of obtaining the feature map from the input original vehicle number image, i is the index of a feature in the original vehicle number image Q, j is the index of the feature with index i in the original vehicle number image in the original vehicle number feature map, M is the set of all features, T is the matrix transpose symbol, is the activation function.
[0040] S5. Extract the located vehicle number character area, and use a deep learning algorithm to perform character recognition on the extracted vehicle number character area. Then, all the recognition results are spliced together and output to form the vehicle number recognition result of the current train.
[0041] Preferably, the character recognition and splicing output are both implemented based on CNN convolutional neural network.
[0042] Convolutional neural networks (CNNs) are a special type of artificial neural network and a key branch of deep learning. CNNs have demonstrated exceptional performance in many fields, achieving significantly higher accuracy and speed than traditional computational learning algorithms. In particular, in the field of computer vision, CNNs are the mainstream model for image classification, image retrieval, object detection, and semantic segmentation. In this paper, the convolutional neural network recognizes the characters within each character region and stitches them together to form the final result for vehicle license plate recognition.
[0043] In a second aspect, the present invention provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the processor executes the steps of the rapid rail vehicle number recognition method.
[0044] In a third aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the rapid rail vehicle number recognition method.
[0045] Beneficial effects of the present invention:
[0046] 1. The rapid rail vehicle number recognition method provided by the present invention is less affected by lighting factors, does not need to consider the regional characteristics of the vehicle number too much, and has a relatively high recognition rate.
[0047] Less affected by lighting factors: On the one hand, there is lighting compensation, which reduces the influence of lighting factors from the input end, so it is less affected by lighting factors; on the other hand, the improved YOLOv3 enhances the generalization ability of the algorithm, and has strong compatibility with vehicle license plate images in various situations, so it is less affected by lighting factors.
[0048] No need to consider the characteristics of the license plate area too much: The improved YOLOv3 enhances the generalization ability of the algorithm, so it is more compatible with license plate images in various situations, without having to consider the characteristics of the license plate area too much.
[0049] Relatively high recognition rate: The YOLOv3 algorithm model and CNN convolutional neural network are used to identify the license plate area and character areas, while the CNN convolutional neural network recognizes, stitches, and outputs the characters. The improved YOLOv3 network accurately locates the license plate area and character areas, while the CNN convolutional neural network is more mature and has a high recognition rate for character recognition.
[0050] 2. The rapid rail vehicle number recognition method provided by the present invention uses a peak signal-to-noise ratio algorithm to search for images of the front and / or rear of the vehicle number in the vehicle number image dataset to be recognized. The peak signal-to-noise ratio is then used to determine whether the two current images contain the front or rear of the vehicle number, thereby shortening the vehicle number recognition time and reducing hardware performance consumption.
[0051] 3. The rapid rail vehicle number recognition method provided by this invention utilizes a deep learning algorithm model, specifically the YOLOv3 algorithm model, to locate the vehicle number area and the vehicle number character area. This deep learning algorithm model provides the image data foundation and verification basis for subsequent character recognition and the splicing of character recognition results. Compared with traditional image processing algorithms used in the prior art, this method has a faster detection rate and higher detection accuracy.
[0052] 4. The rapid rail vehicle number recognition method provided by the present invention extracts the located character area, uses a deep learning algorithm to perform character recognition, and then splices all the recognition results together to output the vehicle number recognition result of the current train. Character recognition is implemented based on the CNN convolutional neural network, with high accuracy and speed.
[0053] 5. The rapid rail vehicle number recognition method provided by the present invention is not affected by changes in external lighting and is only related to the contrast between the target vehicle number area and other areas in the current image. Because the data acquisition device has an illumination compensation function, for each frame of the image, the data acquisition device will perform illumination compensation based on the on-site lighting conditions. Therefore, there is no need to pay too much attention to the illumination factor, and it is only necessary to ensure the integrity and high restoration of the train in the image. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 Schematic diagram of the rapid rail vehicle number recognition method of the present invention;
[0055] Figure 2 The image originally input by the present invention;
[0056] Figure 3 The image obtained by arranging and merging the original input image of the present invention;
[0057] Figure 4 The image of the vehicle head of the present invention;
[0058] Figure 5 This is the rear image of the vehicle of the present invention;
[0059] Figure 6 This is the image stitching result of the front and rear of the vehicle in the present invention;
[0060] Figure 7 This is the first level positioning of the vehicle number area of the present invention;
[0061] Figure 8 Secondary positioning of the character area of the present invention;
[0062] Figure 9 This is a schematic diagram of the YOLOv3 network structure of the present invention;
[0063] Figure 10 This is a schematic diagram of the CNN convolutional neural network structure of the present invention. DETAILED DESCRIPTION
[0064] The following will provide a clear and complete description of the concept, specific structure and technical effects of the present invention in conjunction with the embodiments and drawings, so as to fully understand the purpose, features and effects of the present invention.
[0065] Example 1
[0066] A fast rail vehicle number recognition method, such as Figure 1 As shown, the following steps are included:
[0067] S1, collecting train number images to be identified, forming a train number image dataset;
[0068] S2. Using a peak signal-to-noise ratio algorithm, search for images of the front and / or rear of the vehicle in the image dataset of the vehicle number to be identified;
[0069] S3. Using a deep learning algorithm model to locate the vehicle license plate area in the front and / or rear images;
[0070] S4. Extract the located vehicle number area, and use a deep learning algorithm model to locate the vehicle number character area on the extracted vehicle number area;
[0071] S5. Extract the located vehicle number character area, and use a deep learning algorithm to perform character recognition on the extracted vehicle number character area. Then, all the recognition results are spliced together and output to form the vehicle number recognition result of the current train.
[0072] Example 2
[0073] This embodiment further elaborates on step S1 based on embodiment 1. In step S1, a data acquisition device is used to acquire an image of the train number to be identified. When the data acquisition device acquires the image of the train number to be identified, illumination compensation is performed according to the on-site illumination conditions.
[0074] In this embodiment, the data acquisition device can be a conventional camera equipped with an illumination compensation function, which captures images of the train. Because the data acquisition device incorporates illumination compensation, it performs illumination compensation for each frame based on the on-site illumination conditions. Therefore, there is no need to overly consider illumination factors; instead, the only requirement is to ensure the integrity and high fidelity of the train image. This can be achieved by controlling the camera shutter rate using a radar speed meter. In other words, integrity means that multiple captured images can be stitched together to produce a panoramic view of the entire train, and high fidelity means that deformation of the train in the stitched panoramic view is controlled within ±1%, including tension and / or compression within ±1%.
[0075] like Figure 2 As shown, it is a series of images collected by the data acquisition device. Figure 2In the figure, the two images on the right are similar and can be merged into one to form Figure 3 The vehicle number image dataset to be recognized is shown in .
[0076] Example 3
[0077] This embodiment further elaborates on step S2 based on Example 2. For trains, the train number is typically located on the front and / or rear of the train. A train has at least one train number and at most two. In this embodiment, when either the front or rear image is found, or both images are found, the train number can be identified through subsequent processing to meet actual on-site needs.
[0078] The peak signal-to-noise ratio is:
[0079]
[0080] Wherein, n is the number of bits of each sample value. In this embodiment, n represents the number of bits of each pixel, preferably n=8. MSE is the mean square error of the pixel values between the two input images, which is specifically:
[0081]
[0082] Where col is the width of the input image, row is the height of the input image, I is the first input image, K is the second input image, and (i, j) are the coordinates of the corresponding pixels in the two images.
[0083] In this embodiment, the peak signal-to-noise ratio is used to compare the two images before and after, and to determine whether the two current images contain the front or rear of the vehicle based on the peak signal-to-noise ratio value.
[0084] Specifically, when the peak signal-to-noise ratio value is 40 or greater, it can be determined that the current two images contain the front or rear of the vehicle.
[0085] In this embodiment, the peak signal-to-noise ratio is used to determine whether the current two images contain the front or rear of the vehicle. Compared with the traditional structural similarity (SSIM) judgment method, its advantage is that it increases the judgment rate by about 3 times while ensuring the judgment accuracy.
[0086] like Figure 4 As shown in , it is the front image found by the peak signal-to-noise ratio algorithm; Figure 5 As shown, it is the rear image of the car found by the peak signal-to-noise ratio algorithm.
[0087] Example 4
[0088] This embodiment further elaborates on steps S3 and S4 based on embodiment 3. In step S3, the image of the front and / or rear of the vehicle is traversed, the images are stitched together, and the vehicle number area in the stitched images is located using a deep learning algorithm model.
[0089] During the shooting, due to the relative distance between the data acquisition device and the train, as well as the shooting time, the captured image may only capture the ends of the front and / or rear of the train, without capturing the vehicle number area at the front / rear end. In this case, it is necessary to splice the images of the front and / or rear attachments to connect the vehicle number area with the front and / or rear of the train for subsequent identification. At the same time, in order to ensure the integrity and high restoration of the train in the image, the images also need to be spliced. In this embodiment, the image splicing adopts the ORB (Oriented Fast and Rotated Brief) method, and the spliced image is as follows: Figure 6 shown.
[0090] In step S3 and step S4, the deep learning algorithm models for locating the vehicle number area and locating the vehicle number character area are both YOLOv3 algorithm models. Figure 7 As shown, it is the vehicle license plate area located by the YOLOv3 algorithm model; Figure 8 As shown, this is the vehicle license plate character area located by the YOLOv3 algorithm model.
[0091] The YOLOv3 algorithm model locates the vehicle license plate and character regions within the input image data, providing the image data foundation and verification basis for subsequent character recognition and splicing of the recognition results. Compared to traditional image processing algorithms used in existing technologies, its advantages include faster detection speed and higher accuracy.
[0092] The network structure diagram of the YOLOv3 algorithm model is as follows Figure 9 shown.
[0093] The YOLOv3 convolutional model structure requires the input image data to be 416*416*3, where 416*416 refers to the length and width of the input image data, and 3 refers to the number of channels in the input image data. The model ultimately outputs three tensors of different sizes: y1, y2, and y3, with sizes of 13*13*255, 26*26*255, and 52*52*255, respectively. YOLOv3 mainly consists of five modules:
[0094] (1) DBL module: It is the basic component of the YOLOv3 convolutional model. Its composition structure is: Conv2d+BN+LeakyReLU. BN and Leaky ReLU are inseparable parts of the convolutional layer (except the last layer) in the YOLOv3 convolutional model structure, and together they constitute the smallest component of YOLOv3.
[0095] (2) res_unit module: This is the residual network module in the YOLOv3 convolutional model structure. Its composition is: DBL module + DBL module + add. The add is just a direct addition and does not change the dimension of the tensor.
[0096] (3) resn (n=1, 2, ...) module: It is a large component in the YOLOv3 convolutional model structure, and its composition structure is: zero padding + DBL module + n res_unit modules.
[0097] (4) concat: Its purpose is to concatenate the output tensor of the darknet middle layer with the upsampling result of a subsequent layer to expand the dimension of the tensor.
[0098] (5) Output layer: The output layer of the YOLOv3 convolutional model outputs three tensors y1, y2, and y3 of different sizes, with sizes of 13*13*255, 26*26*255, and 52*52*255 respectively.
[0099] Yolo_v3 uses the first 52 layers of darknet-53 (no fully connected layers). This network is a fully convolutional network that makes extensive use of residual skip connections. To mitigate the negative gradient effects of pooling, this implementation eliminates pooling and uses the stride of conv to achieve downsampling. In this network structure, convolution with a stride of 2 is used for downsampling. To enhance the algorithm's accuracy in detecting small objects, YOLO v3 employs an upsampling and fusion approach similar to FPN (finally, three scales are fused, with the other two scales being 26×26 and 52×52, respectively), performing detection on feature maps at multiple scales.
[0100] YOLOv3 also uses a fully convolutional structure in its three prediction branches. The number of convolution kernels in the last convolutional layer is 255, which is for the 80 categories of the COCO dataset (1 category in this patent): 3*(80+4+1)=255, where 3 means that a grid cell contains 3 bounding boxes, 4 indicates the 4 coordinate information of the box, and 1 indicates the objectness score.
[0101] YOLO v3's Bounding Box uses k-means clustering for objects in an image. Each cell in the feature map predicts three bounding boxes, each of which predicts three things: (1) the location of each box (4 values: center coordinates tx and ty, height bh and width bw of the box), (2) an objectness prediction, and (3) N categories, with 80 categories in the COCO dataset and 20 categories in the VOC dataset. Each of these three detections has a different receptive field. 32x downsampling has the largest receptive field and is suitable for detecting large targets. Therefore, when the input is 416×416, the three anchor boxes for each cell are (116, 90); (156, 198); and (373, 326). 16x downsampling is suitable for objects of average size, with anchor boxes of (30, 61); (62, 45); and (59, 119). The 8x receptive field is the smallest and is suitable for detecting small objects. Therefore, the anchor boxes are (10, 13), (16, 30), and (33, 23). Therefore, when the input is 416×416, there are actually a total of (52×52+26×26+13×13)×3=10647 proposal boxes.
[0102] Preferably, the COSFORMER algorithm is integrated into the YOLOv3 algorithm model, and the Leaky ReLU combined with the trigonometric function distance is used to replace the softmax activation function in the original YOLOv3 algorithm.
[0103] In this embodiment, the YOLOv3 algorithm model is improved by integrating the COSFORMER algorithm into the YOLOv3 algorithm model. The main idea is to use Leaky ReLU combined with trigonometric function distance to replace the softmax activation function in the original YOLOv3 algorithm to enhance the generalization ability of YOLOv3.
[0104] The essence of COSFORMER is a new activation function, which is a nonlinear weighted scheme that can condense the attention matrix distribution, amplify local correlation and downstream generalization ability.
[0105] Softmax activation function formula:
[0106]
[0107] Among them, z i and z care the confidence values of the predicted i / c-th category, C is the total number of categories, and the softmax value is between [0, 1].
[0108] The formula for Leaky ReLU is as follows:
[0109]
[0110] Among them, a i yes Fixed parameters within the interval.
[0111] The activation function of the YOLOv3 algorithm model after integrating COSFORMER is:
[0112]
[0113] Among them, Q is the input original vehicle number image, K is the feature map corresponding to the original vehicle number image, S is a function that can be linearly decomposed to measure the similarity between Q and K, that is, the process description of obtaining the feature map from the input original vehicle number image, i is the index of a feature in the original vehicle number image Q, j is the index of the feature with index i in the original vehicle number image in the original vehicle number feature map, M is the set of all features, T is the matrix transpose symbol, is the activation function.
[0114] Example 5
[0115] This embodiment further explains step S5 based on embodiment 4. The character recognition and splicing output are both implemented based on CNN convolutional neural network. The network structure of CNN convolutional neural network is shown in FIG. Figure 10 shown.
[0116] Convolutional neural networks (CNNs) are a special type of artificial neural network and a key branch of deep learning. CNNs have demonstrated exceptional performance in many fields, achieving significantly higher accuracy and speed than traditional computational learning algorithms. In computer vision, CNNs are the leading model for image classification, image retrieval, object detection, and semantic segmentation. Each CNN layer consists of numerous convolution kernels, each of which performs a convolution operation on the input pixels to produce the next input. As network layers are added, the kernels gradually expand their receptive field and reduce the size of the image. CNNs are hierarchical models whose input is raw pixel data. They are constructed through convolution, pooling, non-linear activation functions, and fully connected layers.
[0117] The LeNet network structure is a classic character recognition model. It consists of two convolutional layers, two pooling layers, and two fully connected layers. The convolution kernels are all 5×5 with a stride of 1, and the pooling layers use max pooling. Through multiple convolutions and pooling, the final CNN layer maps the input image pixels to specific outputs. For example, in a classification task, this is converted into probabilistic outputs for different categories. The difference between the true label and the CNN model's prediction is then calculated. The parameters of each layer are updated through backpropagation, followed by another forward propagation, and this cycle repeats until training is complete. Compared to traditional machine learning models, CNNs employ an end-to-end approach. CNN training proceeds directly from image pixels to final output, without involving detailed feature extraction and model construction, and without requiring human intervention.
[0118] The role of the CNN convolutional network in this embodiment is to recognize the characters in each character area and splice the characters together to form the final result of vehicle license plate recognition.
[0119] Example 6
[0120] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the processor executes the steps of the rapid rail vehicle number recognition method described in any one of the above embodiments 1-5.
[0121] In this embodiment, the processor may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.
[0122] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer executable programs, and units. The processor executes the non-transitory software programs, instructions, and modules stored in the memory to perform various processor functions and work data processing, thereby implementing the methods described in the above embodiments.
[0123] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the processor, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory may optionally include a memory remotely located relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0124] One or more units are stored in the memory, and when executed by the processor, perform the method of any one of the above embodiments 1-5.
[0125] Example 7
[0126] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the rapid rail vehicle number recognition method described in any one of embodiments 1-5 above.
[0127] The above is a detailed description of the embodiments of the present invention, but the present invention is not limited to the embodiments. Those skilled in the art may make various equivalent modifications or substitutions without departing from the spirit of the present invention. These equivalents or substitutions are all included in the scope defined by the claims of the present invention.
Claims
1. A rapid rail vehicle number recognition method, characterized in that: The following steps are involved: Collect train number images to be identified to form a dataset of train number images to be identified; Using the peak signal-to-noise ratio algorithm, find the image of the front and / or rear of the vehicle in the image dataset of the vehicle number to be identified; Using a deep learning algorithm model to locate the vehicle number area in the front and / or rear images of the vehicle, including: starting from the found front and / or rear images, traversing the images, stitching the images, and then using the deep learning algorithm model to locate the vehicle number area in the stitched images; Extract the located vehicle license plate area and use the deep learning algorithm model to locate the vehicle license plate character area on the extracted vehicle license plate area; Extract the located train number character area and use a deep learning algorithm to perform character recognition on the extracted train number character area. Then, all the recognition results are spliced together and output to form the train number recognition result of the current train. Among them, the deep learning algorithm models for locating the vehicle license plate area and the vehicle license plate character area are both YOLOv3 algorithm models combined with the COSFORMER algorithm, and Leaky ReLU combined with trigonometric function distance is used to replace the softmax activation function in the original YOLOv3 algorithm.
2. The method for identifying a vehicle number on a rapid rail system according to claim 1, wherein: In the step of collecting the train's vehicle number image to be identified and forming a data set of vehicle number image to be identified, a data acquisition device is used to collect the train's vehicle number image to be identified. When the data acquisition device collects the vehicle number image to be identified, illumination compensation is performed according to the on-site illumination conditions.
3. The method for identifying a vehicle number on a rapid rail transit system according to claim 1, wherein: The peak signal-to-noise ratio is: Where n is the number of bits per pixel, and MSE is the mean square error of the pixel values between the two input images, which is specifically: Where col is the width of the input image, row is the height of the input image, I is the first input image, K is the second input image, and (i, j) are the coordinates of the corresponding pixels in the two images.
4. The method for identifying a vehicle number on a rapid rail transit system according to claim 1, wherein: The activation function after replacement in the YOLOv3 algorithm model is: Among them, Q is the input original vehicle number image, K is the feature map corresponding to the original vehicle number image, S is a function that can be linearly decomposed to measure the similarity between Q and K, i is the index of a feature in the original vehicle number image Q, j is the index of the feature with index i in the original vehicle number image in the original vehicle number feature map, M is the set of all features, T is the matrix transpose symbol, is the activation function.
5. The method for identifying a vehicle number on a rapid rail system according to claim 1, wherein: The character recognition and splicing output are both implemented based on CNN convolutional neural network.
6. A computer device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method executes the steps of the method for identifying a vehicle number on a rapid rail line as claimed in any one of claims 1 to 5.
7. A computer-readable storage medium, characterized in that A computer program is stored thereon, and when the computer program is executed by a processor, the steps of the rapid rail vehicle number recognition method described in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
An urban rail train number recognition algorithm based on image processing
CN109840523A
A train number identification method and device of a high-speed railway train
CN109344829A
Train number identification system and server
CN112070088A
Fire-fighting robot flame recognition method and device and storage medium
CN113283332A