Generating Optical Character Recognition Training Data for Neural Networks by Analysing Page Description Language Jobs.

By parsing PDL files to generate training data and applying data augmentation, the method addresses inefficiencies in OCR training data creation, resulting in more accurate and reliable ANN-based optical character recognition systems.

JP7532860B2Active Publication Date: 2024-08-14KYOCERA DOCUMENT SOLUTIONS INC
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2020069048
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2019-04-08
Filing Date
2020-04-07
Publication Date
2024-08-14
Estimated Expiration
2040-04-07

AI Technical Summary

Technical Problem

Existing optical character recognition (OCR) technologies face challenges in generating large-scale, diverse training data efficiently, leading to inefficiencies in training artificial neural networks (ANNs) for accurate text recognition, particularly when dealing with varied font styles, sizes, and backgrounds.

Method used

The method involves processing and parsing Page Description Language (PDL) files to automatically generate text images and corresponding training data items, utilizing data augmentation techniques to enrich the OCR training dataset, and applying supervised learning to train ANNs, thereby enhancing the reliability, flexibility, and accuracy of OCR systems.

Benefits of technology

This approach enables the generation of large volumes of diverse training data, reducing the need for manual labeling and improving the performance and robustness of ANNs in recognizing text across various formats and conditions, thus enhancing the accuracy and reliability of optical character recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007532860000009
    Figure 0007532860000009
  • Figure 0007532860000010
    Figure 0007532860000010
  • Figure 0007532860000008
    Figure 0007532860000008
Patent Text Reader

Abstract

To provide a method and an apparatus for training and utilizing an artificial neural network (ANN).SOLUTION: An arithmetic unit receives a training document including text and analyzes the training document to determine training data items. Each of the training data items includes a training label related to text within the training document and location information on the text. An ANN is trained to recognize the text by using the training data items and the training document, and subsequently receives a request to predict text in an application document different from the training document and including second text. The prediction of the second text is determined by applying the trained ANN to the application document, and subsequently information related to the second text is provided as output.SELECTED DRAWING: Figure 3
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to generating optical character recognition training data for neural networks by analyzing page description language jobs.

[0002] This application claims priority to U.S. Patent Application No. 16 / 378,470, filed April 8, 2019, the entire contents of which are incorporated herein by reference. [Background technology]

[0003] The number and geographic footprint of printing devices is growing worldwide, and they continue to be connected to networks. A network may include many printing devices. Such printing devices may have a variety of features, functions, and capabilities. For example, some printing devices may be capable of printing in color, while others may not. As another example, some printing devices may have duplex printing hardware that allows printing on both sides of a sheet of paper, while other printing devices may only be capable of single-sided printing.

[0004] Some printing devices also have optical character recognition (OCR) capabilities. Optical character recognition converts typed or printed text into mechanically encoded text, often from scanned documents or photographs of documents. Optical character recognition is a widely used tool for electronic data entry in many applications. Traditional optical character recognition includes techniques such as pattern matching, image correlation, glyph decomposition, and feature detection. Extensive ergonomics can be used to isolate input glyphs in the text and design glyph functions. Summary of the Invention [Means for solving the problem]

[0005] In a first aspect, a method is provided for training and utilizing an artificial neural network (ANN). A computing device receives a training document including text. The computing device analyzes the training document to determine a plurality of training data items. Each training data item of the plurality of training data items includes a training label associated with text in the training document and location information indicating a location of the text in the training document associated with the training label. The ANN is trained to recognize text in a document using the plurality of training data items and a training input, the training input including the training document. After training the ANN, a request is received to predict text in an application document different from the training document. The application document includes a second text. A prediction of the second text is determined by applying the trained ANN to the application document. After a prediction of the second text is determined, information related to the second text is provided as an output.

[0006] In a second aspect, a computing device is provided. The computing device includes one or more processors and a non-transitory data storage device. The non-transitory data storage device stores at least computer-readable instructions that, when executed by the one or more processors, cause the computing device to perform tasks. The tasks include receiving a training document including text, analyzing the training document to determine a plurality of training data items, each training data item of the plurality of training data items including a training label associated with text in the training document and location information indicating a location of the text in the training document associated with the training label, training an ANN using the plurality of training data items and the training input (including the training document) to recognize text in the document, receiving a request to predict text in an application document (including a second text) different from the training document after training the ANN, determining a prediction of the second text by applying the trained ANN to the application document, and providing information related to the second text as an output after determining a prediction of the second text.

[0007] In a third aspect, an article of manufacture is provided. The article of manufacture includes a non-transitory data storage device having stored thereon at least computer-readable instructions that, when executed by one or more processing devices, cause the computing device to perform tasks. The tasks include receiving a training document including text, analyzing the training document to determine a plurality of training data items, each training data item of the plurality of training data items including a training label associated with text in the training document and location information indicating a location of the text in the training document associated with the training label, training an ANN using the plurality of training data items and a training input including the training document to recognize text in the document, receiving a request to predict text in an application document (including a second text) different from the training document after training the ANN, determining a prediction of the second text by applying the trained ANN to the application document, and providing information related to the second text as an output after determining a prediction of the second text.

[0008] Other aspects, embodiments, and implementations will become apparent to those skilled in the art from the following detailed description, taken in conjunction with the accompanying drawings, where appropriate. [Brief description of the drawings]

[0009] [Figure 1] 1 is an illustration of a printing network in accordance with an example embodiment. [Diagram 2] FIG. 2 is a block diagram illustrating a computing device according to an example embodiment. [Diagram 3] FIG. 1 is a diagram of a supervised learning pipeline in accordance with an example embodiment. [Figure 4] 4 illustrates a training data generation portion of the supervised learning pipeline of FIG. 3 according to an example embodiment. [Diagram 5] 1 is a diagram of a pipeline for optical character recognition in accordance with an example embodiment; [Figure 6A]FIG. 6 is a diagram of a detection convolutional neural network (CNN) of the pipeline of FIG. 5 in accordance with an example embodiment. [Figure 6B] FIG. 6 is another diagram of the detection CNN of the pipeline of FIG. 5 in accordance with an example embodiment. [Figure 6C] FIG. 6 is another diagram of the detection CNN of the pipeline of FIG. 5 in accordance with an example embodiment. [Figure 7] 3 illustrates a scenario according to an exemplary embodiment: In the pipeline of FIG. 3, a predicted model output is generated for, for example, a PDL input. [Figure 8] 1 shows a flowchart of a method according to an exemplary embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0010] In the following detailed description, reference is made to the accompanying drawings, which form a part hereof. In the drawings, like symbols typically indicate like elements, unless otherwise interpreted from the context. The exemplary embodiments described in the detailed description, figures, and claims are not intended to be limiting. Other embodiments may be utilized, and other changes may be made, without departing from the scope of the subject matter presented herein. It will be readily understood that the aspects of the present disclosure, as generally described herein and illustrated in the drawings, can be arranged, substituted, combined, separated, and designed in a wide variety of different configurations, all of which are expressly encompassed herein.

[0011] (Introduction) Described herein are techniques and apparatus for utilizing artificial neural networks (ANNs) and machine learning (ML) in optical character recognition (OCR). An ANN can be trained using a large number of text images (e.g., hundreds, thousands, or more images) to predict text in the text images with an accuracy competitive with current OCR techniques. A text image is an image depicting one or more text items, such as letters, numbers, words, sentences, paragraphs, symbols, logographic characters, etc. Such text images can be obtained from a variety of sources and / or applications. The obtained text images can be provided to train an ANN on how to perform optical character recognition.

[0012] An artificial neural network may include a collection of "nodes" or connected operational units that can loosely model operations. The connected nodes of an ANN can send signals, such as numerical values, to each other. Each node can receive one or more input signals, weight the input signals, and combine the weighted input signals to generate one or more output signals. The weight of an input signal may be a numerical value that increases or decreases the effect of the input signal on the output signal.

[0013] An ANN can have one or more "layers" or nodes, including, but not limited to, one or more layers of input nodes, nodes located in one or more hidden layers, and one or more layers of output nodes. Layers between the input and output layers are called "hidden layers" because these intermediate layers are not visible or hidden to entities outside the ANN. Other examples of ANN layers include, but are not limited to, an input layer that receives inputs from entities outside the ANN's convolutional layer that convolutes (e.g., downsamples) the inputs, and an output layer that provides outputs to such entities, an activation (e.g., RELU) layer that applies an activation function to the inputs, a pooling layer that combines the inputs, and a fully connected layer in which each node in the layer receives as input all outputs from the previous layer.

[0014] An ANN can be trained to learn one or more tasks. During training, the ANN can adjust the weights in the nodes based on a loss function that provides feedback by the ANN on the performance of the task. Once the ANN is considered trained, the trained ANN is called a "model." Before and during training, the ANN can generate predictions of the text depicted in a corresponding input text image. For example, if an input image contains a depiction of the word "flame thrower," the ANN can generate an output that predicts that the text depicted in the input image is "flame thrower."

[0015] Training an ANN can involve supervised learning, in which the ANN infers a function for performing one or more tasks from labeled training data consisting of one or more training data items. In some examples, the training data items include at least input objects and desired output values ​​that can "label" or identify the results of the ANN performing a function on the input objects. The desired output values ​​of the training data items are referred to as "data labels."

[0016] Supervised learning for training an ANN to perform OCR may include labeling one or more text images with corresponding training data items. The ANN may receive the text images as input and predict the text in the text images. The training data items for the text images may include information about the text images that is useful for training the ANN to perform OCR on the text images. For example, a text image "Image 1" depicting "ABC1" may have a data label indicating the text "ABC1", one or more colors of the text, one or more fonts and / or font sizes of the text, one or more positions of the text within the text image, and / or other information that is useful for training the ANN to perform OCR on the text image "Image 1". In supervised learning, the predicted text may be compared to the text in the data labels of the training data items to determine whether the ANN correctly recognized the text in the text image. Manually generating training data items of a large amount of text depicted in a large number of text images may be a time-consuming and / or expensive process.

[0017] In some instances, the majority or all print jobs in a print network utilize a page description language (PDL). Examples of PDLs include, but are not limited to, PostScript, Printer Control Language (PCL), Page Description Format (PDF), Kyocera PDF (KPDF), and Extended Markup Language (XML) Paper Specification (XPS). A PDL can precisely define primitive objects such as text, images, shading, and vector drawings. For example, for each text character, a PDL can include the character code, the character's position, font size, font style (e.g., plain text / normal, bold, italic, underline, strikethrough), font color, and / or other information about the character.

[0018] The input PDL file may be processed to generate one or more text images for training the ANN. The input PDL file may also be analyzed by a computing device to generate one or more training data items corresponding to the corresponding generated text images. More specifically, the input PDL file for the training documents may be analyzed and / or otherwise processed to extract text information such as text characters, position information, character codes, font size, font style, font color, and / or other information about the text. This text information may be used to generate training data items for the generated text images. The training data items may be stored in one or more training data item files.

[0019] The generation of training data items can be performed at one or more text-related levels (e.g., character level, word level, line level, paragraph level, page level), depending on how the ANN is trained to model the OCR. For example, some OCRs require individual recognition of characters, and some PDL parsing tools can extract text location information, such as bounding box information, for each character. As another example, some OCRs recognize characters at the word level, and the PDL parsing tools can include word detection and dictionary post-processing to extract text location information for each word. As yet another example, some machine learning (ML)-based OCR models incorporate pre-processing, such as text location detection, as a trainable feature. In this example, the text location information may be part of the predictions made by the ANN, and the extracted text location information may be included in the training data items used to train the ANN to learn text location detection as part of learning the OCR. Other examples are possible.

[0020] For example, a training data item for a training document may include training labels associated with text in the training document and location information indicating the location of the text in the training document. A rendering file corresponding to a training data item file may be generated by rendering, printing, or scanning the input PDL file used to generate the training data item file.

[0021] The contents of the rendered file and the corresponding training data item file can be used to train one or more ANNs to learn OCR. During training, the position information of the corresponding training data item file can be used to cut out rectangular boxes containing text images from the rendered file. The cut out text image boxes can be paired with corresponding text labels in the corresponding training data item file. The cut out text image boxes can also be provided to the ANN as training data for learning OCR. The ANN can predict the text in the cut out text image boxes and provide a corresponding predicted output. In supervised learning, the predicted text can be compared to the corresponding text label and the ANN can be adjusted based on the comparison. For example, a reward input is provided if the predicted text matches the corresponding text label and a penalty input is provided if the predicted text does not match the corresponding text label.

[0022] Input PDLs and rendered pages can be created and / or modified to enrich an OCR training data set for training an ANN for the purpose of learning OCR. For example, data augmentation techniques such as skew, rotation, noise, and / or filtering can be applied to rendered files to generate new rendered files that are partially or fully augmented (e.g., distorted, rotated, etc.). Additionally, because PDLs are programming languages, input PDLs can be created and / or modified with pages of fonts with different positions, sizes, styles, colors, and backgrounds to improve the robustness of the OCR model.

[0023] For example, PDL files can be processed and parsed to automatically generate text images and corresponding training data items and run as a batch job to generate hundreds, thousands, or more rendered pages and corresponding training data item files associated with print jobs for one or more applications. PDL inputs from various applications (e.g., Word, Excel, Outlook, Visio, etc.) and / or rendered pages of print jobs are useful in effectively reducing overtraining of OCR models in ANNs by providing a variety of text features for training the ANN. Text features include, but are not limited to, features related to text color, background color, text font, text size, text style, character-related features, text position, font effects, font style, text direction, punctuation, and page size. Using automated and / or batch processing, a large number of rendered pages and corresponding training data item files can be easily added to an OCR training dataset without tedious human labeling.

[0024] Also, because both the text images and the training data items are generated from the input PDL files, the input PDL files can be specially created and / or modified to include, modify, or exclude text features of the text images. These specially created and / or modified PDL files can then be used to generate special training data sets of text images and corresponding training data items for training the ANN. For example, a training data set of relatively large (or relatively small) amounts of non-standard font and / or background colors, a training data set of relatively large (or relatively small) amounts of text with specific font effects and styles, etc. These special training data sets can be generated and used to improve and / or enhance the performance of ANNs trained on these special training data sets. In some examples, the techniques described herein can be used to generate millions (or more) of text images and corresponding training data items.

[0025] The techniques described herein can be used to solve the problem of generating training data items for training an ANN for the purpose of learning OCR. The techniques described herein make training an ANN for optical character recognition practical by processing and analyzing PDL files to automatically generate text images and corresponding training data items for supervised training of the ANN. Furthermore, the reliability, flexibility, and accuracy of ANN-based optical character recognition techniques can be increased by using flexible ANNs trained on a variety of text images generated by processing, modifying, and analyzing PDL files, including PDL files sourced from multiple different applications.

[0026] (Example of a printing system) 1 is a diagram illustrating a print network 100 according to an example embodiment. Print network 100 includes printing devices (PDs) 110, 112, 114, computers 120, 122, and one or more servers 130, all interconnected using a network 140. In some examples, print network 100 may have more, fewer, and / or different types of computing devices, servers, and / or print devices than those shown in FIG. 1.

[0027] Printing devices 110, 112, 114 may include devices configured to scan, print, copy, email, report, communicate, and / or otherwise process documents and / or files that were originally available on paper or electronically. After being processed by one or more of printing devices 110, 112, 114, the documents and / or files are available on paper or electronically upon request. That is, printing devices 110, 112, 114 may process a paper document PD or an electronic document ED by at least creating an electronic document ED1 representing the contents of the PD (e.g., scanning the PD to create ED1); creating one or more paper copies of the PD; printing one or more copies of the ED and / or ED1 on one or more types of paper; creating one or more electronic copies of the ED and / or ED1; changing the format of the ED and / or ED1 (e.g., performing an OCR scan, converting the file format used to store the ED and / or ED1); maintaining a remotely accessible storage device (e.g., a document box, etc.) that allows the ED and / or ED1 to be used or accessed by devices other than printing devices 110, 112, 114; and / or communicating with another device about the contents of the ED and / or ED1.

[0028] A document box is storage allocated to an entity (e.g., a user, an administrator, a company, another type of entity, etc.) on a printing device, print server, or another device in which the entity can maintain documents, files, and / or other data. In some embodiments, a document box can be accompanied and / or include storage for personal data, such as an address book and / or device account storage. The document box, address book, and device account storage can store one or more documents, files, personal data, and / or other data, such as contacts, usage, and usage restrictions.

[0029] In some embodiments, printing devices 110, 112, 114 may also perform other tasks and / or other processes. Printing devices 110, 112, 114 may include products from various manufacturers that vary in color, speed, computing power, functionality, network connectivity, and / or other features.

[0030] In an example embodiment, some or all of printing devices 110, 112, 114 may be connected to network 140 via one or more, possibly different, network protocols. Data may be transmitted between printing devices 110, 112, 114, computers 120, 122, and server 130 via wired and / or wireless links between the computers, computing devices, printing devices, servers, and network 140. The format of each data transmission between devices in printing network 100 may include one or more of a variety of different formats, including text format, image format, Extensible Markup Language (XML), Simple Network Management Protocol (SNMP) format, database table, flat file format, or another format.

[0031] Communications between the computers, computing devices, servers, and printing devices include the computers 120, 122, and / or server 130 sending print job and / or print job portion data to the printing devices 110, 112, 114 for printing, and the printing devices 110, 112, 114 sending warning, status, error, device information, colorant usage information, maintenance event information, and / or other messages to the computers 120, 122, and / or server 130 to inform the other devices of colorant usage, maintenance, errors, and / or other conditions on the devices, such as waiting, printing, paused, paper jam, low or out of paper, low or out of toner, etc. Other communications between the computers 120, 122, and / or server 130 are also possible, such as, but not limited to, requests to render an image using radial gradient coloring and associated responses.

