JP7365697B2 - Program and clustering device - Google Patents
Program and clustering device Download PDFInfo
- Publication number
- JP7365697B2 JP7365697B2 JP2020006034A JP2020006034A JP7365697B2 JP 7365697 B2 JP7365697 B2 JP 7365697B2 JP 2020006034 A JP2020006034 A JP 2020006034A JP 2020006034 A JP2020006034 A JP 2020006034A JP 7365697 B2 JP7365697 B2 JP 7365697B2
- Authority
- JP
- Japan
- Prior art keywords
- feature
- symbol
- vector
- appearance probability
- scale images
- 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.)
- Active
Links
- 239000013598 vector Substances 0.000 claims description 134
- 238000000638 solvent extraction Methods 0.000 claims description 42
- 230000006870 function Effects 0.000 claims description 21
- 238000005192 partition Methods 0.000 claims description 17
- 238000013527 convolutional neural network Methods 0.000 claims description 16
- 238000012549 training Methods 0.000 claims description 7
- 238000012935 Averaging Methods 0.000 claims description 6
- 239000000284 extract Substances 0.000 claims description 6
- 238000000605 extraction Methods 0.000 claims description 6
- 230000009467 reduction Effects 0.000 claims description 6
- 238000011176 pooling Methods 0.000 description 34
- 238000000034 method Methods 0.000 description 28
- 238000012545 processing Methods 0.000 description 17
- 238000010586 diagram Methods 0.000 description 10
- 238000012360 testing method Methods 0.000 description 10
- 230000014509 gene expression Effects 0.000 description 8
- 238000002474 experimental method Methods 0.000 description 6
- 238000011156 evaluation Methods 0.000 description 5
- 230000010354 integration Effects 0.000 description 5
- 230000000694 effects Effects 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 230000002776 aggregation Effects 0.000 description 3
- 238000004220 aggregation Methods 0.000 description 3
- 238000011160 research Methods 0.000 description 3
- 230000010365 information processing Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 239000002253 acid Substances 0.000 description 1
- 230000004913 activation Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000005194 fractionation Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
- 230000006403 short-term memory Effects 0.000 description 1
- 239000000126 substance Substances 0.000 description 1
- 238000010200 validation analysis Methods 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
Landscapes
- Character Discrimination (AREA)
- Image Analysis (AREA)
Description
特許法第30条第2項適用 掲載年月日:令和1年12月24日、掲載アドレス:https://www.sciencedirect.com/science/article/abs/pii/S0167865519303782?CMX_ID=&SIS_ID=0&dgcid=STMJ_75273_AUTH_SERV_PPUB&utm_acid=15760823&utm_campaign=STMJ_75273_AUTH_SERV_PPUB&utm_dgroup=Email1Publishing&utm_in=DM637240&utm_medium=email&utm_source=AC_30&utm_term=Email%201%20Publishing_TLSHArticle 30, Paragraph 2 of the Patent Act applies Date of publication: December 24, 2020, Address of publication: https://www. sciencedirect. com/science/article/abs/pii/S0167865519303782? CMX_ID=&SIS_ID=0&dgcid=STMJ_75273_AUTH_SERV_PPUB&utm_acid=15760823&utm_campaign=STMJ_75273_AUTH_SERV_PPUB&utm_dgroup=Emai l1Publishing&utm_in=DM637240&utm_medium=email&utm_source=AC_30&utm_term=Email%201%20Publishing_TLSH
本発明は、プログラム及びクラスタリング装置に関する。 The present invention relates to a program and a clustering device.
受験者(解答者)の考える力を育て、それを測るために、選択式の問題だけでなく記述式の問題を課す必要性が社会的に認識されてきている。記述式問題を課す場合、短期間で信頼性の高い採点を行うことが求められる。手書き認識の技術を用いれば、人による採点を支援する採点支援や自動採点を行うことが可能となる。記述式解答の必要性が高い算数・数学において、手書き解答の認識を採用した学習システムのプロトタイプが発表されている(例えば、非特許文献1~3)。 In order to develop and measure the thinking ability of test takers (answerers), society has begun to recognize the need to impose not only multiple-choice questions but also written questions. When assigning short-answer questions, it is necessary to score highly reliably in a short period of time. Using handwriting recognition technology, it becomes possible to perform scoring support that supports human scoring and automatic scoring. In arithmetic and mathematics, where there is a strong need for written answers, prototype learning systems that employ recognition of handwritten answers have been announced (for example, Non-Patent Documents 1 to 3).
人による採点を行う際に、解答がランダムに採点者に提示されると、採点がぶれる(ばらつく)ことがよく起こる。大規模な試験では、複数人で採点し、採点の点差が一定以上だと第三者が採点する必要が生じ、第三者を使うコストと時間がかさむ。一方、自動採点では、受験者が採点結果を確認し、採点誤りを指摘できる環境が不可欠であるが、それを前提としても、認識の確信度が高いものだけを自動採点し、確信度が低いものは棄却して人による採点に回す方式が現実的である。従って、採点支援か自動採点かによらず、採点者による採点のばらつきを抑えることが重要である。 When grading is done by humans, if answers are randomly presented to the grader, the scores often fluctuate. In large-scale exams, multiple people score the test, and if the difference in scores exceeds a certain level, a third party must score the test, which increases the cost and time of using a third party. On the other hand, automatic scoring requires an environment in which test takers can check their scoring results and point out scoring errors, but even with this as a premise, only items with high recognition confidence will be automatically scored, and test takers with low confidence will only be automatically scored. A realistic method would be to discard the items and have them scored by humans. Therefore, regardless of whether grading is supported or automatic grading is used, it is important to suppress variations in grading between graders.
本発明は、以上のような課題に鑑みてなされたものであり、その目的とするところは、採点者の採点誤りや採点のばらつきを低減して採点の効率を高めることが可能なプログラム及びクラスタリング装置を提供することにある。 The present invention has been made in view of the above-mentioned problems, and its purpose is to provide a program and clustering system that can improve scoring efficiency by reducing scoring errors and variations in scoring by scorers. The goal is to provide equipment.
(1)本発明は、手書き入力された複数の手書きパターンを分類するためのプログラムであって、1つの手書きパターンの画像を少なくとも1つの段階に縮小して、縮小前の元画像と少なくとも1つの縮小画像とを含む複数のスケール画像を生成するスケール画像生成部と、前記複数のスケール画像のそれぞれを畳み込みニューラルネットワークを用いた学習モデルに与えて、前記複数のスケール画像ごとに、シンボルの種類ごとの出現位置に関するシンボル位置特徴を抽出する特徴抽出部と、前記シンボル位置特徴に対して複数種類の区画分割を行い、前記複数種類の区画分割のそれぞれで得られた区画ごとにシンボルの種類ごとの出現確率を求めて特徴ベクトルを生成する特徴ベクトル生成部と、前記複数のスケール画像のそれぞれから生成した前記特徴ベクトルの同一箇所で同一シンボルの出
現確率の最大値をとって統合特徴ベクトルを生成する統合部と、複数の前記手書きパターンの画像のそれぞれから生成した前記統合特徴ベクトルに基づいて、複数の前記手書きパターンを複数のグループに分類する分類部としてコンピュータを機能させることを特徴とするプログラムに関する。また、本発明は、コンピュータ読み取り可能な情報記憶媒体であって、上記各部としてコンピュータを機能させるためのプログラムを記憶した情報記憶媒体に関係する。また、本発明は、上記各部を含むクラスタリング装置に関係する。
(1) The present invention is a program for classifying a plurality of handwritten patterns input by hand, which reduces an image of one handwritten pattern into at least one stage, and compares the original image before reduction with at least one a scale image generation unit that generates a plurality of scale images including a reduced image; and a scale image generation unit that generates a plurality of scale images including a reduced image; a feature extraction unit that extracts a symbol position feature regarding the appearance position of the symbol; a feature vector generation unit that generates a feature vector by determining the probability of occurrence; and a feature vector generation unit that generates an integrated feature vector by taking the maximum value of the probability of occurrence of the same symbol at the same location of the feature vectors generated from each of the plurality of scale images. The present invention relates to a program that causes a computer to function as a classification unit that classifies a plurality of handwritten patterns into a plurality of groups based on a combination unit and the integrated feature vector generated from each of the plurality of images of the handwritten patterns. . The present invention also relates to a computer-readable information storage medium that stores a program for causing a computer to function as each of the above sections. Further, the present invention relates to a clustering device including the above-mentioned parts.
本発明によれば、複数のスケール画像のそれぞれを学習モデルに与えて、複数のスケール画像ごとにシンボル位置特徴を抽出することで、大きさの異なるシンボルのクラス(種類)と位置を抽出することができる。また、シンボル位置特徴に対して複数種類の区画分割を行い、複数種類の区画分割のそれぞれで得られた区画ごとにシンボルの種類ごとの出現確率を求めて特徴ベクトルを生成することで、シンボルの位置ずれの大小に依らずシンボルを検出することができる。また、複数のスケール画像のそれぞれから抽出した複数のシンボル位置特徴のそれぞれに対して複数種類の区画分割を行って特徴ベクトルを生成することで、位置特徴のサイズを揃えて統合することができる。複数のスケール画像のそれぞれから生成した特徴ベクトルを統合して得られる統合特徴ベクトルに基づき複数の手書きパターンを複数のグループに分類することで、手書きパターンを似通ったものごとに精度良くまとめる(クラスタリングする)ことができ、採点者の採点誤りや採点のばらつきを低減して採点の効率を高めることができる。 According to the present invention, classes (types) and positions of symbols of different sizes can be extracted by providing each of a plurality of scale images to a learning model and extracting symbol position features for each of the plurality of scale images. Can be done. In addition, by performing multiple types of partitioning on symbol position features and generating feature vectors by determining the appearance probability of each type of symbol for each partition obtained by each of the multiple types of partitioning, we can Symbols can be detected regardless of the magnitude of positional deviation. Furthermore, by performing multiple types of segmentation on each of the symbol position features extracted from each of the multiple scale images and generating feature vectors, the size of the position features can be made uniform and integrated. By classifying multiple handwritten patterns into multiple groups based on the integrated feature vector obtained by integrating the feature vectors generated from each of multiple scale images, it is possible to accurately group handwritten patterns into groups that are similar (clustering). ), it is possible to reduce grading errors and variations in grading by the grader, and improve grading efficiency.
(2)また本発明に係るプログラム、情報記憶媒体及びクラスタリング装置では、前記複数のスケール画像のそれぞれを前記学習モデルに与えて、前記複数のスケール画像ごとに特徴マップを取得し、当該特徴マップを識別器に入力して得られる前記シンボル位置特徴と当該特徴マップとを掛け合わせて平均化したベクトルを前記識別器に入力してシンボルの種類ごとの出現確率を示す第1出現確率ベクトルを生成し、前記複数のスケール画像のそれぞれから生成した前記第1出現確率ベクトルの同一箇所で同一シンボルの出現確率の最大値をとって第1統合出現確率ベクトルを生成し、当該第1統合出現確率ベクトルとシンボルの種類ごとの出現の有無を示す教師データとに基づいて前記学習モデルを学習させる学習部として更にコンピュータを機能させてもよい(学習部を更に含んでもよい)。 (2) Furthermore, in the program, information storage medium, and clustering device according to the present invention, each of the plurality of scale images is given to the learning model, a feature map is obtained for each of the plurality of scale images, and the feature map is A vector obtained by multiplying the symbol position feature obtained by inputting it to the discriminator and the feature map and averaging the result is input to the discriminator to generate a first occurrence probability vector indicating the probability of occurrence for each type of symbol. , a first integrated appearance probability vector is generated by taking the maximum value of the appearance probability of the same symbol at the same location of the first appearance probability vector generated from each of the plurality of scale images; The computer may further function as a learning section that causes the learning model to learn based on teacher data indicating whether each type of symbol appears (or may further include a learning section).
本発明によれば、特徴マップを識別器に入力して得られるシンボル位置特徴と特徴マップを掛け合わせて得られるベクトルから生成した第1出現確率ベクトルを用いて学習モデルを学習させることで、注目すべきシンボルの出現に重みをつけて学習することができ、学習モデルを適切に学習することができる。 According to the present invention, a learning model is trained using a first appearance probability vector generated from a vector obtained by multiplying a symbol position feature obtained by inputting a feature map to a discriminator and a feature map. It is possible to learn by weighting the appearance of symbols that should occur, and the learning model can be learned appropriately.
(3)また本発明に係るプログラム、情報記憶媒体及びクラスタリング装置では、前記学習部は、前記複数のスケール画像のそれぞれを前記学習モデルに与えて、前記複数のスケール画像ごとに特徴マップを取得し、当該特徴マップの最大値をとったベクトルを前記識別器に入力してシンボルの種類ごとの出現確率を示す第2出現確率ベクトルを生成し、前記複数のスケール画像のそれぞれから生成した前記第2出現確率ベクトルの同一箇所で同一シンボルの出現確率の最大値をとって第2統合出現確率ベクトルを生成し、前記第1統合出現確率ベクトルと前記第2統合出現確率ベクトルを平均化した第3統合出現確率ベクトルを生成し、当該第3統合出現確率ベクトルと前記教師データとに基づいて前記学習モデルを学習させてもよい。 (3) Furthermore, in the program, information storage medium, and clustering device according to the present invention, the learning unit provides each of the plurality of scale images to the learning model and obtains a feature map for each of the plurality of scale images. , a vector with the maximum value of the feature map is input to the discriminator to generate a second appearance probability vector indicating the appearance probability for each type of symbol, and the second appearance probability vector generated from each of the plurality of scale images is A second integrated appearance probability vector is generated by taking the maximum value of the appearance probability of the same symbol at the same location of the appearance probability vector, and a third integration is performed by averaging the first integrated appearance probability vector and the second integrated appearance probability vector. An appearance probability vector may be generated, and the learning model may be trained based on the third integrated appearance probability vector and the teacher data.
本発明によれば、特徴マップの最大値をとったベクトルから生成した第2出現確率ベクトルと第1出現確率ベクトルを用いて、学習モデルを学習させることで、学習モデルをより適切に学習することができる。 According to the present invention, the learning model can be learned more appropriately by learning the learning model using the second appearance probability vector and the first appearance probability vector generated from the vector that takes the maximum value of the feature map. Can be done.
以下、本実施形態について説明する。なお、以下に説明する本実施形態は、特許請求の範囲に記載された本発明の内容を不当に限定するものではない。また本実施形態で説明される構成の全てが、本発明の必須構成要件であるとは限らない。 This embodiment will be described below. Note that this embodiment described below does not unduly limit the content of the present invention described in the claims. Furthermore, not all of the configurations described in this embodiment are essential components of the present invention.
1.構成
図1に本実施形態のクラスタリング装置の機能ブロック図の一例を示す。なお本実施形態のクラスタリング装置は図1の構成要素(各部)の一部を省略した構成としてもよい。
1. Configuration FIG. 1 shows an example of a functional block diagram of a clustering device according to this embodiment. Note that the clustering device of this embodiment may have a configuration in which some of the components (each part) in FIG. 1 are omitted.
入力部160は、紙などに筆記された手書き数式パターン(手書きパターンの一例)を入力するためのものであり、その機能は、手書き数式パターンを画像(白黒画像或いは濃淡画像)として読み取る光学読み取り装置(スキャナー、カメラ等)により実現できる。
The
記憶部170は、処理部100の各部としてコンピュータを機能させるためのプログラムや各種データを記憶するとともに、処理部100のワーク領域として機能し、その機能はハードディスク、RAMなどにより実現できる。
The
表示部190は、処理部100で生成された画像を出力するものであり、その機能は、入力部160としても機能するタッチパネル、LCD或いはCRTなどのディスプレイにより実現できる。
The
処理部100(プロセッサ)は、入力部160からのデータ(画像データ)やプログラムなどに基づいて、分類(クラスタリング)処理、学習処理、表示制御などの処理を行う。この処理部100は記憶部170内の主記憶部をワーク領域として各種処理を行う。処理部100の機能は各種プロセッサ(CPU、DSP等)、ASIC(ゲートアレイ等)などのハードウェアや、プログラムにより実現できる。処理部100は、スケール画像生成部110、特徴抽出部111、特徴ベクトル生成部112、統合部113、分類部114、表示制御部115、学習部116を含む。
The processing unit 100 (processor) performs processing such as classification (clustering) processing, learning processing, and display control based on data (image data) and programs from the
スケール画像生成部110は、1つの手書き数式パターン画像を少なくとも1つの段階に縮小して、縮小前の元画像と少なくとも1つの縮小画像とを含む複数のスケール画像を生成する。
The scale
特徴抽出部111は、複数のスケール画像のそれぞれを畳み込みニューラルネットワークを用いた学習モデルに与えて、複数のスケール画像ごとに、シンボルの種類ごとの出現位置に関するシンボル位置特徴を抽出する。なお、シンボルとは、数式を構成する要素であり、具体的には、数式に現れる数字、文字(英文字、ギリシャ文字)、演算子(算術演算子、論理演算子、集合演算子、関係演算子)、記号(加算記号、演算記号、積算記号、
積分記号、極限記号(lim)、特殊記号(∞等))、関数(log、sin、cos、tan等)、括弧
(大、中、小)である。
The
These are integral symbols, limit symbols (lim), special symbols (such as ∞), functions (log, sin, cos, tan, etc.), and parentheses (large, medium, small).
特徴ベクトル生成部112は、シンボル位置特徴に対して複数種類の区画分割を行い、前記複数種類の区画分割のそれぞれで得られた区画ごとにシンボルの種類ごとの出現確率を求めて特徴ベクトルを生成する。なお、複数種類の区画分割とは、n×mの区画分割のn及び/又はmの値が異なる区画分割である。
The feature
統合部113は、複数のスケール画像のそれぞれから生成した前記特徴ベクトルの同一箇所で同一シンボルの出現確率の最大値をとって統合特徴ベクトルを生成する。
The integrating
分類部114は、複数の手書き数式パターン画像のそれぞれから生成した統合特徴ベクトルに基づいて、複数の手書き数式パターンを複数のグループに分類する。
The
表示制御部115は、分類部114によって複数のグループに分類された複数の手書き数式パターンをグループ毎に表示部190に表示させる制御を行う。
The
学習部116は、複数のスケール画像(学習用のスケール画像)のそれぞれを前記学習モデルに与えて、複数のスケール画像ごとに特徴マップを取得し、当該特徴マップを識別器に入力して得られるシンボル位置特徴と当該特徴マップとを掛け合わせて平均化したベクトルを識別器に入力してシンボルの種類ごとの出現確率を示す第1出現確率ベクトルを生成し、複数のスケール画像のそれぞれから生成した第1出現確率ベクトルの同一箇所で同一シンボルの出現確率の最大値をとって第1統合出現確率ベクトルを生成し、当該第1統合出現確率ベクトルとシンボルの種類ごとの出現の有無を示す教師データとに基づいて前記学習モデルを学習させる。また、学習部116は、複数のスケール画像のそれぞれを学習モデルに与えて、複数のスケール画像ごとに特徴マップを取得し、当該特徴マップの最大値をとったベクトルを識別器に入力してシンボルの種類ごとの出現確率を示す第2出現確率ベクトルを生成し、前記複数のスケール画像のそれぞれから生成した第2出現確率ベクトルの同一箇所で同一シンボルの出現確率の最大値をとって第2統合出現確率ベクトルを生成し、第1統合出現確率ベクトルと第2統合出現確率ベクトルを平均化(統合)した第3統合出現確率ベクトルを生成し、当該第3統合出現確率ベクトルと教師データとに基づいて学習モデルを学習させてもよい。
The
2.本実施形態の手法
図2は、手書き数式パターンの入力画像(手書き数式パターン画像)から統合特徴ベクトルを生成する処理の流れを示す図である。
2. Technique of this Embodiment FIG. 2 is a diagram showing the flow of processing for generating an integrated feature vector from an input image of a handwritten mathematical formula pattern (handwritten mathematical formula pattern image).
まず、1つの手書き数式パターン画像(クラスタリング対象となる手書き数式パターン画像)を少なくとも1つの段階に縮小して、縮小前の元画像と少なくとも1つの縮小画像を含む複数のスケール画像を生成する。図1に示す例では、1つの手書き数式パターン画像から、辺長を1/2に縮小した縮小画像(1/4画像)と、辺長を1/4に縮小した縮小画像(1/16画像)とを生成することで、3つのスケール画像(元画像、1/4画像、1/16画像)を生成している。なお、より小さな縮尺で縮小した縮小画像を用いてもよいし、別の縮尺で縮小した縮小画像を追加して用いてもよい。 First, one handwritten mathematical formula pattern image (handwritten mathematical formula pattern image to be clustered) is reduced to at least one stage to generate a plurality of scaled images including an original image before reduction and at least one reduced image. In the example shown in FIG. 1, a reduced image (1/4 image) whose side length is reduced to 1/2 and a reduced image (1/16 image) whose side length is reduced to 1/4 are created from one handwritten mathematical pattern pattern image. ), three scale images (original image, 1/4 image, and 1/16 image) are generated. Note that a reduced image reduced to a smaller scale may be used, or a reduced image reduced to a different scale may be additionally used.
次に、複数のスケール画像のそれぞれを、学習モデルである深層畳み込みニューラルネットワーク(Deep CNN)及び識別器(Classifier)に与えて、複数のスケール画像ごとに、シンボルの種類(クラス)ごとの出現位置に関する特徴であるシンボル位置特徴(LC features)を抽出する。図3に、深層畳み込みニューラルネットワークと識別器の構成の
一例を示す。深層畳み込みニューラルネットワーク(Deep CNN)は、畳み込み層CLとプーリング層PL(最大プーリング層)からなり、特徴マップ(CNN feature map)を出力
する。特徴マップ(特徴マップ群)は、2次元配列の入力(スケール画像)に畳み込み(Convolution)やプーリング(Pooling)を適用して得られる特徴の2次元配列である特徴マップを複数含む。特徴マップは、識別器(Classifier)に入力される。ここでは、最後の2つの畳み込み層CLから出力される特徴マップを結合して、識別器に入力している。識別器は、畳み込み層CLとドロップアウトDOからなり、シンボル位置特徴を出力する。
Next, each of the multiple scale images is given to a deep convolutional neural network (Deep CNN) and a classifier (classifier), which are learning models, and the appearance position of each symbol type (class) is determined for each of the multiple scale images. Extract symbol position features (LC features) that are related features. FIG. 3 shows an example of the configuration of a deep convolutional neural network and a discriminator. A deep convolutional neural network (Deep CNN) consists of a convolutional layer CL and a pooling layer PL (maximum pooling layer), and outputs a feature map (CNN feature map). The feature map (feature map group) includes a plurality of feature maps that are two-dimensional arrays of features obtained by applying convolution or pooling to a two-dimensional array input (scale image). The feature map is input to a classifier. Here, the feature maps output from the last two convolutional layers CL are combined and input to the classifier. The classifier consists of a convolutional layer CL and a dropout DO, and outputs symbol position features.
図2にシンボル位置特徴(LC features)として示す箱は、図4に示すように複数の平
面をまとめて表現したものである。シンボル位置特徴は、シンボルの複数の種類(クラス)に対応する複数の平面で表され、各平面は、入力面(スケール画像)上の各位置でのそのクラスの出現確率を示す。奥行D(奥行方向に並ぶ平面の数)はクラスの数(#classes)を示し、高さHは入力面の高さ(縦方向の画素数)を示し、幅Wは入力面の幅(横方向の画素数)を示す。
The boxes shown as symbol position features (LC features) in FIG. 2 collectively represent a plurality of planes as shown in FIG. 4. The symbol position feature is represented by multiple planes corresponding to multiple types (classes) of symbols, and each plane indicates the probability of appearance of that class at each position on the input surface (scale image). Depth D (number of planes lined up in the depth direction) indicates the number of classes (#classes), height H indicates the height of the input surface (number of vertical pixels), and width W indicates the width of the input surface (horizontal (number of pixels in the direction).
次に、複数のスケール画像のそれぞれから抽出した複数のシンボル位置特徴に対して、階層的空間プーリング(HSP:Hierarchical Spatial Pooling)を行う。階層的空間プーリングでは、シンボル位置特徴の各平面に対して複数種類の区画分割を行い、複数種類の区画分割のそれぞれで得られた区画ごとにシンボルの種類(クラス)ごとの出現確率を求めて階層空間特徴ベクトル(HS features、本発明の特徴ベクトルに対応)を生成する。図5は、階層的空間プーリングの一例を模式的に示す図である。この例では、シンボル位置特徴の各平面に対して、3種類の区画分画(1×1の区画分割、3×5の区画分割及び5×7の区画分割)を適用し、3種類の区画分割のそれぞれから、区画ごとに各クラスの出現確率の最大値を求め(区画ごとに最大プーリングを行い)、区画ごとにk次元の特徴ベクトルを生成する。kは、クラスの数(#classes)であり、k次元の特徴ベクトルは、k種類のシンボルそれぞれの出現確率を要素とするベクトルである。そして、分割した区画数分のk次元の特徴ベクトルを連結し、更に、区画分割の種類数分の特徴ベクトルを連結して、階層空間特徴ベクトルを生成する。1×1の区画分割からは1×k=k次元の特徴ベクトル(入力面におけるクラスごとの出現確率)が得られ、3×5の区画分割からは3×5×k=15k次元の特徴ベクトル(入力面を3×5の区画に分割した場合の各区画におけるクラスごとの出現確率)が得られ、5×7の区画分割からは5×7×k=35k次元の特徴ベクトル(入力面を5×7の区画に分割した場合の各区画におけるクラスごとの出現確率)が得られ、これらを連結してk+15k+35k=51k次元の階層空間特徴ベクトルが得られる。1×1の区画分割から得られる特徴ベクトルは、シンボル位置特徴の各平面を分割していないため位置情報を表現しないが、他の区画分割から得られる特徴ベクトルは、位置情報を表現する。なお、上記3種類の区画分割のいずれかを除いたり、別の種類の区画分割を追加して行ってもよい。 Next, hierarchical spatial pooling (HSP) is performed on a plurality of symbol position features extracted from each of a plurality of scale images. In hierarchical spatial pooling, multiple types of partitioning are performed on each plane of symbol position features, and the probability of appearance for each symbol type (class) is determined for each partition obtained by each of the multiple types of partitioning. A hierarchical spatial feature vector (HS features, corresponding to the feature vector of the present invention) is generated. FIG. 5 is a diagram schematically showing an example of hierarchical spatial pooling. In this example, three types of partitioning (1x1 partitioning, 3x5 partitioning, and 5x7 partitioning) are applied to each plane of the symbol position feature, and three types of partitioning are applied. From each division, the maximum value of the appearance probability of each class is determined for each division (maximum pooling is performed for each division), and a k-dimensional feature vector is generated for each division. k is the number of classes (#classes), and the k-dimensional feature vector is a vector whose elements are the appearance probabilities of each of k types of symbols. Then, the k-dimensional feature vectors for the number of divided sections are concatenated, and the feature vectors for the number of types of section division are concatenated to generate a hierarchical spatial feature vector. From 1×1 partitioning, a 1×k=k-dimensional feature vector (probability of appearance for each class on the input surface) is obtained, and from 3×5 partitioning, a 3×5×k=15k-dimensional feature vector is obtained. (the appearance probability of each class in each section when the input surface is divided into 3 x 5 sections) is obtained, and from the 5 x 7 section division, a 5 x 7 x k = 35 k-dimensional feature vector (the input surface is When divided into 5×7 sections, the probability of appearance for each class in each section is obtained, and by connecting these, a hierarchical space feature vector of k+15k+35k=51k dimensions is obtained. The feature vector obtained from 1×1 partitioning does not represent position information because each plane of the symbol position feature is not divided, but the feature vector obtained from other partitioning does express position information. Note that any one of the above three types of partitioning may be excluded, or another type of partitioning may be added.
次に、複数のスケール画像のそれぞれから生成した階層空間特徴ベクトルの同一箇所で同一シンボル(同一クラス)の出現確率の最大値をとって(最大集約(MA:Max aggregation)を行って)統合特徴ベクトル(複数スケール階層空間特徴ベクトル、MHS features)を生成する。図2に示す例では、元画像、1/4画像及び1/16画像のそれぞれか
ら生成した3つの階層空間特徴ベクトルを統合して統合特徴ベクトルを生成する。
Next, the maximum value of the appearance probability of the same symbol (same class) at the same location of the hierarchical spatial feature vector generated from each of the multiple scale images is taken (maximum aggregation (MA) is performed) to integrate the feature. Generate a vector (multi-scale hierarchical spatial feature vector, MHS features). In the example shown in FIG. 2, three hierarchical spatial feature vectors generated from each of the original image, 1/4 image, and 1/16 image are integrated to generate an integrated feature vector.
手書き数式パターンのクラスタリングでは、まず、複数の手書き数式パターン画像それぞれから生成した統合特徴ベクトルに基づいて、手書き数式パターン間の類似度(統合特徴ベクトル間の距離)を求める。統合特徴ベクトル間の距離を求める関数としては、例えば、コサイン距離関数を利用することができる。そして、2つの手書き数式パターン画像の統合特徴ベクトル間の距離を、クラスタリング対象とする手書き数式パターンの全ての組み合わせについて求め、類似する手書き数式パターンごとにクラスタにクラスタリングする。クラスタリングには、K-means++法などの手法を利用することができる。 In clustering handwritten mathematical equation patterns, first, the degree of similarity between handwritten mathematical equation patterns (distance between integrated feature vectors) is determined based on integrated feature vectors generated from each of a plurality of handwritten mathematical equation pattern images. For example, a cosine distance function can be used as a function for determining the distance between integrated feature vectors. Then, the distance between the integrated feature vectors of the two handwritten mathematical formula pattern images is determined for all combinations of handwritten mathematical formula patterns to be clustered, and clustering is performed for each similar handwritten mathematical formula pattern. For clustering, methods such as the K-means++ method can be used.
数式において、シンボルは役割に応じて大きさが変わる。例えば、サブスクリプト(下付き)やスーパースクリプト(上付き)は、ベースラインのシンボルよりも小さい。図3に示す例では、手書き数式パターン画像において、異なる大きさの「x」が出現している。これが数式のシンボル検出を難しくする。本実施形態の手法では、複数のスケール画像のそれぞれを1つの深層畳み込みニューラルネットワーク(Deep CNN)に与えて、複数のスケール画像ごとにシンボル位置特徴(LC features)を抽出することで、大きさの異な
るシンボルのクラスと位置を抽出することができる。これは、いずれかの縮尺のスケール画像が、あるシンボルのクラスと位置を抽出するのに適するからである。すなわち、縮尺の小さなスケール画像は、大きく筆記されるシンボルのクラスと位置を抽出するのに適し、縮尺の大きなスケール画像(元画像など)は、小さく筆記されるシンボルのクラスと位置を抽出するのに適する。
In mathematical equations, symbols change size depending on their role. For example, subscripts and superscripts are smaller than baseline symbols. In the example shown in FIG. 3, "x"s of different sizes appear in the handwritten mathematical formula pattern image. This makes it difficult to detect symbols in mathematical expressions. In the method of this embodiment, each of a plurality of scale images is fed to one deep convolutional neural network (Deep CNN), and symbol position features (LC features) are extracted for each of the plurality of scale images. It is possible to extract classes and positions of different symbols. This is because scale images of any scale are suitable for extracting the class and position of a certain symbol. In other words, a small-scale image is suitable for extracting the class and position of a symbol that is written in a large scale, and a large-scale image (such as the original image) is suitable for extracting the class and position of a symbol that is written in a small scale. suitable for
また、数式認識では、シンボルの位置関係が重要である。例えば、括弧や分数罫の認識には、そのシンボルの形状だけでなく、その周りのシンボルの文脈も必要である。そこで本実施形態の手法では、シンボルだけでなくその近傍の情報を得るために、深層畳み込みニューラルネットワークにおいて、最後の2つの畳み込み層CLから出力される特徴マップを結合して、識別器に入力する。 Furthermore, in mathematical expression recognition, the positional relationship of symbols is important. For example, recognizing parentheses and fractional rules requires not only the shape of the symbol but also the context of the surrounding symbols. Therefore, in the method of this embodiment, in order to obtain not only information about the symbol but also information about its vicinity, in a deep convolutional neural network, the feature maps output from the last two convolutional layers CL are combined and input to the discriminator. .
また、本実施形態の手法では、シンボル位置特徴に対して複数種類の区画分割を行い、複数種類の区画分割のそれぞれで得られた区画ごとにシンボルの種類ごとの出現確率を求めて階層空間特徴ベクトル(HS features)を生成する処理(階層的空間プーリング)を
採用することで、シンボルの位置ずれの大小に依らずシンボルを検出することができる。すなわち、シンボルの位置ずれが大きい場合でも、区画数の少ない区画分割から得られる特徴ベクトルにより、大まかな位置でそのシンボルを検出することができ、シンボルの位置ずれが小さい場合には、区画数の多い区画分割から得られる特徴ベクトルにより、より精密な位置でそのシンボルを検出することができる。なお、階層的空間プーリングにおいて、シンボルの位置ずれに対応するために、各区画におけるシンボルごとの出現確率に対して、区画を中心したガウス関数を重畳するようにしてもよい。
In addition, in the method of this embodiment, the symbol position feature is divided into multiple types of partitions, and the probability of appearance for each type of symbol is determined for each partition obtained by each of the plurality of partitions, and the hierarchical spatial feature is By employing processing (hierarchical spatial pooling) that generates vectors (HS features), symbols can be detected regardless of the magnitude of symbol positional deviation. In other words, even if the positional deviation of a symbol is large, it is possible to detect the symbol at its approximate position using the feature vector obtained from partitioning with a small number of partitions. The feature vector obtained from multiple partitions allows the symbol to be detected at a more precise location. Note that in hierarchical spatial pooling, in order to deal with positional shifts of symbols, a Gaussian function centered on the section may be superimposed on the probability of appearance of each symbol in each section.
また、スケール画像のサイズが異なるとシンボル位置特徴のサイズも異なるが、本実施形態の手法では、複数のスケール画像のそれぞれから抽出した複数のシンボル位置特徴に対して階層的空間プーリングを適用することで、特徴のサイズを同一サイズに揃えて統合することが可能となる。そして、複数のスケール画像のそれぞれから生成した階層空間特徴ベクトルを統合して得られる統合特徴ベクトル(MHS features)に基づき複数の手書き数式パターンを複数のグループに分類することで、手書き数式パターンを似通ったものごとに精度良くクラスタリングすることができ、採点者の採点誤りや採点のばらつきを低減して採点の効率を高めることができる。 Furthermore, if the size of the scale image differs, the size of the symbol position feature also differs, but in the method of this embodiment, hierarchical spatial pooling is applied to a plurality of symbol position features extracted from each of a plurality of scale images. This allows features to be unified by making them the same size. Then, by classifying multiple handwritten math patterns into multiple groups based on the integrated feature vector (MHS features) obtained by integrating the hierarchical spatial feature vectors generated from each of the multiple scale images, the handwritten math patterns can be classified into similar groups. It is possible to cluster each item with high accuracy, reduce scoring errors by scorers and variations in scoring, and improve scoring efficiency.
次に、深層畳み込みニューラルネットワーク(学習モデル)の学習について説明する。図6は、学習処理の流れを示す図である。学習時にはシンボルの位置情報を用いずに、大域注目プーリング(GAtP:Global Attentive Pooling)により、シンボルの種類ごとの出現確率を示す出現確率ベクトルを抽出する。 Next, learning of a deep convolutional neural network (learning model) will be explained. FIG. 6 is a diagram showing the flow of learning processing. During learning, an appearance probability vector indicating the appearance probability of each type of symbol is extracted by global attention pooling (GAtP) without using symbol position information.
まず、クラスタリング時と同様に、1つの手書き数式パターン画像(学習用の手書き数式パターン画像)を少なくとも1つの段階に縮小して、縮小前の元画像と少なくとも1つの縮小画像を含む複数のスケール画像を生成する。次に、複数のスケール画像のそれぞれを、深層畳み込みニューラルネットワーク(Deep CNN)に与えて、最後の2つの畳み込み層CLから出力される特徴マップ(CNN feature map)を得る。特徴マップとして示す箱
の奥行(D)は、特徴マップに含まれる特徴(特徴マップ群に含まれる特徴マップ)の数
(#features)を示す。
First, as in the case of clustering, one handwritten mathematical formula pattern image (handwritten mathematical formula pattern image for learning) is reduced to at least one stage to create multiple scaled images including the original image before reduction and at least one reduced image. generate. Next, each of the plurality of scale images is applied to a deep convolutional neural network (Deep CNN) to obtain a feature map (CNN feature map) output from the last two convolutional layers CL. The depth (D) of the box shown as a feature map indicates the number (#features) of features included in the feature map (feature maps included in the feature map group).
次に、特徴マップに対して、大域注目プーリング(GAtP)を行う。この処理では、あるシンボルの全ての出現位置から特徴を抽出するが、注目すべきクラスの出現に重みをつける。図7は、大域注目プーリングの処理の流れを示す図である。まず、特徴マップ(F)を識別器(Classifier)に入力して、シンボル位置特徴(Mi,i=1..k)を求める。kはクラスの数(#classes)である。次に、シンボルごとに、特徴マップ(F)にシンボル位置特徴を掛け合わせて(乗算して)、k個のクラス注目特徴マップ(F×M1~F×Mk)を得る。クラスc(c番目のクラス)のシンボル位置特徴(入力面上の各位置でのクラスcの出現確率)をMcとすると、特徴マップ(F)にシンボル位置特徴(Mc)を掛け合わせて、クラス注目特徴マップ(F×Mc)を得る。クラス注目特徴マップ(F×Mc)は、クラスcの出現に重みを付けた特徴マップである。次に、クラス注目特徴マップ(F×M1~F×Mk)のそれぞれについて、高さHと幅Wの値の平均をとって(特徴ごとに平均化して)、クラス注目ベクトル(AttF1~AttFk)を求める。特徴マップ(F)にシンボル位置特徴(Mc)を掛け合わせて平均化したクラス注目ベクトル(AttFc)は、以下の式(1)により求めることができる。 Next, global attention pooling (GAtP) is performed on the feature map. In this process, features are extracted from all positions where a certain symbol appears, but weights are given to the appearance of noteworthy classes. FIG. 7 is a diagram showing the flow of global attention pooling processing. First, the feature map (F) is input to a classifier to obtain symbol position features (M i , i=1..k). k is the number of classes (#classes). Next, for each symbol, the feature map (F) is multiplied by the symbol position feature to obtain k class attention feature maps (F×M 1 to F×M k ). If the symbol position feature (probability of appearance of class c at each position on the input surface) of class c (c-th class) is M c , then the feature map (F) is multiplied by the symbol position feature (M c ). , obtain a class attention feature map (F×M c ). The class attention feature map (F×M c ) is a feature map in which the appearance of class c is weighted. Next, for each of the class attention feature maps (F×M 1 to F×M k ), the values of height H and width W are averaged (averaged for each feature), and the class attention vector (Att F1 ~ AttFk ). A class attention vector (Att Fc ), which is obtained by multiplying the feature map (F) by the symbol position feature (M c ) and averaging the results, can be obtained using the following equation (1).
次に、クラス注目ベクトル(AttF1~AttFk)のそれぞれを識別器(Classifier)に入力して得られるベクトル(f(AttF1)~f(AttFk))を対角化(Diagonalize)して、クラスごとの出現確率を示す第1出現確率ベクトル(y1~ykを各要
素とするベクトルy)を求める。ベクトル(f(AttFc))のc番目の要素であるyc(クラスcの出現確率)は、以下の式(2)により求めることができる。
Next, the vectors (f(Att F1 ) to f(Att Fk )) obtained by inputting each of the class attention vectors (Att F1 to Att Fk ) to a classifier are diagonalized. , a first appearance probability vector (vector y whose elements are y 1 to y k ) indicating the appearance probability for each class is determined. The c-th element of the vector (f(Att Fc )), y c (probability of appearance of class c), can be determined by the following equation (2).
あるベクトル)であり、<a,b>は、ベクトルaとベクトルbの内積演算を示す。
次に、図6に示すように、複数のスケール画像のそれぞれから生成した第1出現確率ベクトル(y)の同一箇所で同一シンボルの出現確率の最大値をとって(最大集約(MA)を行って)第1統合出現確率ベクトル(My)を生成する。 Next, as shown in FIG. 6, maximum aggregation (MA) is performed by taking the maximum value of the probability of occurrence of the same symbol at the same location in the first occurrence probability vector (y) generated from each of the multiple scale images. ) A first integrated appearance probability vector (My) is generated.
次に、第1統合出現確率ベクトル(My)と教師データ(クラスごとの出現確率(出現の有無)を示すベクトル)とに基づいて、バイナリエントロピー損失(Binary entropy loss)を用いて学習モデル(深層畳み込みニューラルネットワーク)を学習させる。図6
に示す例では、学習用の手書き数式パターンにシンボル「a」、「b」、「2」、「+」、「分数罫(frac)」が出現するため、教師データとして、これらのクラスの出現確率が「1」でありそれ以外のクラスの出現確率が「0」であるベクトルを用意している。
Next, a learning model (deep Convolutional neural network). Figure 6
In the example shown in , the symbols "a", "b", "2", "+", and "frac" appear in the handwritten formula pattern for learning, so the occurrences of these classes are used as training data. A vector is prepared in which the probability is "1" and the appearance probability of other classes is "0".
なお、大域注目プーリング(GAtP)は、事前学習をしない場合には、収束に多大な時間を要するか、最悪の場合は収束しない可能性がある。また、手書き数式パターン画像中に存在しないクラスに対しても一定の確率を出してしまう可能性がある。そこで、この
問題を解決するために、大域最大プーリング(GMP:Global Max Pooling)によってクラスごとの出現確率(第2出現確率ベクトル)を求め、複数のスケール画像のそれぞれから生成した第2出現確率ベクトルの同一箇所で同一シンボルの出現確率の最大値をとって第2統合出現確率ベクトルを生成し、第2統合出現確率ベクトルと第1統合出現確率ベクトル(My)とを統合(平均化)して第3統合出現確率ベクトルを生成し、第3統合出現確率ベクトルと教師データとに基づいて学習モデルを学習させるようにしてもよい。大域最大プーリングでは、特徴マップ(F)の特徴ごとにx,yについて最大値をとった式(3)のd(depth、#features)次元のベクトルを求める。
Note that global attention pooling (GAtP) may take a long time to converge, or may not converge in the worst case, if no prior learning is performed. Furthermore, there is a possibility that a certain probability will be given for a class that does not exist in the handwritten mathematical formula pattern image. Therefore, in order to solve this problem, the appearance probability (second appearance probability vector) for each class is determined by global maximum pooling (GMP), and the second appearance probability vector is generated from each of the plurality of scale images. A second integrated appearance probability vector is generated by taking the maximum value of the appearance probability of the same symbol at the same location, and the second integrated appearance probability vector and the first integrated appearance probability vector (My) are integrated (averaged). A third integrated appearance probability vector may be generated, and the learning model may be trained based on the third integrated appearance probability vector and the teacher data. In global maximum pooling, a d (depth, #features)-dimensional vector of equation (3) is obtained by taking the maximum value for x and y for each feature of the feature map (F).
3.評価実験
本実施形態のクラスタリング手法(及び、学習手法)を評価する実験を行った。クラスタリングの評価指標として、以下の式(4)に示す純度(Purity)を用いた。クラスタごとに採点することを考えると、純度が1に近い方が良い。
3. Evaluation Experiment An experiment was conducted to evaluate the clustering method (and learning method) of this embodiment. Purity shown in the following equation (4) was used as an evaluation index for clustering. Considering that each cluster is scored, it is better for the purity to be close to 1.
本実験では、手書き数式パターン画像のサンプルとしてCROHME 2016 dataset(H. Mouchere, C. Viard-Gaudin, R. Zanibbi, U. Garain, ICFHR2016 CROHME: Competition on Recognition of Online Handwritten Mathematical Expressions, in: 2016 15th Int. Conf. Front. Handwrit. Recognit., IEEE, 2016: pp. 607-612. doi:10.1109/ICFHR.2016.0116.)を用いた。これには、101種類のシンボルが出現する。また、これには、8,
834の学習サンプル、986の検証サンプル、1,147のテストサンプルがあるが、
本実験では、テストサンプルを用いず、学習サンプルの一部である36種類の数式の620のサンプルをテストサンプルに用いる。なぜなら、元のテストサンプルには、1つの数式あたり1つのサンプルしかないためである。一方、学習サンプルから選んだ620のサンプルには、1つの数式あたり15から22のサンプルがある。元の8,834の学習サンプルからこれら620のサンプルを除いた8,214のサンプルを学習に用いた。検証
サンプルについてはそのまま利用した。以降、このサンプルセットをS-CROHMEと呼ぶ。
In this experiment, we used the CROHME 2016 dataset (H. Mouchere, C. Viard-Gaudin, R. Zanibbi, U. Garain, ICFHR2016 CROHME: Competition on Recognition of Online Handwritten Mathematical Expressions, in: 2016 15th Int) as a sample of handwritten mathematical expression pattern images. Conf. Front. Handwrit. Recognit., IEEE, 2016: pp. 607-612. doi:10.1109/ICFHR.2016.0116.). 101 types of symbols appear in this. Also, this includes 8,
There are 834 training samples, 986 validation samples, and 1,147 test samples.
In this experiment, a test sample is not used, but 620 samples of 36 types of mathematical expressions, which are part of the learning samples, are used as test samples. This is because the original test sample has only one sample per formula. On the other hand, among the 620 samples selected from the training samples, there are 15 to 22 samples per formula. These 620 samples were removed from the original 8,834 training samples, resulting in 8,214 samples used for learning. The verification sample was used as is. Hereinafter, this sample set will be referred to as S-CROHME.
本実験では、全てのサンプル(数式画像)について、その縦横比を固定して、縦方向が
128画素になるように正規化(通常はこれ以上の画素数をもつので128画素に縮小、稀に小さいものは128画素に拡大)し、その結果、横方向が800画素より大きいものは、横方向が800画素になるように線形に圧縮した。なお、横方向が800画素未満のものはそのままとした。複数解像度の画像(複数段階の縮小画像)を生成するために、2×2のマスクによる平均プーリングを2回行った。その結果、縦方向が128画素、64画素、32画素の数式画像(3つのスケール画像)が生成された。なお。数式では、複数のシンボルが出現し、それらを判読できるためには、縦方向が128画素、横方向がそれ以上になることが普通であることから、上記のように前処理するが、それらより少ない画素数(例えば、64画素)の場合は、縦方向が64画素、32画素、16画素の数式画像を用意したり、区画分割の区画数を少なくするなどの方法で対処できる。
In this experiment, we fixed the aspect ratio of all samples (mathematical formula images) and normalized them to 128 pixels in the vertical direction. As a result, those larger than 800 pixels in the horizontal direction were linearly compressed to 800 pixels in the horizontal direction. Note that those with less than 800 pixels in the horizontal direction were left unchanged. In order to generate images with multiple resolutions (multiple levels of reduced images), average pooling using a 2×2 mask was performed twice. As a result, mathematical formula images (three scale images) of 128 pixels, 64 pixels, and 32 pixels in the vertical direction were generated. In addition. In mathematical formulas, multiple symbols appear, and in order to be able to read them, it is normal for the number of pixels to be 128 pixels in the vertical direction and more than that in the horizontal direction. If the number of pixels is small (for example, 64 pixels), this can be handled by preparing formula images with 64 pixels, 32 pixels, or 16 pixels in the vertical direction, or reducing the number of partitions for partitioning.
表1に、本実験で用いた深層畳み込みニューラルネットワークの具体的構成を示す。表1において、♯mapsは、特徴マップの数であり、kは、カーネル(フィルタ)の数であり、sは、ストライドの大きさであり、pは、パディングの大きさである。また、ReLUは、活性化関数である。 Table 1 shows the specific configuration of the deep convolutional neural network used in this experiment. In Table 1, #maps is the number of feature maps, k is the number of kernels (filters), s is the stride size, and p is the padding size. Moreover, ReLU is an activation function.
の距離を算出するために、コサイン距離関数を用いた。クラスタリング手法としては、K-means++法を採用した。
クラスタの数Kを大きくとれば、高い純度(Purity)は簡単に得られる。例えば、クラスタの数Kがサンプルの数Hに等しければ、純度は1になる。しかし、これではクラスタリングをしていないのと同じであり、採点効率は上がらない。従って、クラスタの数Kは、数式の種類数程度にしなければならない。但し、実際の採点場面では、正確な数式認識をしなければ、その種類数は分からない。ここでは、評価のために、前もって分かっている数式の種類数をクラスタの数Kに設定した。すなわち、S-CROHMEを36のクラスタにクラスタリングした。 High purity can be easily obtained by increasing the number of clusters K. For example, if the number of clusters K is equal to the number of samples H, the purity will be 1. However, this is the same as not performing clustering, and the scoring efficiency does not improve. Therefore, the number K of clusters must be about the same as the number of types of mathematical expressions. However, in actual scoring situations, the number of types cannot be known unless accurate mathematical formula recognition is performed. Here, for evaluation, the number of types of formulas known in advance was set as the number of clusters K. That is, S-CROHME was clustered into 36 clusters.
まず、階層空間特徴ベクトル(HS features)を生成する際の階層的空間プーリング(
HSP)の効果を評価した。区画分割を行わない(1×1の区画分割のみを行う)場合、単一の区画分割(3×5、3×7、5×7のいずれかの区画分割のみ)を行う場合、複数種類の区画分画(階層的空間プーリング)を行う場合のそれぞれで、S-CROHMEのテストサンプルをクラスタリングして純度を求めた。評価結果を表2に示す。
First, hierarchical spatial pooling (
HSP) was evaluated. If no partitioning is performed (only 1x1 partitioning), if a single partitioning (3x5, 3x7, or 5x7 partitioning only), multiple types of partitioning. In each case of compartmental fractionation (hierarchical spatial pooling), S-CROHME test samples were clustered to determine purity. The evaluation results are shown in Table 2.
次に、大域プーリングの違いによる効果を評価した。学習時に、大域平均プーリング(GAP:Global Average Pooling)を行う場合、大域最大プーリング(GMP)を行う場
合、大域注目プーリングと大域最大プーリングを統合する(GAtP+GMP)場合のそれぞれで、純度を求めた。評価結果を表3に示す。なお、大域平均プーリングは、特徴マップ(F)の特徴ごとに平均値をとったベクトルを識別器(Classifier)に入力して出現確率ベクトルを求める手法であり、それぞれのクラスに対して、全ての出現位置からその特徴を抽出する。
Next, we evaluated the effects of differences in global pooling. During learning, purity was determined for each of the following cases: Global Average Pooling (GAP), Global Maximum Pooling (GMP), and Integration of Global Attention Pooling and Global Maximum Pooling (GAtP+GMP). The evaluation results are shown in Table 3. Global average pooling is a method that calculates the appearance probability vector by inputting the average value for each feature of the feature map (F) to a classifier. Extract the feature from the appearance position.
大域プーリングの違いは、クラスタリングだけでなく、シンボルの平均認識率にも表れる。GAtP+GMP、GMP、GAPの平均認識率は、それぞれ、0.94、0.93、0.17であった。GAtP+GMPの良さを認識性能でも確認することができた。 The difference in global pooling appears not only in clustering but also in the average recognition rate of symbols. The average recognition rates of GAtP+GMP, GMP, and GAP were 0.94, 0.93, and 0.17, respectively. The merits of GAtP+GMP could also be confirmed in recognition performance.
図8は、ある手書き数式パターン画像(スケール画像)に、当該手書き数式パターン画像から抽出したシンボル位置特徴(シンボルの種類ごとの、画像上の各位置での出現確率)を重ね合わせた図である。シンボル位置特徴は、シンボルの出現確率が高いほど高い輝度で示されている。図8の1番左の1列目の画像は、元画像に元画像から抽出したシンボル位置特徴を重ね合わせた画像であり、2列目の画像は、1/4画像に1/4画像から抽出したシンボル位置特徴を重ね合わせた画像であり、3列目の画像は、1/16画像に1/16画像から抽出したシンボル位置特徴を重ね合わせた画像であり、1番右の4列目の画像は、これら3つの画像を合成した(同一位置での値の最大値をとった)画像である。また、1番上の1行目から11行目にかけて、数式に出現する各シンボル(「x」、「Σ」、「P」、「n」、「j」、「i」、「a」、「0」、「=」、「)」、「(」)の各位置での出現確率を示しており、一番下の12行目の画像は、これらを合成した画像(全てのシンボルの各位置での出現確率)である。なお、図8では、縮小画像(1/4画像、1/16画像)とそのシンボル位置特徴を元画像のサイズに拡大して表示している。 FIG. 8 is a diagram in which symbol position features (probability of appearance at each position on the image for each type of symbol) extracted from the handwritten mathematical formula pattern image (scale image) are superimposed on a certain handwritten mathematical formula pattern image (scale image). . The symbol position feature is shown with higher brightness as the probability of appearance of the symbol is higher. The image in the first column on the far left in FIG. 8 is an image obtained by superimposing the symbol position feature extracted from the original image on the original image, and the image in the second column is an image obtained by superimposing symbol position features extracted from the original image on the original image. The image in the third column is an image in which the symbol position features extracted from the 1/16 image are superimposed on the 1/16 image. The image is an image obtained by combining these three images (taking the maximum value at the same position). In addition, each symbol that appears in the formula ("x", "Σ", "P", "n", "j", "i", "a", It shows the probability of appearance at each position of "0", "=", ")", "("), and the image in the 12th row at the bottom is an image that combines these (each of all symbols (probability of appearance at that location). In addition, in FIG. 8, the reduced images (1/4 image, 1/16 image) and their symbol position characteristics are enlarged to the size of the original image and displayed.
図8から、異なるサイズのシンボルが3つのスケール画像のいずれかで良く処理されていることが分かる。「x」、「n」、「j」、「a」などの小さいサイズのシンボルは、元画像で検出され、「(」、「)」、「=」、「P」などの中間のサイズのシンボルは、1/4画像で検出され、大きいサイズのシンボルの「Σ」は、1/16画像で検出されて
いる。
From FIG. 8, it can be seen that symbols of different sizes are well processed in any of the three scale images. Small size symbols such as 'x', 'n', 'j', 'a' are detected in the original image, while intermediate size symbols such as '(', ')', '=", 'P' etc. The symbol is detected in a 1/4 image, and the large size symbol "Σ" is detected in a 1/16 image.
シンボルの位置も正しく推定されている。しかし、10行目、11行目の画像が示すように、シンボル「(」とシンボル「)」の両方が同一箇所で検出されている。シンボル「(」とシンボル「)」は、数式ではペアで現れるため、位置情報を用いずにクラスの情報だけで学習させられる半教師付き学習では、別々の位置に区別されない。しかし、クラスタリングに対する悪影響は軽微である。 The position of the symbol is also estimated correctly. However, as shown in the images on the 10th and 11th lines, both the symbol "(" and the symbol ")" are detected at the same location. The symbol "(" and the symbol ")" appear as a pair in a mathematical formula, so semi-supervised learning, which uses only class information without using position information, does not distinguish them into separate positions. However, the negative effect on clustering is minor.
なお、本発明は、上述の実施の形態に限定されるものではなく、種々の変更が可能である。本発明は、実施の形態で説明した構成と実質的に同一の構成(例えば、機能、方法及び結果が同一の構成、あるいは目的及び効果が同一の構成)を含む。また、本発明は、実施の形態で説明した構成の本質的でない部分を置き換えた構成を含む。また、本発明は、実施の形態で説明した構成と同一の作用効果を奏する構成又は同一の目的を達成することができる構成を含む。また、本発明は、実施の形態で説明した構成に公知技術を付加した構成を含む。 Note that the present invention is not limited to the above-described embodiments, and various modifications are possible. The present invention includes configurations that are substantially the same as those described in the embodiments (for example, configurations that have the same functions, methods, and results, or configurations that have the same objectives and effects). Further, the present invention includes a configuration in which non-essential parts of the configuration described in the embodiments are replaced. Further, the present invention includes a configuration that has the same effects or a configuration that can achieve the same objective as the configuration described in the embodiment. Further, the present invention includes a configuration in which a known technique is added to the configuration described in the embodiment.
上記実施の形態では、手書き数式パターンを光学読み取り装置により画像として読み取るオフライン方式(画像入力方式)の場合について説明したが、タブレット等により筆記媒体の位置(筆点)の座標データを一定時間間隔で検出するオンライン方式(筆点座標入力方式)に本発明を適用することもできる。オンライン方式の場合は、時系列の筆点列を接続し、更に太さを与えて肉付けすることで画像に変換すれば、上記実施の形態をそのまま適用することができる。或いは、時系列の1次元データの特徴を抽出し、オフライン方式と同様に、シンボル位置特徴(LC features)を抽出するようにしてもよい。オンライ
ン方式の場合、オフライン方式のように手書き数式パターン画像を縮小して複数のスケール画像を用意する必要はなく、LSTM(Long Short-Term Memory)のニューラルネットワークを用いて、シンボルごとにシンボル位置特徴を抽出することができる。そして、1次元の階層的空間プーリングにより、シンボル位置特徴に対して複数種類の区画分割を行って、区画ごとにシンボルの種類ごとの出現確率を求めて特徴ベクトルを生成し、全ての種類の区画分割からの特徴ベクトルを連結して階層空間特徴ベクトルを生成する。複数のスケール画像を用意しないので、階層空間特徴ベクトルの最大集約(MA)を行う必要はない。
In the above embodiment, an offline method (image input method) in which a handwritten mathematical pattern is read as an image by an optical reader is described. The present invention can also be applied to an online method of detection (pen coordinate input method). In the case of an online method, the above embodiment can be applied as is by connecting time-series lines of pen points and adding thickness and fleshing out the image to convert it into an image. Alternatively, features of time-series one-dimensional data may be extracted, and symbol position features (LC features) may be extracted as in the offline method. In the case of the online method, unlike the offline method, there is no need to reduce the handwritten mathematical pattern image and prepare multiple scale images, and instead, a neural network of LSTM (Long Short-Term Memory) is used to create symbol position characteristics for each symbol. can be extracted. Then, by one-dimensional hierarchical spatial pooling, the symbol position feature is divided into multiple types of partitions, the appearance probability of each symbol type is determined for each partition, a feature vector is generated, and all types of partitions are Concatenate the feature vectors from the splits to generate a hierarchical spatial feature vector. Since multiple scale images are not prepared, there is no need to perform maximum aggregation (MA) of hierarchical spatial feature vectors.
また、上記実施の形態では、手書き数式パターンを分類する場合について説明したが、本発明はこれに限らない。本発明は、シンボルが2次元空間で配置される構造(化学物質の構造式、化学反応式、論理式などの手書きパターン)の分類に適用することができる。 Further, in the above embodiment, a case has been described in which handwritten mathematical expression patterns are classified, but the present invention is not limited to this. The present invention can be applied to the classification of structures in which symbols are arranged in a two-dimensional space (handwritten patterns such as structural formulas of chemical substances, chemical reaction formulas, logical formulas, etc.).
100…処理部、110…スケール画像生成部、111…特徴抽出部、112…特徴ベクトル生成部、113…統合部、114…分類部、115…表示制御部、116…学習部、160…入力部、170…記憶部、190…表示部
DESCRIPTION OF
Claims (4)
1つの手書きパターンの画像を少なくとも1つの段階に縮小して、縮小前の元画像と少なくとも1つの縮小画像とを含む複数のスケール画像を生成するスケール画像生成部と、
前記複数のスケール画像のそれぞれを畳み込みニューラルネットワークを用いた学習モデルに与えて、前記複数のスケール画像ごとに、シンボルの種類ごとの出現位置に関するシンボル位置特徴を抽出する特徴抽出部と、
前記シンボル位置特徴に対して複数種類の区画分割を行い、前記複数種類の区画分割のそれぞれで得られた区画ごとにシンボルの種類ごとの出現確率を求めて特徴ベクトルを生成する特徴ベクトル生成部と、
前記複数のスケール画像のそれぞれから生成した前記特徴ベクトルの同一箇所で同一シンボルの出現確率の最大値をとって統合特徴ベクトルを生成する統合部と、
複数の前記手書きパターンの画像のそれぞれから生成した前記統合特徴ベクトルに基づいて、複数の前記手書きパターンを複数のグループに分類する分類部としてコンピュータを機能させることを特徴とするプログラム。 A program for classifying multiple handwritten patterns input by hand,
a scale image generation unit that reduces an image of one handwritten pattern to at least one stage to generate a plurality of scale images including an original image before reduction and at least one reduced image;
a feature extraction unit that applies each of the plurality of scale images to a learning model using a convolutional neural network and extracts a symbol position feature regarding the appearance position of each type of symbol for each of the plurality of scale images;
a feature vector generation unit that performs a plurality of types of partitioning on the symbol position feature and generates a feature vector by determining the appearance probability for each type of symbol for each partition obtained by each of the plurality of types of partitioning; ,
an integrating unit that generates an integrated feature vector by taking the maximum value of the probability of appearance of the same symbol at the same location of the feature vectors generated from each of the plurality of scale images;
A program that causes a computer to function as a classification unit that classifies a plurality of handwritten patterns into a plurality of groups based on the integrated feature vector generated from each of the plurality of images of the handwritten patterns.
前記複数のスケール画像のそれぞれを前記学習モデルに与えて、前記複数のスケール画像ごとに特徴マップを取得し、当該特徴マップを識別器に入力して得られる前記シンボル位置特徴と当該特徴マップとを掛け合わせて平均化したベクトルを前記識別器に入力してシンボルの種類ごとの出現確率を示す第1出現確率ベクトルを生成し、前記複数のスケール画像のそれぞれから生成した前記第1出現確率ベクトルの同一箇所で同一シンボルの出現確率の最大値をとって第1統合出現確率ベクトルを生成し、当該第1統合出現確率ベクトルとシンボルの種類ごとの出現の有無を示す教師データとに基づいて前記学習モデルを学習させる学習部として更にコンピュータを機能させることを特徴とするプログラム。 In claim 1,
Each of the plurality of scale images is given to the learning model to obtain a feature map for each of the plurality of scale images, and the symbol position feature obtained by inputting the feature map to a discriminator and the feature map are The multiplied and averaged vectors are input to the discriminator to generate a first appearance probability vector indicating the appearance probability for each type of symbol, and the first appearance probability vector generated from each of the plurality of scale images is A first integrated appearance probability vector is generated by taking the maximum value of the appearance probability of the same symbol at the same location, and the learning is performed based on the first integrated appearance probability vector and training data indicating whether or not each type of symbol appears. A program characterized by causing a computer to further function as a learning section for learning a model.
前記学習部は、
前記複数のスケール画像のそれぞれを前記学習モデルに与えて、前記複数のスケール画像ごとに特徴マップを取得し、当該特徴マップの最大値をとったベクトルを前記識別器に入力してシンボルの種類ごとの出現確率を示す第2出現確率ベクトルを生成し、前記複数のスケール画像のそれぞれから生成した前記第2出現確率ベクトルの同一箇所で同一シンボルの出現確率の最大値をとって第2統合出現確率ベクトルを生成し、前記第1統合出現確率ベクトルと前記第2統合出現確率ベクトルを平均化した第3統合出現確率ベクトルを生成し、当該第3統合出現確率ベクトルと前記教師データとに基づいて前記学習モデルを学習させることを特徴とするプログラム。 In claim 2,
The learning department is
Each of the plurality of scale images is given to the learning model, a feature map is obtained for each of the plurality of scale images, and a vector that takes the maximum value of the feature map is input to the discriminator to distinguish each symbol type. A second appearance probability vector indicating the appearance probability of the symbol is generated, and a second integrated appearance probability is obtained by taking the maximum value of the appearance probability of the same symbol at the same location of the second appearance probability vector generated from each of the plurality of scale images. generate a third integrated appearance probability vector by averaging the first integrated appearance probability vector and the second integrated appearance probability vector, and generate the third integrated appearance probability vector based on the third integrated appearance probability vector and the teacher data. A program characterized by learning a learning model.
1つの手書きパターンの画像を少なくとも1つの段階に縮小して、縮小前の元画像と少なくとも1つの縮小画像とを含む複数のスケール画像を生成するスケール画像生成部と、
前記複数のスケール画像のそれぞれを畳み込みニューラルネットワークを用いた学習モデルに与えて、前記複数のスケール画像ごとに、シンボルの種類ごとの出現位置に関するシンボル位置特徴を抽出する特徴抽出部と、
前記シンボル位置特徴に対して複数種類の区画分割を行い、前記複数種類の区画分割のそれぞれで得られた区画ごとにシンボルの種類ごとの出現確率を求めて特徴ベクトルを生成する特徴ベクトル生成部と、
前記複数のスケール画像のそれぞれから生成した前記特徴ベクトルの同一箇所で同一シンボルの出現確率の最大値をとって統合特徴ベクトルを生成する統合部と、
複数の前記手書きパターンの画像のそれぞれから生成した前記統合特徴ベクトルに基づ
いて、複数の前記手書きパターンを複数のグループに分類する分類部とを含むことを特徴とするクラスタリング装置。 A clustering device that classifies a plurality of handwritten patterns input by hand,
a scale image generation unit that reduces an image of one handwritten pattern to at least one stage to generate a plurality of scale images including an original image before reduction and at least one reduced image;
a feature extraction unit that applies each of the plurality of scale images to a learning model using a convolutional neural network and extracts a symbol position feature regarding the appearance position of each type of symbol for each of the plurality of scale images;
a feature vector generation unit that performs a plurality of types of partitioning on the symbol position feature and generates a feature vector by determining the appearance probability for each type of symbol for each partition obtained by each of the plurality of types of partitioning; ,
an integrating unit that generates an integrated feature vector by taking the maximum value of the probability of appearance of the same symbol at the same location of the feature vectors generated from each of the plurality of scale images;
A clustering device comprising: a classification unit that classifies the plurality of handwritten patterns into a plurality of groups based on the integrated feature vector generated from each of the plurality of images of the handwritten patterns.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2020006034A JP7365697B2 (en) | 2020-01-17 | 2020-01-17 | Program and clustering device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2020006034A JP7365697B2 (en) | 2020-01-17 | 2020-01-17 | Program and clustering device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2021114091A JP2021114091A (en) | 2021-08-05 |
| JP7365697B2 true JP7365697B2 (en) | 2023-10-20 |
Family
ID=77076994
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2020006034A Active JP7365697B2 (en) | 2020-01-17 | 2020-01-17 | Program and clustering device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7365697B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP7824601B2 (en) * | 2022-03-16 | 2026-03-05 | グローリー株式会社 | Information processing device and information processing method |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2016110232A (en) | 2014-12-02 | 2016-06-20 | エヌ・ティ・ティ・コムウェア株式会社 | Object recognition device, object recognition method, and program |
| US20180137350A1 (en) | 2016-11-14 | 2018-05-17 | Kodak Alaris Inc. | System and method of character recognition using fully convolutional neural networks with attention |
| JP2019128889A (en) | 2018-01-26 | 2019-08-01 | 日本放送協会 | Image information converter and program therefor |
-
2020
- 2020-01-17 JP JP2020006034A patent/JP7365697B2/en active Active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2016110232A (en) | 2014-12-02 | 2016-06-20 | エヌ・ティ・ティ・コムウェア株式会社 | Object recognition device, object recognition method, and program |
| US20180137350A1 (en) | 2016-11-14 | 2018-05-17 | Kodak Alaris Inc. | System and method of character recognition using fully convolutional neural networks with attention |
| JP2019128889A (en) | 2018-01-26 | 2019-08-01 | 日本放送協会 | Image information converter and program therefor |
Non-Patent Citations (3)
| Title |
|---|
| Jianshu Zhang, 外2名,"Multi-Scale Attention with Dense Encoder for Handwritten Mathematical Expression Recognition",2018 24th International Conference on Pattern Recognition (ICPR),IEEE,2018年08月20日,p.2245-2250 |
| 佐々木進亮, 外3名,"オンライン手書き数式の行切出し",電子情報通信学会技術研究報告,日本,一般社団法人電子情報通信学会,2016年02月14日,第115巻, 第456号,p.13-18 |
| 古郡史啓, 外3名,"OCRopusを用いた数式を含む科学技術文献の読取りシステム",電子情報通信学会技術研究報告,日本,一般社団法人電子情報通信学会,2013年03月07日,第112巻, 第495号,p.75-79 |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2021114091A (en) | 2021-08-05 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US9811722B2 (en) | Multi-camera spatial sign language recognition method and system | |
| Yoon et al. | Hand gesture recognition using combined features of location, angle and velocity | |
| CN110929573A (en) | Image detection-based test question inspection method and related equipment | |
| CN109145871B (en) | Psychological behavior recognition method, device and storage medium | |
| CN112347997A (en) | Test question detection and identification method and device, electronic equipment and medium | |
| CN103186790A (en) | Object detecting system and object detecting method | |
| Alon et al. | Deep-hand: a deep inference vision approach of recognizing a hand sign language using american alphabet | |
| Ghadhban et al. | Segments interpolation extractor for finding the best fit line in Arabic offline handwriting recognition words | |
| Dinusha et al. | Detection of potential specific learning disabilities in children through handwriting analysis using machine learning | |
| JP7365697B2 (en) | Program and clustering device | |
| Saabni | Facial expression recognition using multi Radial Bases Function Networks and 2-D Gabor filters | |
| Dlshad et al. | Kurdish sign language recognition system | |
| CN114299482A (en) | Identity card information identification method and device, electronic equipment and storage medium | |
| Salau et al. | Image-based number sign recognition for ethiopian sign language using support vector machine | |
| Azmi et al. | Exploiting features from triangle geometry for digit recognition | |
| Dinu et al. | Local patch dissimilarity for images | |
| Davila et al. | Accessmath: Indexing and retrieving video segments containing math expressions based on visual similarity | |
| JP7104965B2 (en) | Program and clustering device | |
| Escobedo et al. | Finger spelling recognition from depth data using direction cosines and histogram of cumulative magnitudes | |
| Nagendraswamy et al. | GIST descriptors for sign language recognition: an approach based on symbolic representation | |
| Al Emran et al. | Handwritten character recognition and prediction of age, gender and handedness using machine learning | |
| Pariwat et al. | Thai finger-spelling sign language recognition employing PHOG and local features with KNN | |
| Suwanwiwat et al. | Off-line handwritten Thai name recognition for student identification in an automated assessment system | |
| Davydov et al. | Real-time Ukrainian sign language recognition system | |
| Florestiyanto et al. | Braille detection application using Gabor wavelet and support vector machine |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A80 | Written request to apply exceptions to lack of novelty of invention |
Free format text: JAPANESE INTERMEDIATE CODE: A80 Effective date: 20200203 |
|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20221118 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20230913 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20230926 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20231002 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7365697 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |