JP2020027598A - Character recognition device, character recognition method, and character recognition program - Google Patents
Character recognition device, character recognition method, and character recognition program Download PDFInfo
- Publication number
- JP2020027598A JP2020027598A JP2018244224A JP2018244224A JP2020027598A JP 2020027598 A JP2020027598 A JP 2020027598A JP 2018244224 A JP2018244224 A JP 2018244224A JP 2018244224 A JP2018244224 A JP 2018244224A JP 2020027598 A JP2020027598 A JP 2020027598A
- Authority
- JP
- Japan
- Prior art keywords
- regions
- character recognition
- character
- image
- sub
- Prior art date
- Legal status (The legal status 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 status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 32
- 230000014509 gene expression Effects 0.000 claims description 7
- 230000006870 function Effects 0.000 claims description 2
- 238000004891 communication Methods 0.000 description 10
- 238000010586 diagram Methods 0.000 description 7
- 238000012015 optical character recognition Methods 0.000 description 6
- 238000004364 calculation method Methods 0.000 description 4
- 238000013527 convolutional neural network Methods 0.000 description 3
- 238000000605 extraction Methods 0.000 description 3
- 101150013335 img1 gene Proteins 0.000 description 3
- 239000007787 solid Substances 0.000 description 3
- 238000013434 data augmentation Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000007689 inspection Methods 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 238000013528 artificial neural network Methods 0.000 description 1
- 238000011478 gradient descent method Methods 0.000 description 1
- 230000012447 hatching Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 239000003550 marker Substances 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 210000001525 retina Anatomy 0.000 description 1
Images
Abstract
Description
本発明は、文字認識装置、文字認識方法及び文字認識プログラムに関する。 The present invention relates to a character recognition device, a character recognition method, and a character recognition program.
従来、OCR(Optical Character Recognition)と呼ばれる画像に含まれる文字を認識する技術が用いられている。画像中の文字の記載箇所や大きさが統一されている場合、OCRによって高い精度で文字を認識し、画像から文字情報を抽出することができる。 Conventionally, a technique called OCR (Optical Character Recognition) for recognizing characters included in an image has been used. When the description location and size of characters in an image are unified, characters can be recognized with high accuracy by OCR, and character information can be extracted from the image.
例えば、下記特許文献1には、領収書の画像データから文字列情報と位置情報とを取得する画像処理プログラムが記載されている。特許文献1に記載された画像処理プログラムは、位置情報に対応する位置にマーカーを表示し、項目情報の種類に応じて、複数の値を合算する第一処理又は複数の値のうち1つを選択する第二処理を実行する。
For example,
画像中の文字の記載箇所や大きさが統一されている場合、従来のOCR技術によって高い精度で画像から文字情報を抽出することができる。しかしながら、複数の項目が含まれる書類の画像の場合、従来のOCR技術では複数の項目に記載された文字を適切に認識することが難しかった。 When the description location and size of characters in an image are unified, character information can be extracted from the image with high accuracy by the conventional OCR technology. However, in the case of a document image including a plurality of items, it has been difficult for the conventional OCR technology to appropriately recognize the characters described in the plurality of items.
そのため、書類画像に含まれる複数の項目の領域を抽出し、複数の項目の領域それぞれについてOCR技術を適用して文字を認識することが検討されている。ここで、書類画像から複数の項目の領域を抽出するために、ニューラルネットワーク等の画像認識モデルを用いることがある。 Therefore, it has been studied to extract regions of a plurality of items included in a document image and recognize characters by applying the OCR technique to each of the regions of the plurality of items. Here, an image recognition model such as a neural network may be used to extract regions of a plurality of items from a document image.
しかしながら、書類に含まれる項目の数は、画像認識モデルによって区別可能な領域の数よりも多い場合があり、書類画像に含まれる複数の項目の領域が適切に抽出できないことがある。 However, the number of items included in the document may be larger than the number of regions that can be distinguished by the image recognition model, and the region of a plurality of items included in the document image may not be appropriately extracted.
そこで、本発明は、複数の項目が含まれる書類であっても、複数の項目の領域を適切に抽出するように画像認識モデルを構築することができる文字認識装置、文字認識方法及び文字認識プログラムを提供する。 Therefore, the present invention provides a character recognition device, a character recognition method, and a character recognition program capable of constructing an image recognition model so as to appropriately extract regions of a plurality of items even in a document including a plurality of items. I will provide a.
本発明の一態様に係る文字認識装置は、書類に記載された文字を認識する文字認識装置であって、入力に基づいて、書類の画像について複数の領域を設定する第1設定部と、入力に基づいて、複数の領域いずれかに含まれる複数の副領域を設定する第2設定部と、入力に基づいて、複数の領域及び複数の副領域に対して、領域の種類を設定する第3設定部と、画像における複数の領域の位置、複数の領域における複数の副領域の位置及び領域の種類を含む、1又は複数の画像認識モデルの教師有り学習に用いる学習用データを生成する生成部と、を備える。 A character recognition device according to one aspect of the present invention is a character recognition device for recognizing characters described in a document, comprising: a first setting unit configured to set a plurality of regions in a document image based on an input; A second setting unit that sets a plurality of sub-regions included in any of the plurality of regions based on the input; A setting unit and a generation unit that generates learning data used for supervised learning of one or a plurality of image recognition models, including positions of a plurality of regions in an image, positions of a plurality of sub-regions in the plurality of regions, and types of regions. And.
この態様によれば、書類に含まれる項目の数が、画像認識モデルによって区別可能な領域の数よりも多い場合であっても、複数の領域の数を画像認識モデルによって区別可能な領域の数よりも少なく設定し、複数の領域いずれかに含まれる複数の副領域を設定して、複数の項目に対応する領域を設定することができる。これにより、複数の領域と複数の副領域を段階的に識別し、それらの領域の種類を識別する画像認識モデルを構築することができ、複数の項目が含まれる書類であっても、複数の項目の領域を適切に抽出するように画像認識モデルを構築することができる。 According to this aspect, even when the number of items included in the document is larger than the number of areas that can be distinguished by the image recognition model, the number of the plurality of areas is reduced by the number of areas that can be distinguished by the image recognition model. It is possible to set a smaller number, set a plurality of sub-areas included in any of the plurality of areas, and set an area corresponding to a plurality of items. This makes it possible to identify a plurality of areas and a plurality of sub-areas in a stepwise manner and to construct an image recognition model for identifying the type of those areas. Even if the document includes a plurality of items, a plurality of areas can be identified. An image recognition model can be constructed so as to appropriately extract a region of an item.
上記態様において、生成部は、1又は複数の画像認識モデルの教師有り学習に用いる複数種類の学習用データを生成してもよい。 In the above aspect, the generation unit may generate a plurality of types of learning data used for supervised learning of one or a plurality of image recognition models.
この態様によれば、複数の領域、複数の副領域及び領域の種類を一度設定することで、1又は複数の画像認識モデルの教師有り学習に用いる複数種類の学習用データをまとめて生成することができ、複数種類の学習用データを効率的に生成することができる。 According to this aspect, by setting a plurality of regions, a plurality of sub-regions, and a type of the region once, a plurality of types of learning data used for supervised learning of one or a plurality of image recognition models are collectively generated. Thus, a plurality of types of learning data can be efficiently generated.
上記態様において、生成部は、複数の領域及び複数の副領域の輪郭を、領域の種類毎に異なる態様で表した第1種の学習用データと、複数の領域及び複数の副領域を、領域の種類毎に異なる態様で塗り潰した第2種の学習用データと、を生成してもよい。 In the above aspect, the generation unit may include a first type of learning data in which the outlines of the plurality of regions and the plurality of sub-regions are expressed in a different manner for each type of region, and the plurality of regions and the plurality of sub-regions. And the second type of learning data painted in a different manner for each type.
この態様によれば、第1種の学習用データによって、複数の領域及び複数の副領域を区別可能な態様で囲むバウンディングボックスを画像に上書きする第1画像認識モデルを生成することができる。また、第2種の学習用データによって、複数の領域及び複数の副領域を区別可能な態様で塗り潰した画像を出力する第2画像認識モデルを生成することができる。 According to this aspect, it is possible to generate a first image recognition model that overwrites an image with a bounding box that surrounds a plurality of regions and a plurality of sub-regions in a distinguishable manner, using the first type of learning data. In addition, a second image recognition model that outputs an image in which a plurality of areas and a plurality of sub-areas are filled in a distinguishable manner can be generated based on the second type of learning data.
上記態様において、1又は複数の画像認識モデルに新たな画像を入力し、1又は複数の画像認識モデルの出力に基づいて、新たな画像に含まれる複数の領域、複数の領域いずれかに含まれる複数の副領域並びに複数の領域及び複数の副領域に対する領域の種類を出力する画像認識部と、複数の領域の画像及び複数の副領域の画像を文字認識モデルに入力し、文字認識モデルの出力に基づいて、複数の領域に含まれる文字及び複数の副領域に含まれる文字を出力する文字認識部と、領域の種類に応じた補正規則を選択し、文字を補正する補正部と、をさらに備えてもよい。 In the above aspect, a new image is input to one or more image recognition models, and is included in any of a plurality of regions included in the new image and a plurality of regions based on outputs of the one or more image recognition models. An image recognition unit that outputs a plurality of sub-regions and a plurality of regions and an area type for the plurality of sub-regions, and inputs the image of the plurality of regions and the image of the plurality of sub-regions to a character recognition model, and outputs the character recognition model A character recognition unit that outputs a character included in the plurality of regions and a character included in the plurality of sub-regions, and a correction unit that selects a correction rule according to the type of the region and corrects the character. May be provided.
この態様によれば、書類に含まれる項目の数が、画像認識モデルによって区別可能な領域の数よりも多い場合であっても、画像認識部によって段階的に全ての領域を識別することができる。また、文字認識部によって、複数の領域及び複数の副領域に含まれる文字を認識し、補正部によって領域の種類に応じた文字の補正を行うことで、書類に含まれる複数の項目に記載された文字を高精度で出力することができる。 According to this aspect, even when the number of items included in the document is larger than the number of regions that can be distinguished by the image recognition model, all the regions can be identified stepwise by the image recognition unit. . In addition, the character recognition unit recognizes characters included in the plurality of regions and the plurality of sub-regions, and corrects characters according to the type of the region using the correction unit. Characters can be output with high precision.
上記態様において、補正部は、複数の正規表現のいずれかを用いて文字の一部を抽出することで、文字を補正してもよい。 In the above aspect, the correction unit may correct the character by extracting a part of the character using one of the plurality of regular expressions.
この態様によれば、記載される文字が定型化されている場合に、文字の一部を抽出することができる。例えば、文字の中から必要な数値を抽出することができる。 According to this aspect, when the character to be described is standardized, a part of the character can be extracted. For example, necessary numerical values can be extracted from characters.
上記態様において、補正部は、文字と候補となる複数の文字列との編集距離を用いて、文字を候補となる複数の文字列のいずれかに置換することで、文字を補正してもよい。 In the above aspect, the correction unit may correct the character by using the edit distance between the character and the plurality of candidate character strings to replace the character with one of the plurality of candidate character strings. .
この態様によれば、項目に記載される文字が限定されている場合に、記載され得ない文字列を排除して、候補となる複数の文字列のいずれかに補正することができる。 According to this aspect, when the characters described in the item are limited, a character string that cannot be described can be excluded and corrected to one of a plurality of candidate character strings.
上記態様において、補正部は、文字コードの範囲を限定して、文字を補正してもよい。 In the above aspect, the correction unit may correct the character by limiting the range of the character code.
この態様によれば、項目に記載される文字コードの範囲が限定されている場合に、記載され得ない文字コードを排除して、文字コードの範囲を限定して文字を補正することができる。 According to this aspect, when the range of the character code described in the item is limited, the character code that cannot be described can be excluded, and the character can be corrected by limiting the range of the character code.
上記態様において、文字認識部は、複数の文字認識モデルのうち、出力の信用度が高い文字認識モデルを選択し、選択した文字認識モデルの出力に基づいて、複数の領域に含まれる文字及び複数の副領域に含まれる文字を出力してもよい。 In the above aspect, the character recognition unit selects a character recognition model having a high degree of credibility of output from among the plurality of character recognition models, and, based on an output of the selected character recognition model, a character included in the plurality of regions and a plurality of characters. Characters included in the sub area may be output.
この態様によれば、出力の信用度が高い文字認識モデルを選択することで、文字認識精度をより向上させることができる。 According to this aspect, the character recognition accuracy can be further improved by selecting a character recognition model having a high output reliability.
上記態様において、文字認識部は、複数の領域及び複数の副領域毎に文字認識モデルを選択してもよい。 In the above aspect, the character recognition unit may select a character recognition model for each of the plurality of regions and the plurality of sub-regions.
この態様によれば、複数の領域及び複数の副領域毎に、適した文字認識モデルを選択することができ、文字認識精度をより向上させることができる。 According to this aspect, a suitable character recognition model can be selected for each of the plurality of regions and the plurality of sub-regions, and the character recognition accuracy can be further improved.
上記態様において、画像認識部は、1又は複数の画像認識モデルのうち、出力の信用度が高い画像認識モデルを選択し、選択した画像認識モデルの出力に基づいて、複数の領域、複数の副領域及び領域の種類を出力してもよい。 In the above aspect, the image recognizing unit selects an image recognition model having a high degree of credibility of output from one or a plurality of image recognition models, and, based on an output of the selected image recognition model, a plurality of regions and a plurality of sub-regions. And the type of area.
この態様によれば、出力の信用度が高い画像認識モデルを選択することで、書類に含まれる複数の項目の認識精度をより向上させることができる。 According to this aspect, it is possible to further improve the recognition accuracy of a plurality of items included in the document by selecting an image recognition model having a high output credibility.
上記態様において、画像認識部は、書類の種類毎に画像認識モデルを選択してもよい。 In the above aspect, the image recognition unit may select an image recognition model for each type of document.
この態様によれば、書類の種類毎に、適した画像認識モデルを選択することができ、書類に含まれる複数の項目の認識精度をより向上させることができる。 According to this aspect, a suitable image recognition model can be selected for each type of document, and the recognition accuracy of a plurality of items included in the document can be further improved.
上記態様において、入力に基づいて、画像認識部により出力された複数の領域、複数の副領域及び領域の種類と、文字認識部により出力された文字と、補正部により補正された文字との少なくともいずれかを修正し、修正されたデータを学習用データに追加する修正部をさらに備えてもよい。 In the above aspect, based on the input, at least one of the plurality of regions output by the image recognition unit, the plurality of sub-regions and the type of the region, the character output by the character recognition unit, and the character corrected by the correction unit. A correction unit that corrects any of them and adds the corrected data to the learning data may be further provided.
この態様によれば、画像認識モデル及び文字認識モデルいずれかの出力が誤っていた場合に、その誤りを修正したデータを学習用データに追加することができ、画像認識モデル及び文字認識モデルの出力精度をより向上させる学習用データを生成することができる。 According to this aspect, when either of the output of the image recognition model and the output of the character recognition model is erroneous, the data in which the error is corrected can be added to the learning data. It is possible to generate learning data that further improves accuracy.
上記態様において、所定のパラメータが設定された学習プログラム及び学習用データを用いて、1又は複数の画像認識モデル及び複数の文字認識モデルの少なくともいずれかの再学習を行う学習部をさらに備えてもよい。 In the above aspect, a learning unit that re-learns at least one of one or a plurality of image recognition models and a plurality of character recognition models using a learning program in which predetermined parameters are set and learning data may be further provided. Good.
この態様によれば、画像認識モデル及び文字認識モデルいずれかの再学習を行うことで、画像認識モデル及び文字認識モデルの出力精度を継続的に向上させることができる。 According to this aspect, the output accuracy of the image recognition model and the character recognition model can be continuously improved by re-learning either the image recognition model or the character recognition model.
上記態様において、学習部は、1又は複数の画像認識モデル及び文字認識モデルの少なくともいずれかの再学習後の出力精度が再学習前の出力精度より低い場合に、所定のパラメータを変更して、1又は複数の画像認識モデル及び文字認識モデルの少なくともいずれかの再学習を実行し直してもよい。 In the above aspect, the learning unit changes a predetermined parameter when the output accuracy after re-learning of at least one of the one or more image recognition models and the character recognition models is lower than the output accuracy before re-learning, Re-learning of at least one of one or more image recognition models and character recognition models may be performed again.
この態様によれば、仮に画像認識モデル及び文字認識モデルいずれかの再学習によって出力精度が低下した場合に、学習プログラムのパラメータを変更して再学習を実行し直し、画像認識モデル及び文字認識モデルの出力精度が向上するようにすることができる。 According to this aspect, if the output accuracy is reduced due to re-learning of either the image recognition model or the character recognition model, the parameters of the learning program are changed and re-learning is performed again, and the image recognition model and the character recognition model are re-executed. Output accuracy can be improved.
本発明の他の態様に係る文字認識方法は、書類に記載された文字を認識する文字認識方法であって、入力に基づいて、書類の画像について複数の領域を設定することと、入力に基づいて、複数の領域いずれかに含まれる複数の副領域を設定することと、入力に基づいて、複数の領域及び複数の副領域に対して、領域の種類を設定することと、画像における複数の領域の位置、複数の領域における複数の副領域の位置及び領域の種類を含む、1又は複数の画像認識モデルの教師有り学習に用いる学習用データを生成することと、を含む。 A character recognition method according to another aspect of the present invention is a character recognition method for recognizing characters described in a document, wherein a plurality of areas are set for an image of the document based on an input, and Setting a plurality of sub-regions included in any of the plurality of regions; setting a region type for the plurality of regions and the plurality of sub-regions based on the input; Generating learning data used for supervised learning of one or a plurality of image recognition models including the position of the region, the positions of the plurality of sub-regions in the plurality of regions, and the type of the region.
この態様によれば、書類に含まれる項目の数が、画像認識モデルによって区別可能な領域の数よりも多い場合であっても、複数の領域の数を画像認識モデルによって区別可能な領域の数よりも少なく設定し、複数の領域いずれかに含まれる複数の副領域を設定して、複数の項目に対応する領域を設定することができる。これにより、複数の領域と複数の副領域を段階的に識別し、それらの領域の種類を識別する画像認識モデルを構築することができ、複数の項目が含まれる書類であっても、複数の項目の領域を適切に抽出するように画像認識モデルを構築することができる。 According to this aspect, even when the number of items included in the document is larger than the number of areas that can be distinguished by the image recognition model, the number of the plurality of areas is reduced by the number of areas that can be distinguished by the image recognition model. It is possible to set a smaller number, set a plurality of sub-areas included in any of the plurality of areas, and set an area corresponding to a plurality of items. This makes it possible to identify a plurality of areas and a plurality of sub-areas in a stepwise manner and to construct an image recognition model for identifying the type of those areas. Even if the document includes a plurality of items, a plurality of areas can be identified. An image recognition model can be constructed so as to appropriately extract a region of an item.
本発明の他の態様に係る文字認識プログラムは、書類に記載された文字を認識する文字認識装置に備えられたプロセッサを、入力に基づいて、書類の画像について複数の領域を設定する第1設定部、入力に基づいて、複数の領域いずれかに含まれる複数の副領域を設定する第2設定部、入力に基づいて、複数の領域及び複数の副領域に対して、領域の種類を設定する第3設定部、及び画像における複数の領域の位置、複数の領域における複数の副領域の位置及び領域の種類を含む、1又は複数の画像認識モデルの教師有り学習に用いる学習用データを生成する生成部、として機能させる。 According to another aspect of the present invention, there is provided a character recognition program for a processor provided in a character recognition device for recognizing a character described in a document, the first setting for setting a plurality of regions in an image of the document based on an input. A second setting unit that sets a plurality of sub-regions included in any of the plurality of regions based on the input, and sets a region type for the plurality of regions and the plurality of sub-regions based on the input The third setting unit generates learning data used for supervised learning of one or a plurality of image recognition models, including positions of a plurality of regions in the image, positions of a plurality of subregions in the plurality of regions, and types of the regions. Function as a generating unit.
この態様によれば、書類に含まれる項目の数が、画像認識モデルによって区別可能な領域の数よりも多い場合であっても、複数の領域の数を画像認識モデルによって区別可能な領域の数よりも少なく設定し、複数の領域いずれかに含まれる複数の副領域を設定して、複数の項目に対応する領域を設定することができる。これにより、複数の領域と複数の副領域を段階的に識別し、それらの領域の種類を識別する画像認識モデルを構築することができ、複数の項目が含まれる書類であっても、複数の項目の領域を適切に抽出するように画像認識モデルを構築することができる。 According to this aspect, even when the number of items included in the document is larger than the number of areas that can be distinguished by the image recognition model, the number of the plurality of areas is reduced by the number of areas that can be distinguished by the image recognition model. It is possible to set a smaller number, set a plurality of sub-areas included in any of the plurality of areas, and set an area corresponding to a plurality of items. This makes it possible to identify a plurality of areas and a plurality of sub-areas in a stepwise manner and to construct an image recognition model for identifying the type of those areas. Even if the document includes a plurality of items, a plurality of areas can be identified. An image recognition model can be constructed so as to appropriately extract a region of an item.
本発明によれば、複数の項目が含まれる書類であっても、複数の項目の領域を適切に抽出するように画像認識モデルを構築することができる文字認識装置、文字認識方法及び文字認識プログラムが提供される。 According to the present invention, a character recognition device, a character recognition method, and a character recognition program capable of constructing an image recognition model so as to appropriately extract regions of a plurality of items even in a document including a plurality of items Is provided.
以下、本発明の一側面に係る実施の形態(以下、「本実施形態」と表記する。)を、図面に基づいて説明する。なお、各図において、同一の符号を付したものは、同一又は同様の構成を有する。 Hereinafter, an embodiment according to one aspect of the present invention (hereinafter, referred to as “the present embodiment”) will be described with reference to the drawings. In each of the drawings, the components denoted by the same reference numerals have the same or similar configurations.
図1は、本発明の実施形態に係る文字認識システム100の概要を示す図である。本実施形態に係る文字認識システム100は、文字認識装置10、ユーザ端末20、文字認識モデル30、書類画像データベースDB1及びマスタデータベースDB2を含む。文字認識装置10、ユーザ端末20、文字認識モデル30、書類画像データベースDB1及びマスタデータベースDB2は、インターネットやLAN(Local Area Network)等の通信ネットワークNを介して通信可能であってよい。文字認識システム100は、書類の画像に記載された文字を文字認識装置10によって認識し、その結果に誤りが含まれる場合には、ユーザ端末20から修正を受け付けて、認識精度を継続的に向上させていくシステムである。
FIG. 1 is a diagram showing an outline of a
書類画像データベースDB1は、書類の画像を蓄積したデータベースである。文字認識装置10は、書類画像データベースDB1に記憶された書類の画像を取得し、書類に含まれる複数の項目を指定する入力をユーザ端末20から受け付けて、学習用データを生成する。
The document image database DB1 is a database that stores images of documents. The
マスタデータベースDB2は、書類に記載される内容のマスタデータを蓄積したデータベースである。例えば書類に銀行の支店名が記載される場合、マスタデータベースDB2は、現に存在する支店名のリストを記憶してよい。その場合、文字認識装置10は、マスタデータベースDB2からマスタデータを取得し、認識された文字とマスタデータとの突合を行ってよい。
The master database DB2 is a database that stores master data of contents described in documents. For example, when the name of a branch of a bank is described in the document, the master database DB2 may store a list of currently existing branch names. In that case, the
文字認識モデル30は、画像に含まれる文字を認識する学習モデルであり、文字認識装置10によって用いられる。文字認識モデル30は、公知の学習モデルで構成されてよく、手書き文字や印刷された文字を認識するモデルであってよい。本例では、文字認識モデル30は、第1文字認識モデル31及び第2文字認識モデル32を含むが、3以上のモデルを含んでもよい。また、第1文字認識モデル31及び第2文字認識モデル32は、通信ネットワークNを介して利用可能なものであればその保存場所は任意である。なお、文字認識モデル30は、文字認識装置10に含まれてもよい。
The
図2は、本実施形態に係る文字認識装置10の機能ブロックを示す図である。文字認識装置10は、学習処理部10L及び認識処理部10Rを備える。学習処理部10Lは、設定部11、生成部12、学習部13、学習用データ15a、修正データ15b及び修正部16を含む。また、認識処理部10Rは、画像認識部14、文字認識部17、補正部18、辞書データ19a及びマスタデータ19bを含む。
FIG. 2 is a diagram illustrating functional blocks of the
設定部11は、第1設定部11a、第2設定部11b及び第3設定部11cを含む。設定部11は、書類画像データベースDB1から書類の画像を取得し、ユーザ端末20から入力を受け付ける。第1設定部11aは、入力に基づいて、書類の画像について複数の領域を設定する。ここで、複数の領域は、書類に含まれる複数の項目を囲むように設定されてよい。第1設定部11aは、一つの項目が含まれる領域を設定してもよいし、複数の項目が含まれる領域を設定してもよい。
The setting unit 11 includes a
第2設定部11bは、入力に基づいて、複数の領域いずれかに含まれる複数の副領域を設定する。複数の副領域は、第1設定部11aにより設定された領域の内側に設定されてよい。第2設定部11bは、一つの項目が含まれる副領域を設定してもよいし、複数の項目が含まれる副領域を設定してもよい。なお、第2設定部11bは、入力に基づいて、複数の副領域いずれかに含まれる複数の副領域を設定してもよい。すなわち、第2設定部11bによって、領域の内側に複数の副領域が設定され、その副領域の内側にさらに複数の副領域が設定されてもよい。
The
第3設定部11cは、入力に基づいて、複数の領域及び複数の副領域に対して、領域の種類を設定する。領域の種類は、複数の領域及び複数の副領域に対してそれぞれ一つ設定されてよいが、複数の領域及び複数の副領域に対して1又は複数の領域の種類が設定されてもよい。領域の種類は、領域に対応する項目の内容を表すものであってよく、例えば、銀行口座に関する書類であれば、領域の種類は、口座番号や支店名であってよい。
The
生成部12は、書類の画像における複数の領域の位置、複数の領域における複数の副領域の位置及び領域の種類を含む、1又は複数の画像認識モデルの教師有り学習に用いる学習用データを生成する。生成部12は、書類の画像に対して、第1設定部11aにより設定された複数の領域の位置と、第2設定部11bにより設定された複数の副領域の位置と、第3設定部11cにより設定された複数の領域及び複数の副領域の種類とを関連付けて、学習用データを生成してよい。生成部12により生成された学習用データは、学習用データ15aとして記憶される。
The
本実施形態に係る文字認識装置10によれば、書類に含まれる項目の数が、画像認識モデルによって区別可能な領域の数よりも多い場合であっても、複数の領域の数を画像認識モデルによって区別可能な領域の数よりも少なく設定し、複数の領域いずれかに含まれる複数の副領域を設定して、複数の項目に対応する領域を設定することができる。これにより、複数の領域と複数の副領域を段階的に識別し、それらの領域の種類を識別する画像認識モデルを構築することができ、複数の項目が含まれる書類であっても、複数の項目の領域を適切に抽出するように画像認識モデルを構築することができる。
According to the
生成部12は、1又は複数の画像認識モデルの教師有り学習に用いる複数種類の学習用データを生成してもよい。複数種類の学習用データを生成することで、複数の領域、複数の副領域及び領域の種類を一度設定することで、1又は複数の画像認識モデルの教師有り学習に用いる複数種類の学習用データをまとめて生成することができ、複数種類の学習用データを効率的に生成することができる。
The
生成部12は、複数の領域及び複数の副領域の輪郭を、領域の種類毎に異なる態様で表した第1種の学習用データと、複数の領域及び複数の副領域を、領域の種類毎に異なる態様で塗り潰した第2種の学習用データと、を生成してもよい。第1種の学習用データ及び第2種の学習用データの例は、図5及び6を用いて詳細に説明する。第1種の学習用データによって、複数の領域及び複数の副領域を区別可能な態様で囲むバウンディングボックスを画像に上書きする第1画像認識モデル14aを生成することができる。また、第2種の学習用データによって、複数の領域及び複数の副領域を区別可能な態様で塗り潰した画像を出力する第2画像認識モデル14bを生成することができる。
The
学習部13は、所定のパラメータが設定された学習プログラム13a及び学習用データ15aを用いて、1又は複数の画像認識モデルの教師有り学習を行う。本例の場合、学習部13は、第1学習プログラム及び第1種の学習用データを用いて、複数の領域及び複数の副領域を区別可能な態様で囲むバウンディングボックスを画像に上書きする第1画像認識モデル14aを生成してよい。第1画像認識モデル14aは、CNN(Convolutional Neural Network)により構成されてよく、より具体的には、SSD(Single Shot Multibox Detector)、Faster R-CNN又はRetina Netにより構成されてよい。また、学習部13は、第2学習プログラム及び第2種の学習用データを用いて、複数の領域及び複数の副領域を区別可能な態様で塗り潰した画像を出力する第2画像認識モデル14bを生成してよい。第2画像認識モデル14bは、GAN(Generative Adversarial Network)により構成されてよく、より具体的にはVAE(Variational Autoencoder)で構成されてよい。
The
画像認識部14は、1又は複数の画像認識モデルに新たな画像IMGを入力し、1又は複数の画像認識モデルの出力に基づいて、新たな画像IMGに含まれる複数の領域、複数の領域いずれかに含まれる複数の副領域並びに複数の領域及び複数の副領域に対する領域の種類を出力する。ここで、新たな画像IMGは、新しい書類の画像である。本例では、画像認識部14は、学習部13により生成された第1画像認識モデル14a及び第2画像認識モデル14bのいずれかを用いて、書類の項目に対応する画像の領域及び領域の種類を出力する。画像認識部14によって、書類に含まれる項目の数が、画像認識モデルによって区別可能な領域の数よりも多い場合であっても、段階的に全ての領域を識別することができる。
The
文字認識部17は、複数の領域の画像及び複数の副領域の画像を文字認識モデル30に入力し、文字認識モデル30の出力に基づいて、複数の領域に含まれる文字及び複数の副領域に含まれる文字を出力する。本例では、文字認識部17は、第1文字認識モデル31及び第2文字認識モデル32のいずれかを用いて、画像に含まれる文字を出力する。文字認識部17によって、複数の領域及び複数の副領域に含まれる文字を認識することができる。
The
補正部18は、領域の種類に応じた補正規則を選択し、文字を補正する。補正部18は、あらかじめ定められた補正規則に従って、ルールベースで文字を補正してよい。補正部18によって、領域の種類に応じた文字の補正を行うことで、書類に含まれる複数の項目に記載された文字を高精度で出力することができる。
The
補正部18は、複数の正規表現のいずれかを用いて文字の一部を抽出することで、文字を補正してよい。これにより、記載される文字が定型化されている場合に、文字の一部を抽出することができる。例えば、文字の中から必要な数値を抽出することができる。ここで、補正部18は、辞書データ19aを参照して、補正に用いる正規表現を選択してよい。
The
補正部18は、文字認識部17により認識された文字と、候補となる複数の文字列との編集距離を用いて、文字認識部17により認識された文字を候補となる複数の文字列のいずれかに置換することで、文字を補正してもよい。これにより、項目に記載される文字が限定されている場合に、記載され得ない文字列を排除して、候補となる複数の文字列のいずれかに補正することができる。例えば、銀行の支店名が記載される項目の場合、候補となる複数の文字列を現に存在する支店名として、記載された文字を現に存在する支店名のいずれかに補正することができる。ここで、補正部18は、マスタデータ19bを参照して、候補となる複数の文字列を選択してよい。マスタデータ19bは、マスタデータベースDB2が更新された場合に、マスタデータベースDB2から最新のデータを取得してよい。
The
補正部18は、文字コードの範囲を限定して、文字を補正してもよい。これにより、項目に記載される文字コードの範囲が限定されている場合に、記載され得ない文字コードを排除して、文字コードの範囲を限定して文字を補正することができる。例えば、項目に記載される文字コードの範囲が数値を表す文字コードの範囲に限定されている場合、アルファベットの「O(オー)」を数字の「0(ゼロ)」に置換するといった補正を行うことができる。
The
文字認識部17は、複数の文字認識モデルのうち、出力の信用度が高い文字認識モデルを選択し、選択した文字認識モデルの出力に基づいて、複数の領域に含まれる文字及び複数の副領域に含まれる文字を出力してもよい。本例の場合、文字認識部17は、第1文字認識モデル31及び第2文字認識モデル32のうち、出力の信用度が高い文字認識モデルを選択し、選択した文字認識モデルの出力に基づいて、複数の領域に含まれる文字及び複数の副領域に含まれる文字を出力してよい。このように、出力の信用度が高い文字認識モデルを選択することで、文字認識精度をより向上させることができる。
The
文字認識部17は、複数の領域及び複数の副領域毎に文字認識モデルを選択してもよい。例えば、口座番号が記載される領域について第1文字認識モデル31を選択し、支店名が記載される領域について第2文字認識モデル32を選択することとしてよい。このようにして、複数の領域及び複数の副領域毎に、適した文字認識モデルを選択することができ、文字認識精度をより向上させることができる。
The
画像認識部14は、1又は複数の画像認識モデルのうち、出力の信用度が高い画像認識モデルを選択し、選択した画像認識モデルの出力に基づいて、複数の領域、複数の副領域及び領域の種類を出力してもよい。本例の場合、画像認識部14は、第1画像認識モデル14a及び第2画像認識モデル14bのうち、出力の信用度が高い画像認識モデルを選択し、選択した画像認識モデルの出力に基づいて、複数の領域、複数の副領域及び領域の種類を出力してよい。このように、出力の信用度が高い画像認識モデルを選択することで、書類に含まれる複数の項目の認識精度をより向上させることができる。
The
画像認識部14は、書類の種類毎に画像認識モデルを選択してもよい。例えば、銀行口座に関する書類について第1画像認識モデル14aを選択し、車検(自動車検査登録制度)に関する書類について第2文字認識モデル32を選択することとしてよい。このようにして、書類の種類毎に、適した画像認識モデルを選択することができ、書類に含まれる複数の項目の認識精度をより向上させることができる。
The
修正部16は、入力に基づいて、画像認識部14により出力された複数の領域、複数の副領域及び領域の種類と、文字認識部17により出力された文字と、補正部18により補正された文字との少なくともいずれかを修正し、修正されたデータを学習用データ15aに追加する。修正部16は、画像認識部14により出力された複数の領域、複数の副領域及び領域の種類と、文字認識部17により出力された文字と、補正部18により補正された文字との少なくともいずれかを修正した修正データ15bを蓄積し、修正データ15bを定期的に学習用データ15aに追加してもよい。また、修正部16は、修正データ15bを辞書データ19aに追加してもよい。
The correcting
修正部16によって、画像認識モデル及び文字認識モデルいずれかの出力が誤っていた場合に、その誤りを修正したデータを学習用データに追加することができ、画像認識モデル及び文字認識モデルの出力精度をより向上させる学習用データを生成することができる。
When the output of either the image recognition model or the character recognition model is erroneous, the
学習部13は、学習プログラム13a及び学習用データ15aを用いて、1又は複数の画像認識モデル及び複数の文字認識モデルの少なくともいずれかの再学習を行ってよい。例えば、学習部13は、修正部16によって学習用データ15aが追加された場合に、1又は複数の画像認識モデルの再学習を行ってよい。画像認識モデル及び文字認識モデルいずれかの再学習を行うことで、画像認識モデル及び文字認識モデルの出力精度を継続的に向上させることができる。
The
学習部13は、1又は複数の画像認識モデル及び文字認識モデルの少なくともいずれかの再学習後の出力精度が再学習前の出力精度より低い場合に、学習プログラム13aの所定のパラメータを変更して、1又は複数の画像認識モデル及び文字認識モデルの少なくともいずれかの再学習を実行し直してよい。ここで、所定のパラメータとは、学習率等の確率的勾配降下法のハイパーパラメータであってよい。これにより、仮に画像認識モデル及び文字認識モデルいずれかの再学習によって出力精度が低下した場合に、学習プログラムのパラメータを変更して再学習を実行し直し、画像認識モデル及び文字認識モデルの出力精度が向上するようにすることができる。
The
図3は、本実施形態に係る文字認識装置10の物理的構成を示す図である。文字認識装置10は、演算部に相当するCPU(Central Processing Unit)10aと、記憶部に相当するRAM(Random Access Memory)10bと、記憶部に相当するROM(Read only Memory)10cと、通信部10dと、入力部10eと、表示部10fと、を有する。これらの各構成は、バスを介して相互にデータ送受信可能に接続される。なお、本例では文字認識装置10が一台のコンピュータで構成される場合について説明するが、文字認識装置10は、複数のコンピュータが組み合わされて実現されてもよい。また、図3で示す構成は一例であり、文字認識装置10はこれら以外の構成を有してもよいし、これらの構成のうち一部を有さなくてもよい。
FIG. 3 is a diagram illustrating a physical configuration of the
CPU10aは、RAM10b又はROM10cに記憶されたプログラムの実行に関する制御やデータの演算、加工を行う制御部である。CPU10aは、書類の画像に記載された文字を認識するプログラム(文字認識プログラム)を実行する演算部である。CPU10aは、入力部10eや通信部10dから種々のデータを受け取り、データの演算結果を表示部10fに表示したり、RAM10bやROM10cに格納したりする。
The
RAM10bは、記憶部のうちデータの書き換えが可能なものであり、例えば半導体記憶素子で構成されてよい。RAM10bは、CPU10aが実行する文字認識プログラム、書類の画像といったデータを記憶してよい。なお、これらは例示であって、RAM10bには、これら以外のデータが記憶されていてもよいし、これらの一部が記憶されていなくてもよい。
The
ROM10cは、記憶部のうちデータの読み出しが可能なものであり、例えば半導体記憶素子で構成されてよい。ROM10cは、例えば文字認識プログラムや、書き換えが行われないデータを記憶してよい。
The
通信部10dは、文字認識装置10を他の機器に接続するインターフェースである。通信部10dは、インターネット等の通信ネットワークNに接続されてよい。
The communication unit 10d is an interface that connects the
入力部10eは、ユーザからデータの入力を受け付けるものであり、例えば、キーボード及びタッチパネルを含んでよい。
The
表示部10fは、CPU10aによる演算結果を視覚的に表示するものであり、例えば、LCD(Liquid Crystal Display)により構成されてよい。表示部10fは、処理対象となる書類の画像や文字認識結果を表示してよい。
The
文字認識プログラムは、RAM10bやROM10c等のコンピュータによって読み取り可能な記憶媒体に記憶されて提供されてもよいし、通信部10dにより接続される通信ネットワークNを介して提供されてもよい。文字認識装置10では、CPU10aが文字認識プログラムを実行することにより、図2を用いて説明した様々な動作が実現される。なお、これらの物理的な構成は例示であって、必ずしも独立した構成でなくてもよい。例えば、文字認識装置10は、CPU10aとRAM10bやROM10cが一体化したLSI(Large-Scale Integration)を備えていてもよい。
The character recognition program may be provided by being stored in a computer-readable storage medium such as the
図4は、本実施形態に係る文字認識装置10の設定画面DPの一例を示す図である。設定画面DPは、ユーザ端末20に表示される画面であってよく、書類の画像IMG1、ポインタPT、設定モード選択S1及び領域設定S2を含む。ユーザは、ポインタPTにより設定モード選択S1のラジオボタンのいずれかと、領域設定S2のラジオボタンのいずれかを選択し、画像IMG1について複数の領域及び複数の副領域を設定する。
FIG. 4 is a diagram illustrating an example of the setting screen DP of the
領域設定S2には、「1.red」という領域の種類を設定するラジオボタンと、「2.blue」という領域の種類を設定するラジオボタンと、「3.yellow」という領域の種類を設定するラジオボタンと、「4.pink」という領域の種類を設定するラジオボタンと、が含まれる。すなわち、本例では、4種類の領域を設定することができる。また、設定モード選択S1は、複数の領域を設定するモードである「base_image」のラジオボタンと、「1.red」の種類の領域について副領域を設定するモードである「crop_red」のラジオボタンと、「2.blue」の種類の領域について副領域を設定するモードである「crop_blue」のラジオボタンと、「3.yellow」の種類の領域について副領域を設定するモードである「crop_yellow」のラジオボタンと、「4.pink」の種類の領域について副領域を設定するモードである「crop_pink」のラジオボタンと、が含まれる。 In the area setting S2, a radio button for setting an area type “1. red”, a radio button for setting an area type “2. blue”, and an area type “3. yellow” are set. A radio button and a radio button for setting an area type of “4. pink” are included. That is, in this example, four types of regions can be set. The setting mode selection S1 includes a “base_image” radio button for setting a plurality of areas, and a “crop_red” radio button for setting a sub-area for a “1.red” type area. , A radio button of “crop_blue” for setting a sub-area for an area of “2. blue” type, and a radio of “crop_yellow” for setting a sub-area for an area of type “3. yellow” A button and a radio button of “crop_pink”, which is a mode for setting a sub-area for an area of “4. pink” type, are included.
本例では、画像IMG1に対して、複数の領域として、実線で示された第1領域R1、破線で示された第2領域R2、一点鎖線で示された第3領域R3及び二点鎖線で示された第4領域R4が設定されている。ここで、線種は、領域設定S2により選択された領域の種類に対応する。本例では、実線は「1.red」に対応し、破線は「2.blue」に対応し、一点鎖線は「3.yellow」に対応し、二点鎖線は「4.pink」に対応する。 In this example, the image IMG1 is represented by a plurality of regions including a first region R1 indicated by a solid line, a second region R2 indicated by a broken line, a third region R3 indicated by a dashed line, and a two-dot chain line. The indicated fourth region R4 is set. Here, the line type corresponds to the type of the area selected by the area setting S2. In this example, the solid line corresponds to “1.red”, the dashed line corresponds to “2.blue”, the one-dot chain line corresponds to “3.yellow”, and the two-dot chain line corresponds to “4.pink”. .
第1領域R1は、実線で示された第1副領域R1aと、破線で示された第2副領域R1bとを含む。このように、領域の内側に複数の副領域を設定することで、仮に画像認識モデルによって4種類の領域しか認識できない場合であっても、5以上の領域を区別した学習用データを生成し、画像認識モデルによって段階的に5以上の領域を識別できるようにすることができる。 The first region R1 includes a first sub-region R1a indicated by a solid line and a second sub-region R1b indicated by a broken line. In this way, by setting a plurality of sub-regions inside the region, even if only four types of regions can be recognized by the image recognition model, learning data that distinguishes five or more regions is generated, It is possible to identify five or more regions stepwise by the image recognition model.
本例では、第1副領域R1aに「ABC」と記載され、第2副領域R1bに「abc」と記載され、第2領域R2に「DEF」と記載され、第3領域R3に「1234」と記載され、第4領域R4に「G−56」と記載されている。文字認識装置10は、画像認識部14によって、第1副領域R1a、第2副領域R1b、第2領域R2、第3領域R3及び第4領域R4を認識し、文字認識部17によって、それぞれの領域に記載された文字を認識する。また、文字認識装置10は、補正部18によって、文字認識部17により認識された文字を補正する。例えば、第4領域R4に「G−」という文字列に続いて2桁の数値が記載されることが予め決まっている場合、補正部18は、正規表現を用いて「G−56」という文字のうち「56」を抽出することで、文字を補正してもよい。また、例えば、第3領域R3に数値のみ記載されることが予め決まっている場合、補正部18は、文字コードの範囲を限定して、例えば「l(エル)」を「1(one)」に置換して、「1234」という文字を補正してよい。
In this example, “ABC” is described in the first sub-region R1a, “abc” is described in the second sub-region R1b, “DEF” is described in the second region R2, and “1234” is described in the third region R3. And "G-56" is described in the fourth region R4. The
図5は、本実施形態に係る文字認識装置10により生成される第1種の学習用データD1の一例を示す図である。第1種の学習用データD1は、複数の領域及び複数の副領域を区別可能な態様で囲むバウンディングボックスを画像に上書きする第1画像認識モデル14aの教師有り学習に用いるデータである。
FIG. 5 is a diagram illustrating an example of the first type of learning data D1 generated by the
第1種の学習用データD1は、実線で示された第1領域R1、破線で示された第2領域R2、一点鎖線で示された第3領域R3及び二点鎖線で示された第4領域R4を含み、第1領域R1は、実線で示された第1副領域R1a及び破線で示された第2副領域R1bを含む。生成部12は、ユーザ端末20によって入力された複数の領域及び複数の副領域の輪郭をそのまま用いることで、第1種の学習用データD1を生成してもよいし、ユーザ端末20によって入力された複数の領域及び複数の副領域の輪郭を、複数の方向に僅かに平行移動させることでデータオーグメンテーションを行って第1種の学習用データD1を生成してもよい。
The first type of learning data D1 includes a first area R1 indicated by a solid line, a second area R2 indicated by a broken line, a third area R3 indicated by a dashed line, and a fourth area indicated by a two-dot chain line. The first region R1 includes a first sub-region R1a indicated by a solid line and a second sub-region R1b indicated by a broken line. The
図6は、本実施形態に係る文字認識装置10により生成される第2種の学習用データD2の一例を示す図である。第2種の学習用データD2は、複数の領域及び複数の副領域を区別可能な態様で塗り潰した画像を出力する第2画像認識モデル14bの教師有り学習に用いるデータである。
FIG. 6 is a diagram illustrating an example of the second type of learning data D2 generated by the
第2種の学習用データD2は、実線で示された第1塗り潰し領域F1、破線で示された第2塗り潰し領域F2、一点鎖線で示された第3塗り潰し領域F3及び二点鎖線で示された第4塗り潰し領域F4を含み、第1塗り潰し領域F1は、実線で示された第1副塗り潰し領域F1a及び破線で示された第2副塗り潰し領域F1bを含む。複数の塗り潰し領域及び複数の副塗り潰し領域は、領域の種類に対応した色で塗り潰されていてよい。本例では、色の違いをハッチングの違いによって表現している。生成部12は、ユーザ端末20によって入力された複数の領域及び複数の副領域の輪郭の内側を塗り潰すことで、第2種の学習用データD2を生成してもよいし、ユーザ端末20によって入力された複数の領域及び複数の副領域の輪郭を、複数の方向に僅かに平行移動させることでデータオーグメンテーションを行い、その輪郭の内側を塗り潰すことで第2種の学習用データD2を生成してもよい。
The second type of learning data D2 is indicated by a first solid area F1 indicated by a solid line, a second solid area F2 indicated by a broken line, a third solid area F3 indicated by a dashed line, and a two-dot chain line. The first filled area F1 includes a first sub-filled area F1a shown by a solid line and a second sub-filled area F1b shown by a broken line. The plurality of filled regions and the plurality of sub-filled regions may be filled with a color corresponding to the type of the region. In this example, the difference in color is represented by the difference in hatching. The
図7は、本実施形態に係る文字認識装置10により実行される学習用データ生成処理のフローチャートである。はじめに、文字認識装置10は、入力に基づいて、書類の画像について複数の領域を設定する(S10)。また、文字認識装置10は、入力に基づいて、複数の領域のいずれかに含まれる複数の副領域を設定する(S11)。さらに、文字認識装置10は、入力に基づいて、複数の領域及び複数の副領域に対して、領域の種類を設定する(S12)。なお、これらの入力は、ユーザ端末20からの入力であってよい。
FIG. 7 is a flowchart of a learning data generation process performed by the
その後、文字認識装置10は、第1種の学習用データを生成し(S13)、第2種の学習用データを生成する(S14)。なお、本例では2種類の学習用データを生成する場合について説明したが、文字認識装置10は、画像認識部14により用いられる複数の画像認識モデルの数に対応した複数種類の学習用データを生成してよい。以上により、学習用データ生成処理が終了する。
After that, the
図8は、本実施形態に係る文字認識装置10により実行される文字認識処理のフローチャートである。はじめに、文字認識装置10は、書類の種類に基づいて、画像認識モデルを選択する(S20)。そして、文字認識装置10は、新たな画像を、選択した画像認識モデルに入力し、複数の領域、複数の副領域及び領域の種類を出力する(S21)。
FIG. 8 is a flowchart of a character recognition process performed by the
次に、文字認識装置10は、複数の領域及び複数の副領域毎に文字認識モデルを選択する(S22)。そして、文字認識装置10は、複数の領域の画像及び複数の副領域の画像を、選択した文字認識モデルに入力し、複数の領域に含まれる文字及び複数の副領域に含まれる文字を出力する(S23)。
Next, the
その後、文字認識装置10は、領域の種類に応じて、文字を補正する(S24)。文字補正処理については、次図を用いて詳細に説明する。その後、文字認識装置10は、読み取られた文字を出力する(S25)。以上により、文字認識処理が終了する。
Thereafter, the
図9は、本実施形態に係る文字認識装置10により実行される文字補正処理のフローチャートである。同図では、図8の文字を補正する処理(S24)の詳細の一例を示している。
FIG. 9 is a flowchart of a character correction process performed by the
文字認識装置10は、領域の種類が、数値の抽出に対応するものである場合(S241:YES)、複数の正規表現のいずれかを用いて文字の一部を抽出することで、文字を補正する(S242)。なお、本例では数値を抽出する場合について示しているが、正規表現によって文字の一部を抽出する場合、英字や漢字等の数値以外の文字を抽出してもよいし、数値、英字及び漢字等の組み合わせを抽出してもよい。
When the type of the region corresponds to the extraction of a numerical value (S241: YES), the
領域の種類が、数値の抽出に対応するものでなく(S241:NO)、マスタ突合に対応するものである場合(S243:YES)、文字認識装置10は、文字認識部17により認識された文字と、候補となる複数の文字列との編集距離を用いて、文字認識部17により認識された文字を候補となる複数の文字列のいずれかに置換することで、文字を補正する(S244)。
If the type of the area does not correspond to the extraction of the numerical value (S241: NO) but corresponds to the master match (S243: YES), the
領域の種類が、数値の抽出に対応するものでなく(S241:NO)、マスタ突合に対応するものでなく(S243:NO)、文字コードの範囲を数値のみに限定するものである場合(S245:YES)、文字コードの範囲を、数値を表す範囲に限定して、文字を補正する(S246)。なお、本例で示した場合分けは例示であり、それぞれの場合分けの順序は任意であるし、異なる場合分けが含まれてもよい。以上により、文字補正処理が終了する。 When the type of the area does not correspond to the extraction of the numerical value (S241: NO), does not correspond to the master match (S243: NO), and the character code range is limited to only the numerical value (S245). : YES), the character code is corrected by limiting the range of the character code to the range representing the numerical value (S246). Note that the case divisions shown in this example are exemplifications, and the order of each case division is arbitrary, and different case divisions may be included. Thus, the character correction processing ends.
図10は、本実施形態に係る文字認識装置10により実行される再学習処理のフローチャートである。再学習処理は、文字認識処理が行われた後、認識結果に誤りがあった場合や、マスタデータベースDB2に更新があった場合に行われてよい。
FIG. 10 is a flowchart of the relearning process executed by the
はじめに、文字認識装置10は、ユーザ端末20から修正データの入力を受け付ける(S30)。そして、文字認識装置10は、ユーザ端末20からの入力に基づいて、出力された複数の領域、複数の副領域及び領域の種類を修正する(S31)。また、文字認識装置10は、ユーザ端末20からの入力に基づいて、出力された文字及び補正された文字を修正する(S32)。
First, the
その後、文字認識装置10は、複数の領域、複数の副領域及び領域の種類について修正されたデータを学習用データに追加し(S33)、文字及び補正された文字について修正されたデータを辞書データに追加する(S34)。
Thereafter, the
また、文字認識装置10は、マスタデータベースが更新された場合(S35:YES)、最新のデータを取得して、マスタデータ19bを更新する(S36)。
When the master database is updated (S35: YES), the
その後、文字認識装置10は、画像認識モデル及び文字認識モデルの再学習処理を実行する(S37)。再学習処理の結果、画像認識モデル及び文字認識モデルの出力精度が低下した場合(S38:YES)、文字認識装置10は、学習プログラム13aのパラメータを変更し(S39)、画像認識モデル及び文字認識モデルの再学習処理を実行する(S37)。一方、再学習処理の結果、画像認識モデル及び文字認識モデルの出力精度が向上した場合(S38:NO)、画像認識モデル及び文字認識モデルを更新する(S40)。以上により、再学習処理が終了する。なお、パラメータを変更しても画像認識モデル及び文字認識モデルの出力精度が向上しない場合、文字認識装置10は、画像認識モデル及び文字認識モデルを更新せず、それまでのバージョンのまま再学習処理を終了してもよい。
Thereafter, the
以上説明した実施形態は、本発明の理解を容易にするためのものであり、本発明を限定して解釈するためのものではない。実施形態が備える各要素並びにその配置、材料、条件、形状及びサイズ等は、例示したものに限定されるわけではなく適宜変更することができる。また、異なる実施形態で示した構成同士を部分的に置換し又は組み合わせることが可能である。 The embodiments described above are intended to facilitate understanding of the present invention, and are not intended to limit and interpret the present invention. The components included in the embodiment and their arrangement, material, condition, shape, size, and the like are not limited to those illustrated, but can be appropriately changed. It is also possible to partially replace or combine the configurations shown in the different embodiments.
10…文字認識装置、10a…CPU、10b…RAM、10c…ROM、10d…通信部、10e…入力部、10f…表示部、10L…学習処理部、10R…認識処理部、11…設定部、11a…第1設定部、11b…第2設定部、11c…第3設定部、12…生成部、13…学習部、13a…学習プログラム、14…画像認識部、14a…第1画像認識モデル、14b…第2画像認識モデル、15a…学習用データ、15b…修正データ、16…修正部、17…文字認識部、18…補正部、19a…辞書データ、19b…マスタデータ、20…ユーザ端末、30…文字認識モデル、31…第1文字認識モデル、32…第2文字認識モデル、DB1…書類画像データベース、DB2…マスタデータベース、100…文字認識システム Reference numeral 10: character recognition device, 10a: CPU, 10b: RAM, 10c: ROM, 10d: communication unit, 10e: input unit, 10f: display unit, 10L: learning processing unit, 10R: recognition processing unit, 11: setting unit, 11a: first setting unit, 11b: second setting unit, 11c: third setting unit, 12: generation unit, 13: learning unit, 13a: learning program, 14: image recognition unit, 14a: first image recognition model, 14b: second image recognition model, 15a: learning data, 15b: correction data, 16: correction unit, 17: character recognition unit, 18: correction unit, 19a: dictionary data, 19b: master data, 20: user terminal, Reference numeral 30: character recognition model, 31: first character recognition model, 32: second character recognition model, DB1: document image database, DB2: master database, 100: character recognition system
Claims (16)
入力に基づいて、前記書類の画像について複数の領域を設定する第1設定部と、
入力に基づいて、前記複数の領域いずれかに含まれる複数の副領域を設定する第2設定部と、
入力に基づいて、前記複数の領域及び前記複数の副領域に対して、領域の種類を設定する第3設定部と、
前記画像における前記複数の領域の位置、前記複数の領域における前記複数の副領域の位置及び前記領域の種類を含む、1又は複数の画像認識モデルの教師有り学習に用いる学習用データを生成する生成部と、
を備える文字認識装置。 A character recognition device for recognizing characters described in a document,
A first setting unit that sets a plurality of regions for the image of the document based on the input;
A second setting unit configured to set a plurality of sub-regions included in any of the plurality of regions based on an input;
A third setting unit configured to set an area type for the plurality of areas and the plurality of sub-areas based on the input;
Generating learning data for use in supervised learning of one or more image recognition models, including positions of the plurality of regions in the image, positions of the plurality of sub-regions in the plurality of regions, and types of the regions; Department and
A character recognition device comprising:
請求項1に記載の文字認識装置。 The generation unit generates a plurality of types of learning data used for supervised learning of the one or more image recognition models.
The character recognition device according to claim 1.
請求項2に記載の文字認識装置。 The generation unit may include a first type of learning data in which the outlines of the plurality of regions and the plurality of sub-regions are expressed in different modes for each type of the region, and the plurality of regions and the plurality of sub-regions. A second type of learning data that is filled in a different manner for each type of region.
The character recognition device according to claim 2.
前記複数の領域の画像及び前記複数の副領域の画像を文字認識モデルに入力し、前記文字認識モデルの出力に基づいて、前記複数の領域に含まれる文字及び前記複数の副領域に含まれる文字を出力する文字認識部と、
前記領域の種類に応じた補正規則を選択し、前記文字を補正する補正部と、
をさらに備える請求項1から3のいずれか一項に記載の文字認識装置。 A new image is input to the one or more image recognition models, and based on an output of the one or more image recognition models, a plurality of regions included in the new image is included in any of the plurality of regions. An image recognition unit that outputs a plurality of sub-regions and a type of a region for the plurality of regions and the plurality of sub-regions,
The image of the plurality of regions and the image of the plurality of sub-regions are input to a character recognition model, and based on the output of the character recognition model, the characters included in the plurality of regions and the characters included in the plurality of sub-regions A character recognition unit that outputs
A correction unit that selects a correction rule according to the type of the area, and corrects the character;
The character recognition device according to any one of claims 1 to 3, further comprising:
請求項4に記載の文字認識装置。 The correction unit corrects the character by extracting a part of the character using one of a plurality of regular expressions,
The character recognition device according to claim 4.
請求項4に記載の文字認識装置。 The correction unit corrects the character by using the edit distance between the character and a plurality of candidate character strings to replace the character with one of the plurality of candidate character strings.
The character recognition device according to claim 4.
請求項4に記載の文字認識装置。 The correction unit limits the range of a character code, and corrects the character.
The character recognition device according to claim 4.
請求項4から7のいずれか一項に記載の文字認識装置。 The character recognition unit selects a character recognition model having a high degree of credibility of output among a plurality of character recognition models, and, based on an output of the selected character recognition model, a character included in the plurality of regions and the plurality of characters. Output the characters contained in the sub-area,
The character recognition device according to claim 4.
請求項8に記載の文字認識装置。 The character recognition unit selects a character recognition model for each of the plurality of regions and the plurality of sub-regions,
The character recognition device according to claim 8.
請求項4から9のいずれか一項に記載の文字認識装置。 The image recognizing unit selects an image recognition model having a high degree of credibility of output from the one or more image recognition models, and, based on the output of the selected image recognition model, the plurality of regions and the plurality of sub-regions. Outputting the area and the type of the area,
The character recognition device according to claim 4.
請求項10に記載の文字認識装置。 The image recognition unit selects the image recognition model for each type of the document,
The character recognition device according to claim 10.
請求項4から11のいずれか一項に記載の文字認識装置。 Based on the input, the plurality of regions output by the image recognition unit, the plurality of sub-regions and the type of the region, the character output by the character recognition unit, and the character corrected by the correction unit Correcting at least one of the, further comprising a correction unit to add the corrected data to the learning data,
The character recognition device according to claim 4.
請求項4から12のいずれか一項に記載の文字認識装置。 A learning unit configured to re-learn at least one of the one or more image recognition models and the plurality of character recognition models using a learning program in which predetermined parameters are set and the learning data;
The character recognition device according to claim 4.
請求項13に記載の文字認識装置。 The learning unit, when the output accuracy after re-learning of at least one of the one or more image recognition models and the character recognition model is lower than the output accuracy before re-learning, changes the predetermined parameter, Re-executing at least one of the one or more image recognition models and the character recognition model;
The character recognition device according to claim 13.
入力に基づいて、前記書類の画像について複数の領域を設定することと、
入力に基づいて、前記複数の領域いずれかに含まれる複数の副領域を設定することと、
入力に基づいて、前記複数の領域及び前記複数の副領域に対して、領域の種類を設定することと、
前記画像における前記複数の領域の位置、前記複数の領域における前記複数の副領域の位置及び前記領域の種類を含む、1又は複数の画像認識モデルの教師有り学習に用いる学習用データを生成することと、
を含む文字認識方法。 A character recognition method for recognizing characters described in a document,
Based on the input, setting a plurality of areas for the image of the document;
Based on the input, setting a plurality of sub-regions included in any of the plurality of regions,
Based on the input, for the plurality of regions and the plurality of sub-regions, to set the type of region,
Generating learning data for use in supervised learning of one or more image recognition models, including positions of the plurality of regions in the image, positions of the plurality of sub-regions in the plurality of regions, and types of the regions. When,
Character recognition method including.
入力に基づいて、前記書類の画像について複数の領域を設定する第1設定部、
入力に基づいて、前記複数の領域いずれかに含まれる複数の副領域を設定する第2設定部、
入力に基づいて、前記複数の領域及び前記複数の副領域に対して、領域の種類を設定する第3設定部、及び
前記画像における前記複数の領域の位置、前記複数の領域における前記複数の副領域の位置及び前記領域の種類を含む、1又は複数の画像認識モデルの教師有り学習に用いる学習用データを生成する生成部、
として機能させる文字認識プログラム。 A processor provided in a character recognition device that recognizes characters described in documents,
A first setting unit that sets a plurality of regions for the image of the document based on the input;
A second setting unit configured to set a plurality of sub-regions included in any of the plurality of regions based on the input;
A third setting unit that sets an area type for the plurality of areas and the plurality of sub-areas based on the input; and a position of the plurality of areas in the image, the plurality of sub-areas in the plurality of areas. A generating unit that generates learning data used for supervised learning of one or more image recognition models, including a position of a region and a type of the region,
Character recognition program to function as.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018244224A JP2020027598A (en) | 2018-12-27 | 2018-12-27 | Character recognition device, character recognition method, and character recognition program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018244224A JP2020027598A (en) | 2018-12-27 | 2018-12-27 | Character recognition device, character recognition method, and character recognition program |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018152976A Division JP6465427B1 (en) | 2018-08-15 | 2018-08-15 | Character recognition device, character recognition method, and character recognition program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2020027598A true JP2020027598A (en) | 2020-02-20 |
Family
ID=69620216
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018244224A Pending JP2020027598A (en) | 2018-12-27 | 2018-12-27 | Character recognition device, character recognition method, and character recognition program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2020027598A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2022050096A1 (en) * | 2020-09-02 | 2022-03-10 | ソニーグループ株式会社 | Information processing device, information processing method, and program |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH05307639A (en) * | 1992-04-30 | 1993-11-19 | Toshiba Corp | Device for detecting address area of postal matter |
JPH11203410A (en) * | 1998-01-12 | 1999-07-30 | Canon Inc | Method and device for processing image and storage medium therefor |
JP2000293626A (en) * | 1999-04-09 | 2000-10-20 | Nec Corp | Method and device for recognizing character and storage medium |
JP2006279090A (en) * | 2005-03-25 | 2006-10-12 | Fuji Xerox Co Ltd | Image processor, image processing method, and image processing system |
JP2007102715A (en) * | 2005-10-07 | 2007-04-19 | Ricoh Co Ltd | Image processor, image processing method, and image processing program |
WO2007080642A1 (en) * | 2006-01-13 | 2007-07-19 | Fujitsu Limited | Sheet slip processing program and sheet slip program device |
JP2011159256A (en) * | 2010-02-04 | 2011-08-18 | Masakatsu Morii | Method and program for reading visiting card |
JP2013030040A (en) * | 2011-07-29 | 2013-02-07 | Fujitsu Frontech Ltd | Information processing program, information processor, and character recognition method |
JP6465427B1 (en) * | 2018-08-15 | 2019-02-06 | 株式会社シグマクシス | Character recognition device, character recognition method, and character recognition program |
-
2018
- 2018-12-27 JP JP2018244224A patent/JP2020027598A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH05307639A (en) * | 1992-04-30 | 1993-11-19 | Toshiba Corp | Device for detecting address area of postal matter |
JPH11203410A (en) * | 1998-01-12 | 1999-07-30 | Canon Inc | Method and device for processing image and storage medium therefor |
JP2000293626A (en) * | 1999-04-09 | 2000-10-20 | Nec Corp | Method and device for recognizing character and storage medium |
JP2006279090A (en) * | 2005-03-25 | 2006-10-12 | Fuji Xerox Co Ltd | Image processor, image processing method, and image processing system |
JP2007102715A (en) * | 2005-10-07 | 2007-04-19 | Ricoh Co Ltd | Image processor, image processing method, and image processing program |
WO2007080642A1 (en) * | 2006-01-13 | 2007-07-19 | Fujitsu Limited | Sheet slip processing program and sheet slip program device |
JP2011159256A (en) * | 2010-02-04 | 2011-08-18 | Masakatsu Morii | Method and program for reading visiting card |
JP2013030040A (en) * | 2011-07-29 | 2013-02-07 | Fujitsu Frontech Ltd | Information processing program, information processor, and character recognition method |
JP6465427B1 (en) * | 2018-08-15 | 2019-02-06 | 株式会社シグマクシス | Character recognition device, character recognition method, and character recognition program |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2022050096A1 (en) * | 2020-09-02 | 2022-03-10 | ソニーグループ株式会社 | Information processing device, information processing method, and program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6465427B1 (en) | Character recognition device, character recognition method, and character recognition program | |
US10783409B2 (en) | Font replacement based on visual similarity | |
EP3814890B1 (en) | Refinement of machine learning engines for automatically generating component-based user interfaces | |
US10614266B2 (en) | Recognition and population of form fields in an electronic document | |
US10761818B2 (en) | Automatic identification of types of user interface components | |
US10928982B2 (en) | Automatic grouping of user interface elements into components | |
US20200133692A1 (en) | Automatic User Interface Architecture | |
AU2020202601A1 (en) | Utilizing object attribute detection models to automatically select instances of detected objects in images | |
US10949174B2 (en) | Automatic classification of user interface elements | |
US10963694B2 (en) | Duplicate user interface design identification | |
CN105283868A (en) | Probabilistic parsing | |
US8387010B2 (en) | Automatic software configuring system | |
US10366142B2 (en) | Identifier based glyph search | |
JP2019028094A (en) | Character generation device, program and character output device | |
JP2020027598A (en) | Character recognition device, character recognition method, and character recognition program | |
US20230384910A1 (en) | Using Attributes for Font Recommendations | |
JP2019016142A (en) | Input content confirmation screen display device, input content confirmation screen display method and input content confirmation screen display program | |
JP2021114120A (en) | Ambiguous part correction support device and method | |
US20230071291A1 (en) | System and method for a precise semantic segmentation | |
JP5702824B2 (en) | Program and design document generator | |
KR102501631B1 (en) | Method and system to provide handwriting font generation service | |
JPH10143501A (en) | Character string predicting method and document generation device using the method | |
JP2022111796A (en) | Information processor and method for processing information | |
JPH01137317A (en) | Character data processor | |
CN117194532A (en) | Ordering processing method, ordering processing device, computer equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20210709 |
|
A711 | Notification of change in applicant |
Free format text: JAPANESE INTERMEDIATE CODE: A711 Effective date: 20210709 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A821 Effective date: 20210709 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20211216 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20220725 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20220912 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20221208 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20230206 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20230420 |