[0032] Computers 120, 122 can create, retrieve, update, display, and / or delete data (and software that may be associated) for configuring print network 100. Examples of data for configuring print network 100 include data for configuring devices in print network 100, such as printing devices 110, 112, 114, data for configuring network protocols (e.g., File Transfer Protocol (FTP), Hypertext Transfer Protocol (HTTP), Java Message Service (JMS), Kyocera Page Description Language (KPDL®), Private Communications Technology (PCT), Adobe® Portable Document Format (PDF), Simple Object Access Protocol (SOAP), Short Message Service (SMS), Simple Message Transfer Protocol (SMTP), SNMP, Transfer Control Protocol / Internet Protocol (TCP / IP), User Datagram Protocol (UDP), Lightweight Directory Access Protocol (LDP), Message The data may include, but is not limited to, data related to the network and / or server (e.g., MQ, MQ, and / or other protocols), client and / or server access management related data (e.g., passwords, signatures, credentials, certificates, subscriptions, licenses, and / or tokens, software and / or solutions for accessing some or all of the functionality of the network 140 and / or cloud-based services), and data for customization, configuration, and management applications of devices / servers of the printing network 100. In particular, the computers 120, 122 may provide indications regarding the maintenance of the printing devices, which may include, but are not limited to, the printing devices 110, 112, 114, including indications regarding and / or forecasts regarding colorant usage of the printing devices.

[0033] One or more servers 130 may store, update, delete, search, and provide functionality for learning patterns, trends, and / or characteristics regarding data associated with print network 100, particularly associated with printing devices such as printing devices 110, 112, 114. Based on the learned patterns, trends, and / or characteristics, server 130 may generate output, such as predictions regarding the printing devices. Predictions regarding the printing devices include, but are not limited to, predictions of colorant usage by the printing devices. Data stored on server 130 may include device information, colorant usage information, maintenance event information, and / or other information related to devices associated with print network 100. The stored data may be retrieved from server 130 in response to a received query requesting information regarding a particular device, colorant usage, maintenance events, and / or other information.

[0034] In some embodiments, server 130 may provide additional (or alternative) services, such as services related to some or all of the functionality for one or more document solutions and managed print services, such as accounting and maintenance functionality for the solutions and services, document workflow functionality, such as transaction forms, hardcopy signatures, client authentication / access functionality, user interface functionality, local and / or remote network-based storage management including devices in print network 100, and the like. For example, server 130 may further provide functionality related to a print server. A print server may process jobs (e.g., spool job-related data, route jobs, provide user and / or server-related accounting for jobs, verify / enforce authentication and authorization rules associated with jobs), and store data associated with printing devices in print network 100. Jobs processed by the print server include, but are not limited to, print jobs / print requests; communication of documents, files, and / or associated data (e.g., data in email, SMS messages, etc.); document and file related requests (e.g., creating, formatting, scanning, reformatting, converting, accessing, updating, and / or deleting one or more documents and files); document workflow jobs; and / or processing information regarding error / fault reports related to printing devices (e.g., creating, reviewing, updating, assigning, reassigning, communicating, and / or deleting trouble tickets related to error / fault reports related to printing (and possibly other) devices 110, 112, 114). Such data may include data used to process the job (e.g., spool data for print jobs, files for file related requests, etc.), access management related data, key identifying characteristics and / or model dependent information about the printing devices provided by server 130, and possibly other data.

[0035] 2 is a schematic block diagram illustrating a computing device 200 according to an example embodiment. The computing device 200 may include one or more input devices 202, one or more output devices 204, one or more processors 206, and memory 208. In some embodiments, the computing device 200 may be configured to perform one or more functions described herein and / or functions associated with at least some or all of the functions described in the context of the artificial neural networks, convolutional neural networks, recurrent neural networks, pipelines 300, 500, methods 400, 800, and scenario 700, for example.

[0036] The input device 202 may include a user input device, a network input device, a sensor, and / or other types of input devices. For example, the input device 202 may include a user input device such as a touch screen, a keyboard, a keypad, a mouse, a trackball, a joystick, a camera, a voice recognition module, and / or other similar devices. The network input devices may include wired network receivers and / or transceivers, such as Ethernet transceivers, Universal Serial Bus (USB) transceivers, or similar transceivers that may be configured to communicate over a similar physical connection, such as a wired network, such as a twisted pair of wires, coaxial cable, fiber optic links, or similar physical connections, such as a wired network, such as the wired portion of network 140, and / or wireless network receivers and / or transceivers, such as Bluetooth® transceivers, Zigbee® transceivers, Wi-Fi® transceivers, WiMAX® transceivers, wireless wide area network (WWAN) transceivers, and / or similar wireless transceivers that may be configured to communicate over a wireless network, such as the wireless portion of network 140. Sensors may include devices configured to measure conditions in and provide data regarding the environment of computing device 200. Such data may include, but is not limited to, position data, velocity (speed, direction) data, acceleration data, and other data regarding the environment of computing device 200. Examples of sensors include, but are not limited to, a Global Positioning System (GPS) sensor, a position sensor, a gyroscope, an accelerometer, a magnetometer, a camera, a light sensor, an infrared sensor, and a microphone. Other input devices 202 are possible.

[0037] The output devices 204 may include user display devices, audible output devices, network output devices, and / or other types of output devices. User display devices may include one or more printing components, liquid crystal displays (LCDs), light emitting diodes (LEDs), laser lights, displays using digital light processing (DLP) technology, cathode ray tubes (CRTs), light bulbs, and / or other similar devices. Audible output devices may include speakers, speaker jacks, audio output ports, audio output devices, headphones, earphones, and / or other similar devices. The network output devices may include wired network receivers and / or transceivers, such as Ethernet transceivers, Universal Serial Bus (USB) transceivers, or similar transceivers that may be configured to communicate over a similar physical connection, such as a wired network, such as a twisted pair of wires, coaxial cable, fiber optic links, or similar physical connections, such as a wired network, such as the wired portion of network 140, and / or wireless network receivers and / or transceivers, such as Bluetooth® transceivers, Zigbee® transceivers, Wi-Fi® transceivers, WiMAX® transceivers, wireless wide area network (WWAN) transceivers, and / or similar wireless transceivers that may be configured to communicate over a wireless network, such as the wireless portion of network 140. Other types of output devices include, but are not limited to, vibration devices, haptic feedback devices, and invisible light emitting devices, such as devices that emit infrared or ultraviolet light. Other output devices 204 are possible.

[0038] The processor 206 may include one or more general purpose processors, central processing units (CPUs), CPU cores, and / or one or more special purpose processors (e.g., graphics processing units (GPUs), digital signal processors (DSPs), field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), additional graphics-related circuitry / processors, etc.). The processor 206 may be configured to execute computer-readable instructions 210 residing in the memory 208 and / or other instructions described herein.

[0039] The memory 208 may include one or more computer-readable storage media configured to store data and / or instructions that can be read and / or accessed by at least one of the processors 206. The one or more computer-readable storage media may include one or more volatile and / or non-volatile storage components, such as optical, magnetic, organic or other memory or disk storage components, that may be integral, in whole or in part, with at least one of the processors 206. The computer-readable storage media may include one or more components that store data short-term, such as a register memory, a processor cache, and / or a random access memory (RAM). The computer-readable storage media may include non-transitory computer-readable media that store program code and / or data long-term, such as secondary or persistent long-term storage media, such as a read-only memory (ROM), an optical or magnetic disk, a compact disk read-only memory (CD-ROM), etc. In some embodiments, the memory 208 may be implemented using a single physical device (e.g., one optical, magnetic, organic or other memory or disk storage unit), while in other embodiments, the memory 208 may be implemented using two or more physical devices.

[0040] In particular, the memory 208 can store computer-readable instructions 210 that, when executed by the processor 206, cause the computing device to perform functions, such as, but not limited to, some or all of the functions of the devices, networks, methods, diagrams, images, equations, and / or scenarios described herein. In some embodiments, the computer-readable instructions 210 can include instructions for at least neural network software 212. The neural network software 212 can include software and / or firmware for providing neural network-related and / or machine learning algorithm-related functions, such as at least artificial neural networks, convolutional neural networks, recurrent neural networks, pipelines 300, 500 (including, but not limited to, machine learning algorithms 340 and / or predictive models 360), methods 400, 800, and some or all of the functions described in the context of scenarios 700.

[0041] (Techniques for using neural networks in optical character recognition) 3 is a diagram of a supervised learning pipeline 300 according to an example embodiment. The supervised learning pipeline 300 includes a training data generator 310, a training input 320, one or more feature vectors 322, one or more training data items 330, a machine learning algorithm 340, an actual input 350, one or more actual feature vectors 352, a predictive model 360, and one or more predictive model outputs 370. The supervised learning pipeline 300 can be implemented by running some or all of the supervised learning pipeline 300 software on one or more processing devices and / or using other circuitry (e.g., specialized hardware for executing some or all of the supervised learning pipeline 300).

[0042] In operation, the supervised learning pipeline 300 may include two stages: a training stage and a prediction stage. The training stage may include a machine learning algorithm 340 that learns one or more tasks. The prediction stage may include a predictive model 360. The predictive model 360 may be a trained version of the machine learning algorithm 340 and makes predictions to accomplish one or more tasks. In some examples, the machine learning algorithm 340 and / or the predictive model 360 may include, but are not limited to, an artificial neural network (ANN), a deep neural network, a convolutional neural network (CNN), a recurrent neural network, a support vector machine (SVM), a Bayesian network, a genetic algorithm, a linear classifier, a nonlinear classifier, an algorithm based on a kernel method, a logistic regression algorithm, a linear discriminant analysis algorithm, and / or a principal component analysis algorithm.

[0043] In the training stage of the supervised learning pipeline 300, the training data generator 310 may generate training inputs 320 and training data items 330. The training inputs 320 may be processed to determine one or more feature vectors 322. In some examples, the training inputs 320 may be preprocessed. For example, for optical character recognition tasks, the training inputs 320 may be preprocessed to calculate bounding boxes and / or other position information for text and / or other objects in input images (including text images) provided as part of the training inputs 320. In some examples, the training data generator 310 is not used to generate the training inputs 320 and / or training data items.

[0044] In some examples, some or all of the training input 320 includes one or more electronic training documents and / or one or more paper training documents. The electronic training documents may include, but are not limited to, one or more text images, images that do not include text, and documents encoded using a page definition language. In some examples, some or all of the training input 320 is generated by scanning a paper training document into a corresponding electronic document. In some examples, some or all of the training input 320 is generated by printing at least one of the one or more electronic training documents onto paper (e.g., a document represented using a page description language) and scanning a printed version of the at least one electronic training document into a corresponding electronic document, perhaps to generate an electronic copy of the at least one electronic training document.

[0045] The feature vector 322 may be provided to a machine learning algorithm 340 to learn one or more tasks. After performing one or more tasks, the machine learning algorithm 340 may generate one or more outputs based on the feature vector 322 and possibly the training inputs 320. During training, the accuracy of the output of the machine learning algorithm 340 may be evaluated using the training data items 330, and the machine learning algorithm 340 may be updated based on the evaluation. Training of the machine learning algorithm 340 may continue until the machine learning algorithm 340 is considered trained to perform one or more tasks. Once trained, the machine learning algorithm 340 may be considered a predictive model, such as predictive model 360.

[0046] The prediction stage of the supervised learning pipeline 300 may generate one or more actual feature vectors 352 from actual inputs 350. In some examples, some or all of the actual inputs 350 include one or more actual electronic documents and / or one or more actual paper documents. The actual electronic documents may include, but are not limited to, one or more text images, images that do not include text, and documents encoded using a page definition language. In some examples, some or all of the actual inputs 350 are generated by scanning an actual paper document into a corresponding electronic document. In some examples, some or all of the actual inputs 350 are generated by printing at least one of the one or more actual electronic documents onto paper (e.g., a document represented using a page description language) and scanning (or otherwise converting) a printed version of the at least one actual electronic document into a corresponding electronic document, perhaps generating an electronic copy of the at least one actual electronic document.

[0047] The actual inputs 350 may then be provided to a predictive model 360 via actual feature vectors 352. The predictive model 360 may generate one or more outputs, such as a prediction, based on the actual inputs 350. The output of the predictive model 360 may then be provided as a predictive model output 370. In some examples, the predictive model 360 may receive a request to make one or more predictions, which may trigger the predictive model 360 to generate the predictive model output 370 based on the actual inputs 350 and / or the actual feature vectors 352. In some of these examples, the request may include and / or reference the actual inputs 350.

[0048] In some examples, the machine learning algorithm 340 can be trained on one or more training computing devices, and the predictive model 360 can be executed on the same training computing device. In some examples, the machine learning algorithm 340 can be trained on a training computing device. After training, the trained machine learning algorithm 340 can then be transmitted as a predictive model 360 from the training computing device to one or more other computing devices that can run the predictive model 360 on actual inputs 350 to generate predictive model outputs 370.

[0049] In a use case of the supervised learning pipeline 300, the one or more tasks may be one or more tasks related to optical character recognition, such as recognizing text in one or more input images. The training input 320 may then include training documents. The training documents may be, represent, and / or include one or more images, which may include text images. That is, the training documents may include text and / or depictions of text. In some examples, the training documents include PDL-formatted documents that may be processed to generate text and possibly other images for the training input 320. In some examples, the PDL-formatted documents may be parsed to generate some or all of the training data items 330.

