METHOD FOR GENERATING A NEURON NETWORK FOR RECOGNIZING A CHAR SEQUENCE, AND CORRESPONDING RECOGNITION METHOD

DE602018076213T2Active Publication Date: 2024-11-06BULL SA +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
DE602018076213
Authority / Receiving Office
DE · DE
Patent Type
Patents
Current Assignee / Owner
Priority Date
2017-12-29
Filing Date
2018-12-17
Publication Date
2024-11-06
Estimated Expiration
2038-12-17

AI Technical Summary

Technical Problem

Existing methods for recognizing sequences of characters in images lack flexibility and robustness, requiring predefined formats and backgrounds, and often necessitate large databases for satisfactory recognition, limiting their applicability to specific types of sequences and conditions.

Method used

A method involving the creation of an artificial database of character sequences with randomly generated and transformed sequences, allowing a deep neural network to learn without prior segmentation, enabling robust recognition of sequences with variable formats and backgrounds using a small dataset.

Benefits of technology

The approach achieves robust and efficient recognition of sequences in images, comparable to human performance, with real-time processing capabilities, even with a small set of actual sequences, and can identify typographic characters with variations in size, font, orientation, and noise.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader
Need to check novelty before this filing date? Find Prior Art

Description

DOMAINE DE L'INVENTION

[0001] The invention relates to the field of methods for training a neural network for recognizing a sequence of characters, as well as to the field of methods for recognizing a sequence of characters which are then associated with them. CONTEXTE DE L'INVENTION

[0002] It involves recognizing, locating and extracting a sequence of characters in an image, in a way that is both simple and efficient.

[0003] According to a first prior art, it is known to carry out deep learning during which a sequence of characters of predetermined and previously known fixed format is extracted from an image having a plain background which is also fixed and previously known, by carrying out digital segmentation taking advantage of the fixed format of the sequence in the image and previously known.

[0004] If this first prior art allows the use of a database of real sequences for learning of relatively reduced size, while allowing satisfactory subsequent recognition, it is nevertheless with two drawbacks.

[0005] First, the method only works with a sequence of characters of a predetermined and previously known fixed format. Second, the method also requires predetermined conditions on the background of the image from which the sequence of characters will have to be extracted. In summary, this relatively simple first prior art, however, does not present any flexibility. If flexibility is required, it becomes necessary to multiply the methods used and their coordination then becomes very complex, without any guarantee as to the final result obtained.

[0006] According to a second prior art, it is known to carry out deep learning during which only a very small sequence of numbers is extracted from an image, without carrying out digital segmentation requiring a fixed sequence format in the image and previously known.

[0007] A first disadvantage of this second prior art is that it requires a very large real database, with a number of different real sequences in the order of a million, to enable learning resulting in satisfactory subsequent recognition. A second disadvantage of this second prior art is that it is limited to numbers and does not also include letters.

[0008] The document RAJA BALA ET AL: "Image simulation for automatic license plate recognition", PROCEEDINGS OF SPIE, vol. 8305, February 8, 2012 (2012-02-08), page 83050Z, XP055311740, 1000 20th St. Bellingham WA 98225-6705 USA ISSN: 0277-786X, DOI: 10.1117 / 12.912453ISBN: 978-1-5106-1533-5 further discloses a method for generating synthetic images to train a license plate recognition model. RESUME DE L'INVENTION

[0009] The aim of the present invention is to provide a method for training a neural network for recognizing a sequence of characters which at least partially overcomes the aforementioned drawbacks.

[0010] More particularly, the invention aims to provide a method for training a neural network as defined in claim 1, in such a way that, not only does the method for recognizing a sequence of characters in an image based on this method for training a neural network remain robust regardless of the type of sequence of characters to be recognized and regardless of the type of image in which this sequence of characters is included, but also in such a way that this robustness is obtained, despite a usually very insufficient number of real sequences of characters to constitute a database of sufficient size for the step of training the neural network to then guarantee a recognition method which would be robust.

[0011] In the proposed invention, it is the combination, on the one hand, of the particular structure of the artificial database of character sequences and, on the other hand, the particular course of the learning step by the neural network using this artificial database of character sequences, which subsequently makes it possible to obtain this surprising improvement in the robustness of the method for recognizing real sequences.

