WO2021215589A1 - Ocr 기반 문서 분석 시스템 및 방법 - Google Patents

Ocr 기반 문서 분석 시스템 및 방법 Download PDF

Info

Publication number
WO2021215589A1
WO2021215589A1 PCT/KR2020/011210 KR2020011210W WO2021215589A1 WO 2021215589 A1 WO2021215589 A1 WO 2021215589A1 KR 2020011210 W KR2020011210 W KR 2020011210W WO 2021215589 A1 WO2021215589 A1 WO 2021215589A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
ocr
recognized
document analysis
document
Prior art date
Application number
PCT/KR2020/011210
Other languages
English (en)
French (fr)
Inventor
이병철
서광일
김상헌
어진솔
황장현
정안재
최주영
Original Assignee
주식회사 애자일소다
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from KR1020200050181A external-priority patent/KR102149051B1/ko
Priority claimed from KR1020200050180A external-priority patent/KR102149052B1/ko
Priority claimed from KR1020200050179A external-priority patent/KR102149050B1/ko
Application filed by 주식회사 애자일소다 filed Critical 주식회사 애자일소다
Priority to JP2022563495A priority Critical patent/JP7444495B2/ja
Publication of WO2021215589A1 publication Critical patent/WO2021215589A1/ko

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/10Image acquisition