[0050] More specifically, the training documents of the training input 320 may be documents D_PDL in a PDL format. The training data generator 310 may process the PDL of the D_PDL to generate one or more images that represent / depict the D_PDL, and such images may be provided as part of the training input 320. The training data generator 310 may also analyze the PDL of the D_PDL to generate one or more training data items of the training data items 330. The training data items 330, including the training data items generated by the training data generator 310 analyzing the D_PDL, may include, but are not limited to, one or more training labels and location information. The training labels are associated with text present in the corresponding document, image, or other portion of the training input 320. The location information may indicate one or more locations of the text present in the corresponding document, image, or other portion of the training input 320. In some examples, the training data generator 310 may also generate one or more feature vectors of the feature vectors 322 by analyzing and / or otherwise processing the D_PDL.

[0051] The feature vector 322 may be one or more vectors that represent aspects of the training input 320. Exemplary features that may be represented in the feature vector 322 include one or more text features of a text image. The text features may include, but are not limited to, features related to text color, background color, text font, text size, text style, character-related features, text position, font effects, font style, text direction, punctuation, and page size.

[0052] The feature vector 322 may then be provided as an input to a machine learning algorithm 340. In some embodiments, both the training input 320 and the feature vector 322 are provided as inputs to the machine learning algorithm 340. In some embodiments, the training input 320 is provided directly to the machine learning algorithm 340 without using the feature vector 322. During training, the machine learning algorithm 340 operates on the training input 320 and / or the feature vector 322 to generate one or more predictions for optical character recognition of the training input 320 and / or the feature vector 322, i.e., to generate predictions for the text in the input document.

[0053] The text prediction may include, but is not limited to, prediction of one or more characters, words, and / or other text units. The text prediction may include an electronic representation of the text depicted in a corresponding input image, such as a text image of the training input 320 or a text image of the actual input 350. The electronic representation of the text may be formatted using one or more text formats, such as a plain text format (e.g., a Unicode format, an American Standard Code for Information Interchange (ASCII) format), a document format (e.g., a Microsoft® Word format), a format based on hOCR, etc. hOCR is an open standard for data representation of formatted text obtained from OCR, based on Extensible Markup Language (XML), and allows for encoding of text, style, layout information, recognition confidence metrics, and other information.

[0054] In some examples, the text prediction may include a confidence value and / or other data related to the accuracy of the predicted text. The confidence value is determined by the machine learning algorithm 340 as part of the text output prediction determination. For example, a confidence value ranging from 0 to 100 may be determined for the text output prediction and possibly output along with the text output prediction, where a confidence value of 0 indicates that the machine learning algorithm 340 has no (0%) confidence in the text output prediction. A confidence value of 100 indicates that the machine learning algorithm 340 has certain (100%) confidence in the text output prediction, with values ​​between 0 and 100 indicating a percentage of confidence in the text output prediction. Other techniques for representing and / or providing predictions of text, electronic representations of text, and confidence values ​​are also possible.

[0055] The text prediction can be evaluated by comparing the text prediction to data in the training data items 330, such as data labels representing the text in the training input 320 and / or data labels represented by the feature vectors 322. For example, if the text prediction indicates that the text "ABC" is in the input image TRAIN_IMG1 in the training input 320 and the data labels in the training data items 330 for TRAIN_IMG1 indicate that the text in TRAIN_IMG1 is "ABO", then the text prediction correctly recognized two out of three characters of the text in TRAIN_IMG1, and the accuracy of the text prediction in TRAIN_IMG1 is determined to be 2 correct characters / 3 total characters=66.67% accuracy. In some examples, the confidence value determined by the ANN can be compared to the accuracy value of the text prediction to help evaluate the accuracy of the confidence value and / or update the ANN during training. In some examples, the text prediction can be compared to the data labels in the training data items 330 representing the corresponding text in the training input 320. If the text prediction matches the text corresponding to the data labels of the training data items 330, the accuracy of the text prediction may be increased, and if there is no match, the accuracy of the text prediction may be decreased.

[0056] Training of the machine learning algorithm 340 may continue until one or more training termination criteria occur, including, but not limited to, the machine learning algorithm 340 completing predictions for a certain number IN (e.g., IN=1, 10, 100, 1000, 5000, 50000, 10000000, etc.) of text units of the input image, completing predictions for a certain number IT (e.g., IT=1, 2, 3, ..., etc.) of text units of each item of the training input 320, or completing predictions for a final number N of text units of the training input with accuracy above a threshold accuracy value (e.g., N=1, 10, 25, 50, 100, 1000, etc., where the threshold accuracy is 50%, 90%, 95%, 99%, 99.9%, etc.).

[0057] After training, the machine learning algorithm 340 may act as a predictive model 360. The predictive model 360 may perform optical character recognition tasks using the actual input 350 and / or the feature vector 352 as input, e.g., an input text image. The predictive model 360 may then generate one or more predictions of the text present in the actual input 350 as part or all of the predictive model output 370. That is, the predictive model 360 may recognize text in the actual input 350 and present the recognized text as a prediction of the provided text as the predictive model output 370. In some examples, the predictive model 360 may receive a request to recognize text in the actual input 350, and in response generate one or more predictions of the text in the actual input 350 and provide the predictions of the text as the predictive model output 370. The use of the predictive phase / predictive model 360 in performing OCR will be described in more detail in conjunction with at least the OCR pipeline 500 and at least FIG. 5.

[0058] 4 illustrates a training data generator 310 in a supervised learning pipeline 300, according to an example embodiment. The training data generator 310 may perform a method 400 to generate some or all of the training inputs 320 and / or training data items 330.

[0059] The method 400 may begin at block 410, where the training data generator 310 may receive a PDL input. For example, the training input 320 may include one or more training documents that include a PDL. These training documents that include a PDL in the training input 320 may also be referred to as PDL inputs.

[0060] In block 412, the training data generator 310 may determine whether to modify the PDL input. The training data generator 310 may determine whether to change some or all of the PDL input based on user input related to changing the PDL input, based on one or more features of the PDL input, based on a random selection of the PDL input (e.g., randomly selecting a predetermined number N or a predetermined percentage M % of files, documents, or other portions from the training input 320, where N and M are both greater than 0 and M is less than or equal to 100), based on a deterministic selection of the PDL input (e.g., selecting the first (or last) N and / or M % of files, documents, or other portions from the PDL input, selecting N and / or M % of files, documents, or other portions from the middle of the PDL input, selecting every Pth file, document, or other portion of the PDL input, where P is greater than 0), based on data within the PDL input (e.g., based on a tag or other indicator that the PDL input needs to be changed, based on one or more features of the PDL input (e.g., a PDL input that is all green text and / or has at least a predetermined size needs to be changed)). In some cases, the training data generator 310 may decide to modify all of the PDL inputs. For example, the PDL inputs may be modified to include, exclude, and / or modify one or more text features, such as the text features mentioned above in connection with FIG.

[0061] For example, the training data engineer and / or training data generator 310 may determine that the training data for the machine learning algorithm 340 does not have enough font variation. In that case, the training data generator 310 may modify the font type of the PDL input based on user input (e.g., input from the training data engineer) and / or other information (e.g., measurements of font variation in the training data for the machine learning algorithm 340). More specifically, assume that the PDL input only has one page of a particular font (e.g., "Times New Roman"). This does not provide enough font variation for the training input 320. In this case, the training data generator 310 may generate more training data using the particular font as part of the PDL input and / or more generally, generate more training data with the same content but using different font types. There are many other examples of using the training data generator 310 to modify a PDL input.

[0062] If the training data generator 310 determines to modify the PDL input, the training data generator 310 may proceed to block 414. Otherwise, the training data generator 310 determines not to modify the PDL input and proceeds to block 420.

[0063] At block 414, the training data generator 310 may determine one or more modifications to the PDL input and modify the PDL input accordingly to make the one or more modifications. In some examples, the modifications may include modifying one or more text features of the PDL input. In some examples, modifying the PDL input may include modifying the PDL input to include one or more of text using a plurality of different fonts, text using a plurality of different colors, text using a plurality of different sizes, text using a plurality of different styles, and a plurality of pages utilizing a plurality of background colors. In some examples, modifying the PDL input may include modifying the PDL input to enhance electronic documents generated using the PDL input, such enhancements being described below in connection with blocks 442 and 444. In some examples, modifying the PDL input may include adding one or more PDL instructions and / or documents formatted using a PDL. An example of this may include receiving a first PDL input document, copying the first PDL input document to a second PDL document, modifying the second PDL document, and providing both the first and second PDL documents as output of block 414. As another example of adding one or more PDL instructions and / or documents formatted using a PDL, the training data generator 310 may add one or more PDL instructions and / or documents that are unrelated to the PDL input, such as PDL instructions and / or documents that represent particular test cases for training the machine learning algorithm 340. The one or more PDL instructions and / or documents that are unrelated to the PDL input may then be provided as output of block 414. Other modifications of the PDL input are possible.

[0064] At block 420, the training data generator 310 may analyze the PDL input to determine position information (e.g., bounding boxes) and associated text. The PDL input at block 420 may include the PDL input received at block 410 and possibly modified at block 414. The position information may indicate one or more locations of text within the PDL input (or more generally, within the training input 320). One example of position information is a location and / or bounding box that locates one or more characters, words, and / or other text units of the text represented by the PDL input. The bounding box may specify a rectangular area in which the text is located, e.g., the top left corner and bottom right corner of the rectangular area in which the text is located. The associated text may be text specified in the PDL input using the PDL and / or other text within the PDL input, e.g., text within an image that is formatted / referenced by the PDL instructions of the PDL input. The associated text may be associated with position information, e.g., the position information may specify one or more locations within the PDL input for searching / finding the associated text. By analyzing the PDL input, which may include unmodified PDL input, to determine location information and associated text, the training input 320 can be based on thousands of existing application PDL documents, which may be stored in one or more datasets. By analyzing (a dataset of) these existing application PDL files to determine location information and associated text, the training data generator 310 can then generate training data items 330 to generate the training input 320, as described below, allowing the existing application PDL to be utilized while training the machine learning algorithm 340.

