JP7371466B2 - Image processing device - Google Patents

Image processing device Download PDF

Info

Publication number
JP7371466B2
JP7371466B2 JP2019218770A JP2019218770A JP7371466B2 JP 7371466 B2 JP7371466 B2 JP 7371466B2 JP 2019218770 A JP2019218770 A JP 2019218770A JP 2019218770 A JP2019218770 A JP 2019218770A JP 7371466 B2 JP7371466 B2 JP 7371466B2
Authority
JP
Japan
Prior art keywords
unit
neural network
image
convolutional neural
map
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
Application number
JP2019218770A
Other languages
Japanese (ja)
Other versions
JP2021089512A (en
Inventor
篤志 西田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kyocera Document Solutions Inc
Original Assignee
Kyocera Document Solutions Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kyocera Document Solutions Inc filed Critical Kyocera Document Solutions Inc
Priority to JP2019218770A priority Critical patent/JP7371466B2/en
Publication of JP2021089512A publication Critical patent/JP2021089512A/en
Application granted granted Critical
Publication of JP7371466B2 publication Critical patent/JP7371466B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)

Description

本発明は、画像処理装置に関する。 The present invention relates to an image processing device.

特許文献1には、オブジェクトを含む入力画像を取得し、入力画像から、背景画像を用いて変化する領域の画像である変化領域画像を抽出し、入力画像と変化領域画像とを結合して畳込み型ニューラルネットワークを利用することにより、R,G,B,Oの特徴画像を抽出し、当該特徴画像からオブジェクトの位置を検出する技術が記載されている。 Patent Document 1 discloses that an input image including an object is acquired, a changing area image that is an image of a changing area is extracted from the input image using a background image, and the input image and changing area image are combined and folded. A technique is described in which a feature image of R, G, B, and O is extracted by using a built-in neural network, and the position of an object is detected from the feature image.

特開2017-191501公報Japanese Patent Application Publication No. 2017-191501

しかしながら、特許文献1に記載された情報処理装置では、特徴画像から抽出されたオブジェクトの位置の正確さが低いという問題がある。例えば、ある画像の種別を判定させた場合、当該画像のどの特徴部分に注目してこの判定を行ったかを正確に示すことは困難である。また、判定に用いた上記特徴部分が単数ではなく複数である場合には、どの特徴部分に注目してこの判定を行ったかを正確に示すことは更に困難になる。 However, the information processing device described in Patent Document 1 has a problem in that the accuracy of the position of the object extracted from the feature image is low. For example, when determining the type of a certain image, it is difficult to accurately indicate which characteristic part of the image was focused on in making this determination. Furthermore, if the number of characteristic parts used in the determination is not singular but plural, it becomes even more difficult to accurately indicate which characteristic part was focused on in making the determination.

本発明は上記課題に鑑みてなされたものであり、画像に含まれるオブジェクトに基づいて当該画像の種別を判定するときに、当該オブジェクトが単数及び複数のいずれの場合であっても、当該オブジェクトを的確に抽出して、当該画像の種別を判定する精度を高く保つことを目的とする。 The present invention has been made in view of the above-mentioned problems, and when determining the type of an image based on the object included in the image, regardless of whether the object is singular or plural, the object is The purpose is to maintain high accuracy in accurately extracting and determining the type of image.

本発明の一局面に係る画像処理装置は、生成部と、畳込みニューラルネットワーク部と、グラッドカム部と、記憶部と、比較部と、出力部と、補正部とを含む処理部を備え、前記生成部は、処理対象とされる画像データから濃度マップを生成し、前記畳込みニューラルネットワーク部は、前記濃度マップにフィルターをかけて特徴マップを生成し、当該特徴マップから分類データを生成する処理を行い、前記グラッドカム部は、活性化関数を用いて前記特徴マップからアクティベーションマップを生成する処理を行い、当該アクティベーションマップをクラスタリングにより複数のグループに分割し、当該複数のグループについてそれぞれ補正関数を算出し、前記記憶部は、教師データを記憶しており、前記比較部は、前記分類データと前記教師データとを用いて、前記分類データについての第1損失関数を算出する処理を行い、前記出力部は、前記比較部により算出された前記第1損失関数に前記補正関数をそれぞれ加算して、前記複数のグループ毎に第2損失関数を算出し、前記補正部は、前記出力部が算出した前記各第2損失関数を合計した補正値を用いて、前記畳込みニューラルネットワーク部で用いる前記フィルターの重み付けを補正し、前記補正部により作成された新規の前記フィルターを用いた前記畳込みニューラルネットワーク部による前記処理から、前記グラッドカム部、前記比較部、前記出力部、及び前記補正部による処理を繰り返すことで前記フィルターを補正して更新する、ものである。 An image processing device according to one aspect of the present invention includes a processing unit including a generation unit, a convolutional neural network unit, a GLAD cam unit, a storage unit, a comparison unit, an output unit, and a correction unit, The generation unit generates a density map from image data to be processed, and the convolutional neural network unit applies a filter to the density map to generate a feature map, and generates classification data from the feature map. The GRAD cam unit performs processing to generate an activation map from the feature map using an activation function, divides the activation map into a plurality of groups by clustering, and applies a correction function to each of the plurality of groups. , the storage unit stores training data, and the comparison unit performs a process of calculating a first loss function for the classification data using the classification data and the training data, The output unit calculates a second loss function for each of the plurality of groups by adding the correction function to the first loss function calculated by the comparison unit, and the correction unit calculates a second loss function for each of the plurality of groups. The weighting of the filter used in the convolutional neural network unit is corrected using a correction value that is the sum of the calculated second loss functions, and the convolution is performed using the new filter created by the correction unit. The filter is corrected and updated by repeating the processing by the neural network section, the grad cam section, the comparison section, the output section, and the correction section.

本発明によれば、画像に含まれるオブジェクトに基づいて当該画像の種別を判定するときに、当該オブジェクトが単数及び複数のいずれの場合であっても、当該オブジェクトを的確に抽出して、当該画像の種別を判定する精度を高く保つことができる。 According to the present invention, when determining the type of an image based on an object included in the image, regardless of whether the object is singular or plural, the object is accurately extracted and the image is The accuracy of determining the type of can be maintained high.

本発明に係る画像処理装置の一実施形態に係る画像形成装置の内部構成を示す図である。1 is a diagram showing an internal configuration of an image forming apparatus according to an embodiment of an image processing apparatus according to the present invention. 画像形成装置の電気的構成を示すブロック図である。FIG. 1 is a block diagram showing the electrical configuration of an image forming apparatus. (A)は原稿を示す図、(B)は原稿を読み取って得た画像データから作成した濃度マップを示す図、(C)は濃度マップに対して用いるフィルターを示す図である。(A) is a diagram showing a manuscript, (B) is a diagram showing a density map created from image data obtained by reading the manuscript, and (C) is a diagram showing a filter used for the density map. (A)~(C)は畳込みニューラルネットワーク部による処理を説明する図である。(A) to (C) are diagrams illustrating processing by a convolutional neural network unit. (A)~(C)は畳込みニューラルネットワーク部による処理を説明する図である。(A) to (C) are diagrams illustrating processing by a convolutional neural network unit. (A)~(C)は畳込みニューラルネットワーク部による処理を説明する図である。(A) to (C) are diagrams illustrating processing by a convolutional neural network unit. 活性化関数ReLUを説明する図である。It is a figure explaining activation function ReLU. アクティベーションマップの一例を示す図である。FIG. 3 is a diagram showing an example of an activation map. (A)は教師データ、分類データ、及び差分データの一例を示す図、(B)は畳込みニューラルネットワーク部が用いるフィルターが補正されていく変遷を示す図である。(A) is a diagram showing an example of teacher data, classification data, and difference data, and (B) is a diagram showing a transition in which the filter used by the convolutional neural network unit is corrected. (A)~(C)は、教師データ、分類データ、及び差分データの一例を示す図である。(A) to (C) are diagrams showing examples of teacher data, classification data, and difference data. (A)~(C)は、フィルターが補正される度にアクティベーションマップが変化していく変遷を示す図である。(A) to (C) are diagrams showing how the activation map changes each time the filter is corrected.

以下、本発明の一実施形態に係る画像処理装置及び画像処理方法について、図面を参照しながら説明する。なお、以下の説明において、同一又は近似する各部については同一の符号を付し、繰り返しの説明は省略する。 DESCRIPTION OF THE PREFERRED EMBODIMENTS An image processing apparatus and an image processing method according to an embodiment of the present invention will be described below with reference to the drawings. In the following description, the same or similar parts will be denoted by the same reference numerals, and repeated description will be omitted.

図1を参照して、本発明の一実施形態に係る画像処理装置について説明する。図1は、本発明に係る画像処理装置の一実施形態に係る画像形成装置の内部構成を示す図である。 An image processing apparatus according to an embodiment of the present invention will be described with reference to FIG. FIG. 1 is a diagram showing the internal configuration of an image forming apparatus according to an embodiment of an image processing apparatus according to the present invention.

