Techniques for Text Detection

A two-stage text detection process using upsampled training and similarity thresholds addresses the challenge of detecting small text in optical character recognition, enhancing accuracy and reducing false positives.

JP2024544791AActive Publication Date: 2024-12-04INTERNATIONAL BUSINESS MACHINE CORPORATION
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2024537925
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2021-12-22
Filing Date
2022-12-12
Publication Date
2024-12-04
Estimated Expiration
2042-12-12

AI Technical Summary

Technical Problem

Existing optical character recognition systems struggle to accurately detect small text, often missing text with sizes less than 9 pixels due to false positives from image artifacts.

Method used

A two-stage text detection process involving training a model on upsampled small text, followed by upsampling and reprocessing bounding boxes below a threshold size to confirm the presence of text, using similarity thresholds to identify and remove false positives.

Benefits of technology

Enhances the detection of small text by reducing false positives, improving the accuracy of text identification in images, and enabling effective conversion to machine-encoded text.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024544791000001_ABST
    Figure 2024544791000001_ABST
Patent Text Reader

Abstract

In some examples, a system for detecting text in an image includes a memory device that stores a text detection model trained using an image of the upscaled text, and a processor configured to perform text detection on the image to generate original bounding boxes that identify potential text in the image. The processor is also configured to generate a secondary image including the upscaled portions of the image associated with the bounding boxes that are less than a threshold size, and to perform text detection on the secondary image to generate secondary bounding boxes that identify potential text in the secondary image. The processor is also configured to compare the original bounding boxes to the secondary bounding boxes to identify original bounding boxes that are false positives, and generate an image file including the original bounding boxes, where the original bounding boxes identified as false positives are removed.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] This disclosure relates to techniques for detecting text in images. [Background technology]

[0002] Optical character recognition is an electronic process for converting images of typed or handwritten text into machine-coded text. Optical character recognition has many applications, including data entry, information extraction, making scanned images of documents searchable, and many others. Summary of the Invention

[0003] According to embodiments described herein, a system for detecting text in an image may include a memory device that stores a text detection model trained using an image of the upscaled text, and a processor that performs text detection on the image using the text detection model to generate original bounding boxes that identify potential text in the image. The processor is also configured to generate a secondary image including the upscaled portions of the image associated with the bounding boxes that are less than a threshold size, and to perform text detection on the secondary image using the text detection model to generate secondary bounding boxes that identify potential text in the secondary image. The processor is also configured to compare the original bounding boxes to the secondary bounding boxes to identify original bounding boxes that are false positives, and generate an image file that includes the original bounding boxes, and the original bounding boxes identified as false positives are removed.

[0004] In some embodiments, a method of detecting text in an image may include performing text detection on the image to generate original bounding boxes that identify potential text in the image. The method also includes generating a secondary image including an upscaled portion of the image associated with the bounding boxes that are less than a threshold size, and performing text detection on the secondary image to generate secondary bounding boxes that identify potential text in the secondary image. The method also includes comparing the original bounding boxes to the secondary bounding boxes to identify original bounding boxes that are false positives, and generating an image file including the original bounding boxes, where the original bounding boxes identified as false positives are removed. The method may also include processing the image file with a text recognition algorithm to generate a text document including machine-encoded text.

[0005] In yet another embodiment, a computer program product for detecting text in an image may include a computer readable storage medium having program instructions embodied therein, the computer readable storage medium being not the ephemeral signal itself. The program instructions are executable by a processor such that the processor performs text detection on the image to generate original bounding boxes that identify potential text in the image. The program instructions also cause the processor to generate a secondary image including an upscaled portion of the image associated with the bounding boxes that are less than a threshold size, perform text detection on the secondary image to generate secondary bounding boxes that identify potential text in the secondary image. The program instructions also cause the processor to compare the original bounding boxes to the secondary bounding boxes to identify original bounding boxes that are false positives, and generate an image file including the original bounding boxes, where the original bounding boxes identified as false positives are removed.

[0006] Embodiments of the present invention will now be described, by way of example only, with reference to the accompanying drawings, in which: [Brief description of the drawings]