[0012] To this end, the present invention proposes a method for training a neural network, for the recognition of a sequence of characters in an image and without a predefined format, comprising: a step of creating an artificial database of several sequences of characters in images, certain sequences being generated randomly, other sequences coming from transformations of randomly generated sequences, a step of training, of the neural network, to recognize a sequence of characters in an image, directly on at least some of said sequences of said artificial database, without prior pre-cutting of these sequences into their constituent characters.

[0013] To this end, the present invention also proposes a method for recognizing a sequence of characters in an image, comprising: a step of recognizing a sequence of characters in an image, by a neural network trained by a training method according to the invention.

[0014] According to embodiments of the invention, as robustness improves, some or all of the following advantages can be obtained: identification of a sequence of characters in an image with performances comparable to those of a human being, identification of a sequence of characters in an image with typographic characters that are not at all standardized with variations in particular in terms of size, font, color, orientation, brightness, blur, noise, identification of a sequence of characters in an image allowing real-time processing for a video stream exceeding 24fps (fps for "frames per second" in English), identification of a sequence of characters in an image from a very reduced set of available real character sequences.

[0015] According to embodiments of the invention, the functionalities of a tensor flow type software library called “TensorFlow” were used to train and test the neural network.

[0016] According to embodiments of the invention, the deep neural network formed by the invention must recognize a sequence of letters and numbers in an image, and / or of variable size but limited to a maximum of 8 characters, and / or with a highly variable image background in terms of its size, and to recognize license plates of land motor vehicles, for example of the car, truck and motorcycle type, and / or from a very small available set of real character sequences, for example of the order of only a thousand sequences.

[0017] According to preferred embodiments, the invention comprises one or more of the following features which may be used separately or in partial combination with each other or in total combination with each other, with any of the aforementioned objects of the invention.

[0018] Preferably, the neural network is a deep neural network, preferably comprising at least 4 layers of neurons, more preferably comprising between 5 and 10 layers of neurons, even more preferably comprising 7 layers of neurons.

[0019] Thus, the process of recognizing a sequence of characters in an image based on this method of training a neural network remains particularly robust.

[0020] Preferably, the deep neural network is a convolutional deep neural network, preferably comprising convolutions of size between 3 and 10.

[0021] Thus, the process of recognizing a sequence of characters in an image based on this method of training a neural network remains particularly robust.

[0022] Preferably, in the step of producing the artificial database of several character sequences in images, at least 60% of these sequences are either randomly generated sequences or originate from transformations of randomly generated sequences, preferably at least 90% of these sequences are either randomly generated sequences or originate from transformations of randomly generated sequences, even more preferably at least 99% of these sequences are either randomly generated sequences or originate from transformations of randomly generated sequences, advantageously 100% of these sequences are either randomly generated sequences or originate from transformations of randomly generated sequences.

[0023] Thus, the method of recognizing a character sequence in an image based on this method of training a neural network remains robust regardless of the type of character sequence to be recognized and regardless of the type of image in which this character sequence is included, if not despite the total absence of real character sequences, at least despite the presence of a usually far too small number of real character sequences, for the training step of the neural network.

[0024] Preferably, the step of training the neural network to recognize a sequence of characters in an image is carried out directly without prior pre-cutting, for at least 60% of said sequences of said artificial database, preferably for at least 90% of said sequences of said artificial database, even more preferably for at least 99% of said sequences of said artificial database, advantageously for 100% of said sequences of said artificial database.

[0025] Thus, the process of recognizing a sequence of characters in an image based on this method of training a neural network remains even more robust regardless of the type of sequence of characters to be recognized and regardless of the type of image in which this sequence of characters is included.

[0026] Preferably, said transformations are: the intercalation of spaces of variable size between the characters of certain sequences of the artificial database, and / or the use of different types of backgrounds of different sizes as backgrounds of the sequences of characters to be recognized.

[0027] Thus, the method of recognizing a sequence of characters in an image based on this method of training a neural network remains even more robust regardless of the type of sequence of characters to be recognized and regardless of the type of image in which this sequence of characters is included.

[0028] A training database comprising only sequences of characters uniformly spaced between them will make the recognition process significantly more fragile as soon as the characters of the actual sequences to be recognized are randomly spaced, which is particularly the case for license plates which are of various formats and which can have different spacing widths depending on the position where they are found on the license plate.

[0029] Since the character sequences to be recognized are extracted from the images in which they are found along with the background on which they are found, the size and visual texture of this background are also more critical parameters than the others.

[0030] Preferably, said transformations are: geometric transformations which may include: enlargements, and / or reductions, and / or rotations, and / or translations, and / or geometric distortions, and / or other geometric deformations, and / or image processing transformations which may include: color changes, and / or grayscale changes, and / or edge enhancements, and / or edge smoothing, and / or other intensity and / or contrast processing.

[0031] Thus, the method of recognizing a character sequence in an image based on this method of training a neural network remains even more robust regardless of the type of character sequence to be recognized and regardless of the type of image in which this character sequence is included, and also regardless of the conditions under which these actual character sequences are photographed or otherwise obtained.

[0032] Preferably, the artificial sequence database comprises at least 100,000 different sequences for training, preferably at least 500,000 different sequences for training, even more preferably between 500,000 and 2,000,000 different sequences for training.

[0033] Thus, the process of recognizing a sequence of characters in an image based on this process of training a neural network will be more robust for a large size of the database on which its training was carried out.

[0034] In particular, the fact that the neural network is deep requires a larger size of the database on which its training was carried out.

[0035] The benefit obtained by this deep neural network, which is more demanding on the size of the artificial learning database, is greater robustness during the subsequent recognition process.

[0036] Preferably, the artificial sequence database comprises, on the one hand, between one third and two thirds of randomly generated sequences, and on the other hand, between two thirds and one third of sequences originating from transformations of randomly generated sequences, preferably as many randomly generated sequences as sequences originating from transformations of randomly generated sequences.

[0037] Thus, the neural network training database achieves a good compromise between, on the one hand, learning the type of character to be recognized in the sequence and, on the other hand, the form in which the character will be found in the sequence to be recognized. Some of the sequences contained in the artificial database and obtained by transformations of randomly generated sequences come from transformations of randomly generated sequences already contained in the artificial database.

[0038] Thus, the neural network's training database is even more efficient in that the character sequences to be recognized, at least in part, will be found in both standard and unusual forms.

[0039] Preferably, the artificial database comprises character sequences whose typographic characters are not standardized and instead have: a variable size, and / or a variable font, and / or a variable color, and / or a variable orientation, and / or a variable brightness, and / or a variable blur level, and / or a variable signal-to-noise ratio.

[0040] Thus, the method of recognizing a character sequence in an image based on this method of training a neural network remains even more robust regardless of the type of character sequence to be recognized and regardless of the type of image in which this character sequence is included, and also regardless of the conditions under which these actual character sequences are photographed or otherwise obtained.

[0041] Preferably, the characters include letters and numbers.

[0042] Thus, the method of recognizing a sequence of characters in an image based on this method of training a neural network will be more robust for the recognition of automobile license plates.

[0043] Preferably, in the step of making the artificial database of several character sequences in images, less than 10% of these sequences are real photographed sequences, preferably less than 1% of these sequences are real photographed sequences, even more preferably 0% of these sequences are real photographed sequences.

[0044] Thus, the method of recognizing a character sequence in an image based on this method of training a neural network remains robust regardless of the type of character sequence to be recognized and regardless of the type of image in which this character sequence is included, if not despite the total absence of real character sequences, at least despite the presence of a usually far too small number of real character sequences, for the training step of the neural network.

[0045] The character sequences in the artificial database correspond to car license plates respectively.

[0046] This is a preferred embodiment comprising many practical applications in road traffic of vehicles, advantageously land vehicles.

[0047] Preferably, the length of the character sequence is between 1 and 9.

[0048] Thus, being able to determine in advance the length of the sequence of characters to be recognized and being able to implement it in the recognition process as well as in the training process, makes them more efficient, in particular improves their compromise between on the one hand increasing the detection efficiency and on the other hand reducing the false alarm rate.

[0049] Preferably, the neural network training step uses, for each character in the sequence of characters to be recognized, a probability table representative of said character.