[0065] In block 430, the training data generator 310 may determine the training data items 330 based on the location information and / or associated text. For example, the training data items 330 may be created and / or updated by storing and / or otherwise using the location information and / or associated text determined by parsing the PDL input in block 420. A training data item TDI1 in the training data items 330 may store text T1 and location information specifying one or more locations Loc1 of the text T1 within the PDL input (or more generally, within the training input 320). That is, the training data item TDI1 may associate location information specifying a location Loc1 within the PDL input to search / find the text T1 within the PDL input. For example, assume that the PDL input for document TESTDOC1 indicates that the word "printing device" is written 72 pixels to the right and 72 pixels down from the upper left corner (ULHC) of the first page of TESTDOC, i.e., at a location (72,72) with respect to the ULHC of the first page. The training data generator 310 may then analyze the PDL input for document TESTDOC1 to determine position information (72,72) for the text "printing device" on the first page of document TESTDOC1. After analyzing the PDL input for document TESTDOC1, the training data generator 310 may create or update training data item TDI_TESTDOC1 to store the position information (72,72) and the associated text "printing device" as part of TDI_TESTDOC1. In a related example, assume that the bottom right corner of a bounding box enclosing the text "printing device" on the first page of document TESTDOC1 is at position (89,155) relative to the ULHC of the first page. In this case, the training data generator 310 can analyze the PDL input of the document TESTDOC1 to determine the bounding box [(72,72)(89,155)] of the text "printing device" as the location information, and then store the bounding box [(72,72)(89,155)] as the location information of the associated text "printing device" as part of TDI_TESTDOC1. Other examples are possible.

[0066] It is contemplated that by combining the procedures of blocks 420 and 430, the training data generator 310 can analyze (at block 420) the PDL input and determine (at block 430) the training data items 330. Other techniques for determining the training data items 330 based on location information and / or associated text are also possible.

[0067] At block 440, the training data generator 310 can determine at least a portion of the training inputs 320 from the PDL input. For example, the training data generator 310 can process the PDL input to generate one or more electronic and / or paper documents. For example, the PDL input can be printed to one or more files and / or paper. The generated one or more electronic and / or paper documents can then be used as part or all of the training inputs 320. Other techniques for determining at least a portion of the training inputs 320 from the PDL input are also possible.

[0068] At block 442, the training data generator 310 may determine whether to augment the training inputs 320. The training data generator 310 may determine whether to augment some or all of the training inputs 320 based on user input related to augmenting the training inputs 320, based on one or more features of the training inputs 320, based on random selection of the training inputs 320 (e.g., randomly selecting a predetermined number N or a predetermined percentage M % of files, documents, or other portions of the training inputs 320 (where N and M are both greater than 0 and M is less than or equal to 100)), deterministic selection of the training inputs 320 (e.g., randomly selecting the first (or last) N and / or M % of files, documents, or other portions of the training inputs 320), or deterministic selection of the training inputs 320 (e.g., randomly selecting the first (or last) N and / or M % of files, documents, or other portions of the training inputs 320). or other portions of the training input 320, selecting a central N and / or M % file, document, or other portion of the PDL input of a document of the training input 320, selecting every Pth file, document, or other portion of the training input 320 (where P is greater than 0), based on data in the training input 320 (e.g., based on a tag or other indicator that the training input 320 needs modification, based on one or more features of the training input 320 (e.g., training inputs 320 that are all green text and / or have at least a predetermined size need augmentation)). In some cases, the training data generator 310 may decide to augment all of the training inputs 320. Exemplary data augmentation techniques for augmenting the training inputs are described below in connection with block 444. If the training data generator 310 decides to augment the training input 320, the training data generator 310 may proceed to block 444.

[0069] For example, assume that the training data engineer and / or training data generator 310 determines that the training input 320 does not have enough skewed pages, i.e., pages whose axes are at various angles. In that case, the training data generator 310 can augment the training input 320 based on user input (e.g., input from the training data engineer) and / or other information (e.g., measurements of skewed pages in the training input 320). In this example, the training data generator 310 can apply one or more affine transformations to the original pages of the training input 320 to generate more skewed pages. There are many other examples of using the training data generator 310 to augment the training input 320.

[0070] At block 444, the training data generator 310 may augment the training input 320 by performing one or more data augmentation techniques on some or all of the training input 320. The data augmentation techniques may include modifying some or all of one or more particular electronic documents in the training input 320. The one or more data augmentation techniques may include, but are not limited to, distorting at least some of the particular electronic documents in the training input 320, rotating at least some of the particular electronic documents in the training input 320, introducing noise into at least some of the particular electronic documents in the training input 320, and filtering at least some of the particular electronic documents in the training input 320. The one or more particular electronic documents in the training input 320 may be randomly selected or otherwise selected from the training input 320. For example, one could randomly select one or more documents from the training input 320, select every Nth (N>1) document from the training input 320, select all documents from the training input 320, select the first N (N>0) documents from the training input 320, or select the last N (N>0) documents from the training input 320.

[0071] In some examples, the training data generator 310 may augment the training input 320 by adding one or more augmented documents to the training input 320. An example of this is receiving a first input document as part of the training input 320, copying the first input document to a second input document, augmenting the second input document by performing one or more of the data augmentation techniques mentioned above on the second input document, and providing both the first input document and the augmented second input document as an output of block 414. As another example of adding one or more augmented documents to the training input 320, the training data generator 310 may add one or more augmented documents unrelated to the training input 320, such as augmented documents that represent specific test cases for training the machine learning algorithm 340. The one or more augmented documents unrelated to the training input 320 may then be provided as an output of block 444. Other augmentations of the training input 320 are also possible.

[0072] At block 450, the training data generator 310 may provide as output the training inputs 320 and the training data items 330. Upon completion of block 450, the method 400 may be complete.

[0073] In some examples, the method 400 may further include generating at least a portion of the feature vector 322. For example, in block 420, the training data generator 310 may analyze the PDL input to determine location information and / or associated text. The training data generator 310 may also analyze the PDL input to determine one or more text features and / or other features of the PDL input that can be used in the feature vector 322 to represent aspects of the training input 320, e.g., the PDL input-based portion of the training input 320. In some of these examples, in block 450, the training data generator 310 may also provide at least a portion of the generated feature vector 322 as an output.

[0074] 5 is a diagram of an OCR pipeline 500 for optical character recognition, according to an example embodiment. In some examples, the OCR pipeline 500 may be related to and / or implement the prediction stage of the supervised learning pipeline 300. The OCR pipeline 500 includes an actual input 350, an actual feature vector 352, pre-processing 510, a prediction model 360, post-processing 550, and a prediction model output 370. Some or all of the OCR pipeline 500 may be implemented by running some or all of the software of the OCR pipeline 500 on one or more processing devices and / or using other circuitry (e.g., specialized hardware for executing some or all of the OCR pipeline 500).

[0075] In operation, the OCR pipeline 500 may begin by receiving an actual input 350. In particular, the actual input 350 to the OCR pipeline 500 may include one or more actual electronic documents and / or one or more actual paper documents, which may be scanned into corresponding electronic documents, at least as described above with respect to the contents of FIG. 3. In some examples, the actual input 350 may include one or more documents in a PDL format. Such PDL formatted documents may be printed into an electronic document that can then be used as part of the actual electronic document of the actual input 350. The actual electronic document may be, represent, and / or include one or more images, which may include text images. That is, the actual electronic document may include text and / or depictions of text.

[0076] After receiving the actual input 350, the OCR pipeline 500 can generate one or more actual feature vectors 352 based on the actual input 350. The actual feature vector 352 can represent aspects of the actual input 350. Exemplary features that can be represented in the actual feature vector 352 include one or more text features of a text image. The text features can include, but are not limited to, features related to text color, background color, text font, text size, text style, character-related features, text position, font effects, font style, text direction, punctuation, and page size.

[0077] After generating the actual feature vector 352, the OCR pipeline 500 may continue by preprocessing 510 the received actual input 350 and / or the actual feature vector 352. The preprocessing 510 may include preprocessing similar to that described above for the training stage of the supervised learning pipeline 300. That is, the actual input 350 may be preprocessed to identify the location of text and / or related objects (e.g., text images) within the actual input 350. In particular, the actual input 350 may be preprocessed to calculate bounding boxes and possibly other location information for text and / or related objects within the actual input 350. In some examples, data from the actual feature vector 352 may be used during preprocessing of the actual input 350.

[0078] After preprocessing 510, the OCR pipeline 500 may proceed to use a predictive model 360 to recognize text in the preprocessed actual input 350. FIG. 5 shows that the predictive model 360 of the OCR pipeline 500 may include a detection model 520, a classifier model 530, and a recognition model 540. When the predictive model 360 receives the preprocessed actual input 350 from preprocessing 510, it first utilizes the detection model 520 to detect text in the preprocessed actual input 350. The predictive model 360 then utilizes the classifier model 530 to classify the text found by the detection model 520. The predictive model 360 utilizes the recognition model 540 to recognize the text classified by the classifier model 530, and outputs the results by the recognition model 540 on the recognized text as a prediction of the text recognized in the preprocessed actual input 350.

[0079] The detection model 520 includes a trained detection convolutional neural network (CNN) 522 for performing regression 524 and segmentation 526 on the actual feature vector 352 to recognize text. A convolutional neural network is an ANN that assumes that the input provided at its input layer is an image-related input, such as a text image, and includes hidden layers organized for image processing and / or other image-related tasks. The regression 524 may include determining how the text is "positioned" or positioned relative to the text image and / or other images received in the actual input 350, such as within a bounding box in which the text is located (possibly determined during preprocessing 510). For example, the text may be curved, aligned with the vertical and / or horizontal axis of the bounding box, or tilted with respect to the vertical and / or horizontal axis of the bounding box. Thus, determining the positioning of the text within the bounding box is part of recognizing the text within the bounding box. Thus, the trained detection CNN 522 can be utilized to perform regression 524 to determine the location of text within text images, documents, and / or other inputs received in actual input 350.

[0080] Segmentation 526 may include determining one or more regions or partitions of the text image and / or other image containing text received in actual input 350. In some examples, segmentation 526 may include determining partitions of bounding boxes containing text. Thus, segmentation 526 may be performed using trained detection CNN 522 to determine portions within the text image, document, and / or other input containing text received as actual input 350.

[0081] FIG. 6A is a diagram of a detection CNN 522a that can be trained to perform text detection as the detection model 520. The detection CNN 522a receives preprocessed input (PPI) 610 at a CNN layer 612. A CNN layer such as one or more of the CNN layers 612, 614, 616, 632, 634, 636, 640, 642, 644, 662, 664, 666, 670, 672, 674 can perform the tasks of convolution, activation, and pooling using one or more convolution layers of the CNN layer, one or more activation layers of the CNN layer, and one or more pooling layers of the CNN layer, respectively. The convolution layers can learn one or more filters to filter their respective inputs. Each filter operates on a subset of the inputs to the activation layer. For example, if the input to a convolutional layer represents an input of X×Y pixels with Z different color inputs (e.g., a text image of size X×Y pixels and either a grayscale image with Z=1, a red-green-blue (RGB) image with Z=3, or a cyan-magenta-yellow-black (CMYK) image with Z=4), the input to the convolutional layer can be viewed as a volume with X×Y×Z number of input pixels times the number of colors. The filters in the convolutional layer can filter a portion of the X×Y×Z volume, for example X1×Y1×Z1 pixels / colors, where X1≦X, Y1≦Y, and Z1≦Z. For example, assume that the input to the CNN layer 612 is a 100x100 pixel text image in CMYK format (Z=4), and that the convolutional layer of the CNN layer 612 takes an input volume of 100x100x4 pixels / colors and acts on this 100x100x4 volume by convolving it with a 3x3x3 filter. Many other examples of input volumes and filters are possible.