[0007] [Figure 1] FIG. 1 illustrates an example of a computing device configured to recognize text in an image, according to embodiments described herein. [Figure 2A] FIG. 2 illustrates an illustration of a technique for detecting text in an image according to embodiments described herein. [Figure 2B] FIG. 2 illustrates an illustration of a technique for detecting text in an image according to embodiments described herein. [Figure 2C] FIG. 2 illustrates an illustration of a technique for detecting text in an image according to embodiments described herein. [Figure 2D] FIG. 2 illustrates an illustration of a technique for detecting text in an image according to embodiments described herein. [Diagram 3] FIG. 2 is a process flow diagram of an example method for detecting text in an image according to embodiments described herein. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0008] This disclosure describes techniques for automatically identifying text images in documents. In many optical character recognition algorithms, the first step in converting a text image into coded characters involves detecting the presence of text. Various techniques exist for detecting text, such as regression-based text detection and segmentation-based text detection. However, such methods may have difficulty detecting text in small fonts. For example, text less than 9 pixels in size may tend to be missed.

[0009] An embodiment of the present technology provides a text detection technique for identifying small text. According to an embodiment, a text detection model is trained on the upsampled small text. The target document is then processed using the trained text detection model, resulting in a list of bounding boxes surrounding the detected text. After a first pass, the small bounding boxes may contain text or may be the result of false positive detections. To filter out the false positives, the images corresponding to the bounding boxes below a threshold size are upscaled and copied to a new image. The new image is processed using the trained text detection model to determine whether each bounding box in the new image actually contains text or whether some bounding boxes represent false positives.

[0010] Referring now to FIG. 1, an example of a computing device configured to recognize text in an image is shown. The computing device 100 may be, for example, a server, a desktop computer, a laptop computer, a tablet computer, or a smartphone. In some examples, the computing device 100 may be a cloud computing node. The computing device 100 may be described in the general context of computer system executable instructions, such as program modules, executed by a computer system. Generally, program modules may include routines, programs, objects, components, logic, data structures, etc. that perform particular tasks or implement particular abstract data types. The computing device 100 may be implemented in a distributed cloud computing environment where tasks are performed by remote processing devices linked through a communications network. In a distributed cloud computing program environment, program modules may be located in both local and remote computer system storage media, including memory storage devices.

[0011] Computing device 100 may include a processor 102 adapted to execute stored instructions and a memory device 104 that provides temporary memory space for the execution of said instructions during operation. The processor may be a single-core processor, a multi-core processor, a computing cluster, or any number of other configurations. Memory 104 may include random access memory (RAM), read-only memory, flash memory, or any other suitable memory system.

[0012] The processor 102 may be connected through a system interconnect 106 (e.g., PCI, PCI-Express, etc.) to an input / output (I / O) device interface 108 adapted to connect the computing device 100 to one or more I / O devices 110. The I / O devices 110 may include, for example, a keyboard and a pointing device, which may specifically include a touchpad or a touchscreen. The I / O devices 110 may be built-in components of the computing device 100 or may be devices externally connected to the computing device 100.

[0013] The processor 102 may also be linked through the system interconnect 106 to a display interface 112 adapted to connect the computing device 100 to a display device 114. The display device 114 may include a display screen that is a built-in component of the computing device 100. The display device 114 may also include a computer monitor, television, or projector that is externally connected to the computing device 100. In addition, a network interface controller (NIC) 116 may be adapted to connect the computing device 100 to a network 118 through the system interconnect 106. In some embodiments, the NIC 116 may transmit data using any suitable interface or protocol, such as an Internet Small Computer System Interface, for example. The network 118 may be a cellular network, a wireless network, a wide area network (WAN), a local area network (LAN), or the Internet, for example. A remote device 120 may connect to the computing device 100 through the network 118.

[0014] In some examples, the processor 102 may be linked through the system interconnect 106 to a storage device 122 that stores files, data, and programming code for implementation of the disclosed techniques. The storage device may include training images 124, a text detection model generator 126, a text detection model 128, a text detection algorithm 130, images 132, a text recognition algorithm 134, and text documents 136.