画像形成装置100は、複写機、プリンター、及びファクシミリの機能を兼ね備えた複合機である。 The image forming apparatus 100 is a multifunction device that has the functions of a copying machine, a printer, and a facsimile.

図1に示すように、画像形成装置100は、原稿搬送部2と、読取部4と、給送部6と、搬送部8と、画像形成部10と、排出部12と、処理部20とを備える。更に、画像形成装置100は、操作部5及びネットワークインターフェイス部91を備える(図2)。 As shown in FIG. 1, the image forming apparatus 100 includes a document transport section 2, a reading section 4, a feeding section 6, a transport section 8, an image forming section 10, an ejection section 12, and a processing section 20. Equipped with Furthermore, the image forming apparatus 100 includes an operation section 5 and a network interface section 91 (FIG. 2).

原稿搬送部2は、トレイ80に配置された原稿Gを搬送する。原稿搬送部2は、ピックアップローラー82と、複数の搬送ローラー84とを含んでよい。また、原稿搬送部2の一例は、ADF(Auto Document Feeder)である。原稿Gは、紙、またはプロジェクターに用いるプラスチックシートである。 The document transport unit 2 transports the document G placed on the tray 80. The document transport section 2 may include a pickup roller 82 and a plurality of transport rollers 84. Further, an example of the document transport unit 2 is an ADF (Auto Document Feeder). The original G is paper or a plastic sheet used in a projector.

読取部4は、原稿Gの画像を読み取る。読取部4は、画像を読み取って画像データを生成する。読取部4は、光源86と、複数の反射ミラー88と、レンズ90と、撮像部92とを含む。読取部4の一例は、スキャナーである。 The reading unit 4 reads the image of the document G. The reading unit 4 reads an image and generates image data. The reading section 4 includes a light source 86, a plurality of reflective mirrors 88, a lens 90, and an imaging section 92. An example of the reading unit 4 is a scanner.

光源86は、複数の発光素子を有する。発光素子は、例えば、発光ダイオード(Laser Emitting Diode:LED)である。光源86から出射された光は、原稿搬送部2を搬送される原稿Gによって反射した後、複数の反射ミラー88で反射されて、レンズ90を通り、撮像部92に到達する。 Light source 86 has a plurality of light emitting elements. The light emitting element is, for example, a light emitting diode (LED). The light emitted from the light source 86 is reflected by the original G being transported through the original transporting section 2 , is reflected by a plurality of reflecting mirrors 88 , passes through a lens 90 , and reaches the imaging section 92 .

撮像部92は、レンズ90から光を受け取る複数の受光素子を有している。撮像部92は、例えば、電荷結合素子(Charage Coupled Device:CCD)である。撮像部92は、撮像部92に到達した光からアナログ電気信号を生成する。その後、A/D変換部(図示せず)において、当該アナログ信号がデジタル信号に変換され、このデジタル信号により画像データが構成される。読取部4は、当該画像データを処理部20に出力する。 The imaging unit 92 includes a plurality of light receiving elements that receive light from the lens 90. The imaging unit 92 is, for example, a charge coupled device (CCD). The imaging section 92 generates an analog electrical signal from the light that has reached the imaging section 92 . Thereafter, in an A/D converter (not shown), the analog signal is converted into a digital signal, and the digital signal constitutes image data. The reading section 4 outputs the image data to the processing section 20.

給送部6は、複数のシートSを収容し、搬送部8へシートSを給送する。シートSは、例えば、紙製または合成樹脂製である。搬送部8は、複数の搬送ローラー対を含み、画像形成部10にシートSを搬送する。 The feeding section 6 accommodates a plurality of sheets S, and feeds the sheets S to the conveying section 8. The sheet S is made of paper or synthetic resin, for example. The conveyance section 8 includes a plurality of conveyance roller pairs, and conveys the sheet S to the image forming section 10.

画像形成部10は、電子写真方式によってシートSにトナー像を形成する。具体的には、画像形成部10は、感光体ドラムと、帯電装置と、露光装置と、現像装置と、補給装置と、転写装置と、クリーニング装置と、除電装置とを含む。 The image forming section 10 forms a toner image on the sheet S using an electrophotographic method. Specifically, the image forming section 10 includes a photosensitive drum, a charging device, an exposure device, a developing device, a replenishing device, a transfer device, a cleaning device, and a static eliminator.

トナー像は、例えば、原稿Gの画像を示す。排出部12は、画像形成装置100の外部にシートSを排出する。 The toner image shows, for example, an image of a document G. The discharge unit 12 discharges the sheet S to the outside of the image forming apparatus 100.

次に、図2を参照して、本実施形態に係る画像形成装置100の電気的構成を説明する。図2は、本実施形態に係る画像形成装置100の電気的構成を示すブロック図である。図3(A)は原稿を示す図、(B)は原稿を読み取って得た画像データから作成した濃度マップを示す図、(C)は濃度マップに対して用いるフィルターを示す図である。 Next, with reference to FIG. 2, the electrical configuration of the image forming apparatus 100 according to this embodiment will be described. FIG. 2 is a block diagram showing the electrical configuration of the image forming apparatus 100 according to this embodiment. 3A is a diagram showing a document, FIG. 3B is a diagram showing a density map created from image data obtained by reading the document, and FIG. 3C is a diagram showing a filter used for the density map.

処理部20は、プロセッサー、RAM(Random Access Memory)、ROM(Read Only Memory)、及び専用のハードウェア回路を含んで構成される。プロセッサーは、例えばCPU(Central Processing Unit)、ASIC(Application Specific Integrated Circuit)、又はMPU(Micro Processing Unit)等である。処理部20は、生成部22と、畳込みニューラルネットワーク部24と、グラッドカム部26と、記憶部28と、比較部30と、出力部32と、補正部34と、分類部36とを備えている。 The processing unit 20 includes a processor, a RAM (Random Access Memory), a ROM (Read Only Memory), and a dedicated hardware circuit. The processor is, for example, a CPU (Central Processing Unit), an ASIC (Application Specific Integrated Circuit), or an MPU (Micro Processing Unit). The processing section 20 includes a generation section 22, a convolutional neural network section 24, a GLAD cam section 26, a storage section 28, a comparison section 30, an output section 32, a correction section 34, and a classification section 36. There is.

処理部20は、画像形成装置100が備えるHDD111又は上記ROMに記憶されている制御プログラムに従った上記プロセッサーによる動作により、生成部22と、畳込みニューラルネットワーク部24と、グラッドカム部26と、記憶部28と、比較部30と、出力部32と、補正部34と、分類部36として機能するものである。但し、当該生成部22~分類部36は、上記プロセッサーによる制御プログラムに従った動作によらず、それぞれハードウェア回路により構成することも可能である。 The processing section 20 generates the generation section 22, the convolutional neural network section 24, the GLAD cam section 26, and the memory by the operation of the processor according to the control program stored in the HDD 111 included in the image forming apparatus 100 or the ROM. It functions as a section 28, a comparison section 30, an output section 32, a correction section 34, and a classification section 36. However, the generating section 22 to the classifying section 36 may be configured by hardware circuits instead of operating according to the control program by the processor.

生成部22、畳込みニューラルネットワーク部24、グラッドカム部26、記憶部28、比較部30、出力部32、及び補正部34は、例えば読取部4による原稿読取で得られた画像データに対して、以下に示す処理を行う。例えば、原稿Gは、図3(A)に示すように、表題に法人名が記載された文書である。原稿Gの表題には、例えば、「ABCD株式会社」と記載された画像部分A1を有し、更に、文末に「ABCD株式会社」がもう一度記載された画像部分A2を有している。 The generation unit 22, the convolutional neural network unit 24, the GLAD cam unit 26, the storage unit 28, the comparison unit 30, the output unit 32, and the correction unit 34 process image data obtained by reading a document by the reading unit 4, for example. Perform the processing shown below. For example, as shown in FIG. 3A, manuscript G is a document in which a corporate name is written in the title. The title of the manuscript G includes, for example, an image portion A1 in which "ABCD Corporation" is written, and an image portion A2 in which "ABCD Corporation" is written once again at the end of the sentence.

生成部22は、上記画像データから濃度マップ50(図3(B))を生成する。 The generation unit 22 generates a density map 50 (FIG. 3(B)) from the image data.

畳込みニューラルネットワーク部24は、濃度マップ50にフィルター52(図3(C))をかけて、第1特徴マップ54(図4(C))を生成する処理を行う。更に、畳込みニューラルネットワーク部24は、第1特徴マップ54から第2特徴マップ(図5(C))を生成する処理を行う。更に、畳込みニューラルネットワーク部24は、第2特徴マップから分類データを生成する処理を行う。 The convolutional neural network unit 24 performs a process of applying a filter 52 (FIG. 3(C)) to the density map 50 to generate a first feature map 54 (FIG. 4(C)). Further, the convolutional neural network unit 24 performs processing to generate a second feature map (FIG. 5(C)) from the first feature map 54. Further, the convolutional neural network unit 24 performs a process of generating classification data from the second feature map.

グラッドカム部26は、Grad-cam処理を行うことにより、第2特徴マップ56からアクティベーションマップ66を生成する。 The Grad-cam unit 26 generates an activation map 66 from the second feature map 56 by performing Grad-cam processing.