[0082] To convolve the filter over the input volume, a convolutional layer may slide the filter across the width and height of the input volume and perform dot products between the entries of the filter and the input at each location of the filter on the input volume. Because the convolutional layer slides the filter across the width and height of the input volume, the convolutional layer can be thought of as generating a two-dimensional activation map that provides the response of the filter at every spatial location of the input volume.

[0083] The output of the convolutional layer (e.g., the activation map described above) may be provided as input to an activation layer. The activation layer may determine whether or not to provide the output of the input layer (e.g., the convolutional layer) to a subsequent layer. For example, assume that the activation map values ​​are in the range of [0,1] and only activation map values ​​above 0.4 are provided to a subsequent layer. The activation layer then maps activation map values ​​in the range of [0,0.4] to 0 (representing no activation) and further maps activation map values ​​in the range of [0.4,1] to 1 (representing activation). More generally, the convolutional layer of a CNN layer may model an activation function such as a sigmoid / logistic activation function, a hyperbolic tangent activation function, a rectified linear unit (ReLU) activation function, or another activation function that determines whether or not the output of the convolutional layer should be provided to a subsequent layer. The CNN layer may include one or more pairs of convolutional and activation layers to filter the input to perform a task (e.g., text detection and / or classification).

[0084] The output of the convolutional and activation layer pair may be provided to a pooling layer. The pooling layer may downsample the filtered input provided by the convolutional and activation layers. The pooling layer may slide a pooling filter over the input volume, similar to the description above for convolution. The pooling filter may effectively perform a function on the sampled pixels / colors. For example, it may determine the maximum value of the pixels / colors sampled by the pooling filter, determine the average value of the pixels / colors sampled by the pooling filter, and provide the output of the function as the output of the filter. For example, if the pooling filter calculates the maximum value of an input volume of 2x2x1 pixels / colors, the pooling filter reduces the four values ​​in the 2x2x1 input volume to one output (maximum) value. This downsamples the 2x2x1 input volume to one value, i.e., downsampling by a factor of two on both the X and Y coordinates of the input. Many other examples of pooling filters are possible. Thus, a CNN layer may selectively filter and downsample the input using convolutional, activation, and pooling layers to extract features related to the input to the CNN layer. The resulting output of the CNN layer may be represented as a feature vector.

[0085] In some examples, a pooling layer can be used to upsample an input. For example, a pooling layer can provide multiple outputs, each identical to the input. For example, a single pixel / color input I_UPSAM can be received by an upsampling pooling layer that outputs a 2x2x1 volume of pixels / colors. Each of these outputs can have the value of I_UPSAM or another value based on I_UPSAM (e.g., a weighted or filtered version of I_UPSAM). Thus, the upsampling pooling layer upsamples the pixel / color input I_UPSAM by a factor of 4 to generate a 2x2x1 volume of pixels / colors.

[0086] In some examples, the pooling layer performing the upsampling can receive information about the relevant input, such as an input received from another layer via a skip connection. A skip connection is a connection between layers of an ANN that avoids or "skips" one or more layers of the ANN. The input received via a skip connection can provide information about features that can be used to compute an upsampled output by the upsampling pooling layer. For example, with reference to FIG. 6B, a skip connection from CNN layer 632 to CNN layer 644 can provide CNN layer 644 with a "coarse" input related to the preprocessed input 630, i.e., the input before it is downsampled by CNN layer 632. The upsampling pooling layer can also receive input from a non-skip connection, and continuing with the previous example, can receive a "fine" input from CNN layer 642, such as the I_UPSAM value described above. The upsampling pooling layer can then combine the fine and coarse inputs to generate an output. For example, this may be a convolution-transpose operation (also called deconvolution), where a filter is used to weight the finer input for each color / pixel of the coarse input, and the weighted finer input and the coarse input are combined (e.g., by multiplication and / or addition) to generate the upsampled output of the upsampling pooling layer. Other techniques for upsampling and / or other examples of pooling layers for downsampling and other examples of pooling layers for upsampling are possible.

[0087] For example, the preprocessed input 610 may be the preprocessed actual input 350 provided via preprocessing 510. The CNN layer 612 may process the preprocessed input 610 (e.g., filter and downsample the preprocessed input 610 as a first feature vector) to result in an output prediction (OP) 622 of the text in the preprocessed input 610 and provide an input (e.g., a first feature vector) to the CNN layer 614. The CNN layer 614 may process the input 612 provided to the CNN layer 612 (e.g., filter and downsample the input provided by the CNN layer 612 as a second feature vector) to result in an output prediction (OP) 624 of the text in the preprocessed input 610 and provide an input (e.g., a second feature vector) to the CNN layer 616. The CNN layer 616 can process the input provided by the CNN layer 612 (e.g., by filtering and downsampling the input provided by the CNN layer 614) to result in an output prediction 626 of the text in the preprocessed input 610. The output of the detection CNN 522a can then be one or more of the output predictions 622, 624, 626.

[0088] In some examples, the output and / or output predictions 622, 624, 626 of the detection CNN 522a can classify the preprocessed input 610 as one or more text characters, e.g., “A”, “B”, … “Z”, “a”, “b”, … “z”, “0”, “1”, … “9”, “!”, etc. The output and / or output predictions 622, 624, 626 of the detection CNN 522a can also classify the preprocessed input 610 as having no text characters, i.e., having a classification of “no character” for the preprocessed input 610. The text in the preprocessed input 610 can then be considered to have been detected by the detection CNN 522a if the output of the detection CNN 522a is other than “no character”, e.g., an input that classifies the preprocessed input as “Q”. Also, if the output of detection CNN 522a is a "no characters" output, for example if the preprocessed input 610 represents a group of pixels that are all the same color and therefore do not represent text characters, then detection CNN 522a may also be deemed to have detected no text in the processed input 610.

[0089] FIG. 6B is a diagram of a detection CNN 522b that can be trained to perform text detection as the detection model 520. The detection CNN 522b receives an input 630 preprocessed by a CNN layer 632. For example, the preprocessed input 630 can be the preprocessed actual input 350 provided via preprocessing 510. The CNN layer 632 can process the preprocessed input (e.g., filter and downsample the preprocessed input 610 as a fourth feature vector) to provide an input (e.g., a fourth feature vector) to the CNN layers 634 and 644. The CNN layer 634 can process the input provided by the CNN layer 632 (e.g., filter and downsample the input provided by the CNN layer 632 as a fifth feature vector) to provide an input (e.g., a fifth feature vector) to the CNN layers 636 and 642. CNN layer 636 may process the input provided by CNN layer 634 (e.g., filter and downsample the input provided by CNN layer 634 as a sixth feature vector) and provide an input (e.g., a sixth feature vector) to CNN layer 640. In some examples, the input provided from CNN layer 632 to CNN layer 644, the input provided from CNN layer 634 to CNN layer 642, and / or the input provided from CNN layer 634 to CNN layer 640 may act as skip connections between paired CNN layers.

[0090] The CNN layer 640 of the detection CNN 522b can process the input provided to the CNN layer 634 (e.g., upsample the sixth feature vector and generate the resulting features as a seventh feature vector) to generate a resulting output prediction 650 of the text in the preprocessed input 630 and provide an input (e.g., the seventh feature vector) to the CNN layer 614. The CNN layer 642 can process the input provided by the CNN layers 640 and 634 (e.g., filter and upsample the seventh feature vector using the data provided by the CNN layer 634 to generate an eighth feature vector) to generate a resulting output prediction 652 of the text in the preprocessed input 630 and provide an input (e.g., the eighth feature vector) to the CNN layer 644. The CNN layer 644 can process the input provided by the CNN layers 642 and 632 (e.g., filter and upsample the eighth feature vector using the data provided by the CNN layer 632) to generate a resulting output prediction 654 of the text in the preprocessed input 630. The output of the detection CNN 522b may then be one or more of the output predictions 650, 652, 654.

[0091] FIG. 6C is a diagram of a detection CNN 522c that can be trained to perform text detection as the detection model 520. FIG. 6C shows a similar operation to the detection CNN 522c. The preprocessed input 660 of the detection CNN 522c serves as the preprocessed input 630 of the detection CNN 522b, and the CNN layers 662, 664, 666, 670, 672, and 674 serve as the CNN layers 632, 634, 636, 640, 642, and 644, respectively. However, the CNN layers 670 and 672 do not provide output predictions. In the detection CNN 522c, only the CNN layer 674 provides the output predictions 680, and the output of the detection CNN 522c becomes the output predictions 680.

[0092] Returning to Figure 5, classifier model 530 of predictive model 360 may be trained to classify text. Classifier model 530 may determine the probability that a portion of text being classified represents a particular text character, e.g., the probability that a text character has a particular ASCII or Unicode value. More specifically, ASCII encodes 128 characters (256 characters in the case of extended ASCII), and classifier model 530 may generate at least 128 (or 256) outputs O0...O. 127 (O0...O for extended ASCII 255 ) may be present. x is the probability that the current portion of the input to the classifier model 530 represents the input character whose ASCII value is x. That is, if the current portion represents the letter "Q", then the network 65 ...O 90 The probability of outputting an uppercase letter is, for example, O 65 (representing "A") is 0.1%, O 66 (representing "B") is 2%, O 67 (representing "C") is 0.01%...O 81 (representing "Q") is 89%..., O 90 (representing "Z") is 1.1%. In some instances, the classifier model 530 may provide a different output. For example, 128 (O for extended ASCII 256 ) is the "no character" output, along with the probability that the part of the text being classified is not an ASCII character (or an extended ASCII character). Other outputs of the classifier model 530 are possible.