[0050] Thus, the compromise between efficiency during the recognition process and simplicity during the training process, achieved at the learning stage, is improved.

[0051] Preferably, the training step of the neural network uses, to compare two probability distributions representative of the sequence of characters to be recognized, a cost function.

[0052] Using a cost function allows learning to converge faster.

[0053] Preferably, said cost function is based on cross entropy.

[0054] Cross entropy is a particularly effective cost function for optimizing these probabilities.

[0055] Preferably, the cost function of the character sequence is the sum of the cost functions of each character.

[0056] The summation of the cost functions of each character to obtain the overall cost function of the character sequence has a double advantage: firstly, it is simple to implement, and secondly, it still works well despite the complexity of the process of recognizing a character sequence of non-standard format.

[0057] Preferably, said cost function is minimized by an Adam optimizer.

[0058] The Adam optimizer quickly and efficiently minimizes this cost function.

[0059] Preferably, loading data into the neural network is done through an asynchronous queue that contains the files to be loaded and the operations to be performed on those files.

[0060] This loading strategy proves to be particularly effective here.

[0061] Preferably, the initialization of weights in the neural network is performed by a Xavier initializer.

[0062] Xavier's initializer significantly reduces the learning time of the neural network in this training process, to then obtain comparable robustness at the level of the recognition process.

[0063] Preferably, said recognition step is preceded by a step of extracting the sequence of characters and the image background neighboring this sequence of characters, outside the rest of the image, only said sequence of characters and said image background neighboring this sequence of characters, to the exclusion of said rest of the image, being provided to the neural network.

[0064] This preliminary extraction step has two important advantages. On the one hand, it greatly facilitates the rest of the recognition process, by removing a lot of parasitic information which would have risked significantly disrupting this process. On the other hand, it remains relatively easy to carry out, because the background image close to the sequence of characters stands out and is generally quite clearly distinguished from the rest of the image which is more blurred and more random.

[0065] Preferably, said image background adjacent to said sequence of characters is a plain, single-color background.

[0066] This further enhances the second advantage of this preliminary extraction step, because the background image adjacent to the character sequence stands out and is even more clearly distinguished from the rest of the image, which is, on the contrary, more blurred and more random.

[0067] The said sequence of characters to be recognized in an image corresponds to a car registration plate.

[0068] This is a preferred embodiment comprising many practical applications in road traffic of vehicles, advantageously land vehicles.

[0069] Preferably, said recognition step is carried out in real time on a video stream of images including the character sequences to be recognized, preferably with a video stream greater than 10fps, more preferably with a video stream greater than 20fps.

[0070] This is a preferred embodiment comprising delicate real-time practical applications in vehicle road traffic, such as for example the instant recognition of automobile registration plates making it possible to instantly display the speed of their vehicle to the driver at the roadside at an educational radar.

[0071] Other characteristics and advantages of the invention will appear on reading the following description of a preferred embodiment of the invention, given by way of example and with reference to the appended drawings. BREVE DESCRIPTION DES DESSINS

[0072] There figure 1 schematically represents an example of the progress of the method for recognizing a sequence of characters based on the method for training a neural network according to an embodiment of the invention. The figure 2 schematically represents an example of an English-language computer listing for the two English-language computer software libraries “OpenCV” and “TensorFlow”, in the form of an implementation flowchart in accordance with one embodiment of the invention. figure 3 schematically represents an example of the operation of the neural network on the one hand trained according to the method of training a neural network and on the other hand used according to the method of recognizing a sequence of characters based on the method of training a neural network according to an embodiment of the invention. The figures 4A, 4B et 4C represent examples of character sequence images included in the artificial database used for training the neural network according to one embodiment of the invention. The figure 5 represents examples of identification results showing the effectiveness of the method for recognizing a character sequence based on the method for training a neural network according to one embodiment of the invention. DESCRIPTION DETAILLEE DE L'INVENTION

[0073] There figure 1 schematically represents an example of the progress of the method for recognizing a sequence of characters based on the method for training a neural network according to one embodiment of the invention.

[0074] In the training process of the neural network 1, from an artificial database 7 of character sequences, a character sequence recognition model in an image based on a neural network 1 performs a deep learning step 11.