[0015] Training images 124 are a stored set of character images used to generate text detection model 128. The character images may cover a wide range of sizes to cover the range of text sizes that may be expected in typical images. In some embodiments, the height of the character images may be as small as 9 pixels to 25 pixels, for example. In addition, some character images may be upscaled small text. For example, character images may be upscaled from their original size by a factor of 2, 3, 4, or more. In this way, an original character image of about 10×10 pixels may be increased in size to 20×20 pixels, 30×30 pixels, 40×40 pixels, or more. By upscaling, the character size increases, but image noise is also introduced. In this way, the resulting text detection model may be better able to detect small text with the same level of image noise.

[0016] The text detection model generator 126 is a machine learning algorithm that processes the training images 124 to generate a text detection model 128. The text detection model 128, trained using the training images 124, may then be used by a text detection algorithm 130 to process an image 132. The image may be any suitable type of digital image, such as a scanned document, an image captured by a camera, or a screen capture.

[0017] The text detection algorithm 1130 operates in two stages. During the first stage, the algorithm produces a probability map or matrix that describes for each pixel the probability of whether that pixel is amongst text characters. The probability matrix can be used to identify character boxes and to identify connected components, i.e. characters that are close enough to each other to be considered to form a word. The end result of the first stage of the text detection algorithm is an array of bounding boxes that enclose parts of the image that have been identified as possible words or characters.

[0018] The second stage of the text detection algorithm 130 is to filter out false positives. Because the text detection model 128 is trained on small text, it is possible that small image artifacts such as stray marks or small shapes on the scanned image may cause false positives. During the second stage, the bounding boxes generated in the first stage are analyzed to identify bounding boxes that are less than a threshold size. The threshold may be, for example, a bounding box having a height size of less than 10 pixels. For those bounding boxes that are less than the threshold, the corresponding text is upsampled to a larger size and copied into a new image, which may be referred to herein as a secondary image. The degree of upscaling may be, for example, a magnification factor of 2x to 4x or more. Upscaling also adds additional pixel data to the upscaled image. Any suitable upscaling process may be used, such as nearest neighbor interpolation, bilinear algorithm, bicubic algorithm, etc.

[0019] The new secondary image, including the upsampled image, is reprocessed using the same text detection model 128 used in stage 1, thereby producing a second array of bounding boxes. The bounding boxes for the first stage may be compared to the bounding boxes for the second stage to identify false positives. Comparing the bounding boxes may include determining a similarity between two bounding boxes that relate to the same image portion and comparing the similarity to a similarity threshold. The similarity may be determined, for example, by comparing the size of corresponding bounding boxes or comparing the overlap between the bounding boxes. The presence of text is confirmed if the corresponding bounding boxes are the same size or within a specified threshold range of the same size. If the bounding box generated during the second stage is significantly smaller than the bounding box for the first stage, the algorithm identifies the bounding box for the first stage as a false positive.

[0020] The similarity may also be determined by computing a Jaccard coefficient for the secondary bounding box and its corresponding original bounding box, where the Jaccard coefficient indicates the degree of overlap between the bounding boxes. In such a case, the similarity threshold may be, for example, a Jaccard coefficient between 0.8 and 0.9. In addition, if no bounding box is detected where a bounding box identified during the first stage was previously located, the bounding box from the first stage is identified as a false positive.

[0021] In most cases, the new images generated for false positive identifications will be relatively small, for example, on the order of 50 pixels high and 400 pixels wide. Therefore, the additional processing overhead used in the second stage is expected to be small. In most cases, the second stage may increase the overall text detection processing time by 5 percent.

[0022] If a false positive is identified, the bounding boxes identified in the first stage that were identified as false positives may be filtered out. At this stage, the text detection process is complete and an electronic image is obtained with corresponding bounding boxes that identify areas of the image that were identified as containing text. The resulting electronic image may then be processed by a text recognition algorithm 134 to convert the text image into a text document 136 that contains digitally encoded text. The text recognition algorithm 134 may be any suitable optical character recognition (OCR) technique.