[0093] During supervised learning, the classifier model 530 can be trained using a loss function that measures the discrepancy between the predicted values ​​and the ground truth values ​​(e.g., the data labels of the training data items). More specifically, the loss function LF1 of the training classifier model 530 can be based on a mean squared error (MSE) value that represents the "Euclidean distance" between the predicted values ​​and the data labels of the training data items. That is, for the capital letters in this "Q" example, according to the loss function LF1, O65 (represented by "A") is 0%, O 66 (represented by "B") is 0%, O 67 (represented by "C") is 0%...O 81 (represented by "Q") is 100%...O 90 (represented by "Z") can be determined to be 0%. The output of the loss function can be backpropagated by the gradients of each layer of the classifier model 530 to determine how much to adjust the parameters of each layer to reduce the error value. The error value can be, for example, |O x -LF1(O x )| (L1 norm) or |{O x -LF1(O x )} 2 | 1 / 2 (L2 norm), such as an error value calculated based on the difference between O x and LF1(O x ). Other loss functions are also possible. For example, the loss function may be based on cross-entropy loss and / or other values.

[0094] That is, the classifier model 530 can learn a method of classifying (and thereby performing optical character recognition) the depicted characters by adjusting the weights of the nodes to repeatedly reduce the error value over each part of each input image. The training of the classifier model 530 can be completed when the error value falls below a threshold, for example, when the sum of the error values SEV added together (for example, O0...O 127 (in the case of extended ASCII, O0...O 255 ) for a predetermined number NEV (for example, 1, 10, 1000, 5000) of input images is less than the threshold error value TEV (that is, when SEV is the sum for the most recent NEV input images, training is completed if SEV < TV). Other techniques for determining the completion of the training of the classifier model 530 are also possible.

[0095] The recognition model 540 may include a trained recognition CNN 542 and a trained regression neural network 544. The recognition CNN 542 is the output of the classifier model 530Ox Continuing with the classification example above for the letter "Q," the classifier model 530 receives "Q" as an input and then outputs the above, e.g., O 65 (representing "A") is 0.1%, O 66 (representing "B") is 2%, O 67 (representing "C") is 0.01%, ...O 81 (representing "Q") is 89%...O 90 (representing “Z”) outputs 1.1%. The recognition CNN 542 uses the output O x Receive and 81 (representing "Q") has the highest probability and therefore, the classifier model 530 recognizes the letter "Q."

[0096] The recurrent neural network 544 may include a recurrent neural network, which is an ANN with connections between the nodes of the ANN, such connections forming a directed graph along a time series. The recurrent neural network 544 may use one or more memory layers to store information about past inputs / events, e.g., previously received characters / text items. Such connections between the nodes and / or memory layers may allow the recurrent neural network 544 to exhibit dynamic behavior over time, i.e., changes in behavior over time.

[0097] The trained recurrent neural network 544 can perform text recognition based on its input (e.g., the output of the recognition CNN 542) using features including connectionist time series classification 546 and attention 548. From the perspective of the recurrent neural network 544, the input from the recognition CNN 542 can be thought of as recognized characters, or more generally, a time series of text items. Thus, the trained recurrent neural network 544 can predict text from a time series of recognized text items, e.g., predict words of text from a time series of recognized text items.

[0098] The connectionist time series classifier 546 may be used as part of and / or by the trained recurrent neural network 544 to provide inputs for segmenting inputs received by the recurrent neural network 544, e.g., for segmenting the time series of recognized text items into words, phrases, sentences, etc. Attention 548 may assign "attention" or weights to past inputs recalled from the memory layer of the recurrent neural network 544 and inputs for segmenting inputs from the connectionist time series classifier 546, and determines how to weight these inputs to provide better text predictions from the time series of recognized text items.

[0099] After the predictive model 360 recognizes the pre-processed actual input 350 text, the OCR pipeline 500 can proceed to perform post-processing 550 of the predictive model 360 output. For example, if the recognition model 540 provides output at the character (or word) level, the post-processing 550 can include reformatting the output into words (or phrases / sentences) of text. In another example, if the recognition model 540 provides output regarding the recognized text and the probability of the recognized text, the post-processing 550 can include combining the output regarding the recognized text and the output regarding the probability of the recognized text into one common output including both text and probability that is provided as the predictive model output 370. In a related example, if the recognition model 540 provides output regarding the recognized text and the probability of the recognized text, the post-processing 550 can include selecting between these outputs. For example, if the output regarding the probability of the recognized text is not needed, the post-processing 550 can select only the output regarding the recognized text as the predictive model output 370 to be output.

[0100] After post-processing 550 of the output of the predictive model 360 is complete, the OCR pipeline 500 may proceed to output 370 of the predictive model. The OCR pipeline 500 may provide the predictive model output 370 by storing some or all of the predictive model output 370, transmitting some or all of the predictive model output 370 to one or more other computing devices, displaying some or all of the predictive model output 370, and / or otherwise providing some or all of the predictive model output 370.

[0101] In some examples, specific hardware (e.g., application specific integrated circuits (ASICs), graphics processing units (GPUs), tensor processing units (TPUs), and / or other circuitry) may be constructed to embody some or all of predictive model 360 and / or OCR pipeline 500. For example, the specific hardware responsible for predictive model 360 and / or OCR pipeline 500 may be embodied as one or more "OCR chips" commonly used in devices that perform optical character recognition, such as scanning / printing devices, etc.

[0102] 7 illustrates a scenario 700 in which a supervised learning pipeline 300 is trained and an associated OCR pipeline 500 generates a predictive model output 740 based on a PDL input, according to an example embodiment. In the scenario 700, the training data generator 310 generates a rendered PDL 720 by processing an input PDL file, and generates associated training data items 730 by parsing the input PDL file to determine values ​​that make up the training data items 730. FIG. 7 illustrates that the rendered PDL 720 represents the black letters "ABC" approximately in the center of a gray page.

[0103] FIG. 7 also shows that training data item 730 provides information about the rendered PDL 720 including that the rendered PDL 720 has “Text” of “ABC”, the text color is “0,0,0,255” (represented using CMYK to indicate a black text color), the text font is “Helvetica”, the text font size is “48”, the “Text Bounding Box (BBox) is 75,64,165,100”, the text rotation is specified as “0” degrees, and the background color is represented in CMYK as “0,0,0,128”, e.g., a gray background.

[0104] In scenario 700, a bounding box is specified by two of its four corners, the top left corner and the bottom right corner of the bounding box. Each corner is specified by a pixel location "XY." The "X" value is specified in pixels starting at "0" at the top left corner of the page (in this case, the page represented by the rendered PDL 720) and increasing as you move from the top left corner to the right. The "Y" value is specified in pixels starting at "0" at the top left corner of the page and increasing as you move from the top left corner to the bottom. Thus, the bounding box specified by training data item 730 "75,64,165,100" has its top left corner located at "75,64," i.e., 75 pixels to the right and 64 pixels down from the top left corner of the page of the rendered PDL 720, and its bottom right corner located at "165,100," i.e., 165 pixels to the right and 100 pixels down from the top left corner of the page of the rendered PDL 720.

[0105] Scenario 700 continues, but now machine learning algorithm 340 is trained based in part on rendered PDL 720, with training data items 730 provided as input during training. After machine learning algorithm 340 is trained, machine learning algorithm 340 is considered a predictive model 360 and utilized as part of OCR pipeline 500.

[0106] Scenario 700 proceeds to OCR pipeline 500, which receives rendered PDL 720 as part of actual input 350. After actual feature vectors 352 are generated from actual input 350 and preprocessing 510 of the actual input is performed, the preprocessed actual input and actual feature vectors 352 are provided to predictive model 360. Predictive model 360 then operates on the preprocessed actual input and actual feature vectors 352 as described above in connection with OCR pipeline 500 to generate predictive model output 740 for scenario 700 and provide an output of recognized text in the rendered PDL.

[0107] In scenario 700, predictive model output 370 of predictive model 360 is post-processed by post-processing 550 to generate an output in a format similar to hOCR. This post-processed output is shown in FIG. 7 as predictive model output 740. Similar to hOCR, predictive model output 740 is shown in FIG. <p class="‘ocr_par’" lang="‘eng’" title=""training1”">" Like<p....> " (paragraph) tags can be used to indicate paragraph boundaries, and recognized lines of text indicated by hOCR can be separated by "<span...> " tag and a "class" of "ocr_line".

[0108] In the example predictive model output 740, the span tag is " <span class="‘ocrx_word’" title="‘bbox" 73 62 168 99;x_wconf93’> A.B.C. " The class "ocr_word" indicates a span related to a word recognized using OCR. It also indicates that it has a "title" with a "bbox" (bounding box) whose top left corner has XY coordinates "73 62" and whose bottom right corner has XY coordinates "168 99", that the confidence value "x_wconf" is 93 or 93%, and that the predicted text is "ABC".<span...> " is shown between " and ". Other forms of the predictive model output are possible in other scenarios. After the predictive model output 740 is generated, scenario 700 ends with OCR pipeline 500 providing the predictive model output 740 as part of the predictive model output 370.

[0109] (Example of how it works) 8 illustrates a flowchart of a method 800 according to an exemplary embodiment. The method 800 can be used for training and utilizing an artificial neural network. The method 800 can be performed by a computing device, such as computing device 200.

[0110] 8 shows that the method 800 may begin at block 810. At block 810, a computing device may receive training documents including text, at least as described herein with respect to FIGS.

[0111] At block 820, the computing device may analyze the training document to determine a plurality of training data items, each of which includes a training label associated with text in the training document and location information indicating a location of the text in the training document associated with the training label, as described herein with respect to at least FIGS.

[0112] At block 830, the ANN can be trained to recognize text in documents using a plurality of training data items and a training input including training documents, as described herein in connection with at least Figures 3, 4 and 7.

[0113] At block 840, after training the ANN, a request may be received to predict text for an application document that is different from the training document, the application document including second text, at least as described herein with respect to FIG.

[0114] At block 850, a prediction of the second text may be determined by applying a trained ANN, as described herein in connection with at least FIGS. 5, 6A, 6B, 6C, and 7, to the application document.

[0115] At block 860, after a prediction for the second text has been determined, as described herein with respect to at least FIGS. 5 and 7, information related to this second text may be provided as output.

[0116] In some examples, the training documents may be specified using a PDL, in which case, as described herein with respect to at least Figures 3 and 4, determining the plurality of training data items by analyzing the training documents may include analyzing a PDL of the training documents to determine the plurality of training data items.

[0117] In some examples, analyzing the PDL of the training document to determine the plurality of training data items may include determining position information, which may include a bounding box indicating a location of text in the training document associated with the training label, by analyzing the PDL of the training document, as described herein in connection with at least Figures 3 and 4.

[0118] In some examples, training the ANN to recognize text in a document using the multiple training data items and the training input may include generating an electronic copy of the training document using a PDL of the training document, applying the trained ANN to the training document to determine a prediction of the text of the training document, and determining an accuracy of the prediction of the text of the training document based on the multiple training data items, as described herein in connection with at least Figures 3 and 4.

[0119] In some examples, determining accuracy of a prediction of the text of the training document based on a plurality of training data items may include determining a first training data item of the plurality of training data items (which may include a first training label associated with a first text in the training document and first position information indicating a first position of the first text in the training document), determining a first predicted text at the first position in the prediction of the text, and determining accuracy of the prediction of the text of the training document based on a comparison of the first training label associated with the first text and the first predicted text, as described at least herein in connection with FIGs.

[0120] In some examples, determining an accuracy of a text prediction of the training document based on a comparison of a first training label associated with the first text to the first predicted text may include determining whether the first text matches the first predicted text, and refining the text prediction after determining that the first text matches the first predicted text, as described at least herein in connection with FIGS. 3 and 4.

[0121] In some examples, generating an electronic copy of the training document using the PDL of the training document may include generating an electronic copy of the training document using the PDL of the training document and one or more data augmentation techniques, at least as described herein in connection with Figures 3 and 4.

[0122] In some examples, the one or more data augmentation techniques may include one or more of a technique for distorting at least a portion of the electronic copy of the training document, a technique for rotating at least a portion of the electronic copy of the training document, a technique for introducing noise into at least a portion of the electronic copy of the training document, and a technique for filtering at least a portion of the electronic copy of the training document, at least as described herein in connection with Figures 3 and 4.

[0123] In some examples, generating an electronic copy of the training document using the PDL of the training document may include printing a paper copy of the training document and scanning the paper copy of the training document to generate an electronic copy of the training document, as described herein in connection with at least Figures 3 and 4.

[0124] In some examples, analyzing the PDL of the training document may include modifying the PDL of the training document to include at least one of text using multiple different fonts, text using multiple different colors, text using multiple different sizes, text using multiple different styles, and multiple pages utilizing multiple background colors, as described herein in connection with at least FIGS. 3 and 4 .

[0125] In some examples, training the ANN to recognize text in a document using a plurality of training data items and a training input may include determining a feature vector based on the training input, at least as described herein in connection with Figures 3, 4 and 7.

[0126] The illustrative embodiments described in the detailed description, figures, and claims are not intended to be limiting. Other embodiments may be utilized, and other changes may be made, without departing from the spirit and scope of the subject matter presented herein. It will be readily understood that the aspects of the present disclosure, as generally described herein and illustrated in the figures, can be arranged, substituted, combined, separated, and designed in a wide variety of different configurations, all of which are expressly encompassed herein.

[0127] In any or all of the ladder diagrams, scenarios, and flow charts shown in the drawings and described herein, each block and / or communication may represent processing of information and / or transmission of information in accordance with the exemplary embodiments. Alternative embodiments are also within the scope of these exemplary embodiments. In such alternative embodiments, for example, the functions, transmissions, communications, requests, responses, and / or messages described as blocks may be executed in an order different from that shown or described, including substantially simultaneously or in the reverse order, depending on the functionality. Furthermore, more or fewer blocks and / or functions may be used with any of the ladder diagrams, scenarios, and flow charts described herein, and such ladder diagrams, scenarios, and flow charts may be combined with each other, either partially or in whole.

[0128] A block representing processing of information may correspond to circuitry that can be configured to perform specific logical functions in a method or technique. Alternatively or additionally, a block representing processing of information may correspond to a module, segment, or portion of program code (including associated data). The program code may include one or more instructions executable by a processor to implement specific logical functions or operations in a method or technique. The program code and / or associated data may be stored in any type of computer-readable medium, such as a storage device including a disk or hard drive, or other storage medium.

[0129] The computer readable medium may also include non-transitory computer readable media, such as register memory, processor cache, and computer readable media that store data for a short period of time, such as random access memory (RAM). The computer readable medium may also include non-transitory computer readable media that store program code and / or data for a long period of time, such as secondary or persistent long-term storage media, such as read-only memory (ROM), optical or magnetic disk, compact disk read-only memory (CD-ROM). The computer readable medium may also be any other volatile or non-volatile storage system. The computer readable medium may be, for example, considered as a computer readable storage medium, or a tangible storage device.

[0130] Various aspects and embodiments have been disclosed herein, and other aspects and embodiments will be apparent to those of ordinary skill in the art. The various aspects and embodiments disclosed herein are intended to be illustrative and not limiting. The true scope is indicated by the following claims.

Claims

1. 1. A method for training and utilizing an artificial neural network (ANN), comprising: receiving, at a computing device, a training document including text; analyzing the training documents using the computing device to determine a plurality of training data items including training labels associated with text in the training documents and location information indicating locations of text in the training documents associated with the training labels; training an ANN to recognize text in documents using the plurality of training data items and a training input including the training documents; receiving, after training the ANN, a request to predict text in an application document that differs from the training document and includes a second text; determining a prediction of the second text by applying the trained ANN to the application document; and providing as output information related to the second text after determining the prediction of the second text. Including, the training document is specified using a Page Description Language (PDL), and parsing the training document to determine the plurality of training data items comprises parsing the PDL of the training document to determine the plurality of training data items; Training an ANN to recognize text in a document using the plurality of training data items and the training input includes: generating an electronic copy of the training document using the PDL of the training document; determining predictions of the text of the training documents by applying the trained ANN to the training documents; and determining an accuracy of the prediction of the text of the training document based on the plurality of training data items; Including, the prediction of text includes a confidence value; The method of claim 1, wherein the confidence value is determined by a machine learning algorithm as part of a text output prediction determination, is output along with the text output prediction, and is used to evaluate the accuracy of the confidence value and / or update the ANN during training by comparing it with an accuracy value of the prediction.

2. 2. The method of claim 1 , wherein analyzing a PDL of the training document to determine the plurality of training data items comprises analyzing a PDL of the training document to determine position information including a bounding box indicating a position of the text in the training document associated with the training label.

3. Determining the accuracy of the prediction of the text of the training document based on the plurality of training data items includes: determining a first training data item of the plurality of training data items including a first training label associated with a first text in the training document and first location information indicative of a first location of the first text within the training document; determining a first predicted text at the first position within the prediction of text; and determining the accuracy of the prediction of text of the training document based on a comparison of the first training label associated with the first text and the first predicted text; The method of claim 1 or claim 2, comprising:

4. Determining the accuracy of the prediction of text of the training document based on a comparison of the first training label associated with the first text to the first predicted text includes: determining whether the first text matches the first predicted text; and refining the prediction of text after determining that the first text is consistent with the first predicted text. The method of claim 3 , comprising:

5. 5. The method of claim 1, wherein generating the electronic copy of the training document using the PDL of the training document comprises generating the electronic copy of the training document using the PDL of the training document and one or more data augmentation techniques.

6. 6. The method of claim 5, wherein the one or more data augmentation techniques include one or more of the following: distorting at least a portion of the electronic copy of the training document; rotating at least a portion of the electronic copy of the training document; introducing noise into at least a portion of the electronic copy of the training document; and filtering at least a portion of the electronic copy of the training document.

7. generating the electronic copy of the training document using the PDL of the training document, printing a paper copy of said training document; and scanning the paper copy of the training document to generate the electronic copy of the training document. The method of any one of claims 1 to 6, comprising:

8. Analyzing the PDL of the training document includes modifying the PDL of the training document such that the training document includes at least one of text using a plurality of different fonts, text using a plurality of different colors, text using a plurality of different sizes, text using a plurality of different styles, and a plurality of pages utilizing a plurality of background colors. The method of any one of claims 1 to 7, comprising:

9. 9. The method of claim 1, wherein training an ANN to recognize text in a document using the plurality of training data items and a training input comprises determining a feature vector based on the training input.

10. 1. A computing device, comprising: One or more processors and a non-transitory data storage device storing at least computer-readable instructions, the computer-readable instructions being executed by one or more processors to receiving a training document including a text; analyzing the training documents to determine a plurality of training data items including training labels associated with text in the training documents and location information indicating locations of text in the training documents associated with the training labels; training an artificial neural network (ANN) to recognize text within documents using the plurality of training data items and a training input including the training documents; receiving, after training the ANN, a request to predict text in an application document that differs from the training document and includes a second text; determining a prediction of the second text by applying the trained ANN to the application document; and providing as output information related to the second text after determining the prediction of the second text. Including, the training document is specified using a Page Description Language (PDL), and parsing the training document to determine the plurality of training data items comprises parsing the PDL of the training document to determine the plurality of training data items; Training an ANN to recognize text in a document using the plurality of training data items and the training input includes: generating an electronic copy of the training document using the PDL of the training document; determining predictions of the text of the training documents by applying the trained ANN to the training documents; and determining an accuracy of the prediction of the text of the training document based on the plurality of training data items; Including, the prediction of text includes a confidence value; said confidence value being determined by a machine learning algorithm as part of determining an output prediction of a text, being output together with the output prediction of the text, and being used to assess the accuracy of said confidence value and / or to update the ANN during training by comparing it with an accuracy value of said prediction; A computing device that performs tasks including:

11. A product comprising: a non-transitory data storage device storing at least computer readable instructions; The computer readable instructions are executed by one or more processors of a computing device to cause the computing device to receiving a training document including a text; analyzing the training documents to determine a plurality of training data items including training labels associated with text in the training documents and location information indicating locations of text in the training documents associated with the training labels; training an artificial neural network (ANN) to recognize text within documents using the plurality of training data items and a training input including the training documents; receiving, after training the ANN, a request to predict text in an application document that differs from the training document and includes a second text; determining a prediction of the second text by applying the trained ANN to the application document; and providing as output information related to the second text after determining the prediction of the second text. Including, the training document is specified using a Page Description Language (PDL), and parsing the training document to determine the plurality of training data items comprises parsing the PDL of the training document to determine the plurality of training data items; Training an ANN to recognize text in a document using the plurality of training data items and the training input includes: generating an electronic copy of the training document using the PDL of the training document; determining predictions of the text of the training documents by applying the trained ANN to the training documents; and determining an accuracy of the prediction of the text of the training document based on the plurality of training data items; Including, the prediction of text includes a confidence value; said confidence value being determined by a machine learning algorithm as part of determining an output prediction of a text, being output together with the output prediction of the text, and being used to assess the accuracy of said confidence value and / or to update the ANN during training by comparing it with an accuracy value of said prediction; A product that performs tasks, including:

Citation Information

Patent Citations

  • Image processing unit

    JP2002237940A

  • Low resolution OCR for camera obtained document

    JP2011008802A

  • Machine learning training data generation

    JP2019046269A

  • Semantic page segmentation of vector graphics documents

    US20190026550A1