[0075] During the method of recognizing an actual sequence of characters, a car 10 is traveling, and a step 12 of capturing a video is performed, followed by a step 13 of recognizing a license plate in the video image capture 16, followed by a step 14 of extracting the sequence 15 of characters contained in the image 16 of the license plate.

[0076] During step 13 of recognizing an automobile license plate in the video image capture 16, a system for generating synthetic data makes it possible to train the neural network 1 on a sufficient mass of data from the artificial database 7 to achieve the expected recognition performance.

[0077] During the extraction step 14 of the sequence 15 of characters contained in the image 16 of the license plate, on the one hand a recognition function makes it possible to locate a part of the image containing the sequence of characters sought, and on the other hand a deep learning model based on a neural network 1 is used to recognize the sequence 15 of characters, which offers great robustness, allowing the recognition of sequences 15 of characters, with variable brightnesses, different viewing angles, varied fonts of characters, etc.

[0078] The deep learning model based on a neural network 1 can recognize any sequence of N characters, the characters being numbers and / or letters and / or separations of type "-", while remaining compatible with the real-time constraint.

[0079] This deep learning model based on a neural network 1 can also be used to recognize any sequence of characters in images, outside the use case for license plate recognition, provided of course that the initial artificial database intended to make the neural network perform its deep learning is available or created.

[0080] There figure 2 schematically represents an example of an English-language computer listing for the two English-language computer software libraries “OpenCV” and “TensorFlow”, in the form of an implementation flowchart in accordance with one embodiment of the invention.

[0081] Image 16 will undergo a series 21 of processing in the “OpenCV” software library before undergoing another series 22 of processing in the “TensorFlow” software library to obtain the sequence 15 of characters on the license plate.

[0082] Series 21 of processing successively includes: a transformation of the color into gray levels, thresholding, contour analysis, extraction of a rectangular strip giving the position of the sequence 15 of characters of the license plate in the image 16 captured by video.

[0083] The series 22 of processing successively comprises: an extraction of the useful zone comprising on the one hand the sequence 15 of characters to be extracted and on the other hand the plain background located in the immediate vicinity of this sequence 15 of characters to be extracted, this in order to free itself from the rest of the image which can contain much more noise because it is not plain, followed by the recognition step by the neural network 1 resulting in obtaining the sequence 15 of characters contained in the registration plate of the car.

[0084] There figure 3 schematically represents an example of the operation of the neural network on the one hand trained according to the method of training a neural network and on the other hand used according to the method of recognizing a sequence of characters based on the method of training a neural network according to an embodiment of the invention.

[0085] Whether for the neural network training method 1 or for the character sequence recognition method based on the neural network training method 1, the neural network 1 receives an image as input 2 and outputs features 3 which are in the form of a probability table. This probability table includes 9 probability values ​​for the size 4 of the sequence and 36 probability values ​​for each of the characters 5 of the sequence which can be a number, 9 probability values, a letter, 26 probability values, or the separation “-”, 1 probability value.

[0086] The neural network problem 1 can be considered a classification problem. Indeed, for each character 5 found in the image, a probability value must be determined for belonging to a class. For each character 5, the number of possible classes is 9+26+1=36, which corresponds to 9 numbers, 26 letters and a separation "-". For each character 5, there are therefore 36 probability classes.

[0087] The neural network 1 will output a table of probabilities ("softmax output" in English) which, instead of simply indicating which class an input image belongs to, indicates here, 9 probability values ​​in a first table to determine the size 4 of the sequence, then 9 following tables each containing 36 probability values ​​to determine respectively which are the 9 characters 5.

[0088] Neural network 1 uses a cost function which is the cross entropy which is particularly suitable for comparing the similarities between two probability distributions. The aim is then to minimize the error between an input image 2 whose character sequence is known and the character sequence prediction given as output by neural network 1. At the output of neural network 1, there are 10 characteristics which each correspond to a probability distribution, 9 for the characters and 1 for the size of the sequence. Thus, 10 cross entropies are evaluated, one per output characteristic 3. 10 cost functions are obtained which are simultaneously minimized. The sum of these cost functions gives the overall cost function. Since the size 4 of the sequence is at most 9 characters 5, cost functions strictly greater than 9 are excluded.Alternatively, one can evaluate only 9 cross-entropies, those of the characters, and not include that of size 4 of the sequence in the evaluation of the cross-entropies.