[0023] It should be understood that the block diagram of FIG. 1 is not intended to indicate that the computing device 100 should include all of the components illustrated in FIG. 1. Rather, the computing device 100 may include fewer components or may include additional components not illustrated in FIG. 1 (e.g., additional memory components, embedded controllers, modules, additional network interfaces, etc.). Furthermore, any of the functionality of the text detection model generator 126, the text detection algorithms 130, and the text recognition algorithms 134 may be implemented partially or entirely in hardware or the processor 102, or both. For example, the functionality may be implemented in logic specifically implemented in an application specific integrated circuit, an embedded controller, or logic specifically implemented in the processor 102. The term logic as referred to herein may include any suitable hardware (e.g., specifically a processor), software (e.g., specifically an application), firmware, or any suitable combination of hardware, software, and firmware.

[0024] 2A, 2B, and 2C are illustrative of techniques for detecting text in an image. FIG. 2A shows an example image 200 including text. Image 200 may be any suitable file type and may be any type of image including a scanned document, a camera captured image, a screen capture, etc. Exemplary image 200 may include text in various font styles and sizes and may also include non-text artifacts such as stray marks, non-text geometric shapes or images. In the example shown in FIG. 2A, the image includes large font text 202, small font text 204, and stray markings 206, which may be marks accidentally made on a paper document before it was scanned to produce image 200.

[0025] Figure 2B shows an image with bounding boxes after the first stage of the text detection process, where bounding boxes have been generated for each individual word and character in both the large and small font text, as well as for stray marks.

[0026] FIG. 2C illustrates a small secondary image 208 generated during the second stage of the text detection process. The secondary image 208 includes the portions 210-228 of the original image 200 associated with bounding boxes less than a threshold size. In addition, each identified portion captured in the small image 208 is enlarged, i.e., upscaled, by a specified scale factor to create a larger image. The various portions may be included in the same small image. However, in some implementations, multiple small images may be generated, each having a certain number of image portions, or each image portion may be stored as a separate image. The location of each image portion in the small image 208 is tracked so that it may be correlated with the appropriate bounding box in the original image 200. For example, the small image 208 may include or be associated with metadata that correlates each portion with its location in the original image.

[0027] As shown in Figure 2C, the outer bounding box represents the original bounding box identified during the first stage of the text detection process and may be referred to herein as the original bounding box. During the second stage of the text detection process, the small image 208 is processed using the same text detection algorithm and model used during the first stage, resulting in a new set of bounding boxes, also referred to herein as secondary bounding boxes. The new secondary bounding boxes identified during the second stage are shown in Figure 2C as the inner bounding boxes.

[0028] As shown in FIG. 2C, some of the portions captured from the original image are not identified as text by the text detection algorithm during the second stage, in which case no secondary bounding box is present. For example, portions 210 and 226 do not show a secondary bounding box. In such a case, the bounding box for this image portion is identified as a false positive. If text is detected within an image portion, the original bounding box and the secondary bounding box may be compared to determine a similarity. The similarity may be compared to a similarity threshold, and if the similarity is less than the similarity threshold, the corresponding original bounding box is identified as a false positive.

[0029] The comparison may involve comparing the relative sizes of the bounding boxes or the overlap between the bounding boxes. If the original and secondary bounding boxes are identical or nearly identical according to a similarity threshold, the image portion is identified as a true positive. In some embodiments, the overlap may be compared using a Jaccard coefficient, also known as the Jaccard similarity coefficient, which is defined as the size of the intersection divided by the size of the union. For example, the threshold may be a Jaccard coefficient of 0.8 or 0.9. Other techniques for determining whether the original and secondary bounding boxes are nearly identical may also be used. For example, the similarity threshold may specify a threshold area of ​​the secondary bounding box as a percentage of the area of ​​the original bounding box. Those image portions below the similarity threshold are identified as false positives.

[0030] In the example results of FIG. 2C, four false positives and six true positives are identified. Image portions 210 and 226 are identified as false positives because the text detection algorithm did not identify text in the second stage, as indicated by the absence of a secondary bounding box. Image portions 212 and 228 are identified as false positives because a comparison of the secondary bounding box to the original bounding box results in a result that is below the similarity threshold. The remaining image portions 212-224 are identified as true positives because the secondary bounding boxes are close in size to the original bounding box, resulting in a high degree of overlap, thereby causing the comparison result to exceed the similarity threshold.