更にグラッドカム部26は、生成したアクティベーションマップ66を複数のグループに分割する。グラッドカム部26は、アクティベーションマップ66を複数のグループに分割する処理を、クラスタリング(例えば、k-means)により行う。本実施形態では、グラッドカム部26は、アクティベーションマップ66に対するk-meansによるクラスタリングを行って、アクティベーションマップ66を複数に分割する例を説明する。例えば、グラッドカム部26は、アクティベーションマップ66から、クラスタ毎に、濃度が濃い中心点を検出し、当該中心点から予め定められた一定の距離内に存在する各点の集合を1つのグループとする分割処理を行う。 Furthermore, the GLAD cam unit 26 divides the generated activation map 66 into a plurality of groups. The GLAD cam unit 26 performs a process of dividing the activation map 66 into a plurality of groups using clustering (for example, k-means). In this embodiment, an example will be described in which the GLAD cam unit 26 performs clustering using k-means on the activation map 66 and divides the activation map 66 into a plurality of parts. For example, the GLAD cam unit 26 detects a center point with a high density for each cluster from the activation map 66, and defines a set of points existing within a predetermined distance from the center point as one group. Perform the dividing process.

なお、グラッドカム部26は、上記画像データに対して、上記グループ数が推定されるx-meansでのクラスタリングを行って、推定されたグループ数にアクティベーションマップ66を分割してもよい。 Note that the GLAD cam unit 26 may perform clustering on the image data using x-means in which the number of groups is estimated, and divide the activation map 66 into the estimated number of groups.

記憶部28は、例えばHDD又はメモリーであり、教師データ60を記憶している。本実施形態では、処理部20により、原稿G(図3(A))がABCD株式会社宛に作成された文書であるのかを判定する場合を例にする。このため、例えば、「ABCD株式会社」の文字を示す見本画像に対して、生成部22及び畳込みニューラルネットワーク部24による処理を行って分類データを生成し、この生成された分類データを教師データとする。 The storage unit 28 is, for example, an HDD or a memory, and stores the teacher data 60. In this embodiment, a case will be described in which the processing unit 20 determines whether the document G (FIG. 3A) is a document created for ABCD Corporation. For this reason, for example, the generation unit 22 and the convolutional neural network unit 24 perform processing on a sample image showing the characters "ABCD Corporation" to generate classification data, and use the generated classification data as the teacher data. shall be.

比較部30は、分類データ62と、教師データ60とを比較し、差分データ64を算出する。また、比較部30は、分類データ62と教師データ60を用いて第1損失関数(Loss function)を算出する。 The comparison unit 30 compares the classification data 62 and the teacher data 60 and calculates difference data 64. Furthermore, the comparison unit 30 calculates a first loss function using the classification data 62 and the teacher data 60.

出力部32は、上記第1損失関数から更に第2損失関数(Loss function)を算出する。 The output unit 32 further calculates a second loss function from the first loss function.

補正部34は、出力部32から出力されてくる上記第2損失関数を用いてフィルター52の重み付けを補正する。 The correction unit 34 corrects the weighting of the filter 52 using the second loss function outputted from the output unit 32.

分類部36は、画像判定処理を行う。分類部36は、上記のように補正部34により補正されて更新された最新のフィルター52を用いて畳込みニューラルネットワーク部24により生成された分類データが示す各値の配列によって、画像の種別を判定する。 The classification unit 36 performs image determination processing. The classification unit 36 determines the type of image based on the array of values indicated by the classification data generated by the convolutional neural network unit 24 using the latest filter 52 corrected and updated by the correction unit 34 as described above. judge.

操作部5は、ユーザーから各種操作指示の入力を受け付ける。 The operation unit 5 receives input of various operation instructions from the user.

ネットワークインターフェイス部91は、図略のLANチップなどの通信モジュールを備える通信インターフェイスである。ネットワークインターフェイス部91は、ローカルエリア内、又はインターネット上の外部装置と種々のデータの送受信を行う。 The network interface unit 91 is a communication interface including a communication module such as a LAN chip (not shown). The network interface unit 91 sends and receives various data to and from external devices within the local area or on the Internet.

次に、図2に加えて更に図3乃至図11を参照して、本実施形態に係る画像形成装置100の具体例を説明する。 Next, a specific example of the image forming apparatus 100 according to the present embodiment will be described with reference to FIGS. 3 to 11 in addition to FIG. 2.

まず、図3(A)~(C)を参照して、畳込みニューラルネットワーク部24の処理の概略を説明する。畳込みニューラルネットワーク部24は、畳込み処理とプーリング処理とを繰り返し、分類データ(図9(A))を得る処理を行う。 First, an outline of the processing of the convolutional neural network unit 24 will be explained with reference to FIGS. 3(A) to 3(C). The convolutional neural network unit 24 repeats convolution processing and pooling processing to obtain classification data (FIG. 9(A)).

畳込みニューラルネットワーク部24は、生成部22により生成された濃度マップ50(図3(B))に、予め記憶しているフィルター52(図3(C))を掛け、図4(C)に示す第1特徴マップ54を生成し、更に第1特徴マップ54から第2特徴マップ56を生成する処理を行う。 The convolutional neural network unit 24 multiplies the density map 50 (FIG. 3(B)) generated by the generating unit 22 by a pre-stored filter 52 (FIG. 3(C)), and generates the image in FIG. 4(C). A first feature map 54 shown in FIG. 1 is generated, and a second feature map 56 is further generated from the first feature map 54.

続けて、畳込みニューラルネットワーク部24は、プーリング処理により、第2特徴マップ56から、予め定められたマトリクス(この実施形態では2×2を例にして説明する)ごとに代表値56C、代表値56Dを抽出する(図6(A)(B))。畳込みニューラルネットワーク部24は、(i)当該プーリング処理を繰り返して第2特徴マップ56を小さくし、更に、このように小さくした第2特徴マップ56を、一次的に並ぶ一列の予め定められた画素数のデータに展開する、(ii) 第2特徴マップ56を全結合層により、一次的に並ぶ一列の予め定められた画素数のデータに展開する、等の処理により、図9(A)に示す分類データ62を得る。分類データ62については、図9(A)を参照して後述する。 Subsequently, the convolutional neural network unit 24 performs pooling processing to extract representative values 56C and representative values from the second feature map 56 for each predetermined matrix (in this embodiment, 2×2 will be explained as an example). 56D is extracted (FIG. 6(A)(B)). The convolutional neural network unit 24 (i) repeats the pooling process to reduce the size of the second feature map 56, and further divides the thus reduced second feature map 56 into a predetermined line in a primary line. (ii) Developing the second feature map 56 into data with a predetermined number of pixels in a linear row using a fully connected layer, etc., as shown in FIG. 9(A). Classification data 62 shown in is obtained. The classification data 62 will be described later with reference to FIG. 9(A).

グラッドカム部26は、Grad-cam処理を行うことにより、第2特徴マップ56からアクティベーションマップ66を生成する。更にグラッドカム部26は、生成したアクティベーションマップ66を複数のグループに分割する。この分割処理により、グラッドカム部26は、例えば、図3(A)に示した原稿Gの画像における画像部分A1を含むグループと、画像部分A2を含むグループとに、アクティベーションマップ66を分割する。 The Grad-cam unit 26 generates an activation map 66 from the second feature map 56 by performing Grad-cam processing. Furthermore, the GLAD cam unit 26 divides the generated activation map 66 into a plurality of groups. Through this division process, the GLAD cam unit 26 divides the activation map 66 into a group including the image portion A1 and a group including the image portion A2 in the image of the document G shown in FIG. 3A, for example.

ここで、畳込みニューラルネットワーク部24による上記畳込み処理を更に詳細に説明する。読取部4(図2)は原稿Gを読み取り、図3(A)に例を示す画像データを生成する。 Here, the above convolution processing by the convolutional neural network unit 24 will be explained in more detail. The reading unit 4 (FIG. 2) reads the original G and generates image data, an example of which is shown in FIG. 3(A).

そして、生成部22は、原稿G全体を示す画像について濃度マップ50(図3(B))を生成する。濃度マップ50は、画素x11、画素x12、画素x13、・・・、画素x21、画素x22、画素x23、・・・、画素x31、画素x32、画素x33、・・・、画素xij、・・・がマトリクス状に配列されたものである。それぞれの画素xijには、濃度情報が付与されている。 Then, the generation unit 22 generates a density map 50 (FIG. 3(B)) for the image showing the entire document G. The density map 50 includes pixels x11, pixel x12, pixel x13, ..., pixel x21, pixel x22, pixel x23, ..., pixel x31, pixel x32, pixel x33, ..., pixel xij, ... are arranged in a matrix. Density information is given to each pixel xij.