Definitions

  • the present invention relates to an OCR-based document analysis system and method, and more particularly, by providing relative position information for characters recognized based on OCR recognition, a connection between recognized items, and a confidence score for the recognized information, It relates to an OCR-based document analysis system and method that can reduce data table reconstruction and confirmation work time by predictive accuracy inspectors.
  • the receipts stored and managed in this way are made of paper, there is a fundamental risk of damage to the originals, there is a technical and economic burden to prevent exposure to contamination, loss, and corruption, and the receipt storage space is proportional to the increase in the amount of receipt storage. There is a problem that needs to be increased.
  • the person in charge of the individual or company extracts and classifies the information necessary for the above-mentioned accounting or tax processing from the conventional receipt by handwriting input method, and writes it in the book or enters and stores the information in the PC where the accounting management program is installed. There is this inconvenient problem.
  • character (text) images included in documents can be converted through machine encoding. It can also be stored in .
  • Such machine encoding may be mainly performed through optical character recognition (OCR), and an image-based text document may be automatically detected, identified, and encoded using a computer or the like.
  • OCR optical character recognition
  • Korea Patent Publication No. 10-1139801 (Title of the Invention: Automatic information collection system and method through receipt reading) reads and stores the purchased goods, the quantity purchased, the amount used, etc. printed on the conventional receipt through OCR By doing so, a configuration for automatically collecting and managing the purchase information of the user of the corresponding receipt is disclosed.
  • the OCR according to the prior art has a problem in that the recognition accuracy of OCR decreases in the case of an image printed in a low-quality printer or fax, imaged by a low-resolution photographing means, crumpled, or photographed in an inclined state.
  • the information collection system has a problem in that it is impossible to know the connection relationship between the recognized items because it is possible to simply recognize the goods, the quantity, the amount used, and the like.
  • the information collection system is configured to recognize a receipt including a barcode, in particular, a digital data receipt through a separate scanner device, there is a difficult problem in recognition of a general receipt.
  • the information collection system has problems in that it is difficult to recognize a new item, and it is not possible to generate a reconfiguration form including the recognized item.
  • the information collection system and method according to the prior art has a problem in that the examiner has to check both the presence/absence of abnormality in the recognized information with respect to the information collected through OCR.
  • the present invention provides relative position information for recognized characters based on OCR recognition, a connection between recognized items, and a confidence score for the recognized information, thereby providing data table reconstruction and prediction accuracy testers.
  • An object of the present invention is to provide an OCR-based document analysis system and method that can reduce the verification work time.
  • an embodiment of the present invention is an OCR-based document analysis system, which detects the position of at least one object among arbitrary forms, letters, and numbers in an image to be recognized by using an object detection model.
  • a rectangular shape is displayed along the perimeter of the detected type, letter, and number object to generate a pixel position value on the square, and using the OCR model, information about letters and numbers recognized in the pixel on the square is output, and the generation
  • It is characterized in that it consists of a document analysis device that connects all pixels on the adjacent square based on the pixel position value of the square, and displays the character and number information recognized through the OCR model by matching the pixel positions on the connected square.
  • the document analysis apparatus creates and stores an item DB defining character (item) information used in an arbitrary document,
  • the document analysis apparatus calculates the confidence score of the recognized letters and numbers based on the recognition rate using the OCR model, reflects the calculated confidence score in the display information to be visually displayed, and the confidence score is characterized in that the reconstruction rate calculated according to the correction of at least one of the form, shape, and position using the correction model is additionally reflected.
  • the document analysis apparatus includes an input unit for receiving a recognition target image; Detects the position of at least one of an arbitrary form, letter, and number object using an object detection model in the received recognition target image, and displays a rectangular image around the detected form, letter, and number object; an object detection modeling unit generating a pixel position value on the displayed rectangle; an OCR modeling unit for outputting information about letters and numbers recognized within the pixels of the rectangle by using the OCR model; Based on the generated rectangular pixel position value and the recognized character and numeric information, the pixel position of an arbitrary rectangle having numeric information is used as the starting position to move in the left direction and the upward direction, but when the character information is searched, it is moved a form configuration modeling unit that connects all the square pixels found in the , and displays the letters and numbers recognized through the OCR model by matching the pixel positions on the connected square; and a database for storing the generated rectangular pixel position value, recognized character and numeric information and matching result, and a form of document data used in a specific institution
  • the object detection model uses a PSENet (Progressive Scale Expansion Network)-based deep learning model to detect the location of type, letter and number objects from training data including document images, and the detected type, letter and A rectangular image is displayed along the perimeter of the numeric object, and pixel position value generation on the displayed rectangle is learned.
  • PSENet Progressive Scale Expansion Network
  • the object detection model according to the embodiment includes an original image, an image in which an arbitrary part of the document is folded, an image in which the position of the document is tilted at an arbitrary angle, an image whose brightness is adjusted with an arbitrary illuminance, and the contents displayed in the document. It is characterized in that it learns the training data based on the image with this blurry and broken connecting line, the image with a curved arbitrary part of the document, and the image with the number and the connecting line overlapped.
  • the form configuration modeling unit takes the pixel position value of the generated rectangle and the pixel position of an arbitrary rectangle having numeric information based on the recognized numeric information as the starting position in the left direction and the upward direction. can move
  • the form configuration modeling unit connects all the rectangular pixels searched during movement, analyzes the connected rectangular arrangement information, and compares it with the arrangement information of a document of a specific organization stored in advance, and, as a result of the comparison, a specific organization
  • the arrangement information of the document is matched, it is characterized in that the recognized numerical information is matched to the pixel position on the rectangle of the specific institution document to be displayed.
  • a marker is displayed at the pixel center point on the generated rectangle, and a pixel position on an arbitrary rectangle having numeric information based on the recognized numeric information is used as a starting position in the left direction and the upper direction. can move to
  • the form configuration modeling unit connects all the square pixels searched during movement, analyzes the marker position information on the connected square, and compares it with the arrangement information of a document of a specific organization stored in advance, and, as a result of the comparison, a specific organization
  • the arrangement information of the document is matched, it is characterized in that the recognized numerical information is matched to the pixel position on the rectangle of the specific institution document to be displayed.
  • the document analysis apparatus includes an input unit for receiving a recognition target image; an item DB generation unit generating an item DB defining character (item) information used in an arbitrary document to compare with character information recognized in the recognition target image; Detects the position of at least one of an arbitrary form, letter, and number object using an object detection model in the received recognition target image, and displays a rectangular image around the detected form, letter, and number object; an object detection modeling unit generating a pixel position value on the displayed rectangle; an OCR modeling unit for outputting information about letters and numbers recognized within the pixels of the rectangle by using the OCR model;
  • the recognized character information is compared with the item DB, and as the recognized character is corrected with the character information of the item DB, the pixel position on an arbitrary rectangle having numeric information is used as the starting position to move in the left and upward directions, a form configuration modeling unit that connects all the found square pixels during movement when information is searched, and displays the letters and numbers corrected through the OCR model by matching the pixel positions on the connected
  • the form composition modeling unit according to the embodiment is characterized in that it analyzes the characters detected through natural language processing (NLP).
  • NLP natural language processing
  • the form configuration modeling unit is characterized in that it calculates a confidence score for the recognized character by comparing between the recognized character and item DB information.
  • the form configuration modeling unit according to the embodiment is connected when the horizontal and vertical lengths of the rectangular pixel size of the numeric object are the same as the horizontal and vertical lengths of other adjacent rectangular pixels or are included in the horizontal and vertical lengths of other boxes. characterized in that it becomes possible.
  • the form configuration modeling unit connects at least one of the nearest left and upper rectangular pixels, and connects until a letter object in the connected rectangular pixels is found.
  • the form configuration modeling unit according to the embodiment is characterized in that if the found square pixel is empty, it is connected to the next square pixel located in the left direction.
  • the document analysis apparatus is characterized in that the normal recognition region, the error region including the incorrect region and the correction region are displayed as visualization information of different colors according to the confidence score.
  • the document analysis apparatus includes an input unit for receiving a recognition target image; In the received recognition target image, a position of at least one of a type, a letter, and a number object is detected using an object detection model, a rectangular image is displayed around the detected type, a letter, and a number object, and a pixel position on the displayed rectangle is detected.
  • an object detection modeling unit that generates a value
  • an OCR modeling unit for outputting information about letters and numbers recognized within the pixels of the rectangle by using the OCR model
  • the recognized character is corrected with the character information of the item DB, the pixel position on an arbitrary rectangle having numeric information is used as the starting position to move in the left direction and the upward direction.
  • a form configuration modeling unit for connecting the elements and matching the letter and number information corrected through the OCR model to the pixel position on the connected rectangle to be displayed; a reliability evaluation unit that calculates a confidence score of the recognized letters and numbers using a correction model, and reflects it on the display based on the calculated confidence score to be visually displayed; and a database for storing the generated rectangular pixel position value, recognized character and numeric information, trust information, and a form of document data used in a specific institution.
  • the document analysis apparatus may further include an item DB generator configured to generate item DB information for a character preset from an arbitrary document with respect to the character included in the recognition target image.
  • the form configuration modeling unit is characterized in that the detected character object is matched with the item DB information, and when the recognized character is corrected according to the matching result, the corrected character is reflected.
  • the form configuration modeling unit is characterized in that the color of the rectangular box of letters and numbers is displayed in different colors in a normal recognition area and an error occurrence area including an incorrect area and a correction area.
  • the document analysis method comprises: a) the document analysis apparatus detects the position of at least one of arbitrary type, letter, and numeric objects using an object detection model in the received recognition target image, and detects the generating a pixel position value on the rectangle by displaying a rectangle around the perimeter of the specified format, letter, and number object; b) outputting, by the document analysis apparatus, information on letters and numbers recognized in the detected rectangular pixels using the OCR model; and c) the document analysis device moves left and up with the generated pixel position value on the rectangle and the pixel position on any rectangle having numeric information based on the recognized character and numeric information as the starting position.
  • the character information is searched, connecting all the found square pixels during movement, matching the text and numeric information recognized through the OCR model to the pixel positions of the connected square to be displayed.
  • the object detection model of step a) uses a PSENet (Progressive Scale Expansion Network)-based deep learning model to detect the location of shape, letter and number objects from training data including document images, and the detected shape , it is characterized in that it learns to generate a rectangular box and a pixel position value on the rectangle along the perimeter of the letter and number objects.
  • PSENet Progressive Scale Expansion Network
  • the object detection model of step a) is an original image, an image in which any part of the document is folded, an image in which the position of the document is inclined at an arbitrary angle, an image whose brightness is adjusted with an arbitrary illuminance, It is characterized in that the learning data is learned based on an image in which the content displayed in the document is not clear and has broken connecting lines, an image in which an arbitrary part of the document is curved, and an image in which numbers and connecting lines are overlapped.
  • step c) a pixel position on an arbitrary rectangle having numerical information based on the generated pixel position value on the rectangle c-1) and the recognized character and number information is used as the starting position. moving left and up until information is retrieved; c-2) when the character information is retrieved, connecting all the found square pixels while moving; and c-3) matching and displaying the recognized character and numeric information at the pixel position on the rectangle.
  • step c) a pixel position on an arbitrary rectangle having numerical information based on the generated pixel position value on the rectangle and the recognized numerical information is used as the starting position to the left. moving in the direction and upward direction; c'-2) connecting all the rectangular pixels retrieved during the movement; and c'-3) analyzes the arrangement information on the connected rectangle and compares it with arrangement information of a specific organization document stored in advance. and matching and displaying the recognized numerical information.
  • step c) includes the steps of c"-1) displaying a marker 520 at the center point of the generated square pixel; c"-2) having numeric information based on the recognized numeric information moving in the left direction and the upper direction using the position of a pixel on an arbitrary rectangle as a starting position, and connecting all the pixels on the rectangle searched during the movement; c"-3) analyzing the location information of the marker 520 on the connected square and comparing it with the arrangement information of a specific organization document stored in advance; and c"-4) If the comparison result matches the arrangement information of the specific organization document, and displaying the recognized numerical information by matching the pixel position on the rectangle of the specific institution document.
  • step b) comprises: generating, by the document analysis apparatus, an item DB defining character (item) information used in an arbitrary document to compare with character information recognized in the recognition target image; and matching, by the document analyzing apparatus, the detected text object with the item DB information, and correcting the recognized text according to the matching result.
  • the document analysis detection apparatus analyzes the characters through natural language processing (NLP) for the detected character object, and analyzes the characters based on the comparison between the analyzed characters and the item DB information It is characterized in that it is determined whether the recognized characters are corrected by calculating a confidence score for , and NLP-based correction is performed according to the correction of the recognized characters.
  • NLP natural language processing
  • the document analyzing apparatus is characterized in that when a rectangular pixel is blank, it is connected to the next rectangular pixel located in the left direction.
  • the embodiment further includes: d) the document analysis device calculates the confidence score of the recognized letters and numbers using a correction model, reflects the calculated confidence score on the display, and visually displays it; characterized by including.
  • the correction model of step d) is reliable based on the reconstruction rate according to performing correction of at least one of form, shape, and position, and whether corrected characters are reflected according to the matching result with item DB information It is characterized by calculating the score.
  • the document analysis apparatus divides the text object into a left header area in which the text object is disposed in the left area and an upper header area in which the text object is disposed in the upper area based on the pixel position value of the generated text object, Character and number information recognized through the OCR model by creating and disposing virtual cell objects based on the left header area and the upper header area, matching the placed virtual cell objects and numeric objects to connect them based on matrix information It is characterized in that it is displayed.
  • the document analysis apparatus includes an input unit for receiving a recognition target image; Detects the position of at least one of an arbitrary form, letter, and number object using an object detection model in the received recognition target image, and displays a rectangular image around the detected form, letter, and number object; an object detection modeling unit that generates pixel position values of displayed letter and number objects; an OCR modeling unit for outputting information about letters and numbers recognized within the pixels of the rectangle by using the OCR model; Based on the pixel position value of the generated text object, a left header area in which a text object is disposed in the left area and an upper header area in which a text object is disposed in an upper area is divided based on the left header area and the upper header area A virtual cell that creates and arranges a virtual cell object of size M ⁇ N, matches the placed virtual cell object with a number object, connects them based on matrix information, and displays the letter and number information recognized through the OCR model Form composition modeling unit; and a database for storing the generated rectangular pixel position value,
  • the virtual cell form configuration modeling unit divides the left header area and the upper header area of the text object, and calculates the spacing and size between the text objects included in the divided left header area and the upper header area, , characterized in that the virtual cell object is arranged based on the divided left header area and upper header area.
  • the virtual cell form configuration modeling unit matches the virtual cell object and the number object disposed on the upper left, and calculates a gradient between the matched number object and the virtual cell object, and the calculated gradient is on the right It is characterized in that even the matching of the virtual cell object and the number object arranged at the bottom is reflected.
  • an embodiment of the present invention provides an OCR-based document analysis method, comprising: i) receiving, by a document analysis apparatus, an image to be recognized; ii) the document analysis device detects the position of at least one of arbitrary types, letters, and numbers using an object detection model in the received recognition target image, and draws a rectangular image around the detected type, letter, and number objects generating pixel position values of character and numeric objects by displaying; iii) outputting, by the document analysis device, information on letters and numbers recognized in the detected rectangular pixels using the OCR model; and iv) the document analyzing apparatus divides the text object into a left header area in which a text object is disposed and an upper header area in which a text object is disposed in an upper area based on the pixel position value of the generated text object, and the left header Create and arrange a virtual cell object based on the area and the upper header area, match the placed virtual cell object with the number object, connect it based on matrix information, and display the letter and number information recognized through the O
  • step of arranging the text object based on the left and upper pixel positions of step iv) includes: iv-1) distinguishing the left header area and the upper header area of the text object by the document analysis apparatus; iv-2) calculating an interval and a size between the text objects included in the divided left header area and the upper header area; and iv-3) arranging the virtual cell object based on the divided left header area and upper header area.
  • step of matching the arranged virtual cell object and the number object in step iv) according to the above embodiment and connecting based on matrix information is iv-4) the virtual cell object and the number arranged in the upper left corner of the document analysis device calculating a gradient between the number object and the virtual cell object by matching the object; and iv-5) the document analysis device moves sequentially according to the matrix information, and reflects the calculated gradient to match the virtual cell object and the number object disposed in the lower right corner, and connects them.
  • the present invention recognizes letters including letters and numbers described in items on a document, and analyzes the connection relationship between items based on relative position information for the recognized letters, so that the recognized number can be matched to the corresponding item There is this.
  • the present invention analyzes the pattern in which letters are arranged based on the connection and relative positional relationship between recognized items and compares it with the form pattern used in institutions such as hospitals and insurance companies that use specific documents or receipts, so that, quickly and It has the advantage of being able to accurately match.
  • OCR has the advantage that it can be simplified to recognize only numbers.
  • the present invention has the advantage of improving the accuracy of recognition through deep learning using various learning data even if it is not a standardized image.
  • the present invention has an advantage in that accurate recognition can be performed even when the image to be recognized is input in a tilted state.
  • the present invention can reduce the confirmation work time by the inspector by providing the part that is normally recognized and the part that is wrong or suspected based on the confidence score with respect to the information recognized through OCR as visualization information of different colors.
  • the present invention has an advantage in that accurate information can be recognized for receipts in various formats used in hospitals, pharmacies, and the like.
  • the present invention has the advantage of providing accurate and reliable usage information for receipts in various formats used by institutions such as hospitals and insurance companies.
  • FIG. 1 is a block diagram showing the configuration of an OCR-based document analysis system according to a first embodiment of the present invention.
  • FIG. 2 is an exemplary diagram for explaining character position detection of the OCR-based document analysis system according to the embodiment of FIG. 1 .
  • FIG. 3 is an exemplary view showing a result of character position detection according to FIG. 2 .
  • FIG. 4 is an exemplary view showing an OCR recognition result of the OCR-based document analysis system according to the embodiment of FIG. 1 .
  • FIG. 5 is an exemplary view showing a result of a character position detection model and an OCR model of the OCR-based document analysis system according to the embodiment of FIG. 1 .
  • FIG. 6 is an exemplary view for explaining a connection process of the OCR-based document analysis system according to the embodiment of FIG.
  • FIG. 7 is an exemplary diagram illustrating a rectangular connection of the OCR-based document analysis system according to the embodiment of FIG. 1 .
  • FIG. 8 to 13 are exemplary views showing learning data for automatic augmentation modeling of the OCR-based document analysis system according to the embodiment of FIG. 1 .
  • FIG. 14 is a flowchart illustrating an OCR-based document analysis process according to an embodiment of the present invention.
  • FIG. 15 is a flowchart illustrating an item matching process according to the embodiment of FIG. 14 .
  • FIG. 16 is another flowchart illustrating an item matching process according to the embodiment of FIG. 14 .
  • 17 is another flowchart illustrating an item matching process according to the embodiment of FIG. 14 .
  • FIG. 18 is a block diagram showing the configuration of an OCR-based document analysis system according to a second embodiment of the present invention.
  • FIG. 19 is an exemplary view for explaining the item DB generation of the OCR-based document analysis system according to the embodiment of FIG.
  • FIG. 20 is an exemplary diagram illustrating an item DB of the OCR-based document analysis system according to the embodiment of FIG. 18 .
  • 21 is an exemplary diagram for explaining character position detection of the OCR-based document analysis system according to the embodiment of FIG. 18 .
  • FIG. 22 is an exemplary view showing a result of character position detection according to the embodiment of FIG. 21 .
  • FIG. 23 is an exemplary diagram illustrating an NLP process of an OCR-based document analysis system according to the embodiment of FIG. 18 .
  • FIG. 24 is an exemplary view showing an OCR recognition result of the OCR-based document analysis system according to the embodiment of FIG. 18 .
  • FIG. 25 is an exemplary view illustrating a reconstructed image through connection of an OCR-based document analysis system according to the embodiment of FIG. 18 .
  • 26 is an exemplary diagram for explaining a connection process of an object detection box of the OCR-based document analysis system according to the embodiment of FIG. 18 .
  • FIG. 27 is another exemplary diagram for explaining a connection process of an object detection box of the OCR-based document analysis system according to the embodiment of FIG. 18 .
  • FIG. 29 is a block diagram illustrating an OCR-based document analysis system according to a third embodiment of the present invention.
  • FIG. 30 is an exemplary diagram for explaining a connection process according to the third embodiment.
  • FIG. 31 is an exemplary view showing a reconstructed image of the OCR-based document analysis system according to the embodiment of FIG.
  • FIG. 32 is a flowchart illustrating an OCR-based document analysis process according to a third embodiment of the present invention.
  • FIG. 33 is a block diagram illustrating an OCR-based munseok system according to a fourth embodiment of the present invention.
  • FIG. 34 is an exemplary view for explaining a virtual cell connection process of the OCR-based document analysis system according to the embodiment of FIG. 33 .
  • FIG. 35 is another exemplary view for explaining a virtual cell connection process of the OCR-based document analysis system according to the embodiment of FIG. 33 .
  • FIG. 36 is an exemplary diagram for explaining a process of linking a virtual cell based on a location coordinate of the OCR-based document analysis system according to the embodiment of FIG. 33 .
  • FIG. 37 is an exemplary diagram illustrating a final connection state using a virtual cell of the OCR-based document analysis system according to the embodiment of FIG. 33 .
  • FIG. 38 is an exemplary diagram illustrating a connection state of a pushed character using the OCR-based document analysis system according to the embodiment of FIG. 33 .
  • FIG. 39 is an exemplary diagram illustrating a curved character connection state using the OCR-based document analysis system according to the embodiment of FIG. 33 .
  • FIG. 40 is a flowchart illustrating an OCR-based document analysis process according to a fourth embodiment of the present invention.
  • FIG. 41 is a flowchart illustrating a virtual cell-based item matching process according to the embodiment of FIG. 40 .
  • ... unit means a unit that processes at least one function or operation, which may be divided into hardware, software, or a combination of the two.
  • the term "at least one” is defined as a term including the singular and the plural, and even if the term “at least one" does not exist, each element may exist in the singular or plural, and may mean the singular or plural. will be self-evident.
  • FIG. 1 is a block diagram showing the configuration of an OCR-based document analysis system according to a first embodiment of the present invention
  • FIG. 2 is an exemplary diagram for explaining character position detection of the OCR-based document analysis system according to the embodiment of FIG. 3 is an exemplary diagram illustrating the character position detection result according to FIG. 2
  • FIG. 4 is an exemplary diagram illustrating the OCR recognition result of the OCR-based document analysis system according to the embodiment of FIG. 1
  • FIG. 5 is FIG. It is an exemplary diagram showing a result of a character position detection model of an OCR-based document analysis system according to an embodiment and a result of the OCR model
  • FIG. 6 is an example for explaining a connection process of the OCR-based document analysis system according to the embodiment of FIG.
  • FIG. 7 is an exemplary diagram illustrating a rectangular connection of the OCR-based document analysis system according to the embodiment of FIG. 1 .
  • the OCR-based document analysis system uses an object detection model to select at least one of an arbitrary form, letters, and numbers in an image to be recognized. Detects the position of the object, displays a rectangle along the perimeter of the detected type, letter, and number object to generate a pixel position value on the rectangle, and uses the OCR model to obtain information about letters and numbers recognized within the pixel on the rectangle.
  • a document analysis apparatus for outputting, connecting all adjacent pixels of a rectangle based on the generated pixel position value on the rectangle, matching the pixel positions of the connected rectangle with character and numeric information recognized through the OCR model and displaying ( 100) can be achieved.
  • the document analysis apparatus 100 may be configured to include the input unit 110 for receiving the recognition target image transmitted from the outside.
  • the input unit 110 may be configured as a data communication means for receiving an image transmitted from an external terminal connected through a network or an image scanned through a scanner or the like.
  • the document analysis apparatus 100 detects the position of an arbitrary form, letter, and number object included in the image by using the object detection model in the recognition target image received through the input unit 110, and the detected It may be configured to include an object detection modeling unit 120 that generates pixel position information on a rectangle by displaying a rectangle shape along the perimeter of the type, letter, and number object.
  • the object detection modeling unit 120 recognizes the relative positions of the type, letter, and number objects, and determines the arrangement according to the position of the type, letter, and number object of the detected type, letter, and number object.
  • a rectangular image is displayed along the perimeter, and pixel position values (coordinate information) on the displayed rectangle are generated.
  • the object detection model uses a PSENet (Progressive Scale Expansion Network)-based deep learning model to detect form, letter and number objects and their positions from training data including document images, and performs learning to improve the detection rate. can do.
  • PSENet Progressive Scale Expansion Network
  • the object detection model is based on the original image of the receipt, as shown in FIG. 8, an image in which any part of the document is folded, an image in which the position of the document is tilted at an arbitrary angle as in FIG. 9, and an arbitrary illuminance as shown in FIG.
  • the image to be recognized is described as an image related to a hospital receipt as an embodiment, but is not limited thereto. may include
  • the object detection model may find an optimal rule in performing detection based on variously changed images through automatic augmentation.
  • the object detection model may set a pixel on a rectangle with respect to an object of a detected type, letter, and number, and generate a position value of the set pixel.
  • a pixel position value composed of a rectangular box 212 on the outer surface of, for example, a text object 211 detected from an arbitrary detection area 210 in the input document image 200 is generated and recognized
  • a pattern based on a square shape By displaying the information about the object 213 on the character detection result 220, it is possible to recognize a pattern based on a square shape.
  • the rectangular box 212 may preferably be configured in a rectangular shape.
  • the form configuration modeling unit 140 to be described later may be compared with the receipt configuration of an institution (hospital) stored in advance to distinguish which institution the receipt is.
  • the format is a single cell in the form constituting the document table, and may have a rectangular shape.
  • the document analysis apparatus 100 may be configured to include an OCR modeling unit 130 for recognizing letters and numbers using the OCR model for the type, letter, and number objects detected by the object detection modeling unit 120 . have.
  • the OCR modeling unit 130 is a configuration that automatically detects and recognizes an image-based text document, and may be configured using a known OCR model.
  • the OCR modeling unit 130 may calculate and provide the recognized prediction information 310 with respect to the OCR recognition result 300 and the confidence score 320 for the prediction information 310 together.
  • the prediction information 310 indicates the letters and numbers to be included in the recognized object
  • the confidence score 320 reflects the case where the contents are not clear or the connected part is broken in the process of recognizing through OCR. It may be a recognition rate calculated by calculating the ratio of the part recognized in .
  • the document analysis apparatus 100 connects the rectangular pixels of the adjacent type and all letter and number objects based on the detected type and the position of the letter and number objects, and connects the pixels on the connected rectangle to the position of the letter and number objects through the OCR model. It may be configured to include a form configuration modeling unit 140 that matches and displays the recognized letter and number information.
  • the form configuration modeling unit 140 matches the prediction information recognized based on the detection result 220 of the object detection modeling unit 120 and the prediction information 310 of the OCR modeling unit 130 . make it possible
  • the form configuration modeling unit 140 matches the detection result 220 of the object detection modeling unit 120 and the prediction information 310 of the OCR modeling unit 130, the square of all adjacent letter and number objects. Connect shape pixels.
  • the starting position is a rectangle with arbitrary numeric information.
  • the form configuration modeling unit 140 first connects the left square pixel closest to the start position and the upper square pixel, and then connects all adjacent objects.
  • the form configuration modeling unit 140 repeats the above-described movement and search process to search for all the rectangular pixels, and the rectangular pixels including text, for example, character information (items) on the left and upper sides. Move and search until it appears.
  • the form configuration modeling unit 140 connects all the found rectangular pixels.
  • moving and searching to the left and upper sides of the reference object box 410 in the document image 400 is performed to connect to the rectangular box of the next object, and the left object box ( If 420 is a letter or a number, it is connected through the left connecting line 440 .
  • the upper object box 430 is connected to the upper object square box through movement, search, and connection upward, and if the upper object box 430 located on the upper side is text information (item) or a number, it is connected through the upper connection line 441 .
  • the form configuration modeling unit 140 finds left and upper character information (items) starting from numeric information after connecting adjacent rectangular pixels, and matches the recognized character and numeric information to the pixel position of the rectangle. to display it.
  • the form configuration modeling unit 140 may check whether the box arrangement information of a specific institution document stored in the database 150 is matched by comparison.
  • a specific institution may include any place that issues receipts and accounting-related documents in any form, such as hospitals, pharmacies, companies, and the like.
  • FIG. 7 is a diagram showing the connection state of the rectangular pixels, and shows that the rectangular shape included in the document is recognized as an object and connected.
  • the form configuration modeling unit 140 generates a number based on the pixel position value on the rectangle generated based on the relative position of the detected form and the form detected through the object detection model, and numerical information recognized through the OCR model. It moves in the left direction and the upper direction with the position of a pixel on an arbitrary rectangle having information as the starting position, and connects all the pixels on the rectangle that are searched for through the movement.
  • the form configuration modeling unit 140 analyzes the arrangement information of the connected rectangle and compares it with arrangement information of a specific institution document stored in the database 150 .
  • the form configuration modeling unit 140 matches the numerical information recognized by the OCR model to the pixel position of the rectangle of the specific institution document to be displayed.
  • the form composition modeling unit 140 displays a marker 520 at the pixel center point on a rectangle generated based on the relative position of the detected form and the form detected through the object detection model, and recognizes the form recognized through the OCR model. Based on the numerical information, it moves in the left direction and the upper direction using the position of a pixel on an arbitrary rectangle having numerical information as the starting position, and connects all the pixels on the rectangle searched through the movement.
  • the form configuration modeling unit 140 displays the marker 520 at the pixel center point on the connected rectangle, analyzes the position information of each marker 520 and compares it with the arrangement information of a specific institution document stored in the database 150 . .
  • the form configuration modeling unit 140 matches the numerical information recognized by the OCR model to the pixel position of the rectangle of the specific agency document and displays it.
  • the document analysis apparatus 100 may be configured to include a database 150 that stores a reconstructed image output from the form composition modeling unit 140, a form (or format) of document data used by a specific institution, and the like. have.
  • FIG. 14 is a flowchart illustrating an OCR-based document analysis process according to the first embodiment of the present invention
  • FIG. 15 is a flowchart illustrating an item matching process according to the embodiment of FIG. 14 .
  • the document analysis apparatus 100 receives an image of a receipt to be recognized through an external terminal or fax connected through a network (S100).
  • the document analysis apparatus 100 detects an arbitrary format, letter, and number object and its position using an object detection model in the received image of the receipt to be recognized, and forms a rectangle along the perimeter of the detected format, letter, and number object.
  • a character detection step of generating pixel position information on a rectangle by displaying is performed (S200).
  • the object detection model uses a PSENet (Progressive Scale Expansion Network)-based deep learning model to detect form, letter and number objects and their positions from training data including document images, and to improve the detection rate. learning can be performed for
  • the object detection model is based on an original image, an image in which an arbitrary part of the document is folded, an image in which the position of the document is tilted at an arbitrary angle, an image whose brightness is adjusted with an arbitrary illuminance, and the content displayed in the document is not clear and is broken.
  • Training data can be learned based on an image with connecting lines, an image in which an arbitrary part of a document is curved, and an image in which numbers and connecting lines are superimposed.
  • the document analysis apparatus 100 performs an OCR recognition step ( S300 ) of recognizing letter and number information using an OCR model in a rectangular pixel of the detected format, letter, and number object.
  • the document analysis apparatus 100 After performing step S300, the document analysis apparatus 100 connects all adjacent rectangular pixels based on the detected format and the position of the rectangular pixels of the letter and number object, and matches the letter and number information of the connected rectangular pixels step (S400) is performed.
  • the document analysis apparatus 100 sets the generated pixel position value on the rectangle and the pixel position on an arbitrary rectangle having numeric information based on the recognized character and numeric information as the starting position. It moves in the left direction and upward direction until the character information is searched (S410).
  • the left square pixel closest to the start position and the upper square pixel are first connected, and then, all adjacent square pixels are moved left or right, and the number object until the character information (item) appears. search for them
  • the document analysis apparatus 100 matches the character and number information recognized through the OCR model to the pixel position of the connected rectangle to display ( S412 ), and stores it in the database 150 .
  • the document analyzing apparatus 100 may analyze arrangement information on the connected quadrangle image.
  • the arrangement information on the square connected through the step S420 is analyzed and compared with the arrangement information of a specific institution document stored in advance (S421).
  • step S421 it is determined whether the arrangement information of a specific institution document is matched (S422), and when the analyzed arrangement information on a rectangle is matched, the recognized numerical information is displayed by matching the pixel position on a rectangle of a specific institution document (S423).
  • step S410 may be performed.
  • the document analyzing apparatus 100 may analyze the arrangement information of the connected rectangular pixels through the marker.
  • the document analyzing apparatus 100 displays the marker 520 at the center point of the generated square pixel ( S430 ).
  • the document analysis apparatus 100 moves in the left direction and the upper direction using the position of any rectangular pixel having numeric information based on the recognized numeric information as the starting position, and connects all the rectangular pixels searched during the movement. (S431).
  • the document analyzing apparatus 100 analyzes the structure information of the rectangular pixel based on the position information using the marker 520 ( S432 ).
  • step S430 it is determined whether there is a document in which the arrangement (or structure) of the rectangular pixels matches the arrangement information of a specific institution document stored in the database 150 ( S433 ).
  • step S433 when the marker arrangement information and the marker arrangement information of the specific institution document match, the item of the specific institution document is searched (S434), and the numerical information recognized by the OCR model is matched to the position of the searched item and displayed (S435).
  • step S410 may be performed.
  • the recognized number is assigned to the corresponding item can be matched.
  • fast and accurate matching is achieved by analyzing the pattern of letter placement based on the connection and relative positional relationship between recognized items and comparing it with the form pattern used by institutions such as hospitals and insurance companies that use specific documents or receipts. possible.
  • OCR optical character recognition
  • FIG. 18 is a block diagram showing the configuration of an OCR-based document analysis system according to a second embodiment of the present invention.
  • the OCR-based document analysis system generates and stores item DB 300' information for preset characters from arbitrary documents, and recognizes them using an object detection model. Detects the object and location of letters and numbers from the target image, recognizes letters and numbers using the OCR model for the detected letters and numbers, and compares the recognized letters with the item DB (300') information It may be made of a document analysis apparatus 100 ′ that determines whether or not to correct through the correction, and configures a reconstruction form in which the recognized letters, corrected letters, and numbers are reflected as the recognized letters are corrected.
  • the document analysis apparatus 100 ′ may include an input unit 110 ′ for receiving a recognition target image.
  • the input unit 110' may be configured as a data communication means for receiving an image transmitted from an external terminal connected through a network or an image scanned through a scanner or the like.
  • the document analysis apparatus 100' includes an item DB generation unit 120' for generating item DB (300', see FIG. 20) information about a character set in advance from an arbitrary document with respect to the character included in the recognition target image. It may be composed of
  • the item DB generation unit 120' is fixedly included in the document 200' such as a hospital receipt, for example, as shown in FIG. 19, and information about the item 210' displayed in text such as billing details, medical treatment details, etc. Analyze
  • the item DB generation unit 120' creates an item DB 300' as shown in FIG. 20 for the items analyzed in FIG. 19 and stores the items in the database 160'.
  • the image to be recognized is described as an image related to a hospital receipt as an embodiment, but is not limited thereto.
  • the document analysis apparatus 100' detects the position of arbitrary form, letter and number objects included in the image by using the object detection model in the recognition target image received through the input unit 110', It may be configured to include an object detection modeling unit 130' that generates pixel position information on a square by displaying a square shape along the circumference of the detected type, letter, and number object.
  • the object detection modeling unit 130 ′ recognizes the relative positions of the type, letter, and number objects, and the detected type, letter, and number object so as to check the arrangement according to the position of the type, letter, and number object.
  • a rectangular image is displayed along the perimeter of , and pixel position values (coordinate information) on the displayed rectangle are generated.
  • the object detection model uses a PSENet (Progressive Scale Expansion Network)-based deep learning model to detect form, letter and number objects and their positions from training data including document images, and performs learning to improve the detection rate. can do.
  • PSENet Progressive Scale Expansion Network
  • the image to be recognized is described as an image related to a hospital receipt as an embodiment, but is not limited thereto. may include
  • the object detection model may find an optimal rule in performing detection based on variously changed images through automatic augmentation.
  • the object detection model may set a pixel on a rectangle with respect to an object of a detected type, letter, and number, and generate a position value of the set pixel.
  • a text object 411 ′ detected from an arbitrary detection area 410 ′ in the input document image 400 ′ is displayed as a rectangular box along the outer circumferential surface.
  • the object detection model displays information on the recognized object as the object detection result 420' as shown in FIG.
  • the form configuration modeling unit 150 to be described later may be compared with the receipt configuration of an institution (hospital) stored in advance to distinguish which institution the receipt is.
  • the format is a single cell in the form constituting the document table, and may have a rectangular shape.
  • the document analysis apparatus 100 ′ includes an OCR modeling unit 140 ′ for recognizing letters and numbers using the OCR model for the type, letter, and number objects detected by the object detection modeling unit 130 . can be
  • the OCR modeling unit 140' is a configuration that automatically detects and recognizes an image-based text document, and may be configured using a well-known OCR model.
  • the OCR modeling unit 140' may provide together with the prediction information recognized for the OCR recognition result through the OCR model, and the confidence score based on the confidence score calculated by the form configuration modeling unit to be described later with respect to the prediction information. .
  • the prediction information indicates the letters and numbers to be included in the recognized object
  • the confidence score reflects the case where the content is not clear or the connected part is broken in the process of recognizing through OCR. It may be a recognition rate calculated by .
  • the document analysis apparatus 100' compares the recognized character information with the item DB 300', and corrects the recognized character with the character information of the item DB 300'. Move in the left and up directions with the pixel position as the starting position, but when character information is retrieved, all the square pixels searched during movement are connected, and the character and numeric information corrected through the OCR model at the pixel position in the connected square It may be configured to include a form configuration modeling unit 150' that matches and displays.
  • Form configuration modeling unit 150 in order to compare with the character information recognized in the recognition target image, text (item) information used in arbitrary documents, for example, hospital receipts, pharmacy receipts, transaction statements, tax bills, etc.
  • a defined item DB 300' can be created.
  • the form configuration modeling unit 150 ′ performs NLP objects with respect to letters recognized through Natural Language Processing (NLP) for the recognized letter objects 411′ by morpheme or segmental sound. (411a') is analyzed, and a confidence score for the recognized character is calculated and output based on a comparison between the analyzed result and the information of the item DB 300'.
  • NLP Natural Language Processing
  • the recognized character is "MRI Diagnosis-”
  • information about the item stored in the item DB 300' is searched, and then through comparison with the item DB 300' information corresponding to the searched item. Calculate the confidence score.
  • the form configuration modeling unit 150 ′ allows a new item to be recognized in the hospital receipt, or a typo or unrecognized person due to an OCR mistake, to be processed according to the situation using the NLP.
  • the confidence score for the letters calculated by the form composition modeling unit 150 ′ is, as shown in FIG. 24 , the prediction information 421 ′ recognized in the OCR recognition result 420 ′ and the form composition modeling unit 150 ′. may provide a confidence score 422 ′ calculated for the prediction information 421 ′.
  • the user can determine that the recognition has been performed well. make it possible
  • the form configuration modeling unit 150 ′ connects the rectangular pixels of all letters and numbers adjacent in the left and upward directions at an arbitrary starting position based on the recognized positions of the rectangular pixels, as shown in FIG. 25 , and reconstructs them.
  • a form 500' is created.
  • the form configuration modeling unit 150' is connected when the horizontal and vertical lengths of the box size of the numeric object are the same as the horizontal and vertical lengths of other adjacent boxes or are included in the horizontal and vertical lengths of other boxes.
  • the horizontal size 700 and the vertical size 710 of the starting object box 600 based on the starting object box 600 recognized as a number are set to the left object box 610 ) and the lateral size (700a) and longitudinal size (710a) of the upper object box 620 are equal to or equal to the lateral size and longitudinal size of the left object box 610 and the upper object box 620 If included, it is connected to the left connecting line 800 and the upper connecting line 810 to be displayed.
  • the start position is described as the start object box 600 for the numerical object located in the center, but the right object box 600a located on the right side of the start object box 600, the start object box ( The lower object box 630 located on the lower side of the 600) can be set as the starting position, and for example, when the right object box 600a is set as the starting position, the text object for which the "industrial charge" is recognized is the upper object box ( 620a).
  • the form configuration modeling unit 150 ′ repeats the above process to connect only the closest left and upper sides, and after connecting, starting from the number, the text, for example, a letter object (item) appears on the left and upper sides. Connect through navigation and search.
  • the form configuration modeling unit 150' consists only of characters selected from the corrected characters, that is, the item DB 300'
  • the items of the reconfiguration form only contain numbers recognized through the OCR model of the OCR modeling unit 140'. It can also recognize and match the recognized number and item.
  • the document analysis apparatus 100 ' is a form configuration modeling unit 150', a reconstructed form, a reconstructed image composed of the reconstructed form, and a database ( 160').
  • a specific institution may include any place that issues receipts and accounting-related documents in any form, such as hospitals, pharmacies, companies, and the like.
  • the form configuration modeling unit 150 ′ can be connected to items of other lines if it continues to move to the left in a tilted state. You can check whether the shape pixel has information.
  • the form configuration modeling unit 150 ′ moves in the left direction from the first rectangular pixel 910 including arbitrary numeric information, and at this time, if the second rectangular pixel 920 is blank, the Make connections so that you can avoid erroneous connections between pixels in a rectangle.
  • the document analysis apparatus 100 ′ receives an image of a receipt to be recognized through an external terminal or fax connected through a network ( S100 ′).
  • the document analysis apparatus 100 ′ detects an arbitrary format, letter and number object and its position using an object detection model in the image of the received receipt to be recognized, and determines the circumference of the detected format, letter and number object Accordingly, an object detection step of generating pixel position information on a rectangle by displaying a rectangle image is performed (S200').
  • the object detection model uses a PSENet (Progressive Scale Expansion Network)-based deep learning model to detect form, letter and number objects and their positions from training data including document images, and improves the detection rate learning can be performed for
  • PSENet Processive Scale Expansion Network
  • the object detection model is based on an original image, an image in which an arbitrary part of the document is folded, an image in which the position of the document is tilted at an arbitrary angle, an image whose brightness is adjusted with an arbitrary illuminance, and the content displayed in the document is not clear and is broken.
  • Training data can be learned based on an image with connecting lines, an image in which an arbitrary part of a document is curved, and an image in which numbers and connecting lines are superimposed.
  • the document analysis apparatus 100' performs an OCR recognition step (S300') of recognizing letter and number information using an OCR model in a rectangular pixel for the detected format, letter, and number object.
  • the document analysis apparatus 100' After performing the step S300', the document analysis apparatus 100' generates text information fixed from an arbitrary document, that is, character information for an item as the item DB 300 information, and the generated item DB 300' ) information is stored in the database 160' (S400').
  • step S600' if there is a typo or unrecognized person, the document analysis apparatus 100' performs NLP-based correction (S700').
  • step S700' the document analyzing apparatus 100' analyzes characters detected through natural language processing (NLP).
  • NLP natural language processing
  • the document analysis apparatus 100' may calculate and output a confidence score for the analyzed character based on a comparison between the analyzed character and the item DB 300' information.
  • the document analysis apparatus 100 ' moves in the left direction and the upper direction using the position of any rectangular pixel having numerical information as the starting position, but when text information is retrieved, all the pixels in the rectangle searched during movement are connected and , so that the letter and number information corrected through the OCR model is matched to the pixel position on the connected rectangle (S800').
  • the document analysis apparatus 100 ′ moves and connects the start position in the left direction and the upper direction of the start position as a numeric object.
  • the document analysis apparatus 100 ′ matches the recognized letters, corrected letters, and numbers for each item.
  • the document analysis apparatus 100' outputs the final result of the reconstructed image based on the reconstructed form by reflecting the recognized letters and the corrected letters (S900'), and the reconstructed form and the reconstructed image are stored in the database 150' ) to be stored.
  • OCR optical character recognition
  • recognition accuracy can be improved through deep learning learning using various learning data, and accurate information can be recognized for receipts in various formats used in hospitals, pharmacies, etc. Reliability can be improved by providing recognition and accuracy of predicted values.
  • FIG. 29 is a block diagram illustrating an OCR-based document analysis system according to a third embodiment of the present invention.
  • the OCR-based document analysis system detects the position of at least one object among arbitrary forms, letters, and numbers in an image to be recognized by using an object detection model. detecting, generating a pixel position value on a rectangle by displaying a rectangle along the perimeter of the detected type, letter and number object, recognizing letter and number information recognized in the pixel on the rectangle using an OCR model, and Based on the generated pixel position value on the rectangle, all pixels on the adjacent rectangle are connected, and the character and number information recognized through the OCR model are matched to the pixel position on the connected rectangle and displayed. may be included.
  • the document analysis apparatus 100 ′′ may calculate a confidence score of recognized letters and numbers according to a recognition rate, and reflect the calculated confidence score on a display to be visually displayed.
  • the document analysis apparatus 100 ′′ may cause the reconstruction form to display a normal recognition region and an error region including an incorrect region and a correction region as visualization information of different colors according to the confidence score.
  • the document analysis apparatus 100 allows the reconstruction rate calculated according to the correction of at least one of the form, shape, and location of the confidence score using the correction model to be additionally reflected.
  • the document analysis apparatus 100 ′′ may include an input unit 110 ′′ for receiving a recognition target image.
  • the input unit 110 ′′ may be configured as a data communication means for receiving an image transmitted from an external terminal connected through a network or an image scanned through a scanner or the like.
  • the document analysis apparatus 100" is an item DB generation unit 120" that generates information about the item DB 300' (refer to FIG. 20) about the letters preset from any document with respect to the letters included in the recognition target image. It may be composed of
  • the item DB generation unit 120" is fixedly included in the document 200', such as a hospital receipt, for example, as shown in FIG. Analyze
  • the item DB generation unit 120" generates an item DB 300' as shown in FIG. 20 for the items analyzed in FIG. 19 and stores it in the database 170".
  • the image to be recognized is described as an image related to a hospital receipt as an embodiment, but is not limited thereto.
  • the document analysis apparatus 100 detects the position of arbitrary form, letter and number objects included in the image by using the object detection model in the recognition target image received through the input unit 110", It may be configured to include an object detection modeling unit 130 ′′ that generates pixel position information on a rectangle by displaying a rectangle shape along the circumference of the detected type, letter, and number object.
  • the object detection modeling unit 130 "recognizes the relative positions of the form, letter, and number objects, and the detected form, letter, and number object so as to check the arrangement according to the position of the form, letter, and number object.
  • a rectangular image is displayed along the perimeter of , and pixel position values (coordinate information) on the displayed rectangle are generated.
  • the object detection model uses a PSENet (Progressive Scale Expansion Network)-based deep learning model to detect form, letter and number objects and their positions from training data including document images, and performs learning to improve the detection rate. can do.
  • PSENet Progressive Scale Expansion Network
  • the image to be recognized is described as an image related to a hospital receipt as an embodiment, but is not limited thereto. may include
  • the object detection model may find an optimal rule in performing detection based on variously changed images through automatic augmentation.
  • the object detection model may set a pixel on a rectangle with respect to an object of a detected type, letter, and number, and generate a position value of the set pixel.
  • a text object 411 ′ detected from an arbitrary detection area 410 ′ in the input document image 400 ′ is displayed as a rectangular box along the outer circumferential surface.
  • the object detection model displays information on the recognized object as the object detection result 420' as shown in FIG.
  • the form configuration modeling unit 150 "to be described later can be compared with the receipt configuration of the pre-stored institution (hospital) to distinguish which institution the receipt is. .
  • the format is a single cell in the form constituting the document table, and may have a rectangular shape.
  • the document analysis apparatus 100" includes an OCR modeling unit 140" for recognizing letters and numbers using the OCR model for the type, letter, and number objects detected by the object detection modeling unit 130". can be configured.
  • the OCR modeling unit 140 ′′ is a configuration that automatically detects and recognizes an image-based text document, and may be configured using a well-known OCR model.
  • a confidence score based on the confidence score 432' calculated by the configuration modeling unit may be provided together.
  • the prediction information 431' indicates letters and numbers to be included in the recognized object
  • the confidence score 432' reflects the case where the content is not clear or the connected part is broken in the process of recognizing through OCR. It may be a recognition rate calculated by calculating the ratio of the recognized part from the whole part.
  • the document analysis apparatus 100" compares the recognized character information with the item DB 300', and corrects the recognized character with the character information of the item DB 300" in any rectangular shape having numeric information. Move in the left and up directions with the pixel position as the starting position, but when character information is retrieved, all the square pixels searched during movement are connected, and the character and numeric information corrected through the OCR model at the pixel position in the connected square It may be configured to include a form configuration modeling unit 150 ′′ that matches and displays.
  • Form configuration modeling unit 150 "in order to compare with the character information recognized in the recognition target image, text (item) information used in arbitrary documents, for example, hospital receipts, pharmacy receipts, transaction statements, tax bills, etc.
  • a defined item DB 300' can be created.
  • the form configuration modeling unit 150 ′′ provides NLP objects for letters detected through natural language processing (NLP) for the recognized letter object 411 ′ for each morpheme or segmental sound. (411a') may be analyzed, and a confidence score for the recognized character may be calculated based on a comparison between the analyzed result and the item DB 300' information.
  • NLP natural language processing
  • the recognized character is "MRI Diagnosis-”
  • information about the item stored in the item DB 300' is searched, and then through comparison with the item DB 300' information corresponding to the searched item. Calculate the confidence score.
  • the form configuration modeling unit 150 ′′ can process it according to the situation using the NLP.
  • the confidence score for the letters calculated by the form composition modeling unit 150" is, as shown in FIG. 24, the prediction information 431' recognized in the OCR recognition result 430', and the form composition modeling unit 150") may provide a confidence score 432' calculated for the prediction information 431'.
  • the form configuration modeling unit 150 ′′ creates a reconstructed form by connecting the object positions of all letters and numbers adjacent to the left and up directions from an arbitrary starting position based on the detected positions of the letters and objects.
  • the form configuration modeling unit 150 is the same as the horizontal or vertical length of another box adjacent to the box size of the numeric object, or the horizontal and vertical length of another box. If included, connect them.
  • the horizontal size 600 and the vertical size 710 of the starting object box 600 based on the starting object box 600 recognized as a number are set to the left object box 610 .
  • the lateral size (700a) and longitudinal size (710a) of the upper object box 620 are equal to or equal to the lateral size and longitudinal size of the left object box 610 and the upper object box 620 If included, it is displayed by connecting it with the left connecting line 800 and the upper connecting line 810 .
  • the start position is described as the start object box 600 for the numerical object located in the center, but the right object box 600a located on the right side of the start object box 600, the start object box ( 600), the lower object box located at the lower side may be set as the starting position.
  • the text object recognized (or detected) of the "compensation charge" may be the upper object box 620a.
  • the form configuration modeling unit 150 ′′ repeats the above process to connect only the closest left and upper sides, and after connecting, starting from the numbers, the text, for example, the letter object (item) appears on the left and the upper side. Connect through navigation and search.
  • the left object box 920 located on the left side If ') is a letter, it is connected through the left connecting line 940'.
  • the upper object box 930 ′ is a text object (item) by moving upward and searching, it is continuously connected through the upper connecting line 941 ′.
  • the form configuration modeling unit 150 ′′ determines that there are no misspellings or unrecognized characters when the items of the reconstructed form consist only of corrected characters, that is, characters selected from the item DB 300 ′, and the OCR modeling unit 140 It is also possible to recognize only the recognized number through the OCR model of "), and to match the recognized number with the item.
  • the form configuration modeling unit 150" matches the detected character object with the item DB 300' information, and when the recognized character is corrected according to the matching result, the corrected character is reflected.
  • the form configuration modeling unit 150 not only finds letter objects and number objects through rectangular recognition, but also corrects the document image in a horizontal state through reconstruction by vertices when the document image is an image in a tilted state. may be
  • the form configuration modeling unit 150 ′′ may convert the document image into a rectangular document image through reconstruction through trapezoidal correction.
  • the form configuration modeling unit 150 ′′ may convert the document image into a rectangular document image by using a program for correcting the shape or form.
  • the form configuration modeling unit 150 "operates to perform correction to improve recognition accuracy to achieve accurate recognition based on the faithful reconstruction of the rectangular shape, but errors occur through correction and reconstruction accordingly. Possibilities may increase as well.
  • the document analysis apparatus 100 "using the correction model, information on the risk of judgment error due to correction and reconstruction, for example, information obtained by digitizing the type and number of correction and reconstruction, and the recognized letters and numbers.
  • a reliability evaluation unit 160 that calculates a confidence score based on the reliability and reflects it on the display through the form configuration modeling unit 150" so that the user can check it based on the calculated confidence score, thereby visually displaying it. may be included.
  • the reliability evaluation unit 160 ′′ provides information on the risk of judgment error due to correction and reconstruction, for example, the type and number of correction and reconstruction, and a confidence score digitized by the form configuration modeling unit 150 ′′. do.
  • the form configuration modeling unit 150" displays the normal object area and the error-generating object area including the wrong object area and correction area in different colors from the rectangular box of letters and numbers.
  • the form configuration modeling unit 150" is based on the confidence score provided through the reliability evaluation unit 160", as shown in FIG. It is displayed in blue so that the normal object regions 910" and 911" can be identified.
  • the form configuration modeling unit 150 ′′ displays the object region in which the confidence score provided through the reliability evaluation unit 160 ′′ is less than or equal to the reference value in an arbitrary color (eg, red) in the reconstructed image 900 ′′.
  • Error occurrence object areas 920", 921", 922", 923", 924" are displayed so that they can be identified.
  • the document analysis apparatus 100" includes a database 170" that stores the generated rectangular pixel position value, recognized letters, numeric information, trust information, and a form of document data used in a specific institution. can be configured.
  • a specific institution may include any place that issues receipts and accounting-related documents in any form, such as hospitals, pharmacies, companies, and the like.
  • FIG. 32 is a flowchart illustrating an OCR-based document analysis process according to a third embodiment of the present invention.
  • the document analysis apparatus 100 ′′ receives an image of a receipt to be recognized through an external terminal connected through a network, a fax, or the like ( S100 ′′).
  • the document analysis apparatus 100 detects objects and positions of letters and numbers using an object detection model in the received image of the receipt to be recognized, and an object that forms a rectangular box on the detected objects of letters and numbers A detection step is performed (S200").
  • the object detection model uses a PSENet (Progressive Scale Expansion Network)-based deep learning model to detect form, letter and number objects and their positions from training data including document images, and to improve the detection rate. learning can be performed for
  • the object detection model is based on an original image, an image in which an arbitrary part of the document is folded, an image in which the position of the document is tilted at an arbitrary angle, an image whose brightness is adjusted with an arbitrary illuminance, and the content displayed in the document is not clear and is broken.
  • Training data can be learned based on an image with connecting lines, an image in which an arbitrary part of a document is curved, and an image in which numbers and connecting lines are superimposed.
  • the document analysis apparatus 100 performs an OCR recognition step (S300") of recognizing letter and number information using an OCR model in a rectangular pixel for the detected format, letter, and number object.
  • the document analysis apparatus 100 After performing the step S300", the document analysis apparatus 100" generates fixed text information from an arbitrary document, that is, character information about the item, as the item DB 300' information, and the generated item DB 300 ', see FIG. 20) information is stored in the database 170" (S400").
  • the recognized character information is compared with the item DB 300', and the recognized character is corrected with the character information of the item DB 300' to determine whether there is a typo or unrecognized character to determine whether to correct the document.
  • the apparatus 100 performs NLP-based calibration (S500").
  • step S500 the document analysis apparatus 100" analyzes the characters detected through natural language processing (NLP).
  • NLP natural language processing
  • step S500 the document analysis apparatus 100" may calculate and output a confidence score for the analyzed character based on a comparison between the analyzed character and the item DB 300' information.
  • the document analysis apparatus 100 "moves in the left direction and the upward direction using the position of an arbitrary rectangular pixel having numerical information as the starting position, but when character information is retrieved, all the found rectangular pixels are connected during movement, , so that the letter and number information corrected through the OCR model is matched to the pixel position on the connected rectangle (S600").
  • the document analyzing apparatus 100 moves and connects the start position in the left direction and the upper direction of the start position as a numeric object.
  • the document analysis apparatus 100 "matches recognized letters, corrected letters, and numbers for each item.
  • the document analysis apparatus 100 performs corrections to improve recognition accuracy, so that the faithful reconstruction of the rectangle and accurate recognition based on this can be achieved. , calculates a confidence score based on the reliability of the recognized letters and numbers, and reflects it on the display so that the user can check it based on the calculated confidence score to be visually displayed (S700").
  • step S700 if the document image is in a tilted state, the document analysis apparatus 100 "corrects it to a document image in a horizontal state through reconstruction by vertices, and if the document image is a trapezoid-shaped image, through trapezoidal correction It can also be converted into a rectangular document image through reconstruction.
  • the document image includes a wrinkled or folded part
  • the reconstruction rate according to the correction of at least one of the form, shape, and position; A confidence score can be calculated.
  • step S700 the document analysis apparatus 100" displays the normal object area and the error-generating object area including the wrong object area and correction area in different colors according to the confidence score of the rectangular box of letters and numbers. make it possible
  • the object area having a confidence score equal to or greater than the preset reference value is displayed in blue, for example, in the reconstructed image 900 " so that the normal object areas 910 " and 911 " can be identified.
  • the object area having a confidence score of less than or equal to the reference value is displayed in red, for example, in the reconstruction image 900" so that the error-prone object areas 920", 921", 922", 923", 924" can be identified. make it displayed
  • the recognized character, the corrected character, the form reconstructed through correction and reconstruction is converted into a reconstructed image to output the final result (S800"), and to be stored in the database 170".
  • FIG. 33 is a block diagram illustrating an OCR-based munseok system according to a fourth embodiment of the present invention.
  • the OCR-based document analysis system detects the position of at least one object among arbitrary forms, letters, and numbers in an image to be recognized by using an object detection model. Detect, but generate a pixel position value of a letter and number object by displaying a rectangular shape along the circumference of the detected type, letter and number object
  • a document analysis apparatus for outputting, connecting all adjacent pixels of a rectangle based on the generated pixel position value on the rectangle, matching the pixel positions of the connected rectangle with character and numeric information recognized through the OCR model and displaying ( 100"').
  • the document analysis apparatus 100"' provides a left header area in which a text object is disposed in the left area of the image based on the pixel position value of the generated text object, and an upper header area in which a text object is disposed in an upper area of the image. , and a virtual cell object can be created and placed based on the divided left header area and upper header area.
  • the document analysis apparatus 100"' is configured to match the placed virtual cell object and the number object, connect it based on row/column information, and display the letter and number information recognized through the OCR model can be
  • the document analysis apparatus 100"' may be configured to include an input unit 110"' for receiving a recognition target image transmitted from the outside.
  • the input unit 110"' may be configured as a data communication means for receiving an image transmitted from an external terminal connected through a network or an image scanned through a scanner or the like.
  • the document analysis apparatus 100"' detects the position of an arbitrary form, letter, and number object included in the image by using the object detection model in the recognition target image received through the input unit 110"'. and an object detection modeling unit 120"' for generating pixel position information on a square by displaying a square shape along the perimeter of the detected type, letter, and number object.
  • the object detection modeling unit 120"' recognizes the relative positions of the form, letter, and number objects, and the detected form, letter, and number so as to check the arrangement according to the position of the form, letter, and number object.
  • a rectangular image is displayed along the perimeter of the object, and pixel position values (coordinate information) on the displayed rectangle are generated.
  • the object detection model uses a PSENet (Progressive Scale Expansion Network)-based deep learning model to detect form, letter and number objects and their positions from training data including document images, and performs learning to improve the detection rate. can do.
  • PSENet Progressive Scale Expansion Network
  • the object detection model is based on an original image, an image in which an arbitrary part of the document is folded, an image in which the position of the document is tilted at an arbitrary angle, an image whose brightness is adjusted with an arbitrary illuminance, and the content displayed in the document is not clear and is broken. It can learn using training data based on images with connecting lines, images with curved lines in any part of the document, and images with numbers and connecting lines overlapping each other.
  • the image to be recognized is described as an image related to a hospital receipt as an embodiment, but is not limited thereto. may include
  • the object detection model may find an optimal rule in performing detection based on variously changed images through automatic augmentation.
  • the object detection model may set a pixel on a rectangle with respect to an object of a detected type, letter, and number, and generate a position value of the set pixel.
  • the rectangular box 212 (refer to FIG. 2) may preferably be configured in a rectangular shape.
  • the format is a single cell in the form constituting the document table, and may have a rectangular shape.
  • the document analysis apparatus 100"' uses the OCR model for the type, letter, and number objects detected by the object detection modeling unit 120"' to recognize letters and numbers by the OCR modeling unit 130"') It may be composed of
  • the OCR modeling unit 130"' is a configuration that automatically detects and recognizes an image-based text document, and may be configured using a well-known OCR model.
  • the OCR modeling unit 130"' is the OCR recognition result (300, see FIG. 4), the recognized prediction information (310, see FIG. 4), and the confidence score (320, FIG. 4) for the prediction information 310 2) can be calculated and provided together.
  • the prediction information 310 indicates the letters and numbers to be included in the recognized object
  • the confidence score 320 reflects the case where the contents are not clear or the connected part is broken in the process of recognizing through OCR. It may be a recognition rate calculated by calculating the ratio of the part recognized in .
  • the document analysis apparatus 100"' provides a left header area in which a text object is disposed in the left area of the image based on the pixel position value of the generated text object, and an upper header area in which a text object is disposed in an upper area of the image.
  • a virtual cell object of size M ⁇ N is created and placed, and the placed virtual cell object and the number object are matched to connect based on row/column information. It may be configured to include a virtual cell form configuration modeling unit 140"' for displaying character and numeric information recognized through the OCR model.
  • the virtual cell form configuration modeling unit 140"' determines what type of prediction information is recognized based on the detection result of the object detection modeling unit 120"' and the prediction information of the OCR modeling unit 130"'. to match.
  • the virtual cell form configuration modeling unit 140"' matches the detection result 220 of the object detection modeling unit 120"' and the prediction information 310 of the OCR modeling unit 130"', Connect the rectangular pixels of all adjacent letter and number objects.
  • a plurality of left objects 410"' are detected in the left area on the document image 400"', and a plurality of upper objects 420 are detected in the upper area on the document image 400"'.
  • "') is detected, and a number object 430"' is detected in conjunction with the individual left object 410"' and the upper object 420"'.
  • the number object 430"' is an attribute of the number object 430"' by the left object 410"' and the upper object 420"' corresponding to the number object 430"'. This is defined
  • the virtual cell form configuration modeling unit 140"' creates a virtual cell object so that a letter object and a number object are connected.
  • the virtual cell form configuration modeling unit 140"' is the left header on the document image 400"', as shown in FIG. 35, based on the position coordinates of the text object extracted through the object detection modeling unit 120"'.
  • the area 500"' and the upper header area 510"' are separated and divided.
  • the virtual cell form configuration modeling unit 140"' is a character object included in the divided left header area 500"', that is, a plurality of text objects disposed in the vertical downward direction of the left header area 500"' in the drawing. of the left header object 501"' and the text object included in the upper header area 510"', that is, the upper header object 511" arranged in the horizontal right direction of the upper header area 510"' in the drawing. ', 512"'), extract the position coordinate values of the pixels in the rectangle.
  • the virtual cell form configuration modeling unit 140"' calculates the spacing and size between the text object included in the left header area 500"' and the upper header area 510"' of the text object, that is, the left header object ( 501"'), the upper header object 511"', and the upper header object 1 (512"') calculate the spacing and size, and divide the left header area 500"' and the upper header area 510"' ), a plurality of virtual cell groups 530"' and 530"'a are arranged according to row/column information.
  • the plurality of virtual cell objects 531"' and 532"' included in the virtual cell group 530"' and 530"'a are the left header area 500"' and the upper header area 510"'. are arranged according to the row/column information of
  • the number of virtual cell objects 531"' and 532"' arranged is the left header object 501"' and the upper header detected in the left header area 500"' and the upper header area 510"'. It is formed as many as M ⁇ N, which is the number of objects 511"'.
  • the virtual cell form configuration modeling unit 140"' matches the numeric object area 520"' with the virtual cell groups 530"' and 530"'a, and the virtual cell object 531 disposed in the upper left corner. "') and the number object 521"' are matched first.
  • the virtual cell object 531"' and the number object 521"' which have the highest accuracy, are first matched.
  • the virtual cell form configuration modeling unit 140"' matches the number object 521"' with the virtual cell object 531"' disposed in the upper left corner, as shown in FIG. 36, the matched number object 521 Calculate the gradient between "') and the virtual cell object 531"'.
  • the virtual cell form configuration modeling unit 140"' is set on the document image to prevent erroneous matching when the numeric objects 521"' included in the document image are arranged in an inclined state instead of in the horizontal direction.
  • the gradient of the corresponding vector in the coordinate system is calculated, and the overall gradient of the image is calculated based on the calculated gradient.
  • the virtual cell form configuration modeling unit 140"' puts the inclination information between the number object 521"' and the virtual cell object 531"' matched in the upper left corner so that the overall gradient of the image is reflected in the lower right corner. Even the matching of the placed virtual cell object and the number object n(523"') is reflected.
  • the virtual cell form configuration modeling unit 140"' connects the virtual cell object with the left, upper, and lower objects through a gradient line 540"' and an upper header line 541"', the left header object Based on the distance and size between objects calculated from (501"'), upper header object (511"'), upper header object 1 (512"'), etc. make it connect
  • the virtual cell form configuration modeling unit 140"' removes the virtual cell object and generates and outputs the final connection image 600"', as shown in FIG. 37 .
  • the virtual cell form configuration modeling unit 140"' may compare the final connection image 600"' with box arrangement information of a specific institution document stored in the database 150"' and check whether it matches.
  • a specific institution may include any place that issues receipts and accounting-related documents in any form, such as hospitals, pharmacies, companies, and the like.
  • the virtual cell form configuration modeling unit 140"' even when the character image 700"' in which the numeric object 730"' is pushed is input, the left header object 710"' and the upper After creating a virtual cell object based on the header object 720"', for example, by matching the number object 730"' pushed to the bottom with the virtual cell object, the text object and the number object are connected based on the slope. Make sure that the correct connection is made.
  • the virtual cell form configuration modeling unit 140 "' as shown in FIG. 39, even when a text image 800 that is curved (or inclined) to one side in the drawing is input, the left header object 810 "' and the upper header A virtual cell object is created based on the object 820"', and then the number object 830"' is matched with the virtual cell object, so that the letter object and the number object can be accurately connected through the connection based on the gradient.
  • the document analysis apparatus 100"' includes a reconstructed image output from the virtual cell form configuration modeling unit 140, a form (or format) of document data used in a specific institution, a pixel position value on a generated rectangle, and the recognized It may be configured to include a database 150 for storing character and numeric information and matching results.
  • FIG. 40 is a flowchart illustrating an OCR-based document analysis process according to a fourth embodiment of the present invention
  • FIG. 41 is a flowchart illustrating a virtual cell-based item matching process according to the embodiment of FIG. 40 .
  • the document analysis apparatus 100"' receives an image of a receipt to be recognized through an external terminal or fax connected through a network (S100"').
  • the document analysis apparatus 100"' detects an arbitrary format, letter and number object and its position using an object detection model in the image of the received receipt to be recognized, and follows the perimeter of the detected format, letter and number object.
  • a character detection step of generating pixel position information on a rectangle by displaying the rectangle is performed (S200"').
  • the object detection model uses a PSENet (Progressive Scale Expansion Network)-based deep learning model to detect form, letter and number objects and their positions from training data including document images, and to improve the detection rate. learning can be performed for
  • the object detection model is based on an original image, an image in which an arbitrary part of the document is folded, an image in which the position of the document is tilted at an arbitrary angle, an image whose brightness is adjusted with an arbitrary illuminance, and the content displayed in the document is not clear and is broken.
  • Training data can be learned based on an image with connecting lines, an image in which an arbitrary part of a document is curved, and an image in which numbers and connecting lines are superimposed.
  • the document analysis apparatus 100"' performs an OCR recognition step (S300"') of recognizing letter and number information by using the OCR model in a rectangular pixel for the detected format, letter, and number object. .
  • the document analysis apparatus 100"' determines the left header area 500 in which the text object is disposed in the left area of the image based on the pixel position value of the generated text object, and the upper side of the image.
  • the region is divided into an upper header region 510 in which text objects are arranged, and virtual cell objects are created and placed based on the left header region 500 and the upper header region 510, and the arranged virtual cell objects and numbers.
  • Objects are matched and connected based on row/column information (S400"').
  • step S400"' the document analysis apparatus 100"' arranges the virtual cell object based on the left and upper pixel positions of the text object, but the left header area 500"' of the text object 35) and the upper header area 510"' (refer to FIG. 35) (S410"').
  • the document analysis apparatus 100"' calculates the spacing and size between the text objects included in the divided left header area 500"' and the upper header area 510"' (S420"').
  • the document analysis apparatus 100"' detects the left header object 501"' and the upper header object 511 based on the divided left header area 500"' and the upper header area 510"'. "'), as many as M ⁇ N virtual cell objects are arranged (S430"').
  • the document analysis apparatus 100"' matches the virtual cell object and the number object arranged in the upper left corner to calculate the gradient between the number object and the virtual cell object (S440") ')do.
  • step S440"' the document analysis apparatus 100"' in the reference coordinate system set on the document image to prevent erroneous matching when the numeric objects included in the document image are arranged in an inclined state instead of in the horizontal direction. , calculates the gradient of the corresponding vector in the coordinate system, and calculates the overall gradient of the image based on the calculated gradient.
  • the document analysis apparatus 100"' moves sequentially according to the row/column information, and reflects the calculated gradient to match the virtual cell object and the number object disposed in the lower right corner (S450"'). .
  • the document analysis apparatus 100"' reflects the gradient information between the number object and the virtual cell object matched in the upper left so that the overall gradient of the image is reflected, up to the matching of the virtual cell object and the number object n arranged in the lower right.
  • the virtual cell object and the number object arranged according to the reflection result are matched to be connected based on the row/column information of the left header object 501"' and the upper header object 511"'.
  • step S450"' When the connection of step S450"' is completed, the document analysis apparatus 100"' generates and outputs the final connection image 600"' so that the letters and numbers information recognized through the OCR model are displayed (S500"') .
  • fast and accurate matching is achieved by analyzing the pattern of letter placement based on the connection and relative positional relationship between recognized items and comparing it with the form pattern used by institutions such as hospitals and insurance companies that use specific documents or receipts. possible.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Multimedia (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Biophysics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Character Discrimination (AREA)
  • Character Input (AREA)

Abstract

OCR 기반 문서 분석 시스템 및 방법을 개시한다. 본 발명은 OCR 인식에 기반하여 인식된 글자에 대한 상대적인 위치 정보, 인식된 항목 간의 연결, 인식된 정보에 대한 신뢰 점수를 제공함으로써, 데이터 테이블의 재구성, 예측 정확도 검사자에 의한 확인 작업시간을 감소시킬 수 있다.

Description

OCR 기반 문서 분석 시스템 및 방법
본 발명은 OCR 기반 문서 분석 시스템 및 방법에 관한 발명으로서, 더욱 상세하게는 OCR 인식에 기반하여 인식된 글자에 대한 상대적인 위치 정보, 인식된 항목 간의 연결, 인식된 정보에 대한 신뢰 점수를 제공함으로써, 데이터 테이블의 재구성, 예측 정확도 검사자에 의한 확인 작업시간을 감소시킬 수 있는 OCR 기반 문서 분석 시스템 및 방법에 관한 것이다.
개인이나 기업은 경제 활동 중에 수집하는 영수증을 경비보고, 지출결의 등의 회계 처리 혹은 종합소득세 신고 등의 세무 처리를 위한 사후 증빙 서류로 보관하여 관리한다.
이렇게 보관 및 관리되는 영수증은 종이로 되어 있기 때문에 근본적으로 원본의 훼손 위험이 있으며, 오손, 분실, 부패에 대한 노출을 예방해야 하는 기술적, 경제적 부담이 있고, 영수증 보관량의 증대에 비례하여 영수증 보관 공간을 늘려야 하는 문제점이 있다.
또한, 개인이나 기업의 담당자는 수기 입력 방식으로 종래의 영수증으로부터 상기한 회계 처리 혹은 세무 처리에 필요한 정보를 추출하고 분류하여 장부에 기입하거나 회계관리 프로그램이 설치된 PC에 입력, 저장하기 때문에 정보 추출 작업이 불편한 문제점이 있다.
한편, 문서에 포함된 글자(텍스트) 이미지는 기계 인코딩을 통해 변환할 수 있는 데, 기계 인코딩을 통해 변환된 글자는 전자적으로 편집, 검색 등이 가능하고, 변환된 글자는 파일 등의 형태로 데이터베이스에 저장할 수도 있게 된다.
이러한 기계 인코딩은 주로 광학문자인식(OCR)을 통해 수행될 수 있고, 컴퓨터 등을 이용하여 이미지 기반의 텍스트 문서를 자동으로 감지, 식별 및 인코딩할 수 있다.
한국 등록특허공보 등록번호 제10-1139801호(발명의 명칭: 영수증 판독을 통한 자동 정보 수집 시스템 및 방법)에는 종래의 영수증에 인쇄된 구매 물품, 구매 수량, 사용 금액 등을 OCR을 통해 판독하여 저장함으로써 해당 영수증의 사용자의 구매 정보를 자동으로 수집, 관리하는 구성이 개시되어 있다.
그러나, 종래 기술에 따른 OCR은 저품질의 프린터 또는 팩스 등에서 인쇄되거나, 해상도가 낮은 촬영수단에서 이미지화되거나, 구겨지거나, 또는 기울어진 상태에서 촬영된 이미지의 경우 OCR의 인식 정확도가 떨어지는 문제점이 있다.
또한, 종래 기술에 따른 정보 수집 시스템은 단순히 물품, 수량, 사용 금액등에 대한 인식만 가능하여 인식된 항목들 간의 연결 관계는 알 수 없는 문제점이 있다.
또한, 종래 기술에 따른 정보 수집 시스템은 바코드가 포함된 영수증, 특히 별도의 스캐너 장치를 통해 디지털 데이터화된 영수증을 인식하도록 구성되어 일반적인 영수증의 인식은 어려운 문제점이 있다.
또한, 종래 기술에 따른 정보 수집 시스템은 문서에서 글자들만 인식하기 때문에 인식된 글자와 글자 사이의 관계를 알 수 없는 문제점이 있다.
또한, 종래 기술에 따른 정보 수집 시스템은 OCR을 통해 인식되더라도, 인식된 글자를 알맞은 DB의 필드에 저장할 수 없는 문제점이 있다.
또한, 종래 기술에 따른 정보 수집 시스템은 새로운 항목에 대한 인식이 어렵고, 인식된 항목을 포함한 재구성 폼을 생성할 수 없는 문제점이 있다.
또한, 종래 기술에 따른 정보 수집 시스템 및 방법은 OCR을 통해 수집된 정보에 대하여 검사자가 인식된 정보에 대하여 이상 유/무를 모두 확인해야만 하는 문제점이 있다.
이러한 문제점을 해결하기 위하여, 본 발명은 OCR 인식에 기반하여 인식된 글자에 대한 상대적인 위치 정보, 인식된 항목 간의 연결, 인식된 정보에 대한 신뢰 점수를 제공함으로써, 데이터 테이블의 재구성, 예측 정확도 검사자에 의한 확인 작업시간을 감소시킬 수 있는 OCR 기반 문서 분석 시스템 및 방법을 제공하는 것을 목적으로 한다.
상기한 목적을 달성하기 위하여 본 발명의 일 실시 예는 OCR 기반 문서 분석 시스템으로서, 객체 탐지 모델을 이용하여 인식 대상 이미지에서 임의의 형식(form), 글자 및 숫자 중 적어도 하나의 객체의 위치를 탐지하되, 탐지된 형식, 글자 및 숫자 객체의 둘레를 따라 사각형상을 표시하여 사각형상의 픽셀 위치 값을 생성하고, OCR 모델을 이용하여 상기 사각형상의 픽셀 안에서 인식되는 글자 및 숫자 정보를 출력하고, 상기 생성된 사각형상의 픽셀 위치 값을 기반으로 인접한 모든 사각형상의 픽셀들을 연결하며, 상기 연결된 사각형상의 픽셀 위치에 상기 OCR 모델을 통해 인식된 글자 및 숫자 정보를 매칭시켜 디스플레이하는 문서 분석 장치로 이루어진 것을 특징으로 한다.
또한, 상기 실시 예에 따른 문서 분석 장치는 임의의 문서에서 사용되는 글자(항목) 정보를 정의한 항목 DB를 생성 및 저장하고,
상기 인식된 글자에 대하여 항목 DB의 글자 정보와 비교를 통해 교정 여부를 결정하며, 인식된 글자가 교정됨에 따라 상기 인식된 글자, 교정된 글자 및 숫자 정보를 반영하여 디스플레이 하는 것을 특징으로 한다.
또한, 상기 실시 예에 따른 문서 분석 장치는 OCR 모델을 이용한 인식률에 기반한 인식된 글자 및 숫자의 신뢰 점수를 산출하고, 산출된 신뢰 점수를 상기 디스플레이 정보에 반영하여 시각적으로 표시되도록 하고, 상기 신뢰 점수는 보정 모델을 이용하여 폼, 형상, 위치 중 적어도 하나의 보정 수행에 따라 산출되는 재건율이 추가 반영되는 것을 특징으로 한다.
또한, 상기 실시 예에 따른 문서 분석 장치는 인식 대상 이미지를 수신하는 입력부; 상기 수신된 인식 대상 이미지에서 객체 탐지 모델을 이용하여 임의의 형식(form), 글자 및 숫자 객체 중 적어도 하나의 위치를 탐지하고, 탐지된 형식, 글자 및 숫자 객체의 둘레에 사각형상을 표시하며, 표시된 사각형상의 픽셀 위치 값을 생성하는 객체 탐지 모델링부; OCR 모델을 이용하여 상기 사각형상의 픽셀 내에서 인식되는 글자 및 숫자 정보를 출력하는 OCR 모델링부; 상기 생성된 사각형상의 픽셀 위치 값과, 상기 인식된 글자 및 숫자 정보를 기반으로 숫자 정보를 갖는 임의의 사각형상의 픽셀 위치를 시작 위치로 하여 좌측 방향과 상측 방향으로 이동하되, 글자 정보가 검색되면 이동중에 검색된 모든 사각형상의 픽셀들을 연결하고, 상기 연결된 사각형상의 픽셀 위치에 상기 OCR 모델을 통해 인식된 글자 및 숫자 정보를 매칭시켜 디스플레이되도록 하는 폼 구성 모델링부; 및 상기 생성된 사각형상의 픽셀 위치 값, 인식된 글자, 숫자 정보 및 매칭 결과와, 특정 기관에서 사용하는 문서 데이터의 폼을 저장하는 데이터베이스;를 포함하는 것을 특징으로 한다.
또한, 상기 실시 예에 따른 객체 탐지 모델은 PSENet(Progressive Scale Expansion Network) 기반의 딥러닝 모델을 이용하여 문서 이미지를 포함한 학습 데이터로부터 형식, 글자 및 숫자 객체의 위치 탐지와, 탐지된 형식, 글자 및 숫자 객체의 둘레를 따라 사각형상을 표시하고, 상기 표시된 사각형상의 픽셀 위치 값 생성을 학습하는 것을 특징으로 한다.
또한, 상기 실시 예에 따른 객체 탐지 모델은 원본 이미지, 문서의 임의의 부분이 접혀진 이미지, 문서의 위치가 임의의 각도로 기울어진 이미지, 임의의 조도를 갖는 밝기가 조절된 이미지, 문서에 표시된 내용이 선명하지 않고 끊어진 연결선을 갖는 이미지, 문서의 임의의 부분이 굴곡진 이미지, 숫자와 연결선이 겹쳐진 이미지를 기반으로 학습 데이터를 학습하는 것을 특징으로 한다.
또한, 상기 실시 예에 따른 폼 구성 모델링부는 상기 생성된 사각형상의 픽셀 위치 값과, 상기 인식된 숫자 정보를 기반으로 숫자 정보를 갖는 임의의 사각형상의 픽셀 위치를 시작 위치로 하여 좌측 방향과 상측 방향으로 이동할 수 있다.
또한, 상기 실시 예에 따른 폼 구성 모델링부는 이동중에 검색되는 모든 사각형상의 픽셀들을 연결하고, 상기 연결된 사각형상의 배열 정보를 분석하여 미리 저장된 특정 기관 문서의 배열 정보와 비교하며, 상기 비교 결과, 특정 기관 문서의 배열 정보가 매칭되면, 상기 특정 기관 문서의 사각형상 픽셀 위치에 인식된 숫자 정보를 매칭시켜 디스플레이되도록 하는 것을 특징으로 한다.
또한, 상기 실시 예에 따른 폼 구성 모델링는 생성된 사각형상의 픽셀 중심점에 마커를 표시하고, 상기 인식된 숫자 정보를 기반으로 숫자 정보를 갖는 임의의 사각형상의 픽셀 위치를 시작 위치로 하여 좌측 방향과 상측 방향으로 이동할 수 있다.
또한, 상기 실시 예에 따른 폼 구성 모델링부는 이동중에 검색되는 모든 사각형상의 픽셀들을 연결하고, 연결된 사각형상의 마커 위치 정보를 분석하여 미리 저장된 특정 기관 문서의 배열 정보와 비교하며, 상기 비교 결과, 특정 기관 문서의 배열 정보가 매칭되면, 상기 특정 기관 문서의 사각형상 픽셀 위치에 인식된 숫자 정보를 매칭시켜 디스플레이되도록 하는 것을 특징으로 한다.
또한, 상기 실시 예에 따른 문서 분석 장치는 인식 대상 이미지를 수신하는 입력부; 상기 인식 대상 이미지에서 인식되는 글자 정보와 비교하기 위해, 임의의 문서에서 사용되는 글자(항목) 정보를 정의한 항목 DB를 생성하는 항목 DB 생성부; 상기 수신된 인식 대상 이미지에서 객체 탐지 모델을 이용하여 임의의 형식(form), 글자 및 숫자 객체 중 적어도 하나의 위치를 탐지하고, 탐지된 형식, 글자 및 숫자 객체의 둘레에 사각형상을 표시하며, 표시된 사각형상의 픽셀 위치 값을 생성하는 객체 탐지 모델링부; OCR 모델을 이용하여 상기 사각형상의 픽셀 내에서 인식되는 글자 및 숫자 정보를 출력하는 OCR 모델링부; 상기 인식된 글자 정보를 항목 DB와 비교하고, 인식된 글자를 항목 DB의 글자 정보로 교정함에 따라 숫자 정보를 갖는 임의의 사각형상의 픽셀 위치를 시작 위치로 하여 좌측 방향과 상측 방향으로 이동하되, 글자 정보가 검색되면 이동중에 검색된 모든 사각형상의 픽셀들을 연결하고, 상기 연결된 사각형상의 픽셀 위치에 상기 OCR 모델을 통해 교정된 글자 및 숫자 정보를 매칭시켜 디스플레이되도록 하는 폼 구성 모델링부; 및 상기 생성된 사각형상의 픽셀 위치 값, 교정된 글자 및 숫자 정보 및 매칭 결과와, 특정 기관에서 사용하는 문서 데이터의 폼을 저장하는 데이터베이스를 포함하는 것을 특징으로 한다.
또한, 상기 실시 예에 따른 폼 구성 모델링부는 자연어 처리(Natural Language Processing, NLP)를 통해 탐지된 글자에 대하여 분석하는 것을 특징으로 한다.
또한, 상기 실시 예에 따른 폼 구성 모델링부는 인식된 글자와 항목 DB 정보 사이를 비교하여 인식된 글자에 대한 신뢰 점수를 산출하는 것을 특징으로 한다.
또한, 상기 실시 예에 따른 폼 구성 모델링부는 숫자 객체의 사각형상 픽셀 크기에 대하여 가로, 세로 길이가 인접한 다른 사각형상 픽셀의 가로, 세로 길이와 동일하거나 또는 다른 박스의 가로, 세로 길이에 포함되면 연결되도록 하는 것을 특징으로 한다.
또한, 상기 실시 예에 따른 폼 구성 모델링부는 가장 가까운 좌측 및 상측의 사각형상 픽셀 중 적어도 하나를 연결하되, 연결된 사각형상 픽셀 내의 글자 객체를 찾을 때까지 연결하는 것을 특징으로 한다.
또한, 상기 실시 예에 따른 폼 구성 모델링부는 검색된 사각형상의 픽셀이 빈 칸이면, 좌측방향에 위치한 다음 사각형상의 픽셀과 연결하는 것을 특징으로 한다.
또한, 상기 실시 예에 따른 문서 분석 장치는 신뢰 점수에 따라 정상 인식 영역과, 틀린 영역 및 보정 영역을 포함한 오류발생 영역이 서로 다른 색상의 시각화 정보로 표시되도록 하는 것을 특징으로 한다.
또한, 상기 실시 예에 따른 문서 분석 장치는 인식 대상 이미지를 수신하는 입력부; 상기 수신된 인식 대상 이미지에서 객체 탐지 모델을 이용하여 형식, 글자 및 숫자 객체 중 적어도 하나의 위치를 탐지하고, 탐지된 형식, 글자 및 숫자 객체의 둘레에 사각형상을 표시하며, 표시된 사각형상의 픽셀 위치 값을 생성하는 객체 탐지 모델링부; OCR 모델을 이용하여 상기 사각형상의 픽셀 내에서 인식되는 글자 및 숫자 정보를 출력하는 OCR 모델링부; 상기 인식된 글자를 항목 DB의 글자 정보로 교정함에 따라 숫자 정보를 갖는 임의의 사각형상의 픽셀 위치를 시작 위치로 하여 좌측 방향과 상측 방향으로 이동하되, 글자 정보가 검색되면 이동중에 검색된 모든 사각형상의 픽셀들을 연결하고, 상기 연결된 사각형상의 픽셀 위치에 상기 OCR 모델을 통해 교정된 글자 및 숫자 정보를 매칭시켜 디스플레이되도록 하는 폼 구성 모델링부; 보정 모델을 이용하여 상기 인식된 글자 및 숫자의 신뢰 점수를 산출하고, 산출된 신뢰 점수를 기반으로 상기 디스플레이에 반영하여 시각적으로 표시되도록 하는 신뢰도 평가부; 및 상기 생성된 사각형상의 픽셀 위치 값, 인식된 글자, 숫자 정보, 신뢰 정보와, 특정 기관에서 사용하는 문서 데이터의 폼을 저장하는 데이터베이스;를 포함하는 것을 특징으로 한다.
또한, 상기 실시 예에 따른 문서 분석 장치는 인식 대상 이미지에 포함된 글자에 대하여 임의의 문서로부터 미리 설정된 글자에 대한 항목 DB 정보를 생성하는 항목 DB 생성부;를 더 포함할 수 있다.
또한, 상기 폼 구성 모델링부는 상기 탐지된 글자 객체에 대하여 항목 DB 정보와 매칭시키고, 매칭 결과에 따라 인식된 글자가 교정되면, 상기 교정된 글자가 반영되도록 하는 것을 특징으로 한다.
또한, 상기 실시 예에 따른 폼 구성 모델링부는 글자 및 숫자의 사각형상 박스의 색상을 정상 인식 영역과, 틀린 영역 및 보정 영역을 포함한 오류발생 영역이 서로 다른 색상으로 표시되는 것을 특징으로 한다.
또한, 본 발명의 일 실시 예에 따른 문서 분석 방법은 a) 문서 분석 장치가 수신된 인식 대상 이미지에서 객체 탐지 모델을 이용하여 임의의 형식, 글자 및 숫자 객체 중 적어도 하나의 위치를 탐지하고, 탐지된 형식, 글자 및 숫자 객체의 둘레에 사각형상을 표시하여 사각형상의 픽셀 위치 값을 생성하는 단계; b) 상기 문서 분석 장치가 OCR 모델을 이용하여 탐지된 사각형상 픽셀 안에서 인식되는 글자 및 숫자 정보를 출력하는 단계; 및 c) 상기 문서 분석 장치가 상기 생성된 사각형상의 픽셀 위치 값과, 상기 인식된 글자 및 숫자 정보를 기반으로 숫자 정보를 갖는 임의의 사각형상의 픽셀 위치를 시작 위치로 하여 좌측 방향과 상측 방향으로 이동하되, 글자 정보가 검색되면 이동중에 검색된 모든 사각형상의 픽셀들을 연결하고, 상기 연결된 사각형상의 픽셀 위치에 상기 OCR 모델을 통해 인식된 글자 및 숫자 정보를 매칭시켜 디스플레이되도록 하는 단계;를 포함한다.
또한, 상기 실시 예는 a) 단계의 객체 탐지 모델이 PSENet(Progressive Scale Expansion Network) 기반의 딥러닝 모델을 이용하여 문서 이미지를 포함한 학습 데이터로부터 형상, 글자 및 숫자 객체의 위치 탐지와, 탐지된 형상, 글자 및 숫자 객체의 둘레를 따라 사각형상의 박스와 상기 사각형상의 픽셀 위치 값 생성을 학습하는 것을 특징으로 한다.
또한, 상기 실시 예는 상기 a) 단계의 객체 탐지 모델이 원본 이미지, 문서의 임의의 부분이 접혀진 이미지, 문서의 위치가 임의의 각도로 기울어진 이미지, 임의의 조도를 갖는 밝기가 조절된 이미지, 문서에 표시된 내용이 선명하지 않고 끊어진 연결선을 갖는 이미지, 문서의 임의의 부분이 굴곡진 이미지, 숫자와 연결선이 겹쳐진 이미지를 기반으로 학습 데이터를 학습하는 것을 특징으로 한다.
또한, 상기 실시 예에 따른 c) 단계는 c-1) 생성된 사각형상의 픽셀 위치 값과, 상기 인식된 글자 및 숫자 정보를 기반으로 숫자 정보를 갖는 임의의 사각형상의 픽셀 위치를 시작 위치로 하여 글자 정보가 검색될 때까지 좌측 방향과 상측 방향으로 이동하는 단계; c-2) 상기 글자 정보가 검색되면 이동중에 검색된 모든 사각형상의 픽셀들을 연결하는 단계; 및 c-3) 상기 사각형상의 픽셀 위치에는 인식된 글자와 숫자 정보를 매칭시켜 디스플레이하는 단계;를 포함하는 것을 특징으로 한다.
또한, 상기 실시 예에 따른 c) 단계는 c'-1) 상기 생성된 사각형상의 픽셀 위치 값과, 상기 인식된 숫자 정보를 기반으로 숫자 정보를 갖는 임의의 사각형상의 픽셀 위치를 시작 위치로 하여 좌측 방향과 상측 방향으로 이동하는 단계; c'-2) 상기 이동중에 검색되는 모든 사각형상의 픽셀들을 연결하는 단계; 및 c'-3) 상기 연결된 사각형상의 배열 정보를 분석하여 미리 저장된 특정 기관 문서의 배열 정보와 비교하며, 상기 비교 결과, 특정 기관 문서의 배열 정보가 매칭되면, 상기 특정 기관 문서의 사각형상 픽셀 위치에 인식된 숫자 정보를 매칭시켜 디스플레이하는 단계;를 포함하는 것을 특징으로 한다.
또한, 상기 실시 예에 따른 c) 단계는 c"-1) 생성된 사각형상의 픽셀의 중심점에 마커(520)를 표시하는 단계; c"-2) 상기 인식된 숫자 정보를 기반으로 숫자 정보를 갖는 임의의 사각형상의 픽셀 위치를 시작 위치로 하여 좌측 방향과 상측 방향으로 이동하고, 이동중에 검색되는 모든 사각형상의 픽셀들을 연결하는 단계; c"-3) 연결된 사각형상의 마커(520) 위치 정보를 분석하여 미리 저장된 특정 기관 문서의 배열 정보와 비교하는 단계; 및 c"-4) 상기 비교 결과, 특정 기관 문서의 배열 정보가 매칭되면, 상기 특정 기관 문서의 사각형상 픽셀 위치에 인식된 숫자 정보를 매칭시켜 디스플레이하는 단계;를 포함하는 것을 특징으로 한다.
또한, 상기 실시 예에 따른 b) 단계는 문서 분석 장치가 상기 인식 대상 이미지에서 인식되는 글자 정보와 비교하기 위해, 임의의 문서에서 사용되는 글자(항목) 정보를 정의한 항목 DB를 생성하는 단계; 및 문서 분석 장치가 탐지된 글자 객체에 대하여 항목 DB 정보와 매칭시키고, 매칭 결과에 따라 인식된 글자를 교정하는 단계;를 더 포함하는 것을 특징으로 한다.
또한, 상기 실시 예에 따른 문서 분석 탐지 장치는 탐지된 글자 객체에 대하여 자연어 처리(Natural Language Processing, NLP)를 통해 글자를 분석하고, 분석된 글자와 항목 DB 정보 사이의 비교를 기반으로 분석된 글자에 대한 신뢰 점수를 산출하여 인식된 글자의 교정 여부를 판단하며, 상기 인식된 글자의 교정을 수행함에 따라 NLP 기반의 교정을 수행하는 것을 특징으로 한다.
또한, 상기 실시 예에 따른 문서 분석 장치는 사각형상의 픽셀이 빈칸이면, 좌측방향에 위치한 다음 사각형상의 픽셀과 연결하는 것을 특징으로 한다.
또한, 상기 실시 예는 d) 상기 문서 분석 장치가 보정 모델을 이용하여 상기 인식된 글자 및 숫자의 신뢰 점수를 산출하고, 산출된 신뢰 점수를 기반으로 디스플레이에 반영하여 시각적으로 표시하는 단계;를 더 포함하는 것을 특징으로 한다.
또한, 상기 실시 예에 따른 d) 단계의 보정 모델은 폼, 형상, 위치 중 적어도 하나의 보정 수행에 따른 재건율과, 항목 DB 정보와의 매칭 결과에 따른 교정된 글자의 반영 여부에 기반하여 신뢰 점수를 산출하는 것을 특징으로 한다.
또한, 상기 실시 예에 따른 문서 분석 장치는 상기 생성된 글자 객체의 픽셀 위치 값을 기반으로 좌측 영역에 글자 객체가 배치되는 좌측 헤더 영역과 상측 영역에 글자 객체가 배치되는 상측 헤더 영역으로 구분하되, 상기 좌측 헤더 영역과 상측 헤더 영역을 기준으로 가상 셀 객체를 생성하여 배치하고, 상기 배치된 가상 셀 객체와 숫자 객체를 매칭시켜 행렬 정보를 기반으로 연결하여 상기 OCR 모델을 통해 인식된 글자 및 숫자 정보가 디스플레이되도록 하는 특징으로 한다.
또한, 상기 실시 예에 따른 문서 분석 장치는 인식 대상 이미지를 수신하는 입력부; 상기 수신된 인식 대상 이미지에서 객체 탐지 모델을 이용하여 임의의 형식(form), 글자 및 숫자 객체 중 적어도 하나의 위치를 탐지하고, 탐지된 형식, 글자 및 숫자 객체의 둘레에 사각형상을 표시하며, 표시된 글자 및 숫자 객체의 픽셀 위치 값을 생성하는 객체 탐지 모델링부; OCR 모델을 이용하여 상기 사각형상의 픽셀 내에서 인식되는 글자 및 숫자 정보를 출력하는 OCR 모델링부; 상기 생성된 글자 객체의 픽셀 위치 값을 기반으로 좌측 영역에 글자 객체가 배치되는 좌측 헤더 영역과 상측 영역에 글자 객체가 배치되는 상측 헤더 영역으로 구분하고, 상기 좌측 헤더 영역과 상측 헤더 영역을 기준으로 M×N 크기의 가상 셀 객체를 생성하여 배치하며, 상기 배치된 가상 셀 객체와 숫자 객체를 매칭시켜 행렬 정보를 기반으로 연결하여 상기 OCR 모델을 통해 인식된 글자 및 숫자 정보가 디스플레이되도록 하는 가상 셀 폼 구성 모델링부; 및 상기 생성된 사각형상의 픽셀 위치 값, 인식된 글자, 숫자 정보 및 매칭 결과와, 특정 기관에서 사용하는 문서 데이터의 폼을 저장하는 데이터베이스;를 포함하는 것을 특징으로 한다.
또한, 상기 실시 예에 따른 가상 셀 폼 구성 모델링부는 글자 객체의 좌측 헤더 영역과 상측 헤더 영역을 구분하되, 상기 구분된 좌측 헤더 영역과 상측 헤더 영역에 포함된 글자 객체 사이의 간격 및 크기를 산출하고, 상기 구분된 좌측 헤더 영역과 상측 헤더 영역을 기준으로 가상 셀 객체를 배치하는 것을 특징으로 한다.
또한, 상기 실시 예에 따른 가상 셀 폼 구성 모델링부는 좌측 상단에 배치된 가상 셀 객체와 숫자 객체를 매칭하되, 상기 매칭된 숫자 객체와 가상 셀 객체 사이의 기울기를 산출하고, 상기 산출된 기울기는 우측 하단에 배치된 가상 셀 객체와 숫자 객체의 매칭까지 반영되도록 하는 것을 특징으로 한다.
또한, 본 발명의 일 실시 예는 OCR 기반 문서 분석 방법으로서, i) 문서 분석 장치가 인식 대상 이미지를 수신하는 단계; ii) 상기 문서 분석 장치가 수신된 인식 대상 이미지에서 객체 탐지 모델을 이용하여 임의의 형식, 글자 및 숫자 객체 중 적어도 하나의 위치를 탐지하고, 탐지된 형식, 글자 및 숫자 객체의 둘레에 사각형상을 표시하여 글자 및 숫자 객체의 픽셀 위치 값을 생성하는 단계; iii) 상기 문서 분석 장치가 OCR 모델을 이용하여 탐지된 사각형상 픽셀 안에서 인식되는 글자 및 숫자 정보를 출력하는 단계; 및 iv) 상기 문서 분석 장치가 상기 생성된 글자 객체의 픽셀 위치 값을 기반으로 좌측 영역에 글자 객체가 배치되는 좌측 헤더 영역과 상측 영역에 글자 객체가 배치되는 상측 헤더 영역으로 구분하고, 상기 좌측 헤더 영역과 상측 헤더 영역을 기준으로 가상 셀 객체를 생성하여 배치하고, 상기 배치된 가상 셀 객체와 숫자 객체를 매칭시켜 행렬 정보를 기반으로 연결하여 상기 OCR 모델을 통해 인식된 글자 및 숫자 정보가 디스플레이되도록 최종 결과를 출력하는 단계;를 포함한다.
또한, 상기 실시 예에 따른 iv) 단계의 글자 객체의 좌측 및 상측 픽셀 위치를 기준으로 배치하는 단계는 iv-1) 문서 분석 장치가 글자 객체의 좌측 헤더 영역과 상측 헤더 영역을 구분하는 단계; iv-2) 상기 구분된 좌측 헤더 영역과 상측 헤더 영역에 포함된 글자 객체 사이의 간격 및 크기를 산출하는 단계; 및 iv-3) 상기 구분된 좌측 헤더 영역과 상측 헤더 영역을 기준으로 가상 셀 객체를 배치하는 단계를 포함하는 것을 특징으로 한다.
또한, 상기 실시 예에 따른 iv) 단계의 배치된 가상 셀 객체와 숫자 객체를 매칭시켜 행렬 정보를 기반으로 연결하는 단계는 iv-4) 상기 문서 분석 장치가 좌측 상단에 배치된 가상 셀 객체와 숫자 객체를 매칭하여 숫자 객체와 가상 셀 객체 사이의 기울기를 산출하는 단계; 및 iv-5) 상기 문서 분석 장치가 행렬 정보에 따라 순차적으로 이동하며 상기 산출된 기울기를 우측 하단에 배치된 가상 셀 객체와 숫자 객체의 매칭까지 반영하여 연결하는 단계를 포함하는 것을 특징으로 한다.
본 발명은 문서 상의 항목에 기재된 문자 및 숫자를 포함한 글자를 인식하고, 인식된 글자에 대한 상대적인 위치 정보에 기반하여 항목들 간의 연결관계를 분석함으로써, 인식된 숫자를 해당 항목에 매칭시킬 수 있는 장점이 있다.
또한, 본 발명은 인식된 항목들 간의 연결 및 상대적인 위치 관계를 기반으로 글자가 배치된 패턴을 분석하여 특정 문서 또는 영수증 등을 사용하는 병원, 보험사 등의 기관에서 사용한 폼 패턴과 비교함으로써, 신속하고 정확한 매칭이 가능한 장점이 있다.
또한, 본 발명은 병원, 보험사 등의 기관에서 사용한 폼 패턴과 비교하여 사용함으로써, OCR은 숫자만의 인식으로 단순화 시킬 수 있는 장점이 있다.
또한, 본 발명은 표준화된 이미지가 아니어도 다양한 학습 데이터를 이용한 딥러닝 학습을 통해 인식의 정확도를 향상시킬 수 있는 장점이 있다.
또한, 본 발명은 인식 대상 이미지가 기울진 상태로 입력되도 정확한 인식을 수행할 수 있는 장점이 있다.
또한, 본 발명은 OCR을 통해 인식된 정보에 대하여 신뢰 점수를 기반으로 정상 인식된 부분과, 틀린 부분 또는 의심되는 부분을 서로 다른 색상의 시각화 정보로 제공함으로써 검사자에 의한 확인 작업시간을 감소시킬 수 있는 장점이 있다.
또한, 본 발명은 병원, 약국 등에서 사용하는 다양한 포맷의 영수증에 대하여 정확한 정보의 인식이 가능한 장점이 있다.
또한, 본 발명은 병원, 보험사 등의 기관에서 사용하는 다양한 포맷의 영수증에 대하여 정확하고, 신뢰할 수 있는 사용정보를 제공할 수 있는 장점이 있다.
도 1은 본 발명의 제1 실시 예에 따른 OCR 기반 문서 분석 시스템의 구성을 나타낸 블록도.
도 2는 도 1의 실시 예에 따른 OCR 기반 문서 분석 시스템의 글자 위치 탐지를 설명하기 위한 예시도.
도 3은 도 2에 따른 글자 위치 탐지 결과를 나타낸 예시도.
도 4는 도 1의 실시 예에 따른 OCR 기반 문서 분석 시스템의 OCR 인식 결과를 나타낸 예시도.
도 5는 도 1의 실시 예에 따른 OCR 기반 문서 분석 시스템의 글자 위치 탐지 모델의 결과와 OCR 모델의 결과를 나타낸 예시도.
도 6은 도 1의 실시 예에 따른 OCR 기반 문서 분석 시스템의 연결 과정을 설명하기 위한 예시도.
도 7은 도 1의 실시 예에 따른 OCR 기반 문서 분석 시스템의 사각형상 연결을 나타낸 예시도.
도 8 내지 도 13은 도 1의 실시 예에 따른 OCR 기반 문서 분석 시스템의 자동 증강 모델링을 위한 학습 데이터를 나타낸 예시도.
도 14는 본 발명의 일 실시 예에 따른 OCR 기반 문서 분석 과정을 나타낸 흐름도.
도 15는 도 14의 실시 예에 따른 항목 매칭 과정을 나타낸 흐름도.
도 16은 도 14의 실시 예에 따른 항목 매칭 과정을 나타낸 다른 흐름도.
도 17은 도 14의 실시 예에 따른 항목 매칭 과정을 나타낸 또 다른 흐름도.
도 18은 본 발명의 제2 실시 예에 따른 OCR 기반 문서 분석 시스템의 구성을 나타낸 블록도.
도 19는 도 18의 실시 예에 따른 OCR 기반 문서 분석 시스템의 항목 DB 생성을 설명하기 위한 예시도.
도 20은 도 18의 실시 예에 따른 OCR 기반 문서 분석 시스템의 항목 DB를 나타낸 예시도.
도 21은 도 18의 실시 예에 따른 OCR 기반 문서 분석 시스템의글자 위치 탐지를 설명하기 위한 예시도.
도 22는 도 21의 실시 예에 따른 글자 위치 탐지 결과를 나타낸 예시도.
도 23은 도 18의 실시 예에 따른 OCR 기반 문서 분석 시스템의 NLP 과정을 나타낸 예시도.
도 24는 도 18의 실시 예에 따른 OCR 기반 문서 분석 시스템의OCR 인식 결과를 나타낸 예시도.
도 25는 도 18의 실시 예에 따른 OCR 기반 문서 분석 시스템의 연결을 통한 재구성 이미지를 나타낸 예시도.
도 26은 도 18의 실시 예에 따른 OCR 기반 문서 분석 시스템의 객체 탐지 박스의 연결 과정을 설명하기 위한 예시도.
도 27은 도 18의 실시 예에 따른 OCR 기반 문서 분석 시스템의 객체 탐지 박스의 연결 과정을 설명하기 위한 다른 예시도.
도 28은 본 발명의 제2 실시 예에 따른 OCR 기반 문서 분석 과정을 나타낸 흐름도.
도 29는 본 발명의 제3 실시 예에 따른 OCR 기반 문서 분석 시스템을 나타낸 블록도.
도 30은 제3 실시예에 따른 연결 과정을 설명하기 위한 예시도.
도 31은 도 30의 실시 예에 따른 OCR 기반 문서 분석 시스템의 재구성 이미지를 나타낸 예시도.
도 32는 본 발명의 제3 실시 예에 따른 OCR 기반 문서 분석 과정을 나타낸 흐름도.
도 33은 본 발명의 제4 실시 예에 따른 OCR 기반 문석 시스템을 나타낸 블록도.
도 34는 도 33의 실시 예에 따른 OCR 기반 문서 분석 시스템의 가상 셀 연결 과정을 설명하기 위한 예시도.
도 35는 도 33의 실시 예에 따른 OCR 기반 문서 분석 시스템의 가상 셀 연결 과정을 설명하기 위한 다른 예시도.
도 36은 도 33의 실시 예에 따른 OCR 기반 문서 분석 시스템의 위치 좌료를 기반으로 가상 셀을 연결 과정을 설명하기 위한 예시도.
도 37은 도 33의 실시 예에 따른 OCR 기반 문서 분석 시스템의 가상 셀을 이용한 최종 연결 상태를 나타낸 예시도.
도 38은 도 33의 실시 예에 따른 OCR 기반 문서 분석 시스템을 이용하여 밀린 문자 연결 상태를 나타낸 예시도.
도 39는 도 33의 실시 예에 따른 OCR 기반 문서 분석 시스템을 이용하여 휘어진 문자 연결 상태를 나타낸 예시도.
도 40은 본 발명의 제4 실시 예에 따른 OCR 기반 문서 분석 과정을 나타낸 흐름도.
도 41은 도 40의 실시 예에 따른 가상 셀 기반 항목 매칭 과정을 나타낸 흐름도.
이하에서는 본 발명의 바람직한 실시 예 및 첨부하는 도면을 참조하여 본 발명을 상세히 설명하되, 도면의 동일한 참조부호는 동일한 구성요소를 지칭함을 전제하여 설명하기로 한다.
본 발명의 실시를 위한 구체적인 내용을 설명하기에 앞서, 본 발명의 기술적 요지와 직접적 관련이 없는 구성에 대해서는 본 발명의 기술적 요지를 흩뜨리지 않는 범위 내에서 생략하였음에 유의하여야 할 것이다.
또한, 본 명세서 및 청구범위에 사용된 용어 또는 단어는 발명자가 자신의 발명을 최선의 방법으로 설명하기 위해 적절한 용어의 개념을 정의할 수 있다는 원칙에 입각하여 발명의 기술적 사상에 부합하는 의미와 개념으로 해석되어야 할 것이다.
본 명세서에서 어떤 부분이 어떤 구성요소를 "포함"한다는 표현은 다른 구성요소를 배제하는 것이 아니라 다른 구성요소를 더 포함할 수 있다는 것을 의미한다.
또한, "‥부", "‥기", "‥모듈" 등의 용어는 적어도 하나의 기능이나 동작을 처리하는 단위를 의미하며, 이는 하드웨어나 소프트웨어, 또는 그 둘의 결합으로 구분될 수 있다.
또한, "적어도 하나의" 라는 용어는 단수 및 복수를 포함하는 용어로 정의되고, 적어도 하나의 라는 용어가 존재하지 않더라도 각 구성요소가 단수 또는 복수로 존재할 수 있고, 단수 또는 복수를 의미할 수 있음은 자명하다 할 것이다.
또한, 각 구성요소가 단수 또는 복수로 구비되는 것은, 실시 예에 따라 변경가능하다 할 것이다.
이하, 첨부된 도면을 참조하여 본 발명의 일 실시 예에 따른 OCR 기반 문서 분석 시스템 및 방법의 바람직한 실시예를 상세하게 설명한다.
(제1 실시 예)
도 1은 본 발명의 제1 실시 예에 따른 OCR 기반 문서 분석 시스템의 구성을 나타낸 블록도이고, 도 2는 도 1의 실시 예에 따른 OCR 기반 문서 분석 시스템의 글자 위치 탐지를 설명하기 위한 예시도이며, 도 3은 도 2에 따른 글자 위치 탐지 결과를 나타낸 예시도이고, 도 4는 도 1의 실시 예에 따른 OCR 기반 문서 분석 시스템의 OCR 인식 결과를 나타낸 예시도이며, 도 5는 도 1의 실시 예에 따른 OCR 기반 문서 분석 시스템의 글자 위치 탐지 모델의 결과와 OCR 모델의 결과를 나타낸 예시도이고, 도 6은 도 1의 실시 예에 따른 OCR 기반 문서 분석 시스템의 연결 과정을 설명하기 위한 예시도이며, 도 7은 도 1의 실시 예에 따른 OCR 기반 문서 분석 시스템의 사각형상 연결을 나타낸 예시도이다.
도 1 내지 도 7을 참조하여 설명하면, 본 발명의 제1 실시 예에 따른 OCR 기반 문서 분석 시스템은 객체 탐지 모델을 이용하여 인식 대상 이미지에서 임의의 형식(form), 글자 및 숫자 중 적어도 하나의 객체의 위치를 탐지하되, 탐지된 형식, 글자 및 숫자 객체의 둘레를 따라 사각형상을 표시하여 사각형상의 픽셀 위치 값을 생성하고, OCR 모델을 이용하여 상기 사각형상의 픽셀 안에서 인식되는 글자 및 숫자 정보를 출력하고, 상기 생성된 사각형상의 픽셀 위치 값을 기반으로 인접한 모든 사각형상의 픽셀들을 연결하며, 상기 연결된 사각형상의 픽셀 위치에 상기 OCR 모델을 통해 인식된 글자 및 숫자 정보를 매칭시켜 디스플레이하는 문서 분석 장치(100)로 이루어질 수 있다.
또한, 문서 분석 장치(100)는 외부로부터 전송되는 인식 대상 이미지를 수신하는 입력부(110)를 포함하여 구성될 수 있다.
입력부(110)는 네트워크를 통해 접속된 외부 단말로부터 전송되는 이미지 또는 스캐너 등을 통해 스캐닝된 이미지 등을 수신하는 데이터 통신 수단으로 구성될 수 있다.
또한, 문서 분석 장치(100)는 입력부(110)를 통해 수신된 인식 대상 이미지에서 객체 탐지 모델을 이용하여 이미지에 포함된 임의의 형식(form), 글자 및 숫자 객체의 위치를 탐지하고, 탐지된 형식, 글자 및 숫자 객체의 둘레를 따라 사각형상을 표시하여 사각형상의 픽셀 위치 정보를 생성하는 객체 탐지 모델링부(120)를 포함하여 구성될 수 있다.
즉, 객체 탐지 모델링부(120)는 형식, 글자 및 숫자 객체에 대한 상대적인 위치의 인식을 수행하고, 형식, 글자 및 숫자 객체의 위치에 따른 배열을 확인할 수 있도록 탐지된 형식, 글자 및 숫자 객체의 둘레를 따라 사각형상을 표시하며, 표시된 사각형상의 픽셀 위치 값(좌표 정보)을 생성한다.
여기서, 객체 탐지 모델은 PSENet(Progressive Scale Expansion Network) 기반의 딥러닝 모델을 이용하여 문서 이미지를 포함한 학습 데이터로부터 형식, 글자 및 숫자 객체와, 그 위치를 탐지하고, 탐지율의 향상을 위해 학습을 수행할 수 있다.
또한, 객체 탐지 모델은 영수증의 원본 이미지를 기반으로 도 8과 같이, 문서의 임의의 부분이 접혀진 이미지, 도 9와 같이 문서의 위치가 임의의 각도로 기울어진 이미지, 도 10과 같이 임의의 조도를 갖는 밝기가 조절된 이미지, 도 11과 같이 문서에 표시된 내용이 선명하지 않고 끊어진 연결선을 갖는 이미지, 도 12와 같이 문서의 임의의 부분이 굴곡진 이미지, 도 13과 같이 숫자와 연결선이 겹쳐진 이미지 등을 기반으로 하는 학습 데이터를 이용하여 학습할 수 있다.
이와 같이, 다양한 환경, 예를 들어, 조명, 촬영각도, 촬영시 흔들림, 촬영구도, 사진 해상도 등 다양한 여건에서 촬영될 수 있는 이미지를 감안하여 원본 이미지와 비교하여 다양한 변화를 준 이미지들을 사전에 학습함으로써, 실제 환경에서 수신되는 이미지들에 대한 탐지율 또는 인식율을 향상시킬 수 있다.
한편, 본 발명에서는 설명의 편의를 위해, 인식 대상 이미지를 병원 영수증과 관련된 이미지를 실시 예로 설명하지만 이에 한정되는 것은 아니고, 약국 영수증, 세금계산서, 견적서, 청구서, 거래 명세서, 각종 계산서 및 영수증 등을 포함할 수 있다.
또한, 객체 탐지 모델은 자동 증강(Auto Augmentation)을 통해 다양한 변화를 준 이미지들을 기반으로 탐지를 수행함에 있어서 최적의 규칙을 찾을 수도 있다.
또한, 객체 탐지 모델은 탐지된 형식, 글자 및 숫자의 객체에 대하여 사각형상의 픽셀을 설정하고, 설정된 픽셀의 위치 값을 생성할 수 있다.
즉, 입력된 문서 이미지(200)에서 임의의 탐지 영역(210)으로부터 탐지된 예를 들면, 글자 객체(211)에 대하여 외부면에 사각형상의 박스(212)로 구성된 픽셀 위치 값을 생성하고, 인식된 객체(213)에 대한 정보를 글자 탐지 결과(220)에 표시함으로써, 사각형상 기반의 패턴 인식이 가능하도록 한다.
본 실시 예에서는 설명의 편의를 위해 글자 객체로 설명하지만, 이에 한정되는 것은 아니고, 숫자, 영수증의 폼을 구성하는 형식(form)을 객체로 포함할 수 있음은 당업자에게 있어서 자명할 것이다.
또한, 사각형상의 박스(212)는 바람직하게는 직사각형(rectangular)으로 구성될 수 있다.
또한, 형식의 둘레를 따라 표시된 사각형상의 구성(또는 배열) 패턴에 근거하여 후술되는 폼 구성 모델링부(140)가 미리 저장된 기관(병원)의 영수증 구성과 비교하여 어떤 기관의 영수증인지 구분할 수도 있다.
여기서, 형식은 문서 테이블을 구성하는 폼에서 하나의 셀(Cell)로서, 직사각형으로 이루어질 수 있다.
또한, 문서 분석 장치(100)는 객체 탐지 모델링부(120)에서 탐지된 형식, 글자 및 숫자 객체에 대해 OCR 모델을 이용하여 글자 및 숫자를 인식하는 OCR 모델링부(130)를 포함하여 구성될 수 있다.
여기서, OCR 모델링부(130)는 이미지 기반의 텍스트 문서를 자동으로 감지하여 인식하는 구성으로서, 공지의 OCR 모델을 사용하여 구성될 수 있다.
또한, OCR 모델링부(130)는 OCR 인식 결과(300)에 대하여 인식된 예측 정보(310)와, 예측 정보(310)에 대한 신뢰 점수(320)를 산출하여 함께 제공할 수 있다.
여기서, 예측 정보(310)는 인식된 객체에 포함될 글자 및 숫자를 나타낸 것이고, 신뢰 점수(320)는 OCR을 통해 인식하는 과정에서 내용이 선명하지 않거나, 연결된 부분이 끊어진 경우 등을 반영하여 전체부분에서 인식된 부분의 비율을 산출한 인식률일 수 있다.
또한, 문서 분석 장치(100)는 탐지된 형식, 글자 및 숫자 객체의 위치를 기반으로 인접한 형식, 모든 글자 및 숫자 객체들의 사각형상 픽셀들을 연결하고, 상기 연결된 사각형상의 픽셀 위치에 상기 OCR 모델을 통해 인식된 글자 및 숫자 정보를 매칭시켜 디스플레이되도록 하는 폼 구성 모델링부(140)를 포함하여 구성될 수 있다.
즉, 폼 구성 모델링부(140)는 객체 탐지 모델링부(120)의 탐지 결과(220)와, OCR 모델링부(130)의 예측 정보(310)를 기반으로 하여 인식한 예측 정보들이 어떤 항목인지 매칭되도록 한다.
또한, 폼 구성 모델링부(140)는 객체 탐지 모델링부(120)의 탐지 결과(220)와, OCR 모델링부(130)의 예측 정보(310)를 매칭하기 위해, 인접한 모든 글자 및 숫자 객체들의 사각형상 픽셀들을 연결한다.
또한, 일반적인 영수증 등의 회계 관련 문서는 글자로 이루어진 항목이 주로 상측과 좌측에 배치되므로, 형식의 둘레를 따라 표시한 사각형상의 픽셀들에 대한 연결을 위해, 시작 위치를 임의의 숫자 정보를 갖는 사각형상의 픽셀로 하고, 사각형상의 픽셀 위치를 시작위치로 하여 좌측 방향과 상측 방향으로 이동하며 모든 사각형상의 픽셀(위치)들을 검색한다.
또한, 폼 구성 모델링부(140)는 시작 위치로부터 가장 가까운 좌측의 사각형상 픽셀과 상측의 사각형상 픽셀을 우선 연결하고, 이후, 인접한 모든 객체들을 연결하는 것이 바람직하다.
또한, 폼 구성 모델링부(140)는 상술된 이동 및 검색 과정을 반복하여 모든 사각형상 픽셀들의 검색을 진행하고, 좌측과 상측에 텍스트, 예를 들면, 글자 정보(항목)가 포함된 사각형상 픽셀이 나올때까지 이동, 검색을 수행한다.
또한, 폼 구성 모델링부(140)는 글자 정보가 포함된 사각형상 픽셀이 나오면, 검색된 모든 사각형상 픽셀을 연결한다.
즉, 도 6을 참조하면, 문서 이미지(400)에서 기준 객체 박스(410)의 좌측과 상측으로 이동 및 검색을 수행하여 다음 객체의 사각형상 박스와 연결을 수행하고, 좌측에 위치한 좌측 객체 박스(420)가 글자이거나 또는 숫자이면 좌측 연결선(440)을 통해 연결한다.
또한, 상측으로 이동, 검색 및 연결을 통해 상측 객체 사각형상 박스와 연결을 수행하고, 상측에 위치한 상측 객체 박스(430)가 글자 정보(항목) 또는 숫자이면, 상측 연결선(441)을 통해 연결한다.
계속해서, 폼 구성 모델링부(140)는 인접한 사각형상 픽셀들의 연결 후, 숫자 정보로부터 시작하여 좌측과 상측의 글자 정보(항목)를 찾으면, 상기 사각형상의 픽셀 위치에는 인식된 글자와 숫자 정보를 매칭시켜 디스플레이되도록 한다.
이때, 폼 구성 모델링부(140)는 데이터베이스(150)에 저장된 특정 기관 문서의 박스 배열 정보와 비교하여 매칭되는지 확인할 수 있다.
여기서, 특정 기관은 병원, 약국, 회사 등, 영수증 및 회계 관련 문서를 임의의 폼으로 발행하는 모든 곳을 포함할 수 있다.
또한, 도 7은 사각형상 픽셀의 연결상태를 나타낸 도면으로서, 문서에 포함된 사각형상을 객체로 인식하여 연결한 것을 나타낸다.
즉, 폼 구성 모델링부(140)는 객체 탐지 모델을 통해 탐지된 형식과 상기 탐지된 형식의 상대적 위치를 기반으로 생성한 사각형상의 픽셀 위치 값과, OCR 모델을 통해 인식된 숫자 정보를 기반으로 숫자 정보를 갖는 임의의 사각형상의 픽셀 위치를 시작 위치로 하여 좌측 방향과 상측 방향으로 이동하고, 이동을 통해 검색되는 모든 사각형상의 픽셀들을 연결한다.
또한, 폼 구성 모델링부(140)는 연결된 사각형상의 배열 정보를 분석하여 데이터베이스(150)에 저장된 특정 기관 문서의 배열 정보와 비교한다.
비교 결과, 분석된 배열 정보가 특정 기관 문서의 배열 정보와 매칭되면, 폼 구성 모델링부(140)는 특정 기관 문서의 사각형상 픽셀 위치에 OCR 모델에서 인식된 숫자 정보를 매칭시켜 디스플레이되도록 한다.
또한, 폼 구성 모델링부(140)는 객체 탐지 모델을 통해 탐지된 형식과 상기 탐지된 형식의 상대적 위치를 기반으로 생성한 사각형상의 픽셀 중심점에 마커(520)를 표시하고, OCR 모델을 통해 인식된 숫자 정보를 기반으로 숫자 정보를 갖는 임의의 사각형상의 픽셀 위치를 시작 위치로 하여 좌측 방향과 상측 방향으로 이동하고, 이동을 통해 검색되는 모든 사각형상의 픽셀들을 연결한다.
또한, 폼 구성 모델링부(140)는 연결된 사각형상의 픽셀 중심점에 마커(520)를 표시하고, 각 마커(520)의 위치 정보를 분석하여 데이터베이스(150)에 저장된 특정 기관 문서의 배열 정보와 비교한다.
비교 결과, 특정 기관 문서의 배열 정보가 매칭되면, 폼 구성 모델링부(140)는 특정 기관 문서의 사각형상 픽셀 위치에 OCR 모델에서 인식된 숫자 정보를 매칭시켜 디스플레이되도록 한다.
또한, 문서 분석 장치(100)는 폼 구성 모델링부(140)에서 출력되는 재구성 이미지, 특정 기관에서 사용하는 문서 데이터의 폼(또는 형식) 등을 저장하는 데이터 베이스(150)를 포함하여 구성될 수 있다.
다음은 본 발명의 제1 실시 예에 따른 OCR 기반 문서 분석 방법을 설명한다.
도 14는 본 발명의 제1 실시 예에 따른 OCR 기반 문서 분석 과정을 나타낸 흐름도이고, 도 15는 도 14의 실시 예에 따른 항목 매칭 과정을 나타낸 흐름도이다.
도 1, 도 14 및 도 15를 참조하면, 문서 분석 장치(100)는 네트워크를 통해 연결된 외부 단말 또는 팩스 등을 통해 인식 대상 영수증의 이미지를 수신(S100)한다.
문서 분석 장치(100)는 수신된 인식 대상 영수증의 이미지에서 객체 탐지 모델을 이용하여 임의의 형식, 글자 및 숫자 객체와 그 위치를 탐지하고, 탐지된 형식, 글자 및 숫자 객체의 둘레를 따라 사각형상을 표시하여 사각형상의 픽셀 위치 정보를 생성하는 글자 탐지 단계를 수행(S200)한다.
또한, S200 단계에서, 객체 탐지 모델은 PSENet(Progressive Scale Expansion Network) 기반의 딥러닝 모델을 이용하여 문서 이미지를 포함한 학습 데이터로부터 형식, 글자 및 숫자 객체와, 그 위치를 탐지하고, 탐지율의 향상을 위해 학습을 수행할 수 있다.
또한, 객체 탐지 모델은 원본 이미지, 문서의 임의의 부분이 접혀진 이미지, 문서의 위치가 임의의 각도로 기울어진 이미지, 임의의 조도를 갖는 밝기가 조절된 이미지, 문서에 표시된 내용이 선명하지 않고 끊어진 연결선을 갖는 이미지, 문서의 임의의 부분이 굴곡진 이미지, 숫자와 연결선이 겹쳐진 이미지를 기반으로 학습 데이터를 학습할 수 있다.
계속해서, 문서 분석 장치(100)는 탐지된 형식, 글자 및 숫자 객체에 대한 사각형상 픽셀 안에서, OCR 모델을 이용하여 글자 및 숫자 정보를 인식하는 OCR 인식 단계(S300)를 수행한다.
S300 단계를 수행한 다음, 문서 분석 장치(100)는 탐지된 형식, 글자 및 숫자 객체의 사각형상 픽셀 위치를 기반으로 인접한 모든 사각형상 픽셀들을 연결하고, 연결된 사각형상 픽셀들의 글자 및 숫자 정보를 매칭하는 단계(S400)를 수행한다.
S400 단계를 더욱 상세하게 설명하면, 문서 분석 장치(100)는 생성된 사각형상의 픽셀 위치 값과, 상기 인식된 글자 및 숫자 정보를 기반으로 숫자 정보를 갖는 임의의 사각형상의 픽셀 위치를 시작 위치로 하여 글자 정보가 검색될 때까지 좌측 방향과 상측 방향으로 이동(S410)한다.
이때, 시작 위치로부터 가장 가까운 좌측의 사각형상 픽셀과 상측의 사각형상 픽셀을 우선 연결하고, 이후, 인접한 모든 사각형상 픽셀들을 좌측방향 또는 우측방향으로 이동하며, 글자 정보(항목)가 나올때 까지 숫자 객체들을 검색한다.
계속해서, 글자 정보가 검색되면 이동중에 검색된 모든 사각형상의 픽셀들을 연결(S411)한다.
또한, 문서 분석 장치(100)는 연결된 사각형상의 픽셀 위치에 OCR 모델을 통해 인식된 글자와 숫자 정보를 매칭시켜 디스플레이(S412)되도록 하고, 데이터베이스(150)에 저장한다.
한편, S400 단계에서, 문서 분석 장치(100)는 연결된 사각형상에 대한 배열 정보를 분석할 수도 있다.
즉, 생성된 사각형상의 픽셀 위치 값과, 인식된 숫자 정보를 기반으로 숫자 정보를 갖는 임의의 사각형상의 픽셀 위치를 시작 위치로 하여 좌측 방향과 상측 방향으로 이동하고, 이동중에 검색되는 모든 사각형상의 픽셀들을 연결(S420)한다.
S420 단계를 통해 연결된 사각형상의 배열 정보를 분석하여 미리 저장된 특정 기관 문서의 배열 정보와 비교(S421)한다.
S421 단계에서의 비교를 통해, 특정 기관 문서의 배열 정보와 매칭되는지 판단(S422)하고, 분석된 사각형상의 배열 정보가 매칭되면, 특정 기관 문서의 사각형상 픽셀 위치에 인식된 숫자 정보를 매칭시켜 디스플레이(S423)되도록 한다.
한편, S422의 판단 결과, 매칭되는 문서의 배열 정보가 없으면, S410 단계를 수행할 수 있다.
또한, S400 단계에서, 문서 분석 장치(100)는 연결된 사각형상 픽셀의 배열 정보를 마커를 통해 분석할 수도 있다.
즉, 문서 분석 장치(100)는 생성된 사각형상의 픽셀의 중심점에 마커(520)를 표시(S430)한다.
또한, 문서 분석 장치(100)는 인식된 숫자 정보를 기반으로 숫자 정보를 갖는 임의의 사각형상의 픽셀 위치를 시작 위치로 하여 좌측 방향과 상측 방향으로 이동하고, 이동중에 검색되는 모든 사각형상의 픽셀들을 연결(S431)한다.
또한, 문서 분석 장치(100)는 마커(520)를 이용한 위치 정보를 기반으로 사각형상 픽셀의 구조 정보를 분석(S432)한다.
S430 단계의 분석을 통해 사각형상 픽셀의 배열(또는 구조)이 데이터베이스(150)에 저장된 특정 기관 문서의 배열 정보와 매칭되는 문서가 있는지 판단(S433)한다.
S433 단계의 판단 결과, 마커의 배열 정보와 특정 기관 문서의 마커 배열 정보가 매칭되면, 특정 기관 문서의 항목을 검색(S434)하고, 검색된 항목의 위치에 OCR 모델에서 인식된 숫자 정보를 매칭시켜 디스플레이(S435)되도록 한다.
한편, S433의 판단 결과, 매칭되는 문서의 배열 정보가 없으면, S410 단계를 수행할 수 있다.
따라서, 문서 상의 항목에 기재된 사각형상, 문자 및 숫자를 포함한 글자를 인식하고, 인식된 사각형상, 글자에 대한 상대적인 위치 정보에 기반하여 항목들 간의 연결관계를 분석함으로써, 인식된 숫자를 해당 항목에 매칭시킬 수 있다.
또한,인식된 항목들 간의 연결 및 상대적인 위치 관계를 기반으로 글자가 배치된 패턴을 분석하여 특정 문서 또는 영수증 등을 사용하는 병원, 보험사 등의 기관에서 사용한 폼 패턴과 비교함으로써, 신속하고 정확한 매칭이 가능하다.
또한, 병원, 보험사 등의 기관에서 사용한 폼 패턴과 비교하여 사용함으로써, OCR은 숫자만의 인식으로 단순화 시킬 수 있다.
(제2 실시 예)
도 18은 본 발명의 제2 실시 예에 따른 OCR 기반 문서 분석 시스템의 구성을 나타낸 블록도이다.
도 18을 참조하면, 본 발명의 제2 실시 예에 따른 OCR 기반 문서 분석 시스템은 임의의 문서로부터 미리 설정된 글자에 대한 항목 DB(300') 정보를 생성 및 저장하고, 객체 탐지 모델을 이용하여 인식 대상 이미지로부터 글자 및 숫자의 객체와 위치를 탐지하며, 탐지된 글자 및 숫자의 객체에 대해 OCR 모델을 이용하여 글자 및 숫자를 인식하고, 인식된 글자에 대하여 항목 DB(300') 정보와 비교를 통해 교정 여부를 결정하며, 인식된 글자가 교정됨에 따라 상기 인식된 글자, 교정된 글자 및 숫자가 반영된 재구성 폼을 구성하는 문서 분석 장치(100')로 이루어질 수 있다.
또한, 문서 분석 장치(100')는 인식 대상 이미지를 수신하는 입력부(110')를 포함하여 구성될 수 있다.
입력부(110')는 네트워크를 통해 접속된 외부 단말로부터 전송되는 이미지 또는 스캐너 등을 통해 스캐닝된 이미지 등을 수신하는 데이터 통신 수단으로 구성될 수 있다.
또한, 문서 분석 장치(100')는 인식 대상 이미지에 포함된 글자에 대하여 임의의 문서로부터 미리 설정된 글자에 대한 항목 DB(300', 도 20 참조)정보를 생성하는 항목 DB 생성부(120')를 포함하여 구성될 수 있다.
항목 DB 생성부(120')는 도 19와 같이, 예를 들어 병원 영수증 등의 문서(200')에 고정으로 포함되어, 청구 내역, 진료 내역 등의 텍스트로 표시된 항목(210')에 대한 정보를 분석한다.
또한, 항목 DB 생성부(120')는 도 19에서 분석된 항목에 대하여 도 20과 같은 항목 DB(300')를 생성하여 데이터베이스(160')에 저장되도록 한다.
본 발명에서는 설명의 편의를 위해, 인식 대상 이미지를 병원 영수증과 관련된 이미지를 실시 예로 설명하지만 이에 한정되는 것은 아니고, 약국 영수증, 세금계산서, 견적서, 청구서, 거래 명세서, 각종 계산서 및 영수증 등을 포함할 수 있다.
또한, 문서 분석 장치(100')는 입력부(110')를 통해 수신된 인식 대상 이미지에서 객체 탐지 모델을 이용하여 이미지에 포함된 임의의 형식(form), 글자 및 숫자 객체의 위치를 탐지하고, 탐지된 형식, 글자 및 숫자 객체의 둘레를 따라 사각형상을 표시하여 사각형상의 픽셀 위치 정보를 생성하는 객체 탐지 모델링부(130')를 포함하여 구성될 수 있다.
즉, 객체 탐지 모델링부(130')는 형식, 글자 및 숫자 객체에 대한 상대적인 위치의 인식을 수행하고, 형식, 글자 및 숫자 객체의 위치에 따른 배열을 확인할 수 있도록 탐지된 형식, 글자 및 숫자 객체의 둘레를 따라 사각형상을 표시하며, 표시된 사각형상의 픽셀 위치 값(좌표 정보)을 생성한다.
여기서, 객체 탐지 모델은 PSENet(Progressive Scale Expansion Network) 기반의 딥러닝 모델을 이용하여 문서 이미지를 포함한 학습 데이터로부터 형식, 글자 및 숫자 객체와, 그 위치를 탐지하고, 탐지율의 향상을 위해 학습을 수행할 수 있다.
즉, 영수증의 원본 이미지를 기반으로 문서의 임의의 부분이 n 등분으로 접혀진 이미지, 문서의 위치가 임의의 각도로 기울어진 이미지, 임의의 조도를 갖는 밝기가 조절된 이미지, 문서에 표시된 내용이 선명하지 않고 끊어진 연결선을 갖는 이미지, 문서의 임의의 부분이 굴곡진 이미지, 숫자와 연결선이 겹쳐진 이미지 등을 기반으로 학습 데이터를 학습할 수 있다.
이와 같이, 다양한 환경, 예를 들어, 조명, 촬영각도, 촬영시 흔들림, 촬영구도, 사진 해상도 등 다양한 여건에서 촬영될 수 있는 이미지를 감안하여 원본 이미지와 비교하여 다양한 변화를 준 이미지들을 사전에 학습함으로써, 실제 환경에서 수신되는 이미지들에 대한 탐지율 또는 인식율을 향상시킬 수 있다.
한편, 본 발명에서는 설명의 편의를 위해, 인식 대상 이미지를 병원 영수증과 관련된 이미지를 실시 예로 설명하지만 이에 한정되는 것은 아니고, 약국 영수증, 세금계산서, 견적서, 청구서, 거래 명세서, 각종 계산서 및 영수증 등을 포함할 수 있다.
또한, 객체 탐지 모델은 자동 증강(Auto Augmentation)을 통해 다양한 변화를 준 이미지들을 기반으로 탐지를 수행함에 있어서 최적의 규칙을 찾을 수도 있다.
또한, 객체 탐지 모델은 탐지된 형식, 글자 및 숫자의 객체에 대하여 사각형상의 픽셀을 설정하고, 설정된 픽셀의 위치 값을 생성할 수 있다.
즉, 도 21과 같이, 입력된 문서 이미지(400')에서 임의의 탐지 영역(410')으로부터 탐지된 글자 객체(411')에 대하여 외부 둘레면을 따라 사각형상의 박스로 표시한다.
또한, 객체 탐지 모델은 인식된 객체에 대한 정보를 도 22와 같이, 객체 탐지 결과(420')로 표시함으로써, 사각형상 기반의 패턴 인식도 가능하다.
본 실시 예에서는 설명의 편의를 위해 글자 객체로 설명하지만, 이에 한정되는 것은 아니고, 숫자, 영수증의 폼을 구성하는 형식(form)을 객체로 포함할 수 있음은 당업자에게 있어서 자명할 것이다.
또한, 형식의 둘레를 따라 표시된 사각형상의 구성(또는 배열) 패턴에 근거하여 후술되는 폼 구성 모델링부(150)가 미리 저장된 기관(병원)의 영수증 구성과 비교하여 어떤 기관의 영수증인지 구분할 수도 있다.
여기서, 형식은 문서 테이블을 구성하는 폼에서 하나의 셀(Cell)로서, 직사각형으로 이루어질 수 있다.
또한, 문서 분석 장치(100')는 객체 탐지 모델링부(130)에서 탐지된 형식, 글자 및 숫자 객체에 대해 OCR 모델을 이용하여 글자 및 숫자를 인식하는 OCR 모델링부(140')를 포함하여 구성될 수 있다.
여기서, OCR 모델링부(140')는 이미지 기반의 텍스트 문서를 자동으로 감지하여 인식하는 구성으로서, 공지의 OCR 모델을 사용하여 구성될 수 있다.
또한, OCR 모델링부(140')는 OCR 모델을 통한 OCR 인식 결과에 대하여 인식된 예측 정보와, 예측 정보에 대하여 후술되는 폼 구성 모델링부에서 산출된 신뢰 점수에 기반한 신뢰 점수를 함께 제공할 수 있다.
여기서, 예측 정보는 인식된 객체에 포함될 글자 및 숫자를 나타낸 것이고, 신뢰 점수는 OCR을 통해 인식하는 과정에서 내용이 선명하지 않거나, 연결된 부분이 끊어진 경우 등을 반영하여 전체부분에서 인식된 부분의 비율을 산출한 인식률일 수 있다.
또한, 문서 분석 장치(100')는 인식된 글자 정보를 항목 DB(300')와 비교하고, 인식된 글자를 항목 DB(300')의 글자 정보로 교정함에 따라 숫자 정보를 갖는 임의의 사각형상의 픽셀 위치를 시작 위치로 하여 좌측 방향과 상측 방향으로 이동하되, 글자 정보가 검색되면 이동중에 검색된 모든 사각형상의 픽셀들을 연결하고, 상기 연결된 사각형상의 픽셀 위치에 상기 OCR 모델을 통해 교정된 글자 및 숫자 정보를 매칭시켜 디스플레이되도록 하는 폼 구성 모델링부(150')를 포함하여 구성될 수 있다.
폼 구성 모델링부(150')는 인식 대상 이미지에서 인식되는 글자 정보와 비교하기 위해, 임의의 문서, 예를 들면, 병원 영수증, 약국 영수증, 거래명세서, 세금 계산서 등에서 사용되는 글자(항목) 정보를 정의한 항목 DB(300')를 생성할 수 있다.
또한, 폼 구성 모델링부(150')는 도 23과 같이, 인식된 글자 객체(411')에 대한 자연어 처리(Natural Language Processing, NLP)를 통해 인식된 글자에 대하여 형태소, 또는 분절음 별로, NLP 객체(411a')를 분석하고, 분석된 결과와 항목 DB(300') 정보 사이의 비교를 기반으로 인식된 글자에 대한 신뢰 점수를 산출하여 출력한다.
예를 들어, 인식된 글자가 "MRI 진단-"인 경우, 항목 DB(300')에 저장된 항목에 대한 정보를 검색한 다음, 검색된 항목에 대응하는 항목 DB(300') 정보와의 비교를 통해 신뢰 점수를 산출한다.
즉, 폼 구성 모델링부(150')는 병원 영수증에 새로운 항목이 인식되거나 OCR의 실수로 인해 오탈자, 미인식자 등이 발생하더라도, NLP를 이용하여 상황에 맞게 처리할 수 있도록 한다.
또한, 폼 구성 모델링부(150')에서 산출된 글자에 대한 신뢰 점수는 도 24와 같이, OCR 인식 결과(420')에 인식된 예측 정보(421')와, 폼 구성 모델링부(150')에서 예측 정보(421')에 대하여 산출된 신뢰 점수(422')를 제공할 수도 있다.
신뢰 점수(422')가 일정 값 이상이면, 사용자가 인식이 잘 이루어진 것으로 판단할 수 있도록 하고, 신뢰 점수(422')가 일정 값 이하이면, 사용자가 인식된 결과에 대하여 잘못 인식된 것으로 판단할 수 있도록 한다.
또한, 폼 구성 모델링부(150')는 인식된 사각형상 픽셀의 위치를 기반으로 임의의 시작 위치에서 좌측방향 및 상측방향으로 인접한 모든 글자 및 숫자들의 사각형상 픽셀들을 연결하여 도 25와 같이, 재구성된 폼(500')을 생성한다.
한편, 폼 구성 모델링부(150')는 숫자 객체의 박스 크기에 대하여 가로, 세로 길이가 인접한 다른 박스의 가로, 세로 길이와 동일하거나 또는 다른 박스의 가로, 세로 길이에 포함되면 연결되도록 한다.
도 26을 참조하여 더욱 상세하게 설명하면, 숫자로 인식된 시작 객체 박스(600)를 기준으로 시작 객체 박스(600)의 횡방향 크기(700) 및 종방향 크기(710)를 좌측 객체 박스(610)와 상측 객체 박스(620)의 횡방향 크기(700a) 및 종방향 크기(710a)와 비교하여 동일하거나 또는 좌측 객체 박스(610)와 상측 객체 박스(620)의 횡방향 크기 및 종방향 크기에 포함되면 좌측 연결선(800) 및 상측 연결선(810)으로 연결하여 표시될 수 있도록 한다.
본 실시 예에서는 설명의 편의를 위해 시작 위치를 중앙부분에 위치한 숫자 객체를 시작 객체 박스(600)로 설명하였지만, 시작 객체 박스(600)의 우측에 위치한 우측 객체 박스(600a), 시작 객체 박스(600)의 하측에 위치한 하측 객체 박스(630)를 시작 위치로 설정할 수 있고, 예를 들어 우측 객체 박스(600a)를 시작 위치로 설정하면, "공단 부담금"이 인식된 글자 객체가 상측 객체 박스(620a)가 될 수 있다.
또한, 폼 구성 모델링부(150')는 상기된 과정을 반복하여 가장 가까운 좌측과 상측만을 연결하고, 연결 후 숫자로부터 시작하여 좌측과 상측에 텍스트, 예를 들면, 글자 객체(항목)가 나올때까지 이동 및 검색을 통해 연결한다.
또한, 폼 구성 모델링부(150')는 재구성 폼의 항목이 교정된 글자, 즉 항목 DB(300')에서 선택된 글자들로만 구성되면, OCR 모델링부(140')의 OCR 모델을 통해 인식된 숫자만 인식하고, 인식된 숫자와 항목을 매칭시킬 수도 있다.
또한, 문서 분석 장치(100')는 폼 구성 모델링부(150')에서 재구성 폼과, 재구성된 폼으로 이루어진 재구성 이미지와, 특정 기관에서 사용하는 문서 데이터의 폼과 항목 DB를 저장하는 데이터 베이스(160')를 포함하여 구성될 수 있다.
여기서, 특정 기관은 병원, 약국, 회사 등, 영수증 및 회계 관련 문서를 임의의 폼으로 발행하는 모든 곳을 포함할 수 있다.
또한, 폼 구성 모델링부(150')는 도 27과 같이 기울어진 상태의 이미지가 입력된 경우, 기울어진 상태에서 좌측으로 계속 이동할 경우 다른 라인의 항목과 연결될 수 있으므로, 빈칸 감지 모델을 이용하여 사각형상 픽셀에 정보가 있는지 여부를 확인할 수 있다.
즉, 폼 구성 모델링부(150')는 임의의 숫자 정보를 포함한 제1 사각형상 픽셀(910)로부터 좌측방향으로 이동하고, 이때, 제2 사각형상 픽셀(920)이 빈칸이면, 사각형상 픽셀 간에 연결이 이루어지도록 하여 사각형상 픽셀 간에 잘못 연결되는 것을 방지할 수 있도록 한다.
다음은 본 발명의 제2 실시 예에 따른 OCR 기반 문서 분석 방법을 설명한다.
도 28은 본 발명의 제2 실시 예에 따른 OCR 기반 문서 분석 과정을 나타낸 흐름도이다.
도 18 내지 도 28을 참조하면, 문서 분석 장치(100')는 네트워크를 통해 연결된 외부 단말 또는 팩스 등을 통해 인식 대상 영수증의 이미지를 수신(S100')한다.
또한, 문서 분석 장치(100')는 수신된 인식 대상 영수증의 이미지에서 객체 탐지 모델을 이용하여 임의의 형식, 글자 및 숫자 객체와 그 위치를 탐지하고, 탐지된 형식, 글자 및 숫자 객체의 둘레를 따라 사각형상을 표시하여 사각형상의 픽셀 위치 정보를 생성하는 객체 탐지 단계를 수행(S200')한다.
또한, S200' 단계에서, 객체 탐지 모델은 PSENet(Progressive Scale Expansion Network) 기반의 딥러닝 모델을 이용하여 문서 이미지를 포함한 학습 데이터로부터 형식, 글자 및 숫자 객체와, 그 위치를 탐지하고, 탐지율의 향상을 위해 학습을 수행할 수 있다.
또한, 객체 탐지 모델은 원본 이미지, 문서의 임의의 부분이 접혀진 이미지, 문서의 위치가 임의의 각도로 기울어진 이미지, 임의의 조도를 갖는 밝기가 조절된 이미지, 문서에 표시된 내용이 선명하지 않고 끊어진 연결선을 갖는 이미지, 문서의 임의의 부분이 굴곡진 이미지, 숫자와 연결선이 겹쳐진 이미지를 기반으로 학습 데이터를 학습할 수 있다.
계속해서, 문서 분석 장치(100')는 탐지된 형식, 글자 및 숫자 객체에 대한 사각형상 픽셀 안에서, OCR 모델을 이용하여 글자 및 숫자 정보를 인식하는 OCR 인식 단계(S300')를 수행한다.
S300' 단계를 수행한 다음, 문서 분석 장치(100')는 임의의 문서로부터 고정화 되어 있는 텍스트 정보 즉, 항목에 대한 글자 정보를 항목 DB(300) 정보로 생성하고, 생성된 항목 DB(300') 정보는 데이터베이스(160')에 저장(S400')한다.
상기 인식된 글자 정보를 항목 DB(300')와 비교(S500')하고, 인식된 글자를 항목 DB(300')의 글자 정보로 교정함에 따라 교정 여부를 결정하기 위한 오탈자 또는 미인식자의 유무를 판단(S600')한다.
S600' 단계의 판단 결과, 오탈자 또는 미인식자가 있으면, 문서 분석 장치(100')는 NLP 기반의 교정을 수행(S700')한다.
즉, S700' 단계에서 문서 분석 장치(100')는 자연어 처리(Natural Language Processing, NLP)를 통해 탐지된 글자에 대하여 분석한다.
또한, S700' 단계에서 문서 분석 장치(100')는 분석된 글자와 항목 DB(300') 정보 사이의 비교를 기반으로 분석된 글자에 대한 신뢰 점수를 산출하여 출력할 수도 있다.
계속해서, 문서 분석 장치(100')는 숫자 정보를 갖는 임의의 사각형상의 픽셀 위치를 시작 위치로 하여 좌측 방향과 상측 방향으로 이동하되, 글자 정보가 검색되면 이동중에 검색된 모든 사각형상의 픽셀들을 연결하고, 연결된 사각형상의 픽셀 위치에 상기 OCR 모델을 통해 교정된 글자 및 숫자 정보가 매칭되도록(S800')한다.
즉, 문서 분석 장치(100')는 시작 위치를 숫자 객체로 하여 시작 위치의 좌측 방향과 상측 방향으로 이동 및 연결한다.
이때, 시작 위치로부터 가장 가까운 좌측과 상측만을 우선 연결하고, 이후, 인접한 모든 객체들을 연결하며, 글자 객체(항목)가 나올때 까지 숫자 객체들을 검색하며 이동한다.
또한, 글자 객체를 포함한 항목 검색이 완료되면, 문서 분석 장치(100')는 인식된 글자 및 교정된 글자와 숫자를 항목 별로 대응하여 매칭되도록 한다.
또한, 문서 분석 장치(100')는 인식된 글자 및 교정된 글자를 반영하여 재구성된 폼을 기반으로 재구성 이미지의 최종 결과를 출력(S900')하고, 재구성된 폼과 재구성 이미지는 데이터베이스(150')에 저장되도록 한다.
따라서, 문서 상의 항목에 기재된 문자 및 숫자를 포함한 글자를 인식하고, 인식된 글자에 대한 상대적인 위치 정보에 기반하여 문서에 고정화되어 있는 글자를 포함한 항목들 간의 매칭을 통해 신속 속도를 증가시킬 수 있다.
또한, 병원, 보험사 등의 기관에서 사용한 고정화된 용어들과 비교하여 사용함으로써, OCR은 숫자만의 인식으로 단순화 시킬 수 있다.
또한, 표준화된 이미지가 아니어도 다양한 학습 데이터를 이용한 딥러닝 학습을 통해 인식의 정확도를 향상시킬 수 있고, 병원, 약국 등에서 사용하는 다양한 포맷의 영수증에 대하여 정확한 정보의 인식이 가능하며, 새로운 항목에 대한 인식과 예측값의 정확도를 제공함으로써, 신뢰도를 향상 시킬 수 있다.
(제3 실시 예)
도 29는 본 발명의 제3 실시 예에 따른 OCR 기반 문서 분석 시스템을 나타낸 블록도.
도 29를 참조하면, 본 발명의 제3 일 실시 예에 따른 OCR 기반 문서 분석 시스템은 객체 탐지 모델을 이용하여 인식 대상 이미지에서 임의의 형식(form), 글자 및 숫자 중 적어도 하나의 객체의 위치를 탐지하고, 탐지된 형식, 글자 및 숫자 객체의 둘레를 따라 사각형상을 표시하여 사각형상의 픽셀 위치 값을 생성하며, OCR 모델을 이용하여 상기 사각형상의 픽셀 안에서 인식되는 글자 및 숫자 정보를 인식하며, 상기 생성된 사각형상의 픽셀 위치 값을 기반으로 인접한 모든 사각형상의 픽셀들을 연결하며, 상기 연결된 사각형상의 픽셀 위치에 상기 OCR 모델을 통해 인식된 글자 및 숫자 정보를 매칭시켜 디스플레이 하는 문서 분석 장치(100")를 포함하여 구성될 수 있다.
또한, 문서 분석 장치(100")는 인식률에 따라 인식된 글자 및 숫자의 신뢰 점수를 산출하고, 산출된 신뢰 점수를 디스플레이에 반영하여 시각적으로 표시되도록 할 수 있다.
또한, 문서 분석 장치(100")는 재구성 폼이 신뢰 점수에 따라 정상 인식 영역과, 틀린 영역 및 보정 영역을 포함한 오류발생 영역이 서로 다른 색상의 시각화 정보로 표시되도록 할 수 있다.
또한, 문서 분석 장치(100")는 신뢰 점수가 보정 모델을 이용하여 폼, 형상, 위치 중 적어도 하나의 보정 수행에 따라 산출되는 재건율이 추가 반영될 수 있도록 한다.
이를 위해, 문서 분석 장치(100")는 인식 대상 이미지를 수신하는 입력부(110")를 포함하여 구성될 수 있다.
입력부(110")는 네트워크를 통해 접속된 외부 단말로부터 전송되는 이미지 또는 스캐너 등을 통해 스캐닝된 이미지 등을 수신하는 데이터 통신 수단으로 구성될 수 있다.
또한, 문서 분석 장치(100")는 인식 대상 이미지에 포함된 글자에 대하여 임의의 문서로부터 미리 설정된 글자에 대한 항목 DB(300', 도 20 참조) 정보를 생성하는 항목 DB 생성부(120")를 포함하여 구성될 수 있다.
항목 DB 생성부(120")는 도 19와 같이, 예를 들어 병원 영수증 등의 문서(200')에 고정으로 포함되어, 청구 내역, 진료 내역 등의 텍스트로 표시된 항목(210')에 대한 정보를 분석한다.
또한, 항목 DB 생성부(120")는 도 19에서 분석된 항목에 대하여 도 20과 같은 항목 DB(300')를 생성하여 데이터베이스(170")에 저장되도록 한다.
본 발명에서는 설명의 편의를 위해, 인식 대상 이미지를 병원 영수증과 관련된 이미지를 실시 예로 설명하지만 이에 한정되는 것은 아니고, 약국 영수증, 세금계산서, 견적서, 청구서, 거래 명세서, 각종 계산서 및 영수증 등을 포함할 수 있다.
또한, 문서 분석 장치(100")는 입력부(110")를 통해 수신된 인식 대상 이미지에서 객체 탐지 모델을 이용하여 이미지에 포함된 임의의 형식(form), 글자 및 숫자 객체의 위치를 탐지하고, 탐지된 형식, 글자 및 숫자 객체의 둘레를 따라 사각형상을 표시하여 사각형상의 픽셀 위치 정보를 생성하는 객체 탐지 모델링부(130")를 포함하여 구성될 수 있다.
즉, 객체 탐지 모델링부(130")는 형식, 글자 및 숫자 객체에 대한 상대적인 위치의 인식을 수행하고, 형식, 글자 및 숫자 객체의 위치에 따른 배열을 확인할 수 있도록 탐지된 형식, 글자 및 숫자 객체의 둘레를 따라 사각형상을 표시하며, 표시된 사각형상의 픽셀 위치 값(좌표 정보)을 생성한다.
여기서, 객체 탐지 모델은 PSENet(Progressive Scale Expansion Network) 기반의 딥러닝 모델을 이용하여 문서 이미지를 포함한 학습 데이터로부터 형식, 글자 및 숫자 객체와, 그 위치를 탐지하고, 탐지율의 향상을 위해 학습을 수행할 수 있다.
즉, 영수증의 원본 이미지를 기반으로 문서의 임의의 부분이 n 등분으로 접혀진 이미지, 문서의 위치가 임의의 각도로 기울어진 이미지, 임의의 조도를 갖는 밝기가 조절된 이미지, 문서에 표시된 내용이 선명하지 않고 끊어진 연결선을 갖는 이미지, 문서의 임의의 부분이 굴곡진 이미지, 숫자와 연결선이 겹쳐진 이미지 등을 기반으로 학습 데이터를 학습할 수 있다.
이와 같이, 다양한 환경, 예를 들어, 조명, 촬영각도, 촬영시 흔들림, 촬영구도, 사진 해상도 등 다양한 여건에서 촬영될 수 있는 이미지를 감안하여 원본 이미지와 비교하여 다양한 변화를 준 이미지들을 사전에 학습함으로써, 실제 환경에서 수신되는 이미지들에 대한 탐지율 또는 인식율을 향상시킬 수 있다.
한편, 본 발명에서는 설명의 편의를 위해, 인식 대상 이미지를 병원 영수증과 관련된 이미지를 실시 예로 설명하지만 이에 한정되는 것은 아니고, 약국 영수증, 세금계산서, 견적서, 청구서, 거래 명세서, 각종 계산서 및 영수증 등을 포함할 수 있다.
또한, 객체 탐지 모델은 자동 증강(Auto Augmentation)을 통해 다양한 변화를 준 이미지들을 기반으로 탐지를 수행함에 있어서 최적의 규칙을 찾을 수도 있다.
또한, 객체 탐지 모델은 탐지된 형식, 글자 및 숫자의 객체에 대하여 사각형상의 픽셀을 설정하고, 설정된 픽셀의 위치 값을 생성할 수 있다.
즉, 도 21과 같이, 입력된 문서 이미지(400')에서 임의의 탐지 영역(410')으로부터 탐지된 글자 객체(411')에 대하여 외부 둘레면을 따라 사각형상의 박스로 표시한다.
또한, 객체 탐지 모델은 인식된 객체에 대한 정보를 도 22와 같이, 객체 탐지 결과(420')로 표시함으로써, 사각형상 기반의 패턴 인식도 가능하다.
본 실시 예에서는 설명의 편의를 위해 글자 객체로 설명하지만, 이에 한정되는 것은 아니고, 숫자, 영수증의 폼을 구성하는 형식(form)을 객체로 포함할 수 있음은 당업자에게 있어서 자명할 것이다.
또한, 형식의 둘레를 따라 표시된 사각형상의 구성(또는 배열) 패턴에 근거하여 후술되는 폼 구성 모델링부(150")가 미리 저장된 기관(병원)의 영수증 구성과 비교하여 어떤 기관의 영수증인지 구분할 수도 있다.
여기서, 형식은 문서 테이블을 구성하는 폼에서 하나의 셀(Cell)로서, 직사각형으로 이루어질 수 있다.
또한, 문서 분석 장치(100")는 객체 탐지 모델링부(130")에서 탐지된 형식, 글자 및 숫자 객체에 대해 OCR 모델을 이용하여 글자 및 숫자를 인식하는 OCR 모델링부(140")를 포함하여 구성될 수 있다.
여기서, OCR 모델링부(140")는 이미지 기반의 텍스트 문서를 자동으로 감지하여 인식하는 구성으로서, 공지의 OCR 모델을 사용하여 구성될 수 있다.
또한, OCR 모델링부(140")는 OCR 모델을 통해 도 24와 같이 인식된 OCR 인식 결과(430')에 대하여 인식된 예측 정보(431')와, 예측 정보(431')에 대하여 후술되는 폼 구성 모델링부에서 산출된 신뢰 점수(432')에 기반한 신뢰 점수를 함께 제공할 수 있다.
여기서, 예측 정보(431')는 인식된 객체에 포함될 글자 및 숫자를 나타낸 것이고, 신뢰 점수(432')는 OCR을 통해 인식하는 과정에서 내용이 선명하지 않거나, 연결된 부분이 끊어진 경우 등을 반영하여 전체부분에서 인식된 부분의 비율을 산출한 인식률일 수 있다.
또한, 문서 분석 장치(100")는 인식된 글자 정보를 항목 DB(300')와 비교하고, 인식된 글자를 항목 DB(300")의 글자 정보로 교정함에 따라 숫자 정보를 갖는 임의의 사각형상의 픽셀 위치를 시작 위치로 하여 좌측 방향과 상측 방향으로 이동하되, 글자 정보가 검색되면 이동중에 검색된 모든 사각형상의 픽셀들을 연결하고, 상기 연결된 사각형상의 픽셀 위치에 상기 OCR 모델을 통해 교정된 글자 및 숫자 정보를 매칭시켜 디스플레이되도록 하는 폼 구성 모델링부(150")를 포함하여 구성될 수 있다.
폼 구성 모델링부(150")는 인식 대상 이미지에서 인식되는 글자 정보와 비교하기 위해, 임의의 문서, 예를 들면, 병원 영수증, 약국 영수증, 거래명세서, 세금 계산서 등에서 사용되는 글자(항목) 정보를 정의한 항목 DB(300')를 생성할 수 있다.
또한, 폼 구성 모델링부(150")는 도 23과 같이, 인식된 글자 객체(411')에 대한 자연어 처리(Natural Language Processing, NLP)를 통해 탐지된 글자에 대하여 형태소, 또는 분절음 별로, NLP 객체(411a')를 분석하고, 분석된 결과와 항목 DB(300') 정보 사이의 비교를 기반으로 인식된 글자에 대한 신뢰 점수를 산출할 수도 있다.
예를 들어, 인식된 글자가 "MRI 진단-"인 경우, 항목 DB(300')에 저장된 항목에 대한 정보를 검색한 다음, 검색된 항목에 대응하는 항목 DB(300') 정보와의 비교를 통해 신뢰 점수를 산출한다.
즉, 폼 구성 모델링부(150")는 병원 영수증에 새로운 항목이 인식되거나 OCR의 실수로 인해 오탈자, 미인식자 등이 발생하더라도, NLP를 이용하여 상황에 맞게 처리할 수 있도록 한다.
또한, 폼 구성 모델링부(150")에서 산출된 글자에 대한 신뢰 점수는 도 24와 같이, OCR 인식 결과(430')에 인식된 예측 정보(431')와, 폼 구성 모델링부(150")에서 예측 정보(431')에 대하여 산출된 신뢰 점수(432')를 제공할 수 있다.
또한, 폼 구성 모델링부(150")는 탐지된 글자 및 객체의 위치를 기반으로 임의의 시작 위치에서 좌측방향 및 상측방향으로 인접한 모든 글자 및 숫자들의 객체 위치들을 연결하여 재구성된 폼을 생성한다.
한편, 폼 구성 모델링부(150")는 새로운 항목이 인식된 경우, 숫자 객체의 박스 크기에 대하여 가로, 세로 길이가 인접한 다른 박스의 가로, 세로 길이와 동일하거나 또는 다른 박스의 가로, 세로 길이에 포함되면 연결되도록 한다.
도 25를 참조하여 더욱 상세하게 설명하면, 숫자로 인식된 시작 객체 박스(600)를 기준으로 시작 객체 박스(600)의 횡방향 크기(600) 및 종방향 크기(710)를 좌측 객체 박스(610)와 상측 객체 박스(620)의 횡방향 크기(700a) 및 종방향 크기(710a)와 비교하여 동일하거나 또는 좌측 객체 박스(610)와 상측 객체 박스(620)의 횡방향 크기 및 종방향 크기에 포함되면 좌측 연결선(800) 및 상측 연결선(810)으로 연결하여 표시한다.
본 실시 예에서는 설명의 편의를 위해 시작 위치를 중앙부분에 위치한 숫자 객체를 시작 객체 박스(600)로 설명하였지만, 시작 객체 박스(600)의 우측에 위치한 우측 객체 박스(600a), 시작 객체 박스(600)의 하측에 위치한 하측 객체 박스를 시작 위치로 설정할 수도 있다.
예를 들어, 우측 객체 박스(600a)를 시작 위치로 설정하면, "공단 부담금"이 인식(또는 탐지)된 글자 객체는 상측 객체 박스(620a)가 될 수 있다.
또한, 폼 구성 모델링부(150")는 상기된 과정을 반복하여 가장 가까운 좌측과 상측만을 연결하고, 연결 후 숫자로부터 시작하여 좌측과 상측에 텍스트, 예를 들면, 글자 객체(항목)가 나올때까지 이동 및 검색을 통해 연결한다.
즉, 도 30에 나타낸 바와 같이, 문서 이미지(900')에서 기준 객체 박스(910')의 좌측과 상측으로 이동 및 검색을 통해 다음 객체와 연결을 수행하는데 있어서, 좌측에 위치한 좌측 객체 박스(920')가 글자이면 좌측 연결선(940')을 통해 연결한다.
또한, 상측으로 이동 및 검색을 통해 상측 객체 박스(930')가 글자 객체(항목)이면, 상측 연결선(941')을 통해 계속해서 연결한다.
또한, 폼 구성 모델링부(150")는 재구성 폼의 항목이 교정된 글자, 즉 항목 DB(300')에서 선택된 글자들로만 구성되면, 오탈자 또는 미인식된 글자가 없는 것으로 판단하여 OCR 모델링부(140")의 OCR 모델을 통해 인식된 숫자만 인식하고, 인식된 숫자와 항목을 매칭시킬 수도 있다.
상기 폼 구성 모델링부(150")는 탐지된 글자 객체에 대하여 항목 DB(300') 정보와 매칭시키고, 매칭 결과에 따라 인식된 글자가 교정되면, 교정된 글자가 반영되도록 한다.
또한, 폼 구성 모델링부(150")는 직사각형 인식을 통한 글자 객체 및 숫자 객체를 찾을 뿐만 아니라, 문서 이미지가 기울어진 상태의 이미지인 경우, 꼭지점에 의한 재건을 통해 수평 상태의 문서 이미지로 보정할 수도 있다.
또한, 폼 구성 모델링부(150")는 촬영 각도에 의해 문서 이미지가 사다리꼴 형상의 이미지인 경우, 사다리꼴 보정을 통한 재건을 통해 사각형상의 문서 이미지로 변환할 수도 있다.
또한, 폼 구성 모델링부(150")는 문서 이미지가 구겨지거나 또는 접혀진 부분을 포함하여 촬영된 경우, 형상 또는 폼을 보정하기 위한 프로그램을 이용하여 사각형상의 문서 이미지로 변환할 수도 있다.
한편, 폼 구성 모델링부(150")가 인식 정확도의 제고를 위한 보정을 수행하여 직사각형상의 충실한 재건과 이를 기반으로 하여 정확한 인식이 이루질 수 있도록 동작하지만, 그에 따른 보정 및 재건을 통해 오류의 발생 가능성도 함께 증가할 수 있다.
이를 위해, 문서 분석 장치(100")는 보정 모델을 이용하여 보정 및 재건으로 인한 판단 오류의 위험성 정보, 예를 들면, 보정 및 재건 유형과 갯수 등을 수치화시킨 정보와, 인식된 글자 및 숫자의 신뢰도를 기반으로 신뢰 점수를 산출하고, 산출된 신뢰 점수를 기반으로 사용자가 확인할 수 있도록 폼 구성 모델링부(150")를 통해 디스플레이에 반영함으로써, 시각적으로 표시되도록 하는 신뢰도 평가부(160")를 포함하여 구성될 수 있다.
즉, 신뢰도 평가부(160")는 보정 및 재건으로 인한 판단 오류의 위험성 정보, 예를 들면, 보정 및 재건의 유형과, 갯수 등을 수치화시킨 신뢰 점수를 폼 구성 모델링부(150")로 제공한다.
폼 구성 모델링부(150")는 글자 및 숫자의 사각형상 박스의 색상이 정상 객체 영역과, 틀린 객체 영역 및 보정 영역을 포함한 오류발생 객체 영역이 서로 다른 색상으로 표시한다.
즉, 폼 구성 모델링부(150")는 신뢰도 평가부(160")를 통해 제공되는 신뢰 점수에 기반하여 도 31과 같이, 신뢰 점수가 미리 설정된 기준 값 이상인 객체 영역은 재구성 이미지(900")에서 청색으로 표시하여 정상 객체 영역(910", 911")이 확인될 수 있도록 표시한다.
또한, 폼 구성 모델링부(150")는 신뢰도 평가부(160")를 통해 제공된 신뢰 점수가 기준 값 이하인 객체 영역은 재구성 이미지(900")에서 임의의 색상(예를 들면, 적색)으로 표시하여 오류발생 객체 영역(920", 921", 922", 923", 924")이 확인될 수 있도록 표시한다.
이러한 폼 구성 모델링부(150")의 서로 다른 색상 표시를 통해 사용자는 신속하고 정확하게 확인할 수 있다.
또한, 문서 분석 장치(100")는 상기 생성된 사각형상의 픽셀 위치 값, 인식된 글자, 숫자 정보, 신뢰 정보와, 특정 기관에서 사용하는 문서 데이터의 폼을 저장하는 데이터베이스(170")를 포함하여 구성될 수 있다.
여기서, 특정 기관은 병원, 약국, 회사 등, 영수증 및 회계 관련 문서를 임의의 폼으로 발행하는 모든 곳을 포함할 수 있다.
다음은 본 발명의 제3 실시 예에 따른 OCR 기반 문서 분석 방법을 설명한다.
도 32는 본 발명의 제3 실시 예에 따른 OCR 기반 문서 분석 과정을 나타낸 흐름도이다.
도 29 및 도 32를 참조하면, 문서 분석 장치(100")는 네트워크를 통해 연결된 외부 단말 또는 팩스 등을 통해 인식 대상 영수증의 이미지를 수신(S100")한다.
또한, 문서 분석 장치(100")는 수신된 인식 대상 영수증의 이미지에서 객체 탐지 모델을 이용하여 글자 및 숫자의 객체와 위치를 탐지하고, 탐지된 글자 및 숫자의 객체에 사각형상의 박스를 형성하는 객체 탐지 단계를 수행(S200")한다.
또한, S200 단계에서, 객체 탐지 모델은 PSENet(Progressive Scale Expansion Network) 기반의 딥러닝 모델을 이용하여 문서 이미지를 포함한 학습 데이터로부터 형식, 글자 및 숫자 객체와, 그 위치를 탐지하고, 탐지율의 향상을 위해 학습을 수행할 수 있다.
또한, 객체 탐지 모델은 원본 이미지, 문서의 임의의 부분이 접혀진 이미지, 문서의 위치가 임의의 각도로 기울어진 이미지, 임의의 조도를 갖는 밝기가 조절된 이미지, 문서에 표시된 내용이 선명하지 않고 끊어진 연결선을 갖는 이미지, 문서의 임의의 부분이 굴곡진 이미지, 숫자와 연결선이 겹쳐진 이미지를 기반으로 학습 데이터를 학습할 수 있다.
계속해서, 문서 분석 장치(100")는 탐지된 형식, 글자 및 숫자 객체에 대한 사각형상 픽셀 안에서, OCR 모델을 이용하여 글자 및 숫자 정보를 인식하는 OCR 인식 단계(S300")를 수행한다.
S300" 단계를 수행한 다음, 문서 분석 장치(100")는 임의의 문서로부터 고정화 되어 있는 텍스트 정보 즉, 항목에 대한 글자 정보를 항목 DB(300') 정보로 생성하고, 생성된 항목 DB(300', 도 20 참조) 정보는 데이터베이스(170")에 저장(S400")한다.
상기 인식된 글자 정보를 항목 DB(300')와 비교하고, 인식된 글자를 항목 DB(300')의 글자 정보로 교정함에 따라 교정 여부를 결정하기 위한 오탈자 또는 미인식자의 유무를 판단하여 문서 분석 장치(100)는 NLP 기반의 교정을 수행(S500")한다.
즉, S500" 단계에서 문서 분석 장치(100")는 자연어 처리(Natural Language Processing, NLP)를 통해 탐지된 글자에 대하여 분석한다.
또한, S500" 단계에서 문서 분석 장치(100")는 분석된 글자와 항목 DB(300') 정보 사이의 비교를 기반으로 분석된 글자에 대한 신뢰 점수를 산출하여 출력할 수도 있다.
계속해서, 문서 분석 장치(100")는 숫자 정보를 갖는 임의의 사각형상의 픽셀 위치를 시작 위치로 하여 좌측 방향과 상측 방향으로 이동하되, 글자 정보가 검색되면 이동중에 검색된 모든 사각형상의 픽셀들을 연결하고, 연결된 사각형상의 픽셀 위치에 상기 OCR 모델을 통해 교정된 글자 및 숫자 정보가 매칭되도록(S600")한다.
즉, 문서 분석 장치(100")는 시작 위치를 숫자 객체로 하여 시작 위치의 좌측 방향과 상측 방향으로 이동 및 연결한다.
이때, 시작 위치로부터 가장 가까운 좌측과 상측만을 우선 연결하고, 이후, 인접한 모든 객체들을 연결하며, 글자 객체(항목)가 나올때 까지 숫자 객체들을 검색하며 이동한다.
또한, 글자 객체를 포함한 항목 검색이 완료되면, 문서 분석 장치(100")는 인식된 글자 및 교정된 글자와 숫자를 항목 별로 대응하여 매칭되도록 한다.
또한, 문서 분석 장치(100")는 인식 정확도의 제고를 위한 보정을 수행하여 직사각형상의 충실한 재건과 이를 기반으로 하는 정확한 인식이 이루질 수 있도록 처리된 보정 및 재건 유형과 갯수 등을 수치화시킨 정보와, 인식된 글자 및 숫자의 신뢰도를 기반으로 신뢰 점수를 산출하고, 산출된 신뢰 점수를 기반으로 사용자가 확인할 수 있도록 디스플레이에 반영하여 시각적으로 표시(S700")되도록 한다.
또한, S700" 단계에서 문서 분석 장치(100")는 문서 이미지가 기울어진 상태이면, 꼭지점에 의한 재건을 통해 수평 상태의 문서 이미지로 보정하고, 문서 이미지가 사다리꼴 형상의 이미지이면, 사다리꼴 보정을 통한 재건을 통해 사각형상의 문서 이미지로 변환할 수도 있다.
또한, 문서 이미지가 구겨지거나 또는 접혀진 부분을 포함하면, 형상 또는 폼을 보정하기 위한 프로그램을 이용하여 사각형상의 문서 이미지로 변환함으로써, 폼, 형상, 위치 중 적어도 하나의 보정 수행에 따른 재건율과, 신뢰 점수를 산출할 수 있다.
또한 S700" 단계에서 문서 분석 장치(100")는 신뢰 점수에 따라 글자 및 숫자의 사각형상 박스의 색상이 정상 객체 영역과, 틀린 객체 영역 및 보정 영역을 포함한 오류발생 객체 영역이 서로 다른 색상으로 표시되도록 한다.
즉, 도 31과 같이, 신뢰 점수가 미리 설정된 기준 값 이상인 객체 영역은 재구성 이미지(900")에서 예를 들면, 청색으로 표시하여 정상 객체 영역(910", 911")이 확인될 수 있도록 표시하고, 신뢰 점수가 기준 값 이하인 객체 영역은 재구성 이미지(900")에서 예를 들면, 적색으로 표시하여 오류발생 객체 영역(920", 921", 922", 923", 924")이 확인될 수 있도록 표시되도록 한다.
이러한 폼 구성 모델링부(150")의 서로 다른 색상 표시를 통해 사용자는 신속하고 정확하게 확인할 수 있다.
또한, 인식된 글자, 교정된 글자, 보정 및 재건을 통해 재구성된 폼을 재구성 이미지로 변환하여 최종 결과를 출력(S800")하고, 데이터베이스(170")에 저장되도록 한다.
(제4 실시 예)
도 33은 본 발명의 제4 실시 예에 따른 OCR 기반 문석 시스템을 나타낸 블록도이다.
도 33을 참조하여 설명하면, 본 발명의 제4 실시 예에 따른 OCR 기반 문서 분석 시스템은 객체 탐지 모델을 이용하여 인식 대상 이미지에서 임의의 형식(form), 글자 및 숫자 중 적어도 하나의 객체 위치를 탐지하되, 상기 탐지된 형식, 글자 및 숫자 객체의 둘레를 따라 사각형상을 표시하여 글자 및 숫자 객체의 픽셀 위치 값을 생성하며, OCR 모델을 이용하여 상기 사각형상의 픽셀 안에서 인식되는 글자 및 숫자 정보를 출력하고, 상기 생성된 사각형상의 픽셀 위치 값을 기반으로 인접한 모든 사각형상의 픽셀들을 연결하며, 상기 연결된 사각형상의 픽셀 위치에 상기 OCR 모델을 통해 인식된 글자 및 숫자 정보를 매칭시켜 디스플레이하는 문서 분석 장치(100"')를 포함하여 구성된다.
또한, 문서 분석 장치(100"')는 생성된 글자 객체의 픽셀 위치 값을 기반으로 이미지의 좌측 영역에 글자 객체가 배치되는 좌측 헤더 영역과, 이미지의 상측 영역에 글자 객체가 배치되는 상측 헤더 영역으로 구분하고, 구분된 좌측 헤더 영역과 상측 헤더 영역을 기준으로 가상 셀 객체를 생성하여 배치할 수 있다.
또한, 문서 분석 장치(100"')는 배치된 가상 셀 객체와 숫자 객체를 매칭시켜 행/열(row/column) 정보를 기반으로 연결하여 OCR 모델을 통해 인식된 글자 및 숫자 정보가 디스플레이되도록 구성될 수 있다.
또한, 문서 분석 장치(100"')는 외부로부터 전송되는 인식 대상 이미지를 수신하는 입력부(110"')를 포함하여 구성될 수 있다.
입력부(110"')는 네트워크를 통해 접속된 외부 단말로부터 전송되는 이미지 또는 스캐너 등을 통해 스캐닝된 이미지 등을 수신하는 데이터 통신 수단으로 구성될 수 있다.
또한, 문서 분석 장치(100"')는 입력부(110"')를 통해 수신된 인식 대상 이미지에서 객체 탐지 모델을 이용하여 이미지에 포함된 임의의 형식(form), 글자 및 숫자 객체의 위치를 탐지하고, 탐지된 형식, 글자 및 숫자 객체의 둘레를 따라 사각형상을 표시하여 사각형상의 픽셀 위치 정보를 생성하는 객체 탐지 모델링부(120"')를 포함하여 구성될 수 있다.
즉, 객체 탐지 모델링부(120"')는 형식, 글자 및 숫자 객체에 대한 상대적인 위치의 인식을 수행하고, 형식, 글자 및 숫자 객체의 위치에 따른 배열을 확인할 수 있도록 탐지된 형식, 글자 및 숫자 객체의 둘레를 따라 사각형상을 표시하며, 표시된 사각형상의 픽셀 위치 값(좌표 정보)을 생성한다.
여기서, 객체 탐지 모델은 PSENet(Progressive Scale Expansion Network) 기반의 딥러닝 모델을 이용하여 문서 이미지를 포함한 학습 데이터로부터 형식, 글자 및 숫자 객체와, 그 위치를 탐지하고, 탐지율의 향상을 위해 학습을 수행할 수 있다.
또한, 객체 탐지 모델은 원본 이미지, 문서의 임의의 부분이 접혀진 이미지, 문서의 위치가 임의의 각도로 기울어진 이미지, 임의의 조도를 갖는 밝기가 조절된 이미지, 문서에 표시된 내용이 선명하지 않고 끊어진 연결선을 갖는 이미지, 문서의 임의의 부분이 굴곡진 이미지, 숫자와 연결선이 겹쳐진 이미지를 기반으로 하는 학습 데이터를 이용하여 학습할 수 있다.
이와 같이, 다양한 환경, 예를 들어, 조명, 촬영각도, 촬영시 흔들림, 촬영구도, 사진 해상도 등 다양한 여건에서 촬영될 수 있는 이미지를 감안하여 원본 이미지와 비교하여 다양한 변화를 준 이미지들을 사전에 학습함으로써, 실제 환경에서 수신되는 이미지들에 대한 탐지율 또는 인식율을 향상시킬 수 있다.
한편, 본 발명에서는 설명의 편의를 위해, 인식 대상 이미지를 병원 영수증과 관련된 이미지를 실시 예로 설명하지만 이에 한정되는 것은 아니고, 약국 영수증, 세금계산서, 견적서, 청구서, 거래 명세서, 각종 계산서 및 영수증 등을 포함할 수 있다.
또한, 객체 탐지 모델은 자동 증강(Auto Augmentation)을 통해 다양한 변화를 준 이미지들을 기반으로 탐지를 수행함에 있어서 최적의 규칙을 찾을 수도 있다.
또한, 객체 탐지 모델은 탐지된 형식, 글자 및 숫자의 객체에 대하여 사각형상의 픽셀을 설정하고, 설정된 픽셀의 위치 값을 생성할 수 있다.
즉, 입력된 문서 이미지(200, 도 2 참조)에서 임의의 탐지 영역(210, 도 2 참조)으로부터 탐지된 예를 들면, 글자 객체(211)에 대하여 외부면에 사각형상의 박스(212, 도 2 참조)로 구성된 픽셀 위치 값을 생성하고, 인식된 객체(213, 도 2 참조)에 대한 정보를 글자 탐지 결과(220, 도 3 참조)에 표시함으로써, 사각형상 기반의 패턴 인식이 가능하도록 한다.
본 실시 예에서는 설명의 편의를 위해 글자 객체로 설명하지만, 이에 한정되는 것은 아니고, 숫자, 영수증의 폼을 구성하는 형식(form)을 객체로 포함할 수 있음은 당업자에게 있어서 자명할 것이다.
또한, 사각형상의 박스(212, 도 2 참조)는 바람직하게는 직사각형(rectangular)으로 구성될 수 있다.
또한, 형식의 둘레를 따라 표시된 사각형상의 구성(또는 배열) 패턴에 근거하여 미리 저장된 기관(병원)의 영수증 구성과 비교를 통해 어떤 기관의 영수증인지 구분할 수도 있다.
여기서, 형식은 문서 테이블을 구성하는 폼에서 하나의 셀(Cell)로서, 직사각형으로 이루어질 수 있다.
또한, 문서 분석 장치(100"')는 객체 탐지 모델링부(120"')에서 탐지된 형식, 글자 및 숫자 객체에 대해 OCR 모델을 이용하여 글자 및 숫자를 인식하는 OCR 모델링부(130"')를 포함하여 구성될 수 있다.
여기서, OCR 모델링부(130"')는 이미지 기반의 텍스트 문서를 자동으로 감지하여 인식하는 구성으로서, 공지의 OCR 모델을 사용하여 구성될 수 있다.
또한, OCR 모델링부(130"')는 OCR 인식 결과(300, , 도 4 참조)에 대하여 인식된 예측 정보(310, 도 4 참조)와, 예측 정보(310)에 대한 신뢰 점수(320, 도 2 참조)를 산출하여 함께 제공할 수 있다.
여기서, 예측 정보(310)는 인식된 객체에 포함될 글자 및 숫자를 나타낸 것이고, 신뢰 점수(320)는 OCR을 통해 인식하는 과정에서 내용이 선명하지 않거나, 연결된 부분이 끊어진 경우 등을 반영하여 전체부분에서 인식된 부분의 비율을 산출한 인식률일 수 있다.
또한, 문서 분석 장치(100"')는 생성된 글자 객체의 픽셀 위치 값을 기반으로 이미지의 좌측 영역에 글자 객체가 배치되는 좌측 헤더 영역과, 이미지의 상측 영역에 글자 객체가 배치되는 상측 헤더 영역으로 구분하되, 상기 좌측 헤더 영역과 상측 헤더 영역을 기준으로 M×N 크기의 가상 셀 객체를 생성하여 배치하며, 상기 배치된 가상 셀 객체와 숫자 객체를 매칭시켜 행/열 정보를 기반으로 연결하여 상기 OCR 모델을 통해 인식된 글자 및 숫자 정보가 디스플레이되도록 하는 가상 셀 폼 구성 모델링부(140"')를 포함하여 구성될 수 있다.
즉, 가상 셀 폼 구성 모델링부(140"')는 객체 탐지 모델링부(120"')의 탐지 결과와 OCR 모델링부(130"')의 예측 정보를 기반으로 하여 인식한 예측 정보들이 어떤 항목인지 매칭되도록 한다.
또한, 가상 셀 폼 구성 모델링부(140"')는 객체 탐지 모델링부(120"')의 탐지 결과(220)와, OCR 모델링부(130"')의 예측 정보(310)를 매칭하기 위해, 인접한 모든 글자 및 숫자 객체들의 사각형상 픽셀들을 연결한다.
또한, 일반적인 영수증 등의 회계 관련 문서는 글자로 이루어진 항목이 주로 문서의 좌측가 상측에 배치된다.
즉, 도 34에 나타낸 바와 같이, 문서 이미지(400"') 상의 좌측 영역에는 복수의 좌측 객체(410"')가 탐지되고, 문서 이미지(400"') 상의 상측 영역에는 복수의 상측 객체(420"')가 탐지되며, 개별 좌측 객체(410"')와 상측 객체(420"')와 연동하여 숫자 객체(430"')가 탐지된다.
숫자 객체(430"')는 해당 숫자 객체(430"')에 대응하는 좌측 객체(410"')와 상측 객체(420"')에 의해 해당 숫자 객체(430"')가 가지는 속성(attribute)이 정의된다.
그러나 숫자 객체(430"')를 인접한 객체들과 연결할 때 입력된 문서 이미지에 포함된 숫자 객체들이 수평방향이 아닌 기울어진 상태로 배치된 경우, 좌측 방향에 배치된 글자 객체와 연결하는 과정에서 수평방향이 아닌 기울어진 방향의 연장선에 배치된 다른 글자 객체와 연결될 수 있다.
본 발명의 일 실시 예에 따른 가상 셀 폼 구성 모델링부(140"')는 가상 셀 객체를 생성하여 글자 객체 및 숫자 객체가 연결되도록 한다.
이를 위해 가상 셀 폼 구성 모델링부(140"')는 객체 탐지 모델링부(120"')를 통해 추출된 글자 객체의 위치 좌표를 기반으로 문서 이미지(400"') 상에서 도 35와 같이, 좌측 헤더 영역(500"')과 상측 헤더 영역(510"')을 분리하여 구분한다.
또한, 가상 셀 폼 구성 모델링부(140"')는 구분된 좌측 헤더 영역(500"')에 포함된 글자 객체 즉, 도면 상에서 좌측 헤더 영역(500"')의 수직방향 하부방향으로 배치된 복수의 좌측 헤더 객체(501"')와, 상측 헤더 영역(510"')에 포함된 글자 객체 즉, 도면 상에서 상측 헤더 영역(510"')의 수평방향 우측방향으로 배치된 상측 헤더 객체(511"', 512"') 별로 사각형상 픽셀의 위치 좌표 값을 추출한다.
또한, 가상 셀 폼 구성 모델링부(140"')는 글자 객체의 좌측 헤더 영역(500"')과 상측 헤더 영역(510"')에 포함된 글자 객체 사이의 간격 및 크기 즉, 좌측 헤더 객체(501"'), 상측 헤더 객체(511"'), 상측 헤더 객체 1(512"') 사이의 간격 및 크기를 산출하고, 구분된 좌측 헤더 영역(500"')과 상측 헤더 영역(510"')을 기준으로 복수의 가상 셀 그룹(530"', 530"'a)이 행/열 정보에 따라 배치된다.
즉, 가상 셀 그룹(530"', 530"'a)에 포함된 복수의 가상 셀 객체(531"', 532"')가 좌측 헤더 영역(500"')과 상측 헤더 영역(510"')의 행/열 정보에 따라 배치된다.
여기서, 배치되는 가상 셀 객체(531"', 532"')의 갯수는 좌측 헤더 영역(500"')과 상측 헤더 영역(510"')에서 탐지된 좌측 헤더 객체(501"')와 상측 헤더 객체(511"')의 갯수인 M×N 개 만큼 형성된다.
또한, 가상 셀 폼 구성 모델링부(140"')는 숫자 객체 영역(520"')과 가상 셀 그룹(530"', 530"'a)을 매칭시키는데, 좌측 상단에 배치된 가상 셀 객체(531"')와 숫자 객체(521"')가 우선 매칭되도록 한다.
이때, 좌측 헤더 및 상측 헤더의 정보와 가장 밀접하게 연관된 정보는 좌측 상단이므로, 가장 정확도가 높은 좌측 상단의 가상 셀 객체(531"')와 숫자 객체(521"')를 우선 매칭 시킨다.
또한, 가상 셀 폼 구성 모델링부(140"')는 도 36과 같이, 좌측 상단에 배치된 가상 셀 객체(531"')와 숫자 객체(521"')를 매칭하면, 매칭된 숫자 객체(521"')와 가상 셀 객체(531"') 사이의 기울기를 산출한다.
즉, 가상 셀 폼 구성 모델링부(140"')는 문서 이미지에 포함된 숫자 객체(521"')들이 수평방향이 아닌 기울어진 상태로 배치된 경우 잘못 매칭되는 것을 방지하기 위해 문서 이미지 상에 설정된 기준 좌표계에서, 좌표계 내의 해당 벡터의 기울기를 산출하고, 산출된 기울기에 기반하여 이미지의 전체적인 기울기를 산출한다.
또한, 가상 셀 폼 구성 모델링부(140"')는 이미지의 전체적인 기울기가 반영되도록 좌측 상단에서 매칭된 숫자 객체(521"')와 가상 셀 객체(531"') 사이의 기울기 정보를 우측 하단에 배치된 가상 셀 객체와 숫자 객체 n(523"')의 매칭까지 반영되도록 한다.
또한, 가상 셀 폼 구성 모델링부(140"')는 가상 셀 객체를 좌측, 상단, 하단의 객체와 기울기 라인(540"') 및 상측 헤더 라인(541"')을 통해 연결하는데, 좌측 헤더 객체(501"'), 상측 헤더 객체(511"'), 상측 헤더 객체 1(512"') 등에서 산출한 객체 사이의 간격 및 크기에 기반하여 IoU(Intersection over Union)가 미리 설정된 기준 값 이상이면, 연결되도록 한다.
또한, 가상 셀 폼 구성 모델링부(140"')는 가상 셀 객체를 이용한 연결이 완료되면, 도 37과 같이, 가상 셀 객체를 제거하여 최종 연결 이미지(600"')를 생성하여 출력한다.
이때, 가상 셀 폼 구성 모델링부(140"')는 최종 연결 이미지(600"')를 데이터베이스(150"')에 저장된 특정 기관 문서의 박스 배열 정보와 비교하여 매칭되는지 확인할 수 있다.
여기서, 특정 기관은 병원, 약국, 회사 등, 영수증 및 회계 관련 문서를 임의의 폼으로 발행하는 모든 곳을 포함할 수 있다.
또한, 가상 셀 폼 구성 모델링부(140"')는 도 38과 같이, 숫자 객체(730"')가 밀린 문자 이미지(700"')가 입력되어도, 좌측 헤더 객체(710"')와, 상측 헤더 객체(720"')를 기반으로 가상 셀 객체를 생성한 다음 예를 들면, 하단으로 밀린 숫자 객체(730"')를 가상 셀 객체와 매칭시켜 기울기에 기반한 연결을 통해 글자 객체와 숫자 객체의 정확한 연결이 이루어질 수 있도록 한다.
또한, 가상 셀 폼 구성 모델링부(140"')는 도 39과 같이, 도면 상 한쪽으로 휘어진(또는 기울어진) 문자 이미지(800)가 입력되어도, 좌측 헤더 객체(810"')와, 상측 헤더 객체(820"')를 기반으로 가상 셀 객체를 생성한 다음 숫자 객체(830"')를 가상 셀 객체와 매칭시켜 기울기에 기반한 연결을 통해 글자 객체와 숫자 객체의 정확한 연결이 이루어질 수 있도록 한다.
또한, 문서 분석 장치(100"')는 가상 셀 폼 구성 모델링부(140)에서 출력되는 재구성 이미지, 특정 기관에서 사용하는 문서 데이터의 폼(또는 형식), 생성된 사각형상의 픽셀 위치 값, 인식된 글자, 숫자 정보 및 매칭 결과 등을 저장하는 데이터 베이스(150)를 포함하여 구성될 수 있다.
다음은 본 발명의 제4 실시 예에 따른 OCR 기반 문서 분석 방법을 설명한다.
도 40은 본 발명의 제4 실시 예에 따른 OCR 기반 문서 분석 과정을 나타낸 흐름도이고, 도 41은 도 40의 실시 예에 따른 가상 셀 기반 항목 매칭 과정을 나타낸 흐름도이다.
도 33, 도 40 및 도 41을 참조하면, 문서 분석 장치(100"')는 네트워크를 통해 연결된 외부 단말 또는 팩스 등을 통해 인식 대상 영수증의 이미지를 수신(S100"')한다.
문서 분석 장치(100"')는 수신된 인식 대상 영수증의 이미지에서 객체 탐지 모델을 이용하여 임의의 형식, 글자 및 숫자 객체와 그 위치를 탐지하고, 탐지된 형식, 글자 및 숫자 객체의 둘레를 따라 사각형상을 표시하여 사각형상의 픽셀 위치 정보를 생성하는 글자 탐지 단계를 수행(S200"')한다.
또한, S200 단계에서, 객체 탐지 모델은 PSENet(Progressive Scale Expansion Network) 기반의 딥러닝 모델을 이용하여 문서 이미지를 포함한 학습 데이터로부터 형식, 글자 및 숫자 객체와, 그 위치를 탐지하고, 탐지율의 향상을 위해 학습을 수행할 수 있다.
또한, 객체 탐지 모델은 원본 이미지, 문서의 임의의 부분이 접혀진 이미지, 문서의 위치가 임의의 각도로 기울어진 이미지, 임의의 조도를 갖는 밝기가 조절된 이미지, 문서에 표시된 내용이 선명하지 않고 끊어진 연결선을 갖는 이미지, 문서의 임의의 부분이 굴곡진 이미지, 숫자와 연결선이 겹쳐진 이미지를 기반으로 학습 데이터를 학습할 수 있다.
계속해서, 문서 분석 장치(100"')는 탐지된 형식, 글자 및 숫자 객체에 대한 사각형상 픽셀 안에서, OCR 모델을 이용하여 글자 및 숫자 정보를 인식하는 OCR 인식 단계(S300"')를 수행한다.
S300"' 단계를 수행한 다음, 문서 분석 장치(100"')는 생성된 글자 객체의 픽셀 위치 값을 기반으로 이미지의 좌측 영역에 글자 객체가 배치되는 좌측 헤더 영역(500)과, 이미지의 상측 영역에 글자 객체가 배치되는 상측 헤더 영역(510)으로 구분하고, 상기 좌측 헤더 영역(500)과 상측 헤더 영역(510)을 기준으로 가상 셀 객체를 생성하여 배치하고, 배치된 가상 셀 객체와 숫자 객체를 매칭시켜 행/열 정보를 기반으로 연결(S400"')한다.
S400"' 단계를 더욱 상세하게 설명하면, 문서 분석 장치(100"')는 글자 객체의 좌측 및 상측 픽셀 위치를 기준으로 가상 셀 객체를 배치하되, 글자 객체의 좌측 헤더 영역(500"', 도 35 참조)과 상측 헤더 영역(510"', 도 35 참조)을 구분(S410"')한다.
또한, 문서 분석 장치(100"')는 구분된 좌측 헤더 영역(500"')과 상측 헤더 영역(510"')에 포함된 글자 객체 사이의 간격 및 크기를 산출(S420"')한다.
계속해서, 문서 분석 장치(100"')는 구분된 좌측 헤더 영역(500"')과 상측 헤더 영역(510"')을 기준으로 탐지된 좌측 헤더 객체(501"')와 상측 헤더 객체(511"')의 갯수인 M×N 개 만큼 가상 셀 객체를 배치(S430"')한다.
S430"' 단계의 가상 셀 객체 배치가 완료되면, 문서 분석 장치(100"')는 좌측 상단에 배치된 가상 셀 객체와 숫자 객체를 매칭하여 숫자 객체와 가상 셀 객체 사이의 기울기를 산출(S440"')한다.
즉, S440"' 단계에서 문서 분석 장치(100"')는 문서 이미지에 포함된 숫자 객체들이 수평방향이 아닌 기울어진 상태로 배치된 경우 잘못 매칭되는 것을 방지하기 위해 문서 이미지 상에 설정된 기준 좌표계에서, 좌표계 내의 해당 벡터의 기울기를 산출하고, 산출된 기울기에 기반하여 이미지의 전체적인 기울기를 산출한다.
계속해서, 문서 분석 장치(100"')가 행/열 정보에 따라 순차적으로 이동하며 상기 산출된 기울기를 우측 하단에 배치된 가상 셀 객체와 숫자 객체의 매칭까지 반영하여 연결(S450"')한다.
즉, 문서 분석 장치(100"')는 이미지의 전체적인 기울기가 반영되도록 좌측 상단에서 매칭된 숫자 객체와 가상 셀 객체 사이의 기울기 정보를 우측 하단에 배치된 가상 셀 객체와 숫자 객체 n의 매칭까지 반영되도록 하고, 반영 결과에 따라 배치된 가상 셀 객체와 숫자 객체를 매칭시켜 좌측 헤더 객체(501"')와 상측 헤더 객체(511"')의 행/열 정보를 기반으로 연결한다.
S450"' 단계의 연결이 완료되면, 문서 분석 장치(100"')는 OCR 모델을 통해 인식된 글자 및 숫자 정보가 디스플레이되도록 최종 연결 이미지(600"')를 생성하여 출력(S500"')한다.
따라서, OCR을 통해 인식된 정보에 대하여 신뢰 점수를 기반으로 정상 인식된 부분과, 틀린 부분 또는 의심되는 부분을 서로 다른 색상의 시각화 정보로 제공함으로써 사용자에 의한 신속하고 정확한 확인 가능하며, 사용자의 확인 작업시간을 감소시킬 수 있다.
또한, 문서 상의 항목에 기재된 문자 및 숫자를 포함한 글자를 인식하고, 인식된 글자의 상대적인 위치를 기반으로 가상 셀을 생성하여 숫자에 대한 상대적인 위치 정보를 매칭시킬 수 있다.
또한, 인식된 항목들 간의 연결 및 상대적인 위치 관계를 기반으로 글자가 배치된 패턴을 분석하여 특정 문서 또는 영수증 등을 사용하는 병원, 보험사 등의 기관에서 사용한 폼 패턴과 비교함으로써, 신속하고 정확한 매칭이 가능하다.
또한, 병원, 보험사 등의 기관에서 사용하는 다양한 포맷의 영수증에 대하여 정확하고, 신뢰할 수 있는 사용정보를 제공할 수 있으며, 표준화된 이미지가 아니어도 다양한 학습 데이터를 이용한 딥러닝 학습을 통해 인식의 정확도를 향상시킬 수 있다.
또한, 병원, 약국 등에서 사용하는 다양한 포맷의 영수증에 대하여 정확한 정보의 인식이 가능하고, 특정 양식(폼)이 없는 서류의 디지털화가 가능하다.
상기와 같이, 본 발명의 바람직한 실시 예를 참조하여 설명하였지만 해당 기술 분야의 숙련된 당업자라면 하기의 특허청구범위에 기재된 본 발명의 사상 및 영역으로부터 벗어나지 않는 범위 내에서 본 발명을 다양하게 수정 및 변경시킬 수 있음을 이해할 수 있을 것이다.
또한, 본 발명의 특허청구범위에 기재된 도면번호는 설명의 명료성과 편의를 위해 기재한 것일 뿐 이에 한정되는 것은 아니며, 실시예를 설명하는 과정에서 도면에 도시된 선들의 두께나 구성요소의 크기 등은 설명의 명료성과 편의상 과장되게 도시되어 있을 수 있다.
또한, 상술된 용어들은 본 발명에서의 기능을 고려하여 정의된 용어들로서 이는 사용자, 운용자의 의도 또는 관례에 따라 달라질 수 있으므로, 이러한 용어들에 대한 해석은 본 명세서 전반에 걸친 내용을 토대로 내려져야 할 것이다.
또한, 명시적으로 도시되거나 설명되지 아니하였다 하여도 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자가 본 발명의 기재사항으로부터 본 발명에 의한 기술적 사상을 포함하는 다양한 형태의 변형을 할 수 있음은 자명하며, 이는 여전히 본 발명의 권리범위에 속한다.
또한, 첨부하는 도면을 참조하여 설명된 상기의 실시예들은 본 발명을 설명하기 위한 목적으로 기술된 것이며 본 발명의 권리범위는 이러한 실시예에 국한되지 아니한다.
[부호의 설명]
100, 100', 100", 100"' : 문서 분석 장치
110, 110', 110", 110"' : 입력부
120, 120"', 130', 130", 120"' : 객체 탐지 모델링부
120', 120" : 항목 DB 생성부
130, 130"', 140', 140" : OCR 모델링부
140 : 폼 구성 모델링부
140"' : 가상 셀 폼 구성 모델링부
150, 150"', 160', 170" : 데이터베이스
150', 150" : 폼 구성 모델링부
160" : 신뢰도 평가부
200, 200' : 문서 이미지

Claims (36)

  1. 객체 탐지 모델을 이용하여 인식 대상 이미지에서 임의의 형식(form), 글자 및 숫자 중 적어도 하나의 객체의 위치를 탐지하되, 탐지된 형식, 글자 및 숫자 객체의 둘레를 따라 사각형상을 표시하여 사각형상의 픽셀 위치 값을 생성하며,
    OCR 모델을 이용하여 상기 사각형상의 픽셀 안에서 인식되는 글자 및 숫자 정보를 출력하고, 상기 생성된 사각형상의 픽셀 위치 값을 기반으로 인접한 모든 사각형상의 픽셀들을 연결하며, 상기 연결된 사각형상의 픽셀 위치에 상기 OCR 모델을 통해 인식된 글자 및 숫자 정보를 매칭시켜 디스플레이하는 문서 분석 장치(100, 100', 100", 100"')로 이루어진 OCR 기반 문서 분석 시스템.
  2. 제 1 항에 있어서,
    상기 문서 분석 장치(100')는 임의의 문서에서 사용되는 글자(항목) 정보를 정의한 항목 DB(300')를 생성 및 저장하고,
    상기 인식된 글자에 대하여 항목 DB(300')의 글자 정보와 비교를 통해 교정 여부를 결정하며, 인식된 글자가 교정됨에 따라 상기 인식된 글자, 교정된 글자 및 숫자 정보를 반영하여 디스플레이 하는 것을 특징으로 하는 OCR 기반 문서 분석 시스템.
  3. 제 1 항에 있어서,
    상기 문서 분석 장치(100")는 OCR 모델을 이용한 인식률에 기반한 인식된 글자 및 숫자의 신뢰 점수를 산출하고, 산출된 신뢰 점수를 상기 디스플레이 정보에 반영하여 시각적으로 표시되도록 하고,
    상기 신뢰 점수는 보정 모델을 이용하여 폼, 형상, 위치 중 적어도 하나의 보정 수행에 따라 산출되는 재건율이 추가 반영되는 것을 특징으로 하는 OCR 기반 문서 분석 시스템.
  4. 제 1 항에 있어서,
    상기 문서 분석 장치(100)는 인식 대상 이미지를 수신하는 입력부(110);
    상기 수신된 인식 대상 이미지에서 객체 탐지 모델을 이용하여 임의의 형식(form), 글자 및 숫자 객체 중 적어도 하나의 위치를 탐지하고, 탐지된 형식, 글자 및 숫자 객체의 둘레에 사각형상을 표시하며, 표시된 사각형상의 픽셀 위치 값을 생성하는 객체 탐지 모델링부(120);
    OCR 모델을 이용하여 상기 사각형상의 픽셀 내에서 인식되는 글자 및 숫자 정보를 출력하는 OCR 모델링부(130);
    상기 생성된 사각형상의 픽셀 위치 값과, 상기 인식된 글자 및 숫자 정보를 기반으로 숫자 정보를 갖는 임의의 사각형상의 픽셀 위치를 시작 위치로 하여 좌측 방향과 상측 방향으로 이동하되, 글자 정보가 검색되면 이동중에 검색된 모든 사각형상의 픽셀들을 연결하고, 상기 연결된 사각형상의 픽셀 위치에 상기 OCR 모델을 통해 인식된 글자 및 숫자 정보를 매칭시켜 디스플레이되도록 하는 폼 구성 모델링부(140); 및
    상기 생성된 사각형상의 픽셀 위치 값, 인식된 글자, 숫자 정보 및 매칭 결과와, 특정 기관에서 사용하는 문서 데이터의 폼을 저장하는 데이터베이스(150);를 포함하는 것을 특징으로 하는 OCR 기반 문서 분석 시스템.
  5. 제 4 항에 있어서,
    상기 객체 탐지 모델은 PSENet(Progressive Scale Expansion Network) 기반의 딥러닝 모델을 이용하여 문서 이미지를 포함한 학습 데이터로부터 형식, 글자 및 숫자 객체의 위치 탐지와, 탐지된 형식, 글자 및 숫자 객체의 둘레를 따라 사각형상을 표시하고, 상기 표시된 사각형상의 픽셀 위치 값 생성을 학습하는 것을 특징으로 하는 OCR 기반 문서 분석 시스템.
  6. 제 5 항에 있어서,
    상기 객체 탐지 모델은 원본 이미지, 문서의 임의의 부분이 접혀진 이미지, 문서의 위치가 임의의 각도로 기울어진 이미지, 임의의 조도를 갖는 밝기가 조절된 이미지, 문서에 표시된 내용이 선명하지 않고 끊어진 연결선을 갖는 이미지, 문서의 임의의 부분이 굴곡진 이미지, 숫자와 연결선이 겹쳐진 이미지를 기반으로 학습 데이터를 학습하는 것을 특징으로 OCR 기반 문서 분석 시스템.
  7. 제 4 항에 있어서,
    상기 폼 구성 모델링부(140)는 상기 생성된 사각형상의 픽셀 위치 값과, 상기 인식된 숫자 정보를 기반으로 숫자 정보를 갖는 임의의 사각형상의 픽셀 위치를 시작 위치로 하여 좌측 방향과 상측 방향으로 이동하되,
    이동중에 검색되는 모든 사각형상의 픽셀들을 연결하고, 상기 연결된 사각형상의 배열 정보를 분석하여 미리 저장된 특정 기관 문서의 배열 정보와 비교하며, 상기 비교 결과, 특정 기관 문서의 배열 정보가 매칭되면, 상기 특정 기관 문서의 사각형상 픽셀 위치에 인식된 숫자 정보를 매칭시켜 디스플레이되도록 하는 것을 특징으로 하는 OCR 기반 문서 분석 시스템.
  8. 제 4 항에 있어서,
    상기 폼 구성 모델링부(140)는 생성된 사각형상의 픽셀 중심점에 마커(520)를 표시하고, 상기 인식된 숫자 정보를 기반으로 숫자 정보를 갖는 임의의 사각형상의 픽셀 위치를 시작 위치로 하여 좌측 방향과 상측 방향으로 이동하되,
    이동중에 검색되는 모든 사각형상의 픽셀들을 연결하고, 연결된 사각형상의 마커(520) 위치 정보를 분석하여 미리 저장된 특정 기관 문서의 배열 정보와 비교하며, 상기 비교 결과, 특정 기관 문서의 배열 정보가 매칭되면, 상기 특정 기관 문서의 사각형상 픽셀 위치에 인식된 숫자 정보를 매칭시켜 디스플레이되도록 하는 것을 특징으로 하는 OCR 기반 문서 분석 시스템.
  9. 제 1 항 또는 제 2 항에 있어서,
    상기 문서 분석 장치(100')는 인식 대상 이미지를 수신하는 입력부(110');
    상기 인식 대상 이미지에서 인식되는 글자 정보와 비교하기 위해, 임의의 문서에서 사용되는 글자(항목) 정보를 정의한 항목 DB(300')를 생성하는 항목 DB 생성부(120');
    상기 수신된 인식 대상 이미지에서 객체 탐지 모델을 이용하여 임의의 형식(form), 글자 및 숫자 객체 중 적어도 하나의 위치를 탐지하고, 탐지된 형식, 글자 및 숫자 객체의 둘레에 사각형상을 표시하며, 표시된 사각형상의 픽셀 위치 값을 생성하는 객체 탐지 모델링부(130');
    OCR 모델을 이용하여 상기 사각형상의 픽셀 내에서 인식되는 글자 및 숫자 정보를 출력하는 OCR 모델링부(140');
    상기 인식된 글자 정보를 항목 DB(300')와 비교하고, 인식된 글자를 항목 DB(300')의 글자 정보로 교정함에 따라 숫자 정보를 갖는 임의의 사각형상의 픽셀 위치를 시작 위치로 하여 좌측 방향과 상측 방향으로 이동하되, 글자 정보가 검색되면 이동중에 검색된 모든 사각형상의 픽셀들을 연결하고, 상기 연결된 사각형상의 픽셀 위치에 상기 OCR 모델을 통해 교정된 글자 및 숫자 정보를 매칭시켜 디스플레이되도록 하는 폼 구성 모델링부(150'); 및
    상기 생성된 사각형상의 픽셀 위치 값, 교정된 글자 및 숫자 정보 및 매칭 결과와, 특정 기관에서 사용하는 문서 데이터의 폼을 저장하는 데이터베이스(160');를 포함하는 것을 특징으로 하는 OCR 기반 문서 분석 시스템.
  10. 제 9 항에 있어서,
    상기 폼 구성 모델링부(150')는 자연어 처리(Natural Language Processing, NLP)를 통해 탐지된 글자에 대하여 분석하는 것을 특징으로 하는 OCR 기반 문서 분석 시스템.
  11. 제 10 항에 있어서,
    상기 폼 구성 모델링부(150')는 인식된 글자와 항목 DB(300') 정보 사이를 비교하여 인식된 글자에 대한 신뢰 점수를 산출하는 것을 특징으로 하는 OCR 기반 문서 분석 시스템.
  12. 제 11 항에 있어서,
    상기 폼 구성 모델링부(150')는 숫자 객체의 사각형상 픽셀 크기에 대하여 가로, 세로 길이가 인접한 다른 사각형상 픽셀의 가로, 세로 길이와 동일하거나 또는 다른 박스의 가로, 세로 길이에 포함되면 연결되도록 하는 것을 특징으로 하는 OCR 기반 문서 분석 시스템.
  13. 제 12 항에 있어서,
    상기 폼 구성 모델링부(150')는 가장 가까운 좌측 및 상측의 사각형상 픽셀 중 적어도 하나를 연결하되, 연결된 사각형상 픽셀 내의 글자 객체를 찾을 때까지 연결하는 것을 특징으로 하는 OCR 기반 문서 분석 시스템.
  14. 제 11 항에 있어서,
    상기 폼 구성 모델링부(150')는 검색된 사각형상의 픽셀(920')이 빈 칸이면, 좌측방향에 위치한 다음 사각형상의 픽셀과 연결하는 것을 특징으로 하는 OCR 기반 문서 분석 시스템.
  15. 제 1 항 또는 제 3 항에 있어서,
    상기 문서 분석 장치(100')는 신뢰 점수에 따라 정상 인식 영역과, 틀린 영역 및 보정 영역을 포함한 오류발생 영역이 서로 다른 색상의 시각화 정보로 표시되도록 하는 것을 특징으로 하는 OCR 기반 문서 분석 시스템.
  16. 제 1 항 또는 제 3 항에 있어서,
    인식 대상 이미지를 수신하는 입력부(110");
    상기 수신된 인식 대상 이미지에서 객체 탐지 모델을 이용하여 형식, 글자 및 숫자 객체 중 적어도 하나의 위치를 탐지하고, 탐지된 형식, 글자 및 숫자 객체의 둘레에 사각형상을 표시하며, 표시된 사각형상의 픽셀 위치 값을 생성하는 객체 탐지 모델링부(130");
    OCR 모델을 이용하여 상기 사각형상의 픽셀 내에서 인식되는 글자 및 숫자 정보를 출력하는 OCR 모델링부(140");
    상기 인식된 글자를 항목 DB(300')의 글자 정보로 교정함에 따라 숫자 정보를 갖는 임의의 사각형상의 픽셀 위치를 시작 위치로 하여 좌측 방향과 상측 방향으로 이동하되, 글자 정보가 검색되면 이동중에 검색된 모든 사각형상의 픽셀들을 연결하고, 상기 연결된 사각형상의 픽셀 위치에 상기 OCR 모델을 통해 교정된 글자 및 숫자 정보를 매칭시켜 디스플레이되도록 하는 폼 구성 모델링부(150");
    보정 모델을 이용하여 상기 인식된 글자 및 숫자의 신뢰 점수를 산출하고, 산출된 신뢰 점수를 기반으로 상기 디스플레이에 반영하여 시각적으로 표시되도록 하는 신뢰도 평가부(160"); 및
    상기 생성된 사각형상의 픽셀 위치 값, 인식된 글자, 숫자 정보, 신뢰 정보와, 특정 기관에서 사용하는 문서 데이터의 폼을 저장하는 데이터베이스(170");를 포함하는 것을 특징으로 하는 OCR 기반 문서 분석 시스템.
  17. 제 16 항에 있어서,
    상기 인식 대상 이미지에 포함된 글자에 대하여 임의의 문서로부터 미리 설정된 글자에 대한 항목 DB(300') 정보를 생성하는 항목 DB 생성부(120");를 더 포함하고,
    상기 폼 구성 모델링부(150")는 상기 탐지된 글자 객체에 대하여 항목 DB(300') 정보와 매칭시키고, 매칭 결과에 따라 인식된 글자가 교정되면, 상기 교정된 글자가 반영되도록 하는 것을 특징으로 하는 OCR 기반 문서 분석 시스템.
  18. 제 16 항에 있어서,
    상기 폼 구성 모델링부(150")는 글자 및 숫자의 사각형상 박스의 색상을 정상 인식 영역과, 틀린 영역 및 보정 영역을 포함한 오류발생 영역이 서로 다른 색상으로 표시되는 것을 특징으로 하는 OCR 기반 문서 분석 시스템.
  19. 제 1 항에 있어서,
    상기 문서 분석 장치(100"')는 상기 생성된 글자 객체의 픽셀 위치 값을 기반으로 이미지의 좌측 영역에 글자 객체가 배치되는 좌측 헤더 영역(500"')과, 이미지의 상측 영역에 글자 객체가 배치되는 상측 헤더 영역(510"')으로 구분하되, 상기 좌측 헤더 영역(500"')과 상측 헤더 영역(510"')을 기준으로 가상 셀 객체를 생성하여 배치하고, 상기 배치된 가상 셀 객체와 숫자 객체를 매칭시켜 행/열(row/column) 정보를 기반으로 연결하여 상기 OCR 모델을 통해 인식된 글자 및 숫자 정보가 디스플레이되도록 하는 특징으로 하는 OCR 기반 문서 분석 시스템.
  20. 제 19 항에 있어서,
    상기 문서 분석 장치(100"')는 인식 대상 이미지를 수신하는 입력부(110"');
    상기 수신된 인식 대상 이미지에서 객체 탐지 모델을 이용하여 임의의 형식(form), 글자 및 숫자 객체 중 적어도 하나의 위치를 탐지하고, 탐지된 형식, 글자 및 숫자 객체의 둘레에 사각형상을 표시하며, 표시된 글자 및 숫자 객체의 픽셀 위치 값을 생성하는 객체 탐지 모델링부(120"');
    OCR 모델을 이용하여 상기 사각형상의 픽셀 내에서 인식되는 글자 및 숫자 정보를 출력하는 OCR 모델링부(130"');
    상기 생성된 글자 객체의 픽셀 위치 값을 기반으로 이미지의 좌측 영역에 글자 객체가 배치되는 좌측 헤더 영역(500"')과, 이미지의 상측 영역에 글자 객체가 배치되는 상측 헤더 영역(510"')으로 구분하고, 상기 좌측 헤더 영역(500"')과 상측 헤더 영역(510"')을 기준으로 M×N 크기의 가상 셀 객체를 생성하여 배치하며, 상기 배치된 가상 셀 객체와 숫자 객체를 매칭시켜 행/열 정보를 기반으로 연결하여 상기 OCR 모델을 통해 인식된 글자 및 숫자 정보가 디스플레이되도록 하는 가상 셀 폼 구성 모델링부(140"'); 및
    상기 생성된 사각형상의 픽셀 위치 값, 인식된 글자, 숫자 정보 및 매칭 결과와, 특정 기관에서 사용하는 문서 데이터의 폼을 저장하는 데이터베이스(150"');를 포함하는 것을 특징으로 하는 OCR 기반 문서 분석 시스템.
  21. 제 19 항에 있어서,
    상기 가상 셀 폼 구성 모델링부(140"')는 글자 객체의 좌측 헤더 영역(500"')과 상측 헤더 영역(510"')을 구분하되,
    상기 구분된 좌측 헤더 영역(500"')과 상측 헤더 영역(510"')에 포함된 글자 객체 사이의 간격 및 크기를 산출하고, 상기 구분된 좌측 헤더 영역(500"')과 상측 헤더 영역(510"')을 기준으로 가상 셀 객체를 배치하는 것을 특징으로 하는 OCR 기반 문서 분석 시스템.
  22. 제 19 항에 있어서,
    상기 가상 셀 폼 구성 모델링부(140"')는 좌측 상단에 배치된 가상 셀 객체와 숫자 객체를 매칭하되,
    상기 매칭된 숫자 객체와 가상 셀 객체 사이의 기울기를 산출하고, 상기 산출된 기울기는 우측 하단에 배치된 가상 셀 객체와 숫자 객체의 매칭까지 반영되도록 하는 것을 특징으로 하는 OCR 기반 문서 분석 시스템.
  23. a) 문서 분석 장치(100, 100', 100")가 수신된 인식 대상 이미지에서 객체 탐지 모델을 이용하여 임의의 형식, 글자 및 숫자 객체 중 적어도 하나의 위치를 탐지하고, 탐지된 형식, 글자 및 숫자 객체의 둘레에 사각형상을 표시하여 사각형상의 픽셀 위치 값을 생성하는 단계;
    b) 상기 문서 분석 장치(100, 100', 100")가 OCR 모델을 이용하여 탐지된 사각형상 픽셀 안에서 인식되는 글자 및 숫자 정보를 출력하는 단계; 및
    c) 상기 문서 분석 장치(100, 100', 100")가 상기 생성된 사각형상의 픽셀 위치 값과, 상기 인식된 글자 및 숫자 정보를 기반으로 숫자 정보를 갖는 임의의 사각형상의 픽셀 위치를 시작 위치로 하여 좌측 방향과 상측 방향으로 이동하되, 글자 정보가 검색되면 이동중에 검색된 모든 사각형상의 픽셀들을 연결하고, 상기 연결된 사각형상의 픽셀 위치에 상기 OCR 모델을 통해 인식된 글자 및 숫자 정보를 매칭시켜 디스플레이되도록 하는 단계;를 포함하는 OCR 기반 문서 분석 방법.
  24. 제 23 항에 있어서,
    상기 a) 단계의 객체 탐지 모델은 PSENet(Progressive Scale Expansion Network) 기반의 딥러닝 모델을 이용하여 문서 이미지를 포함한 학습 데이터로부터 형상, 글자 및 숫자 객체의 위치 탐지와, 탐지된 형상, 글자 및 숫자 객체의 둘레를 따라 사각형상의 박스와 상기 사각형상의 픽셀 위치 값 생성을 학습하는 것을 특징으로 하는 OCR 기반 문서 분석 방법.
  25. 제 23 항에 있어서,
    상기 a) 단계의 객체 탐지 모델은 원본 이미지, 문서의 임의의 부분이 접혀진 이미지, 문서의 위치가 임의의 각도로 기울어진 이미지, 임의의 조도를 갖는 밝기가 조절된 이미지, 문서에 표시된 내용이 선명하지 않고 끊어진 연결선을 갖는 이미지, 문서의 임의의 부분이 굴곡진 이미지, 숫자와 연결선이 겹쳐진 이미지를 기반으로 학습 데이터를 학습하는 것을 특징으로 하는 OCR 기반 문서 분석 방법.
  26. 제 23 항에 있어서,
    상기 c) 단계는 c-1) 생성된 사각형상의 픽셀 위치 값과, 상기 인식된 글자 및 숫자 정보를 기반으로 숫자 정보를 갖는 임의의 사각형상의 픽셀 위치를 시작 위치로 하여 글자 정보가 검색될 때까지 좌측 방향과 상측 방향으로 이동하는 단계;
    c-2) 상기 글자 정보가 검색되면 이동중에 검색된 모든 사각형상의 픽셀들을 연결하는 단계; 및
    c-3) 상기 사각형상의 픽셀 위치에는 인식된 글자와 숫자 정보를 매칭시켜 디스플레이하는 단계;를 포함하는 것을 특징으로 하는 OCR 기반 문서 분석 방법.
  27. 제 23 항에 있어서,
    상기 c) 단계는 c'-1) 상기 생성된 사각형상의 픽셀 위치 값과, 상기 인식된 숫자 정보를 기반으로 숫자 정보를 갖는 임의의 사각형상의 픽셀 위치를 시작 위치로 하여 좌측 방향과 상측 방향으로 이동하는 단계;
    c'-2) 상기 이동중에 검색되는 모든 사각형상의 픽셀들을 연결하는 단계; 및
    c'-3) 상기 연결된 사각형상의 배열 정보를 분석하여 미리 저장된 특정 기관 문서의 배열 정보와 비교하며, 상기 비교 결과, 특정 기관 문서의 배열 정보가 매칭되면, 상기 특정 기관 문서의 사각형상 픽셀 위치에 인식된 숫자 정보를 매칭시켜 디스플레이하는 단계;를 포함하는 것을 특징으로 하는 OCR 기반 문서 분석 방법.
  28. 제 23 항에 있어서,
    상기 c) 단계는 c"-1) 생성된 사각형상의 픽셀의 중심점에 마커(520)를 표시하는 단계;
    c"-2) 상기 인식된 숫자 정보를 기반으로 숫자 정보를 갖는 임의의 사각형상의 픽셀 위치를 시작 위치로 하여 좌측 방향과 상측 방향으로 이동하고, 이동중에 검색되는 모든 사각형상의 픽셀들을 연결하는 단계;
    c"-3) 연결된 사각형상의 마커(520) 위치 정보를 분석하여 미리 저장된 특정 기관 문서의 배열 정보와 비교하는 단계; 및
    c"-4) 상기 비교 결과, 특정 기관 문서의 배열 정보가 매칭되면, 상기 특정 기관 문서의 사각형상 픽셀 위치에 인식된 숫자 정보를 매칭시켜 디스플레이하는 단계;를 포함하는 것을 특징으로 하는 OCR 기반 문서 분석 방법.
  29. 제 23 항에 있어서,
    상기 b) 단계는 문서 분석 장치(100', 100")가 상기 인식 대상 이미지에서 인식되는 글자 정보와 비교하기 위해, 임의의 문서에서 사용되는 글자(항목) 정보를 정의한 항목 DB(300')를 생성하는 단계; 및
    문서 분석 장치(100', 100")가 탐지된 글자 객체에 대하여 항목 DB(300') 정보와 매칭시키고, 매칭 결과에 따라 인식된 글자를 교정하는 단계;를 더 포함하는 것을 특징으로 하는 OCR 기반 문서 분석 방법.
  30. 제 29 항에 있어서,
    상기 문서 분석 탐지 장치(100')는 탐지된 글자 객체에 대하여 자연어 처리(Natural Language Processing, NLP)를 통해 글자를 분석하고,
    분석된 글자와 항목 DB(300') 정보 사이의 비교를 기반으로 분석된 글자에 대한 신뢰 점수를 산출하여 인식된 글자의 교정 여부를 판단하며, 상기 인식된 글자의교정을 수행함에 따라 NLP 기반의 교정을 수행하는 것을 특징으로 하는 OCT 기반 문서 분석 방법.
  31. 제 29 항에 있어서,
    문서 분석 장치(100')는 사각형상의 픽셀이 빈칸이면, 좌측방향에 위치한 다음 사각형상의 픽셀과 연결하는 것을 특징으로 하는 OCR 기반 문서 분석 방법.
  32. 제 23 항 또는 제 29 항에 있어서,
    d) 상기 문서 분석 장치(100")가 보정 모델을 이용하여 상기 인식된 글자 및 숫자의 신뢰 점수를 산출하고, 산출된 신뢰 점수를 기반으로 디스플레이에 반영하여 시각적으로 표시하는 단계;를 더 포함하는 것을 특징으로 하는 OCR 기반 문서 분석 방법.
  33. 제 32 항에 있어서,
    상기 d) 단계의 보정 모델은 폼, 형상, 위치 중 적어도 하나의 보정 수행에 따른 재건율과, 항목 DB(300') 정보와의 매칭 결과에 따른 교정된 글자의 반영 여부에 기반하여 신뢰 점수를 산출하는 것을 특징으로 하는 OCR 기반 문서 분석 방법.
  34. i) 문서 분석 장치(100"')가 인식 대상 이미지를 수신하는 단계;
    ii) 상기 문서 분석 장치(100"')가 수신된 인식 대상 이미지에서 객체 탐지 모델을 이용하여 임의의 형식, 글자 및 숫자 객체 중 적어도 하나의 위치를 탐지하고, 탐지된 형식, 글자 및 숫자 객체의 둘레에 사각형상을 표시하여 글자 및 숫자 객체의 픽셀 위치 값을 생성하는 단계;
    iii) 상기 문서 분석 장치(100"')가 OCR 모델을 이용하여 탐지된 사각형상 픽셀 안에서 인식되는 글자 및 숫자 정보를 출력하는 단계; 및
    iv) 상기 문서 분석 장치(100"')가 상기 생성된 글자 객체의 픽셀 위치 값을 기반으로 이미지의 좌측 영역에 글자 객체가 배치되는 좌측 헤더 영역(500"')과, 이미지의 상측 영역에 글자 객체가 배치되는 상측 헤더 영역(510"')으로 구분하고, 상기 좌측 헤더 영역(500"')과 상측 헤더 영역(510"')을 기준으로 가상 셀 객체를 생성하여 배치하고, 상기 배치된 가상 셀 객체와 숫자 객체를 매칭시켜 행/열 정보를 기반으로 연결하여 상기 OCR 모델을 통해 인식된 글자 및 숫자 정보가 디스플레이되도록 최종 결과를 출력하는 단계;를 포함하는 OCR 기반 문서 분석 방법.
  35. 제 34 항에 있어서,
    상기 iv) 단계의 글자 객체의 좌측 및 상측 픽셀 위치를 기준으로 배치하는 단계는 iv-1) 문서 분석 장치(100"')가 글자 객체의 좌측 헤더 영역(500"')과 상측 헤더 영역(510"')을 구분하는 단계;
    iv-2) 상기 구분된 좌측 헤더 영역(500"')과 상측 헤더 영역(510"')에 포함된 글자 객체 사이의 간격 및 크기를 산출하는 단계; 및
    iv-3) 상기 구분된 좌측 헤더 영역(500"')과 상측 헤더 영역(510"')을 기준으로 가상 셀 객체를 배치하는 단계를 포함하는 것을 특징으로 하는 OCR 기반 문서 분석 방법.
  36. 제 34 항에 있어서,
    상기 iv) 단계의 배치된 가상 셀 객체와 숫자 객체를 매칭시켜 행/열 정보를 기반으로 연결하는 단계는 iv-4) 상기 문서 분석 장치(100"')가 좌측 상단에 배치된 가상 셀 객체와 숫자 객체를 매칭하여 숫자 객체와 가상 셀 객체 사이의 기울기를 산출하는 단계; 및
    iv-5) 상기 문서 분석 장치(100"')가 행/열 정보에 따라 순차적으로 이동하며 상기 산출된 기울기를 우측 하단에 배치된 가상 셀 객체와 숫자 객체의 매칭까지 반영하여 연결하는 단계를 포함하는 것을 특징으로 하는 OCR 기반 문서 분석 방법.
PCT/KR2020/011210 2020-04-24 2020-08-21 Ocr 기반 문서 분석 시스템 및 방법 WO2021215589A1 (ko)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2022563495A JP7444495B2 (ja) 2020-04-24 2020-08-21 Ocrベース文書分析システム及び方法

Applications Claiming Priority (6)

Application Number Priority Date Filing Date Title
KR10-2020-0050181 2020-04-24
KR10-2020-0050179 2020-04-24
KR1020200050181A KR102149051B1 (ko) 2020-04-24 2020-04-24 자기 신뢰도 정보를 이용한 ocr 기반 문서 분석 시스템 및 방법
KR1020200050180A KR102149052B1 (ko) 2020-04-24 2020-04-24 Nlp를 이용한 ocr 기반 문서 분석 시스템 및 방법
KR10-2020-0050180 2020-04-24
KR1020200050179A KR102149050B1 (ko) 2020-04-24 2020-04-24 인공지능을 이용한 ocr 기반 문서 분석 시스템 및 방법

Publications (1)

Publication Number Publication Date
WO2021215589A1 true WO2021215589A1 (ko) 2021-10-28

Family

ID=78269491

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2020/011210 WO2021215589A1 (ko) 2020-04-24 2020-08-21 Ocr 기반 문서 분석 시스템 및 방법

Country Status (2)

Country Link
JP (1) JP7444495B2 (ko)
WO (1) WO2021215589A1 (ko)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114120322A (zh) * 2022-01-26 2022-03-01 深圳爱莫科技有限公司 订单商品数量识别结果校正方法及处理设备
CN116168409A (zh) * 2023-04-20 2023-05-26 广东聚智诚科技有限公司 一种应用于标准、专利分析报告自动生成系统
CN116311311A (zh) * 2023-05-23 2023-06-23 荣耀终端有限公司 电子表格生成方法、装置、电子设备及可读存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060114097A (ko) * 2005-04-27 2006-11-06 최철규 광학문자인식 기능을 활용한 재무제표인식 방법 및 그시스템
JP2011150466A (ja) * 2010-01-20 2011-08-04 Fujitsu Ltd 文字列認識装置、文字列認識プログラムおよび文字列認識方法
KR101860569B1 (ko) * 2011-09-08 2018-07-03 삼성전자주식회사 문자 및 바코드를 동시에 인식하는 문자 및 바코드 인식 장치 및 그 제어 방법
KR20190050067A (ko) * 2017-11-02 2019-05-10 (주)중외정보기술 자연어 처리 기반 요양급여 심사지원 서비스 시스템 및 방법

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6702629B2 (ja) 2014-12-27 2020-06-03 株式会社 ハンモック 活字ocrシステム
JP2019191665A (ja) 2018-04-18 2019-10-31 Tis株式会社 財務諸表読取装置、財務諸表読取方法及びプログラム

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060114097A (ko) * 2005-04-27 2006-11-06 최철규 광학문자인식 기능을 활용한 재무제표인식 방법 및 그시스템
JP2011150466A (ja) * 2010-01-20 2011-08-04 Fujitsu Ltd 文字列認識装置、文字列認識プログラムおよび文字列認識方法
KR101860569B1 (ko) * 2011-09-08 2018-07-03 삼성전자주식회사 문자 및 바코드를 동시에 인식하는 문자 및 바코드 인식 장치 및 그 제어 방법
KR20190050067A (ko) * 2017-11-02 2019-05-10 (주)중외정보기술 자연어 처리 기반 요양급여 심사지원 서비스 시스템 및 방법

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
WANG WENHAI; XIE ENZE; LI XIANG; HOU WENBO; LU TONG; YU GANG; SHAO SHUAI: "Shape Robust Text Detection With Progressive Scale Expansion Network", 2019 IEEE/CVF CONFERENCE ON COMPUTER VISION AND PATTERN RECOGNITION (CVPR), IEEE, 15 June 2019 (2019-06-15), pages 9328 - 9337, XP033686972, DOI: 10.1109/CVPR.2019.00956 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114120322A (zh) * 2022-01-26 2022-03-01 深圳爱莫科技有限公司 订单商品数量识别结果校正方法及处理设备
CN114120322B (zh) * 2022-01-26 2022-05-10 深圳爱莫科技有限公司 订单商品数量识别结果校正方法及处理设备
CN116168409A (zh) * 2023-04-20 2023-05-26 广东聚智诚科技有限公司 一种应用于标准、专利分析报告自动生成系统
CN116168409B (zh) * 2023-04-20 2023-07-21 广东聚智诚科技有限公司 一种应用于标准、专利分析报告自动生成系统
CN116311311A (zh) * 2023-05-23 2023-06-23 荣耀终端有限公司 电子表格生成方法、装置、电子设备及可读存储介质
CN116311311B (zh) * 2023-05-23 2023-10-10 荣耀终端有限公司 电子表格生成方法、装置、电子设备及可读存储介质

Also Published As

Publication number Publication date
JP2023522360A (ja) 2023-05-30
JP7444495B2 (ja) 2024-03-06

Similar Documents

Publication Publication Date Title
WO2021215589A1 (ko) Ocr 기반 문서 분석 시스템 및 방법
WO2016018004A1 (en) Method, apparatus, and system for providing translated content
WO2016036045A1 (ko) 근거리 무선 통신을 지원하는 화상형성장치 및 그 화상형성장치의 동작 방법, 근거리 무선 통신을 지원하는 모바일 단말 및 그 단말의 동작 방법 및 근거리 무선 통신을 이용한 클라우드 프린트 시스템
WO2016017975A1 (en) Method of modifying image including photographing restricted element, and device and system for performing the method
WO2015133699A1 (ko) 객체 식별 장치, 그 방법 및 컴퓨터 프로그램이 기록된 기록매체
WO2010021527A2 (ko) 영상에 포함된 객체를 색인하는 시스템 및 방법
WO2016126081A1 (en) Cloud print server and method of providing automatic connection service performed by the cloud print server
WO2015030556A1 (en) Apparatus and method for displaying chart in electronic device
WO2021132851A1 (ko) 전자 장치, 두피 케어 시스템 및 그들의 제어 방법
WO2015111840A1 (ko) 프레임 클러스터링을 이용한 광고 삽입 장치 및 방법
WO2018143707A1 (ko) 메이크업 평가 시스템 및 그의 동작 방법
WO2021071012A1 (ko) 무매체 신원 확인을 통한 상품 구매 서비스 제공 장치 및 방법
WO2018101534A1 (ko) 전자 문서 컨버팅 방법 및 이를 수행하는 시스템
WO2022050507A1 (ko) 태양광 발전 모듈 모니터링 방법 및 시스템
WO2020117006A1 (ko) Ai 기반의 안면인식시스템
WO2015183050A1 (ko) 옵티컬 트래킹 시스템 및 옵티컬 트래킹 시스템의 마커부 자세 및 위치 산출방법
WO2017217656A1 (ko) 동영상 압축방법, 장치 및 이에 대한 컴퓨터 프로그램
WO2016060409A2 (ko) 전자펜, 전자펜과 연동되는 전자기기 및 전자기기의 제어방법
WO2018212608A1 (ko) 구동형 마킹 시스템, 구동형 마킹 장치의 제어방법 및 컴퓨터 판독 가능한 기록매체
WO2018088667A1 (en) Display device
WO2022103236A1 (ko) 선수 추적 방법, 선수 추적 장치 및 선수 추적 시스템
WO2014178610A1 (ko) 옵티컬 트랙킹 시스템 및 이를 이용한 트랙킹 방법
WO2023101114A1 (ko) 이미지 내에 포함된 텍스트를 번역하고 편집하는 방법 및 이를 수행하는 장치
WO2021158058A1 (en) Method for providing filter and electronic device supporting the same
EP4014196A1 (en) Electronic device and method for operating screen capturing by electronic device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20931758

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2022563495

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20931758

Country of ref document: EP

Kind code of ref document: A1