[0031] The identification of false positives is used to modify the bounding boxes in the original image to produce the image shown in Figure 2D. As can be seen in Figure 2D, the bounding boxes for the image artifacts associated with image portions 210, 212, 226, and 228 have been removed. The image shown in Figure 2D may then be processed using a text recognition algorithm to produce a character-encoded text document.

[0032] 3 is a process flow diagram of an example method for detecting text in an image. The method 200 may be implemented in any suitable computing device, such as the computing device 100 of FIG. 1. The method may begin at block 302.

[0033] In block 302, a text detection model is trained using the upsampled small text. The upsampled small text may be generated from labeled training images provided by a human operator. Any suitable upscaling algorithm may be used to upscale the small text.

[0034] At block 304, the image document is processed to detect text using the text detection model generated at block 302. The process performed at block 304 may generate a number of bounding boxes that enclose portions of the image that have been identified as text. The image processed at block 304 may be referred to as the original image to distinguish it from the secondary image generated at 306.

[0035] In block 306, a secondary image is generated by upscaling a portion of the original image and copying the upscaled portion to the secondary image. The portion of the original image that is upscaled and copied to the secondary image is the portion associated with a bounding box that is less than a specified size threshold.

[0036] In block 308, the secondary image is processed to detect text using the text detection model generated in block 302. The processing performed in block 308 may result in a number of secondary bounding boxes that enclose portions of the image that are identified as text.

[0037] At block 310, the bounding box generated at block 304 is compared to the bounding box generated at block 308 to identify false positives. In some embodiments, the presence of a secondary bounding box for an image portion may be used to indicate that the portion contains text (a true positive). In some embodiments, if a secondary bounding box exists for a portion, the secondary bounding box is compared to the original bounding to determine a similarity. If the similarity is above a similarity threshold, the image portion may be identified as containing text (a true positive). Otherwise, if the similarity is below a similarity threshold, the image portion may be identified as not containing text (a false positive).

[0038] In block 312, the raw bounding boxes identified as false positives are removed from the image file.

[0039] At block 314, the image file is processed by a text recognition algorithm to convert the text image into character-coded text. The text recognition algorithm may be any suitable text recognition algorithm. The character-coded text may be stored as a file in a short-term memory device, such as RAM, or in a long-term storage device, such as a hard drive or solid state drive. Additionally, the character-coded text may be transferred over a network to a remote device, sent to a processing device for further processing, such as natural language processing, or processed for transmission to an output device, such as a printer or display screen.

[0040] 3 is not intended to imply that the operations of method 300 should be performed in a certain order or that all of the operations of method 300 should be included in every instance. In addition, method 300 may include additional operations not shown or described.

[0041] The present invention may be a system, a method, or a computer program product, or a combination thereof. The computer program product may include a computer readable storage medium (or media) having computer readable program instructions for causing a processor to carry out aspects of the present invention.

[0042] A computer readable storage medium may be a tangible device capable of holding and storing instructions for use by an instruction execution device. A computer readable storage medium may be, for example, but not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. A non-exhaustive list of more specific examples of computer readable storage media includes portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD), memory stick, floppy disk, mechanically encoded devices such as punch cards or grooved ridge structures with instructions recorded thereon, and any suitable combination of the above. As used herein, a computer-readable storage medium is not to be construed as being a transitory signal itself, such as an electric wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse passing through a fiber optic cable), or an electrical signal transmitted over an electrical wire.

[0043] The computer readable program instructions described herein may be downloaded from a computer readable storage medium to the respective computing / processing device or to an external computer or storage device via a network, such as the Internet, a local area network, a wide area network, or a wireless network, or a combination thereof. The network may include copper transmission cables, optical transmission fiber, wireless transmission, routers, firewalls, switches, gateway computers, or edge servers, or a combination thereof. A network adapter card or network interface of each computing / processing device receives the computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium within the respective computing / processing device.