なお、一例として、画素xijの画素数は2桁であるが、2桁に限られず、1桁でもよく、3桁以上であってもよい。また、以降、画素番号を特定する必要がない場合は、画素xijと記載する。本実施形態においては、説明を簡略にするため、濃度マップ50は、画素x11~画素x99の9×9のマトリクスとする。iおよびjは、正の整数である。フィルター52は、画素w11、画素w12、画素w13、画素w21、画素w22、画素w23、画素w31、画素w32、および画素w33の画素wijが例えば3×3のマトリクス状に配列されている。 Note that, as an example, the number of pixels of pixel xij is two digits, but it is not limited to two digits, and may be one digit, or may be three or more digits. Further, hereinafter, if there is no need to specify the pixel number, it will be described as pixel xij. In this embodiment, to simplify the explanation, the density map 50 is assumed to be a 9×9 matrix of pixels x11 to x99. i and j are positive integers. In the filter 52, pixels wij of pixel w11, pixel w12, pixel w13, pixel w21, pixel w22, pixel w23, pixel w31, pixel w32, and pixel w33 are arranged in a 3×3 matrix, for example.

まず、畳込みニューラルネットワーク部24は、濃度マップ50の畳込みを行う。具体的には、図4(A)に示すように、畳込みニューラルネットワーク部24は、フィルター52を濃度マップ50に掛け合わせる。まず、畳込みニューラルネットワーク部24は、フィルター52の画素w11~画素w33を、濃度マップ50の画素x11~画素x33に掛け合わせる。 First, the convolutional neural network unit 24 convolves the density map 50. Specifically, as shown in FIG. 4A, the convolutional neural network unit 24 multiplies the density map 50 by a filter 52. First, the convolutional neural network unit 24 multiplies pixels w11 to w33 of the filter 52 to pixels x11 to x33 of the density map 50.

続いて、畳込みニューラルネットワーク部24は、フィルター52を濃度マップ50で列番号が増える方向に1列ずらし、フィルター52の画素w11~画素w33を、濃度マップ50の画素x12~画素x34に掛け合わせる。以降、同様に、畳込みニューラルネットワーク部24は、フィルター52を濃度マップ50の画素x11~画素x33のマトリクスから画素x77~画素x99のマトリクスまで順次掛け合わせる。 Next, the convolutional neural network unit 24 shifts the filter 52 by one column in the direction of increasing column numbers in the density map 50, and multiplies the pixels w11 to w33 of the filter 52 to the pixels x12 to x34 of the density map 50. . Thereafter, similarly, the convolutional neural network unit 24 sequentially multiplies the filter 52 from the matrix of pixels x11 to x33 of the density map 50 to the matrix of pixels x77 to x99.

すなわち、畳込みニューラルネットワーク部24は、上記のようにフィルター52を濃度マップ50に掛け合わせることで、図4(B)に示す第1特徴データyij=xij×wijの行列式を得る。iおよびjは、正の整数である。具体的には、畳込みニューラルネットワーク部24は、フィルター52の画素w11~画素w33を濃度マップ50の画素x11~画素x33に掛け合わせて、第1特徴データy11=x11w11+x12w12+x13w13+x21w21+x22w22+x23w23+x31w31+x32w32+x33w33を得る。次に、フィルター52の画素w11~画素w33を、濃度マップ50の画素x12~画素x34に掛け合わせて、第1特徴データy12=x12w11+x13w12+x14w13+x22w21+x23w22+x24w23+x32w31+x33w32+x34w33を得る。以降、同様に、畳込みニューラルネットワーク部24は、フィルター52を濃度マップ50の画素x77~画素x99のマトリクスまで順次掛け合わせる。 That is, the convolutional neural network unit 24 multiplies the density map 50 by the filter 52 as described above to obtain the determinant of the first feature data yij=xij×wij shown in FIG. 4(B). i and j are positive integers. Specifically, the convolutional neural network unit 24 multiplies pixels w11 to w33 of the filter 52 to pixels x11 to x33 of the density map 50 to obtain first feature data y11=x11w11+x12w12+x13w13+x21w21+x22w22+x23w23+x31w31+x32w32+x33w33. get Next, pixels w11 to w33 of the filter 52 are multiplied by pixels x12 to x34 of the density map 50 to obtain first feature data y12=x12w11+x13w12+x14w13+x22w21+x23w22+x24w23+x32w31+x33w32+x34w33. Thereafter, similarly, the convolutional neural network unit 24 sequentially multiplies the matrix of pixels x77 to x99 of the density map 50 by the filter 52.

そして、畳込みニューラルネットワーク部24は、濃度マップ50にフィルター52を掛け合わせて得た第1特徴データy11、第1特徴データy12、・・・、第1特徴データyij、・・・、第1特徴データy77によって構成されるマトリクス状に配置した第1特徴マップ54(図4(C))を得る。これにより、畳込みニューラルネットワーク部24は、9×9の濃度マップ50を、7×7の第1特徴マップ54にする畳込み処理を行ったことになる。 The convolutional neural network unit 24 then generates first feature data y11, first feature data y12, . . . , first feature data yij, . A first feature map 54 (FIG. 4(C)) arranged in a matrix formed by the feature data y77 is obtained. As a result, the convolutional neural network unit 24 has performed convolution processing from the 9×9 density map 50 to the 7×7 first feature map 54.

更に図5(A)~(C)を参照して、畳込みニューラルネットワーク部24による畳込み処理の具体例を説明する。図5(A)に示す濃度マップ50は、図3(B)に示す濃度マップ50の具体例である。図5(A)に示すフィルター52は、図3(B)に示すフィルター52の具体例である。 Furthermore, with reference to FIGS. 5(A) to 5(C), a specific example of convolution processing by the convolutional neural network unit 24 will be described. The density map 50 shown in FIG. 5(A) is a specific example of the density map 50 shown in FIG. 3(B). The filter 52 shown in FIG. 5(A) is a specific example of the filter 52 shown in FIG. 3(B).

ここでは、濃度マップ50を分かりやすく説明するために、濃度マップ50を構成する各画素の値を2値「1」及び「-1」のいずれかで示した例を用いて説明する。また、フィルター52も、2値「1」及び「-1」のいずれかで示した例を用いて説明する。 Here, in order to explain the density map 50 in an easy-to-understand manner, an example will be described in which the value of each pixel constituting the density map 50 is shown as either a binary value of "1" or "-1". Further, the filter 52 will also be explained using an example shown as either a binary value "1" or "-1".

図5(A)に示す濃度マップ50は、画素x11=-1、画素x12=-1、画素x13=-1、画素x21=-1、画素x22=1、画素x23=1、画素x31=-1、画素x32=-1、および画素x33=-1…とした例を示す。 The density map 50 shown in FIG. 5A has pixel x11=-1, pixel x12=-1, pixel x13=-1, pixel x21=-1, pixel x22=1, pixel x23=1, pixel x31=- 1, pixel x32=-1, pixel x33=-1, and so on.

図5(A)に示すフィルター52は、図3(C)に示すフィルター52の画素wijを2値の「1」か「-1」のいずれかで表す。一例として、画素w11=1、画素w12=-1、画素w13=-1、画素w21=-1、画素w22=1、画素w23=-1、画素w31=-1、画素w32=1、および画素w33=-1である。 The filter 52 shown in FIG. 5(A) represents the pixel wij of the filter 52 shown in FIG. 3(C) as either binary "1" or "-1". As an example, pixel w11=1, pixel w12=-1, pixel w13=-1, pixel w21=-1, pixel w22=1, pixel w23=-1, pixel w31=-1, pixel w32=1, and pixel w33=-1.

畳込みニューラルネットワーク部24は、濃度マップ50の画素xijとフィルター52の画素wijとを掛け合わせ、図4(B)において説明したように、第1特徴データyij=xij×wijを得る。具体的には、第1特徴データy11=-1×1+-1×-1+-1×-1+-1×-1+1×1+1×-1+-1×-1+-1×1+-1×-1=3、第1特徴データy12=-1×1+-1×-1+-1×-1+1×-1+1×1+1×-1+-1×-1+-1×1+-1×-1=1、・・・である。 The convolutional neural network unit 24 multiplies the pixel xij of the density map 50 and the pixel wij of the filter 52, and obtains the first feature data yij=xij×wij, as described with reference to FIG. 4(B). Specifically, the first feature data y11=-1×1+-1×-1+-1×-1+-1×-1+1×1+1×-1+-1×-1+-1×1+-1×-1= 3. First feature data y12=-1×1+-1×-1+-1×-1+1×-1+1×1+1×-1+-1×-1+-1×1+-1×-1=1,... It is.

畳込みニューラルネットワーク部24は、第1特徴データy11=3、第1特徴データy12=1、・・・、および第1特徴データy77=-3をマトリクス状に並べ、図5(B)に示すように、第1特徴マップ54を生成する。 The convolutional neural network unit 24 arranges the first feature data y11=3, the first feature data y12=1, . . . , and the first feature data y77=-3 in a matrix, as shown in FIG. 5(B). Thus, the first feature map 54 is generated.

さらに、畳込みニューラルネットワーク部24は、図5(A)に示す例ではフィルター52が3×3の9個のマトリクスからなることから、第1特徴マップ54を構成する各第1特徴データyijを例えば1/9の値に変換して、第2特徴マップ56を生成する。つまり、第2特徴マップ56が第2特徴データzijにより構成されるとすると、第2特徴データzij=第1特徴データyij×1/9である。 Furthermore, since the filter 52 is composed of nine 3×3 matrices in the example shown in FIG. For example, the second feature map 56 is generated by converting the value to 1/9. That is, if the second feature map 56 is composed of the second feature data zij, then the second feature data zij=first feature data yij×1/9.

具体的には、第2特徴データz11=3×1/9=0.33、第2特徴データz12=1×1/9=0.11、・・・、第2特徴データz77=-3×1/9=-0.33である。畳込みニューラルネットワーク部24は、これらの第2特徴データzijをマトリクス状に並べ、図5(C)に示すように、第2特徴マップ56を生成する。以上が畳込みニューラルネットワーク部による畳込み処理である。 Specifically, second feature data z11=3×1/9=0.33, second feature data z12=1×1/9=0.11, ..., second feature data z77=-3× 1/9=-0.33. The convolutional neural network unit 24 arranges these second feature data zij in a matrix, and generates a second feature map 56 as shown in FIG. 5(C). The above is the convolution process by the convolution neural network unit.

次に、畳込みニューラルネットワーク部24によるプーリング処理を説明する。図6(A)に示すように、畳込みニューラルネットワーク部24は、第2特徴マップ56を複数の特徴マトリクス56A、特徴マトリクス56B、・・・、に分割し、それぞれの特徴マトリクス56A、特徴マトリクス56B、・・・、から代表値56C、代表値56D、・・・、を抽出する。 Next, pooling processing by the convolutional neural network unit 24 will be explained. As shown in FIG. 6A, the convolutional neural network unit 24 divides the second feature map 56 into a plurality of feature matrices 56A, feature matrices 56B, . . . Representative values 56C, 56D, . . . are extracted from 56B, .

具体的には、畳込みニューラルネットワーク部24は、第2特徴マップ56を特徴マトリクス56A、56B、・・・、の2×2のマトリクスに分割する。ただし、2列に満たない場合は、1×2のマトリクスに分割する。そして、畳込みニューラルネットワーク部24は、特徴マトリクス56Aから、特徴マトリクス56Aの代表値56Cを抽出する。ここでは、畳込みニューラルネットワーク部24は、代表値として、特徴マトリクス56Aの最大値を抽出するものとする。例えば、代表値56Cは、特徴マトリクス56Aの最大値0.33である。但し、畳込みニューラルネットワーク部24は、代表値を、最大値ではなく、例えば、平均値又は中央値として抽出するようにしてもよい(本願明細書の全編に亘って同様)。 Specifically, the convolutional neural network unit 24 divides the second feature map 56 into 2×2 feature matrices 56A, 56B, . . . . However, if there are less than two columns, it is divided into a 1×2 matrix. Then, the convolutional neural network unit 24 extracts the representative value 56C of the feature matrix 56A from the feature matrix 56A. Here, it is assumed that the convolutional neural network unit 24 extracts the maximum value of the feature matrix 56A as a representative value. For example, the representative value 56C is the maximum value 0.33 of the feature matrix 56A. However, the convolutional neural network unit 24 may extract the representative value as an average value or a median value, for example, instead of the maximum value (the same applies throughout the specification of the present application).

続けて、畳込みニューラルネットワーク部24は、特徴マトリクス56Bを構成する各値の中から、特徴マトリクス56Bの代表値56Dを抽出する。ここでは、畳込みニューラルネットワーク部24は、代表値として、特徴マトリクス56Bの最大値を抽出するものとする。例えば、代表値56Dは、特徴マトリクス56Bの最大値0.11である。 Continuously, the convolutional neural network unit 24 extracts the representative value 56D of the feature matrix 56B from among the values configuring the feature matrix 56B. Here, it is assumed that the convolutional neural network unit 24 extracts the maximum value of the feature matrix 56B as a representative value. For example, the representative value 56D is the maximum value 0.11 of the feature matrix 56B.

畳込みニューラルネットワーク部24は、上記のようにして抽出した各代表値(代表値56C、代表値56D、・・・)を配置したマトリクスを生成する。以上がプーリング処理である。 The convolutional neural network unit 24 generates a matrix in which the representative values (representative value 56C, representative value 56D, . . . ) extracted as described above are arranged. The above is the pooling process.

更に、(i)畳込みニューラルネットワーク部24は、予め定められた数の各代表値から構成されるマトリクス(図6(B)に、予め定められた数を3×3としたマトリクス58の例を示す)が得られるまで、畳込み処理とプーリング処理を更に繰り返す。畳込みニューラルネットワーク部24は、当該マトリクスをなす各代表値を一次元的に展開して、図9(A)に一例を示す分類データ62を生成する。(ii)或いは、畳込みニューラルネットワーク部24は、(i)の場合よりも大きな予め定められた第2の数の各代表値から構成されるマトリクスが得られるまで畳込み処理とプーリング処理を更に繰り返し、当該マトリクスが得られた時点で全結合層の処理を行って、上記予め定められた数の各代表値から構成されるマトリクス(図6(B))を作成し、このマトリクスをなす各代表値を一次元的に展開して、図9(A)に一例を示す分類データ62を生成する。以上が、畳込みニューラルネットワーク部24による処理である。 Furthermore, (i) the convolutional neural network unit 24 generates a matrix composed of a predetermined number of representative values (an example of a matrix 58 in which the predetermined number is 3×3 is shown in FIG. 6(B)). The convolution process and the pooling process are further repeated until . The convolutional neural network unit 24 one-dimensionally expands each representative value forming the matrix to generate classification data 62, an example of which is shown in FIG. 9(A). (ii) Alternatively, the convolutional neural network unit 24 further performs the convolution process and the pooling process until a matrix composed of representative values of a predetermined second number larger than in case (i) is obtained. Repeatedly, when the matrix is obtained, the fully connected layer is processed to create a matrix (FIG. 6(B)) consisting of the predetermined number of representative values, and each of the The representative values are expanded one-dimensionally to generate classification data 62, an example of which is shown in FIG. 9(A). The above is the processing by the convolutional neural network unit 24.

次に、図2に加え、図7、図8および図11を参照して、グラッドカム処理について説明する。グラッドカム部26は、グラッドカム処理(GradCAM:Gradient-weighted Class Activation Mapping)を行う。グラッドカム部26は、グラッドカム処理として、畳込みニューラルネットワーク部24により生成された第2特徴マップ56に、活性化関数ReLU(Rectified Linear Unit)を適用する処理を行って、アクティベーションマップ66(図8)を生成する。 Next, the glad cam process will be described with reference to FIGS. 7, 8, and 11 in addition to FIG. 2. The Grad cam unit 26 performs Gradient-weighted Class Activation Mapping (GradCAM). The GLAD cam unit 26 performs a process of applying an activation function ReLU (Rectified Linear Unit) to the second feature map 56 generated by the convolutional neural network unit 24 as GLAD cam processing, thereby creating an activation map 66 (FIG. 8). ) is generated.

活性化関数ReLUは、図7に示すように、0未満の出力値を全て0にする関数である。すなわち、活性化関数ReLUは、ある閾値以上の部分だけを意味のある情報とする処理、すなわち、当該ある閾値以上の部分を特徴部分として強調する処理である。活性化関数ReLUは、横軸にyijをとり、縦軸にf(yij)をとる。yij<0のとき、f(yij)=0であり、yij≧0のとき、f(yij)=yijである。グラッドカム部26は、第2特徴マップ56の各値に活性化関数ReLUを適用して、適用後の各値からなるマトリクス状のアクティベーションマップ66を生成する。 The activation function ReLU is a function that sets all output values less than 0 to 0, as shown in FIG. In other words, the activation function ReLU is a process that makes only the part above a certain threshold value meaningful information, that is, a process that emphasizes the part above the certain threshold value as a characteristic part. The activation function ReLU has yij on the horizontal axis and f(yij) on the vertical axis. When yij<0, f(yij)=0, and when yij≧0, f(yij)=yij. The GLAD cam unit 26 applies the activation function ReLU to each value of the second feature map 56 to generate a matrix-like activation map 66 made up of the applied values.

図8は、アクティベーションマップ66の一例を示す図である。アクティベーションマップ66は、グラッドカム部26により第2特徴マップ56を構成する各第2特徴データzijを更に強調して示されることにより、原稿Gを読み取った文書データにおける特徴部分が強調されたものとなる。 FIG. 8 is a diagram showing an example of the activation map 66. In the activation map 66, each second feature data zij constituting the second feature map 56 is further emphasized and displayed by the GLAD cam unit 26, so that the feature portions in the document data read from the original G are emphasized. Become.