[0089] At input 2 of neural network 1 is an image which is transmitted through the layers of neural network 1, for example 7 layers in number, and to give in output characteristics 3 the tables of probability values ​​then allowing the extraction of the sequence of characters sought.

[0090] The topology of neural network 1 was determined with the “TensorFlow” software library, and neural network 1 then performed its training step also using this “TensorFlow” software library.

[0091] The "TensorFlow" software library performs mathematical operations on tensors, which are multidimensional matrices.

[0092] The dataset loading strategy is based on asynchronous queues. A queue is created that contains the files to be loaded and the operations to be performed on these files, such as reading, decoding, resizing, extracting, etc.

[0093] Data enrichment, such as random crop, random flip, random contrast, is also performed at this time to add the data enrichment operations on the tail.

[0094] The queues are filled with data, and asynchronously, the neural network 1 can receive this processed data as input.

[0095] A python list (python is a registered trademark) is created on all the jpeg images in the available dataset. Simultaneously, another python list (python is a registered trademark) is created, it contains the labels. For each element x, we have the image path and the label of this image. The queue is created with the image paths and the labels. The required operations are added to the queue to give a batch that can be used by the neural network 1.

[0096] To train neural network 1, first of all a weight initialization operation is performed. Indeed, the better the weight initialization strategy, the greater the time saving required to train neural network 1. A Xavier initializer is used, because the results obtained are significantly better than with a classic random initializer. Then, an optimization operation is performed, thanks to a cost function that is minimized by an Adam optimizer which also gives good results.

[0097] Two python scripts (python is a registered trademark) are used, one for training neural network 1, and the other for testing neural network 1. To share data between scripts, checkpoints are created which contain the numerical values ​​of a list of tensors. All weights of neural network 1 are kept at checkpoint level during the training of neural network 1. It is then sufficient to load one of these checkpoints to be able to perform tests on neural network 1. During the training of neural network 1, the checkpoints are read and loaded into the software library "TensorFlow".

[0098] THE figures 4A, 4B et 4C represent examples of character sequence images included in the artificial database used for training the neural network according to one embodiment of the invention.

[0099] After installing the “TensorFlow” software library, and implementing the overall topology of the neural network 1, the operation of creating the artificial database of character sequences is then carried out, allowing the structure and operation of the neural network to be refined, by modifying the number of layers of the neural network or the size of its convolutions.

[0100] From a first panel of only 1000 images of real character sequences, which is usually largely insufficient to carry out the training of a deep neural network, this first dataset was used to test the neural network obtained by deep learning using the artificial database created by random generation and geometric and colorimetric transformations.

[0101] A first part of the artificial database contains about 400,000 black and white images of the type of the figure 4A .

[0102] There figure 4A represents an image 30 in which a straight sequence of uniformly spaced characters 32 can be extracted from a plain background 31.

[0103] A second part of the artificial database contains about 400,000 images obtained by various advanced transformations carried out from the 400,000 black and white images of the type of the one in the figure 4A of the first part of the artificial database. These advanced transformations include linear geometric transformations, color changes, random modifications of the background on which the sequence of characters to be recognized is located, etc.

[0104] The neural network is then tested on images representing real sequences of characters to be recognized, for example images of real car license plates, corresponding here to the first reduced panel of approximately 1000 real sequences of characters to be recognized on 1000 video captures of real car license plates, which then makes it possible to modify and enrich the artificial database.

[0105] This artificial database contains in particular many character sequences which vary the spaces between characters and / or which have different background colors and different background sizes, the background being what surrounds the character sequence to be recognized in particular in its immediate vicinity, all in order to better match the diversity of real automobile license plates in order to improve the robustness of the neural network thus trained.

[0106] The resulting neural network had 7 layers, and was trained with red, green, and blue images measuring 120 pixels by 80 pixels. The neural network took 2 days to train on an artificial database that mixed the two parts described above in equal parts and had a total volume of about 800,000 artificially created character sequences.