[0044] The computer readable program instructions for carrying out the operations of the present invention may be either assembler instructions, instruction set architecture (ISA) instructions, machine language instructions, machine dependent instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including object oriented programming languages ​​such as Smalltalk, C++, and traditional procedural programming languages ​​such as the "C" programming language or similar programming languages. The computer readable program instructions may be executed entirely on the user's computer, partly on the user's computer as a stand-alone software package, partly on the user's computer and partly on a remote computer, or all on a remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or wide area network (WAN), or the connection may be made to an external computer (e.g., via the Internet using an Internet Service Provider). In some embodiments, electronic circuitry including, for example, a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA) can execute computer readable program instructions to personalize the electronic circuitry by utilizing state information of the computer readable program instructions to perform aspects of the invention.

[0045] Aspects of the present invention are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer readable program instructions.

[0046] These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, executed by the processor of the computer or other programmable data processing apparatus, produce means for implementing the functions / acts specified in one or more blocks of the flowcharts and / or block diagrams. These computer readable program instructions may also be stored on a computer readable medium such that the computer readable storage medium on which the instructions are stored comprises an article of manufacture including instructions that implement aspects of the functions / acts specified in one or more blocks of the flowcharts and / or block diagrams, and can instruct a computer, programmable data processing apparatus, or other device, or combination thereof, to function in a particular manner.

[0047] The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause the computer, other programmable apparatus, or other device to perform a series of operational steps to produce a computer-implemented process such that the instructions, which execute on the computer, other programmable apparatus, or other device, implement the functions / operations specified in one or more blocks of the flowcharts and / or block diagrams.

[0048] The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block of the flowcharts or block diagrams may represent a module, segment, or portion of instructions, including one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions described in the blocks may occur out of the order described in the figures. For example, two blocks shown in succession may in fact be executed substantially simultaneously, or the blocks may sometimes be executed in reverse order, depending on the functionality involved. It should also be noted that each block of the block diagrams and / or flowchart illustrations, and combinations of blocks in the block diagrams and / or flowchart illustrations, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or executes a combination of dedicated hardware and computer instructions.

[0049] The description of various embodiments of the present invention is presented for illustrative purposes, but is not intended to be exhaustive and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terms used in this specification are selected to best explain the principles of the embodiments, practical applications, or technical improvements over the technology found in the market, or to enable other skilled in the art to understand the embodiments disclosed herein.

Claims

1. 1. A system for detecting text in an image, comprising: a memory device for storing a text detection model trained using the upscaled text image; 1. A processor comprising: performing text detection on an image using the text detection model to generate raw bounding boxes that identify latent text within the image; generating a secondary image including an upscaled portion of the image associated with a bounding box less than a threshold size; performing text detection on the secondary image using the text detection model to generate a secondary bounding box that identifies latent text in the secondary image; comparing the original bounding box to the secondary bounding box to identify original bounding boxes that are false positives; generating an image file including the original bounding boxes, and removing the original bounding boxes identified as false positives; A system comprising:

2. The system of claim 1 , wherein the processor processes the image file with a text recognition algorithm to generate a text document comprising machine-encoded text.

3. Comparing the original bounding box to the secondary bounding box to identify original bounding boxes that are false positives includes: determining whether a secondary bounding box has been generated for a portion of the image associated with a particular one of the original bounding boxes; identifying the particular one of the original bounding boxes as a false positive if a secondary bounding box has not been generated; The system of claim 1 , comprising:

4. Comparing the original bounding boxes to the secondary bounding boxes to identify original bounding boxes that are false positives includes, for each of the secondary bounding boxes: comparing said secondary bounding boxes with corresponding original bounding boxes to determine a similarity; comparing the similarity to a similarity threshold; identifying the corresponding original bounding box as a false positive if the similarity is less than the similarity threshold; The system of claim 1 , comprising:

5. The system of claim 4 , wherein determining the similarity comprises calculating a Jaccard coefficient for the secondary bounding box and the corresponding original bounding box.

6. The system of claim 4, wherein the similarity threshold is a Jaccard coefficient between 0.8 and 0.