アクティベーションマップ66は、上記原稿Gの会社名の記載部分の画像を含め、原稿Gの会社名の記載部分以外の部分も強調表示している。そのため、補正部34は、アクティベーションマップ66が、画像種別判定の根拠となるべき画像部分、例えば、原稿Gの会社名の記載部分の画像部分のみを的確に強調表示したものとなるように(全体画像において、どの画像部分が「会社名の記載部分」を示すかを明確にするために)、畳込みニューラルネットワーク部24が用いる上記フィルター52の重み付けである画素wijを補正する。 The activation map 66 includes an image of the company name part of the manuscript G, and also highlights parts of the manuscript G other than the company name part. Therefore, the correction unit 34 makes the activation map 66 accurately highlight only the image portion that should be the basis for image type determination, for example, the image portion where the company name of the document G is written ( In order to clarify which image part in the entire image indicates the "part where the company name is written"), the pixel wij, which is the weighting of the filter 52 used by the convolutional neural network unit 24, is corrected.

ここで、グラッドカム部26は、上述した分割処理を行って、アクティベーションマップ66を複数のグループに分割する。そして、グラッドカム部26は、当該複数のグループについてそれぞれ補正関数f(GradCAM)を算出する。補正関数f(GradCAM)は、数式(1)で表される。
・・・(1)
Here, the GLAD cam unit 26 performs the above-described division process to divide the activation map 66 into a plurality of groups. Then, the GradCAM unit 26 calculates a correction function f (GradCAM) for each of the plurality of groups. The correction function f (GradCAM) is expressed by formula (1).
...(1)

数式(1)の補正関数f(GradCAM)では、上記グループを構成する画素のうち特定の画素を画素cとし、上記グループを構成する画素であって画素c以外の全ての画素をそれぞれ画素rとする。補正関数fは、アクティベーション関数Act(r)と、画素cと各画素rとの距離の2乗を表す距離関数(r-c)^2との積で表される。すなわち、補正関数fは、上記グループの画素cと全ての画素rとの各組み合わせについて、アクティベーション関数Act(r)と距離関数(r-c)^2との積をそれぞれ算出し、これら算出した全ての積の和を更に算出したものである。グラッドカム部26は、分割した上記複数のグループ毎に補正関数fを算出する。 In the correction function f (GradCAM) of formula (1), a specific pixel among the pixels constituting the above group is designated as pixel c, and all pixels constituting the above group other than pixel c are respectively designated as pixel r. do. The correction function f is expressed as the product of the activation function Act(r) and a distance function (r−c)^2 representing the square of the distance between the pixel c and each pixel r. That is, the correction function f calculates the product of the activation function Act(r) and the distance function (r−c)^2 for each combination of pixel c and all pixels r in the above group, and calculates these products. The sum of all the products obtained is further calculated. The grad cam unit 26 calculates a correction function f for each of the plurality of divided groups.

ここでは、一例として、上記グループの最大濃度の画素を画素cとし、任意の画素を画素rとする。例えば、アクティベーション関数Act(r)は、画素rにおけるアクティベーションマップ66(上記グループ)の反応の大きさを表わす。 Here, as an example, the pixel of the group with the maximum density is designated as pixel c, and an arbitrary pixel is designated as pixel r. For example, the activation function Act(r) represents the magnitude of the response of the activation map 66 (the above group) at pixel r.

例えば、アクティベーション関数Act(r)として、画素rの濃度を用いる。すなわち、画素rの濃度の高低に応じてアクティベーション関数Act(r)の値は変化する。また、画素cと画素rとの距離が大きいほど距離関数(r-c)^2の値は大きく、画素cと画素rとの距離が小さいほど距離関数(r-c)^2の値は小さくなる。 For example, the density of pixel r is used as the activation function Act(r). That is, the value of the activation function Act(r) changes depending on the density of the pixel r. Also, the larger the distance between pixel c and pixel r, the larger the value of distance function (r-c)^2, and the smaller the distance between pixel c and pixel r, the greater the value of distance function (r-c)^2. becomes smaller.

続いて、図9を参照して、記憶部28、比較部30を説明する。 Next, the storage section 28 and the comparison section 30 will be explained with reference to FIG.

上述したように、記憶部28は、教師データ60(図9(A))を記憶している。教師データ60は、図9(A)に示すように、上記分類データと同じ数の値が一次元的に並べられた数列からなる。記憶部28は、原稿の種別を判別するための注目画像となる各画像に対応する教師データ60を記憶している。 As described above, the storage unit 28 stores the teacher data 60 (FIG. 9(A)). As shown in FIG. 9(A), the teacher data 60 consists of a numerical sequence in which the same number of values as the classification data are arranged one-dimensionally. The storage unit 28 stores teacher data 60 corresponding to each image that is a target image for determining the type of document.

比較部30は、畳込みニューラルネットワーク部24から取得した分類データ62と、記憶部28が記憶する教師データ60とを比較し、差分データ64を算出する。更に、比較部30は、上記分類データ62と上記教師データ60を用いて下記数式(2)により第1損失関数(Loss function)を算出する。
・・・(2)
The comparison unit 30 compares the classification data 62 acquired from the convolutional neural network unit 24 and the teacher data 60 stored in the storage unit 28, and calculates difference data 64. Further, the comparison unit 30 uses the classification data 62 and the teacher data 60 to calculate a first loss function using the following formula (2).
...(2)

そして、出力部32は、グラッドカム部26から補正関数f(GradCAM)(数式1)の値を取得し、比較部30によって算出された第1損失関数(数式(2))と補正関数f(GradCAM)の値との和を第2損失関数(Loss function)として算出する。すなわち、第2損失関数は、数式(3)で表される。出力部32は、第2損失関数を、上記各グループの補正関数fをそれぞれ用いて当該グループ毎に算出する。
・・・(3)
Then, the output unit 32 acquires the value of the correction function f(GradCAM) (Formula 1) from the GradCam unit 26, and the first loss function (Formula (2)) calculated by the comparison unit 30 and the correction function f(GradCAM) ) is calculated as a second loss function. That is, the second loss function is expressed by equation (3). The output unit 32 calculates a second loss function for each group using the correction function f of each group.
...(3)

補正部34は、出力部32が出力した上記各グループの第2損失関数を合計したものを補正値とし、この補正値を用いて、畳込みニューラルネットワーク部24で用いる上記フィルター52の重み付けを補正する。これにより、補正部34は、該補正後のフィルター52を作成する。この第2損失関数は、アクティベーションマップ66において、上記判定の根拠とすべき原稿Gの会社名の記載部分の画像を的確に強調したものに基づくものであるため、補正部34が、第2損失関数を用いてフィルター52の重み付けを補正すると、畳込みニューラルネットワーク部24により将来生成される分類データ62(図9(A))が教師データ60に近づくよう、フィルター52(図9(B))の画素wijの数値を補正することになる。このようにフィルター52を補正したフィルターをフィルター52B(図9(B))とする。 The correction unit 34 uses the sum of the second loss functions of each group outputted by the output unit 32 as a correction value, and uses this correction value to correct the weighting of the filter 52 used in the convolutional neural network unit 24. do. Thereby, the correction unit 34 creates the filter 52 after the correction. This second loss function is based on the activation map 66 that accurately emphasizes the image of the company name written part of the document G, which should be the basis for the above determination. When the weighting of the filter 52 is corrected using the loss function, the filter 52 (FIG. 9(B) ) will be corrected. A filter obtained by correcting the filter 52 in this manner is referred to as a filter 52B (FIG. 9(B)).

具体的には、図10(A)に示すように、比較部30は、分類データ62Aを取得すると、教師データ60Aと分類データ62Aとの差分をとって、差分データ64Aを算出する。また、比較部30は、教師データ60Aと分類データ62Aから第1損失関数(数式2)を算出する。出力部32は、上記グループ毎に、第1損失関数と、上記グループ別の補正関数fの値との和を算出し、この和を第2損失関数(数式3)とする。補正部34は、各グループの第2損失関数を合計して上記補正値を算出する。補正部34は、当該補正値に基づき(例えばフィルター52に補正値を乗算して)、図9(B)に示すように、畳込みニューラルネットワーク部24のフィルター52を、例えば、フィルター52Bのように補正する。 Specifically, as shown in FIG. 10A, when the comparison unit 30 obtains the classification data 62A, it calculates the difference data 64A by calculating the difference between the teacher data 60A and the classification data 62A. Furthermore, the comparison unit 30 calculates a first loss function (Formula 2) from the teacher data 60A and the classification data 62A. The output unit 32 calculates the sum of the first loss function and the value of the correction function f for each group, and sets this sum as a second loss function (Equation 3). The correction unit 34 calculates the correction value by summing the second loss functions of each group. Based on the correction value (for example, by multiplying the filter 52 by the correction value), the correction unit 34 changes the filter 52 of the convolutional neural network unit 24 to a filter 52B, for example, as shown in FIG. 9(B). Correct to.