[0107] There figure 4B represents an image 33 in which a slanted sequence of somewhat irregularly spaced characters 36 can be extracted from a plain background 35 itself arranged in the middle of a plain distant neighborhood 34.

[0108] There figure 4C represents an image 37 in which a slanted sequence of very irregularly spaced characters 39 can be extracted from a variegated background 38.

[0109] There figure 5 represents examples of identification results showing the effectiveness of the method for recognizing a character sequence based on the method for training a neural network according to one embodiment of the invention.

[0110] There figure 5presents 7 real cases of recognition of real license plates in which we can see the great efficiency and robustness of the method of recognizing a sequence of characters based on the method of training a neural network according to an embodiment of the invention, the different license plates being of all sizes, all colors, all fonts and all orientations.

[0111] On plate 41, no recognition errors. On plate 42, good recognition of letters and numbers, with only one 1 taken for an I. On plate 43, no recognition errors. On plate 44, good recognition of letters and numbers, with only one 0 taken for an O and only one 1 taken for an I. On plate 45, good recognition of letters and numbers, with only one UL pair taken for an LL pair. On plate 46, no recognition errors. On plate 47, no recognition errors.

[0112] Overall, despite some slight errors that can also be made by humans, the accuracy of the neural network, thus trained by deep learning of the artificial database, proved to be excellent, even in the case of blurred or disoriented or misaligned images. The resulting neural network always determines the correct number of characters in the sequence to be recognized, that is to say, it is infallible regarding the size of the sequence of characters to be recognized. The resulting neural network extracts and identifies each of the characters in the sequence to be recognized regardless of the spaces between the characters in the sequence to be recognized. The resulting neural network also remains very robust with respect to changes in scale, because it recognizes small, large, or medium-sized characters equally well.

Claims

1. Method for training a neural network (1), for the recognition of a sequence (15) of characters (5) in an image (16), the image background (31, 35, 38) adjacent to said sequence (15) of characters (5) being a single-colour plain background, the image being a motor vehicle registration plate, comprising: > a step of creating an artificial database (7) of a plurality of sequences (15) of characters (5) in images (16), some sequences (15) being generated randomly, other sequences (15) being derived from transformations of sequences (15) generated randomly, > a learning step (11) that teaches the neural network (1) to recognise a sequence (15) of characters (5) in an image (16), directly on at least some of said sequences (15) of said artificial database (7), without a preliminary subdividing of these sequences (15) into their component characters, > the learning step (11) which teaches the neural network (1) using, for each character (5) of the sequence (15) of characters (5) to be recognised, a probability table representative of said character (5), > the learning step (11) which teaches the neural network (1) using a cost function to compare two probability distributions representative of the sequence (15) of characters (5) to be recognised, > the cost function of the sequence (15) of characters (5) being the sum of the cost functions of each character (5).

2. Method for training a neural network according to claim 1, characterised in that said cost function is based on cross entropy.

3. Method for training a neural network according to any one of claims 1 to 2, characterised in that said cost function is minimised by an ADAM optimiser.

4. Method for training a neural network according to any one of the preceding claims, characterised in that the loading of data as input (2) to the neural network (1) occurs via an asynchronous queue which contains the files to be loaded and the operations to be performed on these files.

5. Method for training a neural network according to any one of the preceding claims, characterised in that the initialisation of weights in the neural network (1) is performed by a Xavier initialiser.

6. Method for recognising a character sequence in an image, comprising a step of recognising a sequence (15) of characters (5) in an image (16) by means of a neural network (1) trained by a training method according to any one of the preceding claims.

7. Method for recognising a character sequence in an image according to claim 6, characterised in that the recognition step (11) is preceded by a step of extracting the sequence (15) of characters (5) and the image background (31, 35, 38) adjacent to this sequence (15) of characters (5), from the rest of the image (16), only said sequence (15) of characters (5) and said image background (31, 35, 38) adjacent to this sequence (15) of characters (5), excluding said rest of the image (16), being provided to the neural network (1).

8. Method for recognising a character sequence in an image according to any one of claims 6 to 7, characterised in that said recognition step is carried out in real time on a video stream of images (16) including the sequences (15) of characters (5) to be recognised, with a video stream greater than 10fps, or with a video stream greater than 20fps.