9.

7. The system of claim 1 , wherein the threshold size is a threshold height of less than 10 pixels and the upscaled portion of the image is upscaled by a factor greater than two.

8. 2. The system of claim 1, wherein the memory device stores the images of the upscaled text, and the processor trains the text detection model using the images of the upscaled text.

9. 10. The system of claim 8, wherein the images of upscaled text used to train the text detection model include text images having an original height of less than 10 pixels that are upscaled by a factor of three or more.

10. The image is Scanned documents, and images captured by the camera The system of claim 1 , wherein the

11. 1. A method for detecting text in an image, comprising: performing text detection on an image to generate a raw bounding box that identifies latent text within the image; generating a secondary image including an upscaled portion of the image associated with a bounding box less than a threshold size; performing text detection on the secondary image to generate a secondary bounding box that identifies potential text within the secondary image; comparing the original bounding boxes to the secondary bounding boxes to identify original bounding boxes that are false positives; generating an image file including the original bounding boxes, wherein the original bounding boxes identified as false positives are removed; processing said image file with a text recognition algorithm to generate a text document comprising machine-encoded text; The method includes:

12. Comparing the original bounding box to the secondary bounding box to identify original bounding boxes that are false positives includes: determining whether a secondary bounding box has been generated for a portion of the image associated with a particular one of the original bounding boxes; identifying the particular one of the original bounding boxes as a false positive if a secondary bounding box has not been generated; The method of claim 11 , comprising:

13. Comparing the original bounding boxes to the secondary bounding boxes to identify original bounding boxes that are false positives includes, for each of the secondary bounding boxes: comparing said secondary bounding boxes with corresponding original bounding boxes to determine a similarity; comparing the similarity to a similarity threshold; identifying the corresponding original bounding box as a false positive if the similarity is less than the similarity threshold; The method of claim 11 , comprising:

14. The method of claim 13 , wherein determining the similarity comprises calculating a Jaccard coefficient for the secondary bounding box and the corresponding original bounding box.

15. The method of claim 11 , wherein the threshold size is a threshold height of less than 10 pixels and the upscaled portion of the image is upscaled by a factor greater than two.

16. 1. A computer program product for detecting text in an image, comprising a computer readable storage medium having program instructions embodied therein, the computer readable storage medium being not a transient signal itself, the program instructions comprising: performing text detection on an image to generate a raw bounding box that identifies latent text within the image; generating a secondary image including an upscaled portion of the image associated with a bounding box less than a threshold size; performing text detection on the secondary image to generate a secondary bounding box that identifies potential text within the secondary image; comparing the original bounding boxes to the secondary bounding boxes to identify original bounding boxes that are false positives; generating an image file including the original bounding boxes, wherein the original bounding boxes identified as false positives are removed; 23. A computer program product executable by a processor to cause the processor to perform the steps of:

17. Comparing the original bounding box to the secondary bounding box to identify original bounding boxes that are false positives includes: determining whether a secondary bounding box has been generated for a portion of the image associated with a particular one of the original bounding boxes; identifying the particular one of the original bounding boxes as a false positive if a secondary bounding box has not been generated; 20. The computer program product of claim 16, comprising:

18. Comparing the original bounding boxes to the secondary bounding boxes to identify original bounding boxes that are false positives includes, for each of the secondary bounding boxes: comparing said secondary bounding boxes with corresponding original bounding boxes to determine a similarity; comparing the similarity to a similarity threshold; identifying the corresponding original bounding box as a false positive if the similarity is less than the similarity threshold; 20. The computer program product of claim 16, comprising:

19. 17. The computer program product of claim 16, wherein determining a similarity comprises calculating a Jaccard coefficient for the secondary bounding box and a corresponding original bounding box.

20. 17. The computer program product of claim 16, wherein the threshold size is a threshold height of less than 10 pixels and the upscaled portion of the image is upscaled by a factor greater than two.

Citation Information

Patent Citations

  • Method and device for character recognition

    JP2003016386A

  • Region proposal networks for automated bounding box detection and text segmentation

    US20210034856A1