このようにフィルター52がフィルター52Bに補正されると、畳込みニューラルネットワーク部24が、補正後のフィルター52Bを用いて、新たな分類データ(一例を図10(B)に分類データ62Bとして示す)を生成し、グラッドカム部26は新たな補正関数fを上記グループ毎に算出する。そして、比較部30は、教師データ60Bと分類データ62Bとを比較して、差分データ64Bを出力する。このとき、分類データ62Bは、分類データ62Aと比較して、教師データ60Bに近似することになる。更に比較部30は、上記分類データ62Bと教師データ60Bを用いて第1損失関数を算出し、出力部32は、グラッドカム部26が上記グループ毎に算出した上記新たな補正関数fを用いて、新たな第2損失関数を上記グループ毎に算出する。補正部34は、グループ毎の新たな第2損失関数を合計した補正値を用いてフィルター52Bを補正してフィルター52Cを作成する。 When the filter 52 is corrected to the filter 52B in this way, the convolutional neural network unit 24 uses the corrected filter 52B to generate new classification data (an example is shown as classification data 62B in FIG. 10(B)). The grad cam unit 26 calculates a new correction function f for each group. The comparison unit 30 then compares the teacher data 60B and the classification data 62B and outputs difference data 64B. At this time, the classification data 62B approximates the teacher data 60B compared to the classification data 62A. Further, the comparison unit 30 uses the classification data 62B and the teacher data 60B to calculate a first loss function, and the output unit 32 uses the new correction function f calculated for each group by the GLAD cam unit 26 to calculate a first loss function. A new second loss function is calculated for each group. The correction unit 34 corrects the filter 52B using a correction value obtained by summing the new second loss functions for each group to create a filter 52C.

畳込みニューラルネットワーク部24は、補正後の各フィルター52Cを用いてそれぞれに、更に新しい分類データ(一例を図10(C)に分類データ62Cとして示す)を生成する。グラッドカム部26は更に新たな補正関数fを上記グループ毎に算出する。そして、比較部30は、教師データ60Cと分類データ62Cとを比較して、差分データ64Cを出力する。分類データ64Cは、分類データ62Bと比較して、さらに教師データ60Cに近似する(図10(C)には、教師データ60Cと分類データ62Cとが一致する例を示している)。図10(C)に示す例では、差分データ64Cは、0のデータのみをもつことになる。 The convolutional neural network unit 24 generates new classification data (an example is shown as classification data 62C in FIG. 10C) using each of the corrected filters 52C. The grad cam unit 26 further calculates a new correction function f for each group. The comparison unit 30 then compares the teacher data 60C and the classification data 62C and outputs difference data 64C. The classification data 64C is more similar to the teacher data 60C than the classification data 62B (FIG. 10C shows an example in which the teacher data 60C and the classification data 62C match). In the example shown in FIG. 10(C), the difference data 64C has only 0 data.

図11(A)~(C)は、上述のように畳込みニューラルネットワーク部24から補正部34までによるフィルター補正処理、及び補正された新たなフィルターを用いた畳込みニューラルネットワーク部24及びグラッドカム部26によるアクティベーションマップ生成処理を上記グループ毎に繰り返すことで、グラッドカム部26が生成する各グループのアクティベーションマップ66が補正されていく様子を示す図である。 11A to 11C show the filter correction processing performed by the convolutional neural network unit 24 to the correction unit 34 as described above, and the convolutional neural network unit 24 and the GLAD cam unit using the corrected new filter. 26 is a diagram showing how the activation map 66 of each group generated by the GLAD cam section 26 is corrected by repeating the activation map generation process by 26 for each group. FIG.

例えば、図11(A)に示す、上記複数のグループのうちの1つのグループについての第1アクティベーションマップ66Aは、原稿Gの会社名の記載部分の画像のみでなく、原稿Gの全体に亘って高い濃度を示しているが、上記のようにしてフィルターが補正され、畳込みニューラルネットワーク部24が、濃度マップ50に新たなフィルター52Bを用いて新たな第1特徴マップ54及び新たな第2特徴マップ56を生成し、グラッドカム部26が新たな第2特徴マップ56から第2アクティベーションマップ66Bを生成すると、第2アクティベーションマップ66Bでは、図11(B)に示すように、第1アクティベーションマップ66Aと比較して、表題部分からの距離が大きい画素の濃度が大きく減少する。 For example, the first activation map 66A for one of the plurality of groups shown in FIG. However, the filter is corrected as described above, and the convolutional neural network unit 24 uses the new filter 52B for the density map 50 to create a new first feature map 54 and a new second feature map 50. When the feature map 56 is generated and the GLAD cam section 26 generates a second activation map 66B from the new second feature map 56, the second activation map 66B has the first activation map 66B as shown in FIG. 11(B). Compared to the activation map 66A, the density of pixels located at a large distance from the title portion is greatly reduced.

そして更に、畳込みニューラルネットワーク部24から補正部34までによるフィルター補正処理でフィルター52Bがフィルター52Cに補正され、補正された更に新たなフィルターを用いた畳込みニューラルネットワーク部24及びグラッドカム部26によるアクティベーションマップ生成処理により、第3アクティベーションマップ66Cが生成されると、第3アクティベーションマップ66Cでは、例えば、図11(C)に示すように、第2アクティベーションマップ66Bと比較して、表題部分からの距離が大きい画素の濃度が更に大きく減少する。図11(C)には、第2アクティベーションマップ66Bと比較して、原稿Gの会社名の記載部分の画像を示す画素からの距離が大きい画素の濃度はほぼ0に近くなり、原稿Gの会社名の記載部分の画像の濃度がより強調された例を示している。 Further, the filter 52B is corrected to the filter 52C by the filter correction processing performed by the convolutional neural network unit 24 to the correction unit 34, and the convolutional neural network unit 24 and the GLAD cam unit 26 perform an action using the corrected new filter. When the third activation map 66C is generated by the activation map generation process, for example, as shown in FIG. 11(C), the title of the third activation map 66C is The density of pixels further away from the portion is reduced even more. In FIG. 11C, compared to the second activation map 66B, the density of pixels located at a large distance from the pixel representing the image of the company name portion of the document G is almost 0, and the density of the pixels of the document G is close to 0. An example is shown in which the density of the image where the company name is written is more emphasized.

このように、畳込みニューラルネットワーク部24から補正部34までによるフィルター補正処理を繰り返し、例えば、教師データと分類データとが一致して差分データが0になった時点(或いは、教師データと分類データとが予め定められた範囲内まで近似した時点)で当該繰り返しを終了し、この時点で補正されている最新のフィルターを、畳込みニューラルネットワーク部24が上記畳込み処理に用いるフィルターとして更新する。以上は、画像種別判定の根拠とすべき画像を抽出するための学習処理である。 In this way, the filter correction process from the convolutional neural network unit 24 to the correction unit 34 is repeated, and for example, when the teacher data and the classification data match and the difference data becomes 0 (or when the teacher data and the classification data The repetition is ended at the time when the values are approximated to within a predetermined range), and the convolutional neural network unit 24 updates the latest filter corrected at this time as the filter used for the above-mentioned convolution processing. The above is a learning process for extracting images to be used as the basis for image type determination.

また、画像種別判定の処理においては、分類部36は、上記のように補正されて更新されている最新のフィルター52を用いて畳込みニューラルネットワーク部24により原稿画像(読取部4による原稿読取で得た画像)から生成された分類データが示す各値の配列によって、画像の種別を判定する。例えば、分類部36は、(A)分類データの第1番目のみが0よりも大きな値を示し、他の各値が可全て0の場合は、画像種別判定の根拠とすべき画像部分が「ABCD会社」であるとして「ABCD会社宛書類」と判定し、(B)分類データの第2番目のみが0よりも大きな値を示し、他の各値が可全て0の場合は、画像種別判定の根拠とすべき画像部分が「EFGH会社」であるとして「EFGH会社宛書類」と判定する、等のようにして画像の種別判定を行う。 In addition, in the process of image type determination, the classification unit 36 uses the latest filter 52 that has been corrected and updated as described above to use the convolutional neural network unit 24 to generate a document image (by reading the document by the reading unit 4). The type of image is determined based on the array of values indicated by the classification data generated from the obtained image. For example, if (A) only the first classification data indicates a value greater than 0 and all other values are 0, the classification unit 36 determines that the image portion to be used as the basis for image type determination is " (B) If only the second classification data shows a value greater than 0 and all other values are 0, the image type is determined. The type of image is determined by, for example, assuming that the image portion that should be the basis for the image is "EFGH company" and determining that it is a "document addressed to EFGH company."

従って、本実施形態に示した学習処理を終えれば、この後に畳込みニューラルネットワーク部24により生成された分類データは教師データに一致又は近似するため、画像の種別を判定させるとき、画像種別判定の根拠とすべき画像部分としてのオブジェクトが単数ではなく複数存在する場合であっても、当該各オブジェクトを的確に抽出して、当該画像の種別を判定する精度を高く保つことができる。 Therefore, once the learning process shown in this embodiment is completed, the classification data generated by the convolutional neural network unit 24 after this matches or approximates the teacher data, so when determining the type of image, image type determination is performed. Even in the case where there is not a single object but a plurality of objects as image portions to be used as the basis for the image, it is possible to accurately extract each object and maintain high accuracy in determining the type of the image.

また、本実施形態では、画像種別判定の処理を行う度に、上記フィルター52の補正処理までの学習処理も行うようにすれば、画像形成装置100による原稿Gの読み取りの件数、および画像処理の件数が増えるに従って、畳込みニューラルネットワーク部24のフィルターがより好適に補正されていくため、画像の種別の判定精度を向上させることができる。 Furthermore, in this embodiment, if the learning process up to the correction process of the filter 52 is also performed every time the image type determination process is performed, the number of times the image forming apparatus 100 reads the document G and the image processing As the number of cases increases, the filter of the convolutional neural network unit 24 is corrected more appropriately, so that the accuracy of image type determination can be improved.

