Document image processing system, document image processing method, and document image processing program
The document image processing system uses feature vectors and machine learning to identify attribute labels and values in documents, overcoming the need for pre-defined template data and facilitating efficient processing of documents with diverse layouts.
Patent Information
- Application Number
- JP2021085715
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-05-20
- Publication Date
- 2024-10-04
- Estimated Expiration
- 2041-05-20
Smart Images

Figure 0007561378000001 
Figure 0007561378000002 
Figure 0007561378000003
Abstract
Description
[Technical field]
[0001] The present invention relates to a document image processing system, a document image processing method, and a document image processing program. [Background technology]
[0002] One document recognition system uses template information that specifies the position of a specific attribute to extract an image of that attribute from within a document image, and obtains the text data using character recognition processing (OCR processing).Furthermore, based on the character string and position of the attribute, it calculates OCR elements for the attribute (attribute, attribute value (item value), position, OCR score, position score, etc.), selects a representative OCR element from the OCR elements based on these scores, generates document summary information from the attributes and attribute values of the representative OCR element, generates a feature vector from the above-mentioned score, and evaluates the reliability of the document summary information based on the feature vector (see, for example, Patent Document 1).
[0003] In addition, in a certain document identification system, a document format table is created in advance by a user, and the document format table includes field information indicating the position, size, character type, etc. of a character recognition target area specified by the user. Then, based on this document format (i.e., field information), character information (text data) in the document is obtained from image data of the document image (for example, see Patent Document 2). [Prior art documents] [Patent documents]
[0004] [Patent Document 1] JP 2019-86984 A [Patent Document 2] JP 2016-48444 A Summary of the Invention [Problem to be solved by the invention]
[0005] However, the above-mentioned technology uses template data that specifies the layout of documents such as forms (information on the position where each attribute is written, etc.), so in order to process multiple documents with different layouts, template data must be created in advance for each layout, which requires tedious work in advance. Also, for documents with unknown layouts, the above-mentioned technology has difficulty in accurately detecting attribute values in document images for certain attributes.
[0006] The present invention has been made in consideration of the above problems, and aims to provide a document image processing system, a document image processing method, and a document image processing program that can accurately identify the attribute value of an attribute without using template data that specifies the description position of the attribute within a document image. [Means for solving the problem]
[0007] The document image processing system according to the present invention includes a document image acquisition unit that acquires a document image, a text data generation unit that extracts a set of character images in the document image and generates text data of the set of character images, a feature vector generation unit that generates a feature vector corresponding to the text data, and a label-value pair identification unit that (a) detects one or more attribute label candidates for a specific attribute from the text data, (b) detects one or more attribute value candidates from the text data, (c) detects pairs of the attribute label candidates and the attribute value candidates as pair candidates, and (d) selects a pair of an attribute label and an attribute value for the specific attribute from the pair candidates. The label-value pair identification unit (a) detects attribute label candidates for the specific attribute from the text data based on the feature vector of the text data, and (b) identifies the pair based on the feature vector of the attribute label candidates and the feature vector of the attribute value candidates.
[0008] The document image processing method according to the present invention includes a document image acquiring step of acquiring a document image, a text data generating step of extracting a set of character images in the document image and generating text data of the set of character images, a feature vector generating step of generating a feature vector corresponding to the text data, and a label value pair identifying step of (a) detecting one or more attribute label candidates for a specific attribute from the text data, (b) detecting one or more attribute value candidates from the text data, (c) detecting pairs of the attribute label candidates and the attribute value candidates as pair candidates, and (d) selecting a pair of an attribute label and an attribute value for the specific attribute from the pair candidates.The label value pair identifying step includes (a) detecting attribute label candidates for the specific attribute from the text data based on the feature vector of the text data, and (b) identifying the above-mentioned pair based on the feature vector of the attribute label candidates and the feature vector of the attribute value candidates.
[0009] A document image processing program according to the present invention causes a computer to function as the document image acquisition unit, the text data generation unit, the feature vector generation unit, and the label-value pair identification unit described above. Effect of the Invention
[0010] According to the present invention, there is provided a document image processing system, a document image processing method, and a document image processing program that accurately identify an attribute value of an attribute without using template data that specifies the description position of the attribute within a document image.
[0011] The above and other objects, features and advantages of the present invention will become more apparent from the following detailed description taken in conjunction with the accompanying drawings. [Brief description of the drawings]
[0012] [Figure 1] FIG. 1 is a block diagram showing a configuration of a document image processing system according to an embodiment of the present invention. [Diagram 2] FIG. 2 is a diagram showing an example of a document image. [Diagram 3] FIG. 3 is a diagram showing an example of a set of character images extracted from the document image shown in FIG. [Figure 4] FIG. 4 is a flowchart illustrating the operation of the document image processing system shown in FIG. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0013] Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
[0014] Fig. 1 is a block diagram showing the configuration of a document image processing system according to an embodiment of the present invention. The document image processing system shown in Fig. 1 is configured with one information processing device (personal computer, server, etc.), but a processing unit described below may be distributed among multiple information processing devices capable of data communication with each other. Furthermore, such multiple information processing devices may include a GPU (Graphics Processing Unit) that processes specific calculations in parallel.
[0015] The document image processing system shown in FIG. 1 includes a storage device 1, a communication device 2, an image reading device 3, and a processing device 4.
[0016] The storage device 1 is a non-volatile storage device such as a flash memory or a hard disk, and stores various data and programs.
[0017] Here, the storage device 1 stores a document image processing program 11 and user setting data 12, and also stores system setting data (such as coefficient setting values of a neural network used in each processing unit described below) as necessary. The document image processing program 11 may be stored in a portable computer-readable recording medium such as a CD (Compact Disk). In that case, for example, the program 11 is installed from the recording medium into the storage device 1. The program 11 may be one program or a collection of multiple programs. The user setting data 12 is data indicating a specific attribute designated by a user described below.
[0018] The communication device 2 is a device capable of data communication, such as a network interface, a peripheral device interface, or a modem, and performs data communication with other devices as necessary. The image reading device 3 optically reads a document image from a document and generates image data (such as raster image data) of the document image. The communication device 2 and the image reading device 3 are provided as necessary.
[0019] The arithmetic processing device 4 is a computer equipped with a CPU (Central Processing Unit), ROM (Read Only Memory), RAM (Random Access Memory), etc., and operates as various processing units by loading programs from the ROM, memory device 1, etc. into the RAM and executing them on the CPU.
[0020] Here, by executing the program 11, the calculation processing device 4 operates as a document image acquisition unit 21, a text data generation unit 22, a feature vector generation unit 23, a label-value pair identification unit 24, a data output unit 25, and a machine learning processing unit 26.
[0021] The document image acquisition unit 21 acquires a document image as image data such as raster image data. The document image is an image of a document including attribute labels (text such as headings) and attribute values (text such as numbers and other character strings) for one or more attributes (description items, etc.), such as receipts (including receipts), bills, delivery notes, and other forms, flyers such as advertisements and announcements, completed questionnaires, and health certificates. For example, the document image acquisition unit 21 reads out a document image as image data stored in the storage device 1, acquires a document image as image data received by the communication device 2 via a communication path such as a network, and acquires a document image as image data generated by the image reading device 3.
[0022] The text data generating unit 22 extracts a set of character images from the acquired document image and generates text data of the set of character images.
[0023] Specifically, the text data generation unit 22 (a) detects character objects by excluding objects other than characters in the document image (photo objects, graphic objects, line objects, etc.), (b) extracts a set of character images by grouping them into units such as "words," "lines," and "paragraphs" based on the position of each character object, and (c) performs character recognition processing (OCR processing) to generate text data (i.e., a character code string) for the set of character images.
[0024] The text data generation unit 22 extracts text objects from within a document image using existing techniques (for example, region separation processing, machine-learned deep neural networks, etc.).
[0025] In this embodiment, the text data generation unit 22 extracts a set of character images from within a document image and generates text data of the set of character images through OCR processing, without using template data that specifies the position of an area within the document image that corresponds to a specific attribute (here, an attribute specified by the user) (i.e., the position at which the attribute label and attribute value are written).
[0026] This specific attribute is specified by the user as text data and input to the system as user setting data 12. For example, the user setting data 12 is received by the communication device 12 together with image data of the document image, or is directly input via a user interface (not shown).
[0027] The feature vector generating unit 23 generates a feature vector corresponding to each of the one or more pieces of text data generated by the text data generating unit 22.
[0028] For example, the feature vector generation unit 23 converts text data of a character image set into a feature vector (e.g., a word vector) using a predetermined word embedding method. The above-mentioned word embedding method is, for example, Word2vec (Skip-Gram model), and the feature vector generation unit 23 includes a conversion unit that has been machine-trained for the word embedding method. The conversion unit includes, for example, a neural network, and converts the text data into a feature vector using the neural network.
[0029] The label-value pair identifying unit 24 identifies a pair of an attribute label (text data indicating the name of an attribute) and an attribute value (text data indicating the value of an attribute) for a user-desired attribute (here, a specific attribute). Specifically, the label-value pair identifying unit 24 (a) detects one or more attribute label candidates for the specific attribute from the above-mentioned text data, (b) detects one or more attribute value candidates from the above-mentioned text data, (c) detects pairs of the detected attribute label candidates and the detected attribute value candidates as pair candidates, and (d) identifies a pair of an attribute label and an attribute value for the specific attribute (i.e., an attribute value related to the attribute desired by the user) from the pair candidates.
[0030] Specifically, the label-value pair identification unit 24 (a) detects attribute label candidates for a specific attribute from the above-mentioned text data based on the feature vectors of the above-mentioned text data, and (b) identifies the above-mentioned pair based on the feature vectors of the attribute label candidates and the feature vectors of the attribute value candidates.
[0031] The label-value pair identifying unit 24 may exclude pair candidates having scores less than a predetermined threshold from the pair candidates (pairs).
[0032] In this embodiment, the feature vector generating unit 23 derives a feature vector of the name of the specific attribute (here, the name of the attribute specified by the user) in the same manner as the feature vector of the text data, and the label-value pair identifying unit 24 detects attribute label candidates based on the distance between the feature vector of the name of the specific attribute (the text data specified by the user as the specific attribute) and the feature vector of the text data (i.e., the degree of relevance or similarity between the name of the specific attribute and the text data).
[0033] Specifically, the label-value pair identifying unit 24 detects text data whose distance is less than a predetermined threshold as an attribute label candidate. For example, the label-value pair identifying unit 24 derives a score corresponding to the distance from the distance using a predetermined arithmetic expression or the like, and compares the score with a predetermined threshold to detect attribute label candidates. For example, this score takes a value within a predetermined range (here, a range of 0 to 1), and if the two are identical, the score is 1, and if the two are not related at all, the score is 0. In addition, the above-mentioned conversion unit is machine-learned so that the stronger the degree of association or similarity between the name of the specific attribute and the above-mentioned text data, the shorter the distance between them.
[0034] In addition, as the attribute value candidates constituting the pair candidates corresponding to the attribute label candidates, for example, those whose physical distance between the two (i.e., the distance between the positions of the two character image sets in the document image) is less than a predetermined threshold are selected.
[0035] It should be noted that the attribute value candidates are not limited to numerical values (character strings indicating numerical values), but may be character strings indicating things other than numerical values (words, sentences, etc.).
[0036] Furthermore, in this embodiment, the label-value pair identification unit 24 derives a score for each pair candidate by scoring the pair candidates based on (a) the correspondence between the positions of the character set images of the attribute label candidates in the document image and the positions of the character set images of the attribute value candidates, and (b) the (semantic) relevance or similarity between the attribute label candidates and the attribute value candidates based on the feature vectors of the attribute label candidates and the feature vectors of the attribute value candidates, and selects a pair from the pair candidates based on the score.
[0037] For example, the above-mentioned score is derived using a predetermined formula so that the closer the positions of the two are, and the higher the score is, the higher the score is, and the pair candidate having a score above a predetermined threshold and / or the pair candidate having the highest score is selected as the pair.
[0038] For example, the above-mentioned relevance is derived from the feature vectors of the attribute label candidates and the feature vectors of the attribute value candidates by a predetermined formula (for example, a formula obtained by machine learning) so that the stronger the relevance (for example, co-occurrence), the higher the relevance. For example, the above-mentioned similarity is derived by a predetermined formula (for example, a formula obtained by machine learning) based on the distance between the feature vectors of both.
[0039] In addition, for the correspondence relationship between the position of the character set image of the attribute label candidate and the position of the character set image of the attribute value candidate in the pair candidate, the score may be changed according to the direction from the position of the character set image of the attribute label candidate to the position of the character set image of the attribute value candidate, or the direction from the position of the character set image of the attribute value candidate to the position of the character set image of the attribute label candidate. In other words, in this case, when the attribute label candidate is located in a specific direction (e.g., to the right (opposite direction of the main scanning direction) or upward (opposite direction of the sub-scanning direction)) from the attribute value candidate, the score is derived so that the score is higher than when the attribute label candidate is located in the opposite direction (e.g., to the left (main scanning direction) or downward (sub-scanning direction)).
[0040] Regarding the above-mentioned machine learning, an existing method may be applied using a predetermined appropriate corpus.
[0041] Fig. 2 is a diagram showing an example of a document image, and Fig. 3 is a diagram showing an example of a set of character images extracted from the document image shown in Fig. 2.
[0042] The document image 101 shown in Fig. 2 is an image of a real estate flyer. A plurality of character image sets as shown in Fig. 3 are extracted from the document image 101 shown in Fig. 2, and for each character image set, the position of the character image set within the document image 101 is identified, and the character image set is converted into text data by OCR processing.
[0043] For example, if the user specifies "date of construction" as a specific attribute, "date of construction" that has a high degree of relevance or similarity to "date of construction" is detected as an attribute label candidate from the text data of the character image set shown in Fig. 3, and a pair candidate of the attribute value candidate "October 1990" and the attribute label candidate "date of construction" is obtained. In this case, based on the feature vectors and positions of the attribute value candidate "October 1990" and the attribute label candidate "date of construction", the positions of the two are close to each other and the relevance is high, so this pair candidate is selected as the pair.
[0044] In this case, the attribute value candidate "Management fee 5,000 yen" and the attribute label candidate "Year built" that are relatively close to each other are considered as pair candidates, but since the degree of association between the two is low, this pair candidate is not selected as a pair.
[0045] The machine learning processing unit 26 executes the machine learning process for carrying out the above-mentioned machine learning. Note that the above-mentioned machine learning processing unit 26 is not essential and may be provided as necessary.
[0046] Next, the operation of the document image processing system according to the present embodiment will be described with reference to Fig. 4, which is a flow chart for explaining the operation of the document image processing system shown in Fig. 1.
[0047] First, the document image acquisition unit 21 acquires a document image (step S1). Next, the text data generation unit 22 detects character objects in the acquired document image (step S2), extracts a character image set (step S3), and generates text data of the character image set by OCR processing (step S4).
[0048] Then, the feature vector generating unit 23 generates a feature vector corresponding to the text data of each character image set (step S5). Also, the feature vector generating unit 23 generates a feature vector corresponding to the name (text data) of one or more specific attributes designated by the user.
[0049] Then, the label-value pair identification unit 24 detects attribute label candidates for a specific attribute specified by the user from the text data of the set of character images (step S6), selects attribute value candidates located within a predetermined distance range from the attribute label candidate in the document image, and sets pair candidates between the attribute label candidate and the attribute value candidate (step S7).
[0050] For each specific attribute, one or more pair candidates are individually set. If a pair candidate cannot be set for a certain specific attribute, a result that no attribute value was detected for that specific attribute is recorded, and the process for that specific attribute is terminated.
[0051] Next, the label-value pair identifying unit 24 scores each of the set pair candidates, and identifies one or more pairs (pairs of attribute labels and attribute values) for each specific attribute based on the obtained scores (step S8).
[0052] Then, the data output unit 25 stores one or more pairs obtained for all the specific attributes in a predetermined data format in the storage device 1 or transmits them by the communication device 2 (step S9).
[0053] As described above, according to the embodiment, the text data generating unit 22 extracts a character image set in a document image and generates text data of the character image set. The feature vector generating unit 23 generates a feature vector corresponding to the text data of the character image set. The label-value pair identifying unit 24 (a) detects one or more attribute label candidates for a specific attribute from the text data, (b) detects one or more attribute value candidates from the text data, (c) detects pairs of the attribute label candidates and the attribute value candidates as pair candidates, and (d) identifies pairs of attribute labels and attribute values for the above-mentioned attributes from the pair candidates. In this case, the label-value pair identifying unit 24 (a) detects attribute label candidates for the specific attribute based on the feature vector of the text data of the character image set, and (b) identifies the above-mentioned pairs based on the feature vector of the attribute label candidates and the feature vector of the attribute value candidates.
[0054] As a result, the text data is semantically classified using the feature vectors of the text data of the set of character images in the document image, and the above-mentioned pairs are identified by evaluating the relevance and similarity between the candidate attribute labels and the candidate attribute values based on the feature vectors of the candidate attribute labels and the feature vectors of the candidate attribute values, so that the attribute value of a specific attribute written in the document image can be accurately identified without using template data that specifies the position of the area in the document image where the attribute value of the specific attribute is written.
[0055] It should be noted that various changes and modifications to the above-described embodiments will be apparent to those skilled in the art. Such changes and modifications may be made without departing from the spirit and scope of the subject matter and without diminishing its intended advantages. In other words, such changes and modifications are intended to be included within the scope of the claims.
[0056] For example, in the above embodiment, after the above-mentioned processing is completed, the image data of the document image may be immediately deleted from the system. [Industrial Applicability]
[0057] The present invention is applicable to recognition processing of document images such as forms, for example. [Explanation of symbols]
[0058] 4. Processing unit (an example of a computer) 11 Document Image Processing Programs 21 Document image acquisition unit 22 Text data generation unit 23 Feature Vector Generation Unit 24 Label-value pair specification 25 Data output section
Claims
1. a document image acquisition unit for acquiring a document image; a text data generating unit that extracts a set of character images from the document image and generates text data of the set of character images; a feature vector generation unit that generates a feature vector corresponding to the text data; (a) detecting one or more attribute label candidates for a specific attribute from the text data, (b) detecting one or more attribute value candidates from the text data, (c) detecting pairs of the attribute label candidates and the attribute value candidates as pair candidates, and (d) selecting a pair of an attribute label and an attribute value for the specific attribute from the pair candidates, the label-value pair identification unit (a) detects, from the text data, the attribute label candidates for the specific attribute based on a feature vector of the text data; and (b) identifies the pair based on the feature vector of the attribute label candidates and the feature vector of the attribute value candidates; A document image processing system comprising:
2. the feature vector generation unit generates a feature vector corresponding to the text data by a predetermined word embedding method, and generates a feature vector of a name of the specific attribute by the predetermined word embedding method; the label-value pair identification unit detects the attribute label candidates based on a distance between a feature vector of a name of the specific attribute and a feature vector of the text data; 2. The document image processing system according to claim 1,
3. 2. The document image processing system according to claim 1, wherein the label-value pair identification unit derives scores for the pair candidates by scoring the pair candidates based on (a) a correspondence relationship between a position of a character set image of the attribute label candidate in the document image and a position of a character set image of the attribute value candidate, and (b) a degree of relevance or similarity between the attribute label candidate and the attribute value candidate based on a feature vector of the attribute label candidate and the feature vector of the attribute value candidate, and selects the pair from the pair candidates based on the score.
4. A document image processing system as claimed in any one of claims 1 to 3, characterized in that the text data generation unit extracts a set of character images from the document image without using template data that specifies the position of an area in the document image that corresponds to the specific attribute.
5. A document image acquisition step of acquiring a document image; a text data generating step of extracting a set of character images from the document image and generating text data of the set of character images; a feature vector generating step of generating a feature vector corresponding to the text data; (a) detecting one or more attribute label candidates for a specific attribute from the text data, (b) detecting one or more attribute value candidates from the text data, (c) detecting pairs of the attribute label candidates and the attribute value candidates as pair candidates, and (d) selecting a pair of an attribute label and an attribute value for the specific attribute from the pair candidates, The label-value pair identifying step includes: (a) detecting attribute label candidates for the specific attribute from the text data based on a feature vector of the text data; and (b) identifying the pair based on the feature vector of the attribute label candidate and the feature vector of the attribute value candidate. A document image processing method comprising the steps of:
6. Computer, a document image acquisition unit for acquiring a document image; a text data generating unit that extracts a set of character images from the document image and generates text data of the set of character images; a feature vector generation unit that generates a feature vector corresponding to the text data; and (a) detecting one or more attribute label candidates for a specific attribute from the text data, (b) detecting one or more attribute value candidates from the text data, (c) detecting pairs of the attribute label candidates and the attribute value candidates as pair candidates, and (d) functioning as a label-value pair specifying unit that selects a pair of an attribute label and an attribute value for the specific attribute from the pair candidates; the label-value pair identification unit (a) detects, from the text data, the attribute label candidates for the specific attribute based on a feature vector of the text data; and (b) identifies the pair based on the feature vector of the attribute label candidates and the feature vector of the attribute value candidates; A document image processing program characterized by:
Citation Information
Patent Citations
Document identification program, document identification device, document identification system, and document identification method
JP2016048444A
Word concept visualization device and word concept visualization method
JP2019012346A
Computer and document identification method
JP2019086984A
Information processing device, information processing method, program, and document reading system
JP2020016946A
Information processor and information processing program
JP2021064209A
Cited By
A document service system, the methods that the document service system performs, and a program that causes a computer to perform the methods that the document service system performs.
JP2026132992A
A document service system, the methods that the document service system performs, and a program that causes a computer to perform the methods that the document service system performs.
JP2026133366A
A document service system, the methods that the document service system performs, and a program that causes a computer to perform the methods that the document service system performs.
JP7843384B1