また、図1乃至図11を用いて説明した上記実施形態の構成及び処理は、本発明の一実施形態に過ぎず、本発明を当該構成及び処理に限定する趣旨ではない。 Further, the configuration and processing of the above embodiment described using FIGS. 1 to 11 are merely one embodiment of the present invention, and the present invention is not intended to be limited to the configuration and processing.

また、上記実施形態では、本発明に係る画像処理の一実施形態を、画像形成装置(複合機)に適用する例を説明しているが、これは一例に過ぎず、本発明に係る画像処理を、他の電子装置、例えば、医療機器、パーソナルコンピューター、携帯電話、スマートフォン、タブレット、ハブ装置、サーバー装置に適用するものとしてもよい。 Further, in the above embodiment, an example in which an embodiment of the image processing according to the present invention is applied to an image forming apparatus (multifunction device) is described, but this is only an example, and the image processing according to the present invention may be applied to other electronic devices, such as medical equipment, personal computers, mobile phones, smartphones, tablets, hub devices, and server devices.

100 画像形成装置
4 読取部
20 処理部
22 生成部
24 畳込みニューラルネットワーク部
26 グラッドカム部
28 記憶部
30 比較部
32 出力部
34 補正部
36 分類部
100 Image forming device 4 Reading section 20 Processing section 22 Generation section 24 Convolutional neural network section 26 Grad cam section 28 Storage section 30 Comparison section 32 Output section 34 Correction section 36 Classification section

Claims (3)

生成部と、畳込みニューラルネットワーク部と、グラッドカム部と、記憶部と、比較部と、出力部と、補正部とを含む処理部を備え、
前記生成部は、処理対象とされる画像データから濃度マップを生成し、
前記畳込みニューラルネットワーク部は、前記濃度マップにフィルターをかけて特徴マップを生成し、当該特徴マップから分類データを生成する処理を行い、
前記グラッドカム部は、活性化関数を用いて前記特徴マップからアクティベーションマップを生成する処理を行い、当該アクティベーションマップをクラスタリングにより複数のグループに分割し、当該複数のグループについてそれぞれ補正関数を算出し、
前記記憶部は、教師データを記憶しており、
前記比較部は、前記分類データと前記教師データとを用いて、前記分類データについての第1損失関数を算出する処理を行い、
前記出力部は、前記比較部により算出された前記第1損失関数に前記補正関数をそれぞれ加算して、前記複数のグループ毎に第2損失関数を算出し、
前記補正部は、前記出力部が算出した前記各第2損失関数を合計した補正値を用いて、前記畳込みニューラルネットワーク部で用いる前記フィルターの重み付けを補正し、
前記補正部により作成された新規の前記フィルターを用いた前記畳込みニューラルネットワーク部による前記処理から、前記グラッドカム部、前記比較部、前記出力部、及び前記補正部による処理を繰り返すことで前記フィルターを補正して更新する、画像処理装置。
A processing unit including a generation unit, a convolutional neural network unit, a grad cam unit, a storage unit, a comparison unit, an output unit, and a correction unit,
The generation unit generates a density map from image data to be processed,
The convolutional neural network unit generates a feature map by filtering the density map, and generates classification data from the feature map,
The GRAD cam unit performs a process of generating an activation map from the feature map using an activation function, divides the activation map into a plurality of groups by clustering, and calculates a correction function for each of the plurality of groups. ,
The storage unit stores teacher data,
The comparison unit performs a process of calculating a first loss function for the classified data using the classified data and the teacher data,
The output unit adds the correction function to the first loss function calculated by the comparison unit to calculate a second loss function for each of the plurality of groups,
The correction unit corrects the weighting of the filter used in the convolutional neural network unit using a correction value that is the sum of the second loss functions calculated by the output unit,
From the process by the convolutional neural network unit using the new filter created by the correction unit, the process by the GLAD cam unit, the comparison unit, the output unit, and the correction unit is repeated to improve the filter. An image processing device that corrects and updates.
前記グラッドカム部は、前記複数のグループへの分割を、前記アクティベーションマップから、クラスタ毎に、濃度が濃い中心点を検出し、当該中心点から予め定められた一定の距離内に存在する各点の集合を1つのグループとすることにより行う請求項1に記載の画像処理装置。 The GLAD cam unit performs division into the plurality of groups by detecting a center point with a high density for each cluster from the activation map, and dividing each point within a predetermined distance from the center point. The image processing apparatus according to claim 1, wherein the image processing is performed by forming a set of into one group. 前記処理部は、分類部を更に備え、
前記分類部は、前記更新されたフィルターを用いて前記畳込みニューラルネットワーク部により生成された分類データが示す各値の配列によって、画像の種別を判定する請求項1又は請求項2に記載の画像処理装置。
The processing unit further includes a classification unit,
The image according to claim 1 or 2, wherein the classification unit determines the type of the image based on an array of values indicated by classification data generated by the convolutional neural network unit using the updated filter. Processing equipment.
JP2019218770A 2019-12-03 2019-12-03 Image processing device Active JP7371466B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019218770A JP7371466B2 (en) 2019-12-03 2019-12-03 Image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019218770A JP7371466B2 (en) 2019-12-03 2019-12-03 Image processing device

Publications (2)

Publication Number Publication Date
JP2021089512A JP2021089512A (en) 2021-06-10
JP7371466B2 true JP7371466B2 (en) 2023-10-31

Family

ID=76220674

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019218770A Active JP7371466B2 (en) 2019-12-03 2019-12-03 Image processing device

Country Status (1)

Country Link
JP (1) JP7371466B2 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180260793A1 (en) 2016-04-06 2018-09-13 American International Group, Inc. Automatic assessment of damage and repair costs in vehicles
JP2019133320A (en) 2018-01-30 2019-08-08 三菱電機インフォメーションシステムズ株式会社 Entry area extraction apparatus and entry area extraction program
CN110458221A (en) 2019-08-05 2019-11-15 南开大学 The method in the excavation target object region based on the accumulation of online attention
JP2020184305A (en) 2019-04-26 2020-11-12 京セラドキュメントソリューションズ株式会社 Image processing apparatus

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180260793A1 (en) 2016-04-06 2018-09-13 American International Group, Inc. Automatic assessment of damage and repair costs in vehicles
JP2019133320A (en) 2018-01-30 2019-08-08 三菱電機インフォメーションシステムズ株式会社 Entry area extraction apparatus and entry area extraction program
JP2020184305A (en) 2019-04-26 2020-11-12 京セラドキュメントソリューションズ株式会社 Image processing apparatus
CN110458221A (en) 2019-08-05 2019-11-15 南开大学 The method in the excavation target object region based on the accumulation of online attention

Also Published As

Publication number Publication date
JP2021089512A (en) 2021-06-10

Similar Documents

Publication Publication Date Title
EP3255586A1 (en) Method, program, and apparatus for comparing data graphs
US9019573B2 (en) Image forming apparatus, reading apparatus, and control method of reading
EP2023598A1 (en) Image processing device, image forming apparatus including same, image processing method
US9521296B2 (en) Inverse halftoning using inverse projection of predicted errors for multi-bit images
US9665770B2 (en) Image processing apparatus with an improved table image detecting unit
JP7371466B2 (en) Image processing device
JP2020184305A (en) Image processing apparatus
US8699792B2 (en) Error diffusion processing circuit
US8284460B2 (en) Image processing apparatus directed to image outline processing, image processing method of the same, and computer-readable storage medium storing instructions for performing image processing
JP6798348B2 (en) Image forming device and image forming control program
JP7146461B2 (en) Image processing method, image processing device, imaging device, program, and storage medium
US9436145B2 (en) Image forming apparatus including correction unit that corrects tone correction table
US10455104B2 (en) Information processing apparatus, image forming apparatus, and non-transitory computer readable medium with communication of printer layout information in response to image processing and reading speed
JP2012253776A (en) Image forming device and image processing program
US20160150118A1 (en) Image processing apparatus
US9756200B2 (en) Image processing apparatus with an improved table image detecting unit
CN111091158A (en) Method, device and equipment for classifying image quality of auxiliary images
JP5697544B2 (en) Image processing apparatus and image processing method
US11836581B2 (en) Learning model generation apparatus, image correction apparatus, and non-transitory computer readable medium for generating learning model based on classified image information
CN117523540A (en) Text detection method and device
JP3632830B2 (en) Error diffusion processing method and error diffusion processing apparatus
JP2014110588A (en) Image processing apparatus, image forming apparatus and program
JP2014110587A (en) Image processing apparatus, image forming apparatus and program
JP2006262228A (en) Image processor, image recorder, program and recording medium
JP2020118766A (en) Image processing device for controlling fixing temperature, image processing method and program

Legal Events

Date Code Title Description
RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20220928

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20221130

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: 20230919

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: 7371466

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150