JP7793492B2 - Learning devices and programs - Google Patents
Learning devices and programsInfo
- Publication number
- JP7793492B2 JP7793492B2 JP2022122621A JP2022122621A JP7793492B2 JP 7793492 B2 JP7793492 B2 JP 7793492B2 JP 2022122621 A JP2022122621 A JP 2022122621A JP 2022122621 A JP2022122621 A JP 2022122621A JP 7793492 B2 JP7793492 B2 JP 7793492B2
- Authority
- JP
- Japan
- Prior art keywords
- processing
- data
- learning
- input data
- cpu
- 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
Landscapes
- Image Analysis (AREA)
Description
本発明の実施形態は、機械学習モデルの学習装置及びコンピュータを当該学習装置として機能させるためのプログラムに関する。 Embodiments of the present invention relate to a machine learning model learning device and a program for causing a computer to function as the learning device.
機械学習モデルの精度を高めるためには、大量の学習データを用いて機械学習モデルを学習させる必要がある。学習データは、入力データとその入力データに対して期待される結果を示す正解ラベルとを組み合わせたデータである。すなわち、大量の学習データを用意するということは、想定される様々なパターンを網羅した多数の入力データとその入力データに対する正解ラベルとを用意する、ということである。しかし、このような大量の学習データを事前に準備することは甚だ困難である。そこで、素となる学習データの入力データに対して様々な加工処理を施すことにより新たな入力データを生成し、素となる学習データの正解ラベルと組み合わせて学習データを拡張する技術がある。 In order to improve the accuracy of a machine learning model, it is necessary to train the model using a large amount of training data. Training data is data that combines input data and correct labels that indicate the expected results for that input data. In other words, preparing a large amount of training data means preparing a large amount of input data that covers a wide range of possible patterns, along with correct labels for that input data. However, preparing such a large amount of training data in advance is extremely difficult. Therefore, there is a technology that generates new input data by performing various processing operations on the raw training data input data, and combines it with the correct labels of the raw training data to expand the training data.
このような技術により拡張された学習データの正解ラベルは、素となる学習データの正解ラベルと等しい。一方、入力データに対する加工処理によっては、機械学習モデルが認識結果を得る際に注目する領域まで加工されたために、実際には入力データから正解ラベルの結果が得られないにも拘らず、正解ラベルの結果が出力される場合がある。このような学習データで学習してしまうと、機械学習モデルの精度が低下する懸念がある。 The correct labels for training data expanded using such technology are equal to the correct labels for the original training data. However, depending on the processing performed on the input data, even the areas that the machine learning model focuses on when obtaining recognition results may be processed, resulting in the output of correct labels even though the correct labels cannot actually be obtained from the input data. There is a concern that training using such training data will result in a decrease in the accuracy of the machine learning model.
本発明の実施形態が解決しようとする課題は、拡張された学習データで学習することで機械学習モデルの精度が低下するのを防ぐことができる学習装置及びそのプログラムを提供しようとするものである。 The problem that embodiments of the present invention aim to solve is to provide a learning device and program that can prevent a decrease in the accuracy of a machine learning model by training it with expanded training data.
一実施形態において、入力データとその入力データに対して期待される結果を示す正解ラベルとを組み合わせた学習データを用いて機械学習モデルを学習させる学習装置は、入力手段と、特定手段と、加工手段と、決定手段とを備える。入力手段は、学習データを機械学習モデルに入力する。特定手段は、学習データを入力した機械学習モデルが当該学習データの正解ラベルで示される結果を得る際に当該学習データの入力データに対して注目した注目領域を特定する。加工手段は、学習データにおける入力データを加工する。決定手段は、加工手段による入力データの加工領域と特定手段により特定された注目領域とに基づいて当該入力データが加工された学習データの正解ラベルを決定する。 In one embodiment, a learning device that trains a machine learning model using training data that combines input data and a correct label indicating a result expected for the input data includes an input means, an identification means, a processing means, and a determination means. The input means inputs the training data to the machine learning model. The identification means identifies an area of interest that is focused on in the input data of the training data when the machine learning model that has received the training data as input obtains a result indicated by the correct label of the training data. The processing means processes the input data in the training data. The determination means determines a correct label for the training data resulting from processing the input data based on the processing area of the input data processed by the processing means and the area of interest identified by the identification means.
以下、機械学習モデルの学習装置に係る一実施形態について、図面を用いて説明する。
本実施形態は、値引シールの情報を画像認識により取得する際に使用される機械学習モデルの学習装置を例示する。
Hereinafter, an embodiment of a learning device for a machine learning model will be described with reference to the drawings.
This embodiment illustrates a learning device for a machine learning model used when acquiring information on discount stickers through image recognition.
スーパーケット等の小売店では、例えば消費期限又は賞味期限が近い商品を値引きして販売するために、商品に値引シールを貼付することはよく行われている。値引シールが付されている商品をPOS(Point Of Sales)端末に登録する場合、オペレータは、商品に付されたバーコードとともに値引シールを画像認識方式のスキャナに翳す。画像認識方式のスキャナは、カメラで撮影した画像からバーコードを認識する。また、同スキャナは、同画像から値引シールも認識し、バーコードの情報とともに値引シールの情報、例えば10円引き、10%引き等の情報をPOS端末に出力する。 In supermarkets and other retail stores, it is common to affix discount stickers to products to sell them at a discount when their expiration date or best-before date is approaching. When registering a product with a discount sticker attached to a POS (Point Of Sales) terminal, an operator holds the discount sticker, along with the barcode attached to the product, over an image recognition scanner. The image recognition scanner recognizes the barcode from an image captured by a camera. The scanner also recognizes the discount sticker from the image and outputs the discount sticker information, such as 10 yen off or 10% off, along with the barcode information, to the POS terminal.
このようなスキャナを用いた商品登録システムにおいては、撮影画像から値引シールを認識するための画像認識技術として、DNN(Deep Neural Network)、CNN(Convolutional Neural Network)、RNN(Recurrent Neural Network)等を用いた機械学習が利用されている。機械学習を利用することにより、極めて短時間のうちに値引シールの情報を認識することができる。ただし、機械学習の認識精度を高めるためには、入力データに対して結果を導き出す仕組みの機械学習モデルの精度を高める必要がある。機械学習モデルの精度を高めるためには、大量の学習データを用いて機械学習モデルを学習させればよい。学習データは、入力データとその入力データに対して期待される結果を示す正解ラベルとを組み合わせたデータである。すなわち本実施形態の場合には、値引シールの画像を入力データとし、その値引シールの情報を正解ラベルとする学習データを大量に用意して、機械学習モデルを学習させればよい。 In product registration systems using such scanners, machine learning techniques such as DNN (Deep Neural Network), CNN (Convolutional Neural Network), and RNN (Recurrent Neural Network) are used as image recognition technologies to recognize discount labels from captured images. Using machine learning makes it possible to recognize information on discount labels in an extremely short time. However, improving the recognition accuracy of machine learning requires improving the accuracy of the machine learning model that derives results from input data. To improve the accuracy of a machine learning model, the machine learning model can be trained using a large amount of training data. Training data is data that combines input data and correct labels that indicate the results expected from that input data. In other words, in this embodiment, images of discount labels are used as input data, and a large amount of training data is prepared in which the information on the discount labels is used as correct labels, and the machine learning model is trained using this data.
ところで、同じ値引シールであっても、オペレータがスキャナに翳した際の角度によって別の画像となる。このため、様々な角度で回転させた値引シールの画像を入力データとする学習データを準備する必要がある。また、スキャナの近傍を照らす照明の強度も店毎に異なる。このため、様々な強度の照明が照らされた値引シールの画像を入力データとする学習データも準備する必要がある。さらには、客が自ら商品のバーコードをスキャナに翳すセルフ方式の場合、オペレータである客が値引シールの一部を指等で隠してスキャナに翳す場合も想定される。そこで、値引シールの一部を指等で遮蔽した画像を入力データとする学習データも準備する必要がある。このような学習データは、素となる学習データの入力データである値引シールの画像に対し、回転、ガンマ変換、照明効果、遮蔽、指当て等の加工処理を施すことによって拡張することができる。 However, even the same discount sticker will appear differently depending on the angle at which the operator holds it over the scanner. For this reason, it is necessary to prepare training data using images of discount stickers rotated at various angles as input data. In addition, the intensity of the lighting illuminating the area near the scanner varies from store to store. For this reason, it is also necessary to prepare training data using images of discount stickers illuminated by lighting of various intensities as input data. Furthermore, in the case of a self-service system in which customers themselves hold the product's barcode over the scanner, it is possible that the customer, who is also the operator, may cover part of the discount sticker with their finger or other object before holding it over the scanner. Therefore, it is also necessary to prepare training data using images of the discount sticker partially obscured with a finger or other object as input data. Such training data can be expanded by applying processing such as rotation, gamma conversion, lighting effects, occlusion, and finger placement to the discount sticker images that form the raw training data input data.
本実施形態は、値引シールの画像を上述した加工処理で加工することにより拡張された大量の学習データを用いて機械学習モデルを学習させる学習装置及びそのプログラムを提供するものである。はじめに、本実施形態に係る商品登録システム100の概要について、図1の模式図を用いて説明する。 This embodiment provides a learning device and program for training a machine learning model using a large amount of training data expanded by processing discount sticker images using the processing described above. First, an overview of the product registration system 100 according to this embodiment will be described using the schematic diagram in Figure 1.
図1に示すように、商品登録システム100は、スキャナ1と、画像処理装置2と、POS端末3とを含む。スキャナ1は、画像認識方式の機種である。すなわちスキャナ1は、カメラを搭載し、そのカメラに翳された商品4を撮影して得た画像を画像処理装置2に供給する。画像処理装置2は、画像から商品4に付されたバーコード5を認識する。また画像処理装置2は、画像から商品4に付された値引シール6を認識する。画像処理装置2は、1つの画像からバーコード5と値引シール6を認識することができる。画像処理装置2は、別々の撮影画像からバーコード5と値引シール6をそれぞれ認識することもできる。 As shown in FIG. 1, the product registration system 100 includes a scanner 1, an image processing device 2, and a POS terminal 3. The scanner 1 is an image recognition model. That is, the scanner 1 is equipped with a camera and takes a picture of a product 4 held up to the camera, and supplies the image obtained to the image processing device 2. The image processing device 2 recognizes a barcode 5 attached to the product 4 from the image. The image processing device 2 also recognizes a discount label 6 attached to the product 4 from the image. The image processing device 2 can recognize the barcode 5 and the discount label 6 from a single image. The image processing device 2 can also recognize the barcode 5 and the discount label 6 from separate captured images.
画像処理装置2は、画像記憶部11、バーコード認識部12、値引シール認識部13及び認識結果出力部14としての機能を有するコンピュータである。画像記憶部11は、スキャナ1のカメラで撮影されたフレーム画像を時系列に記憶する。バーコード認識部12は、画像記憶部11に記憶されたフレーム画像からバーコード5を認識する。バーコード5を認識し得ると、バーコード認識部12は、そのバーコード5の情報を認識結果出力部14に提供する。値引シール認識部13は、画像記憶部11に記憶されたフレーム画像から値引シール6を認識する。値引シール6を認識し得ると、値引シール認識部13は、その値引シール6の情報を認識結果出力部14に提供する。認識結果出力部14は、バーコード認識部12からバーコードの情報が提供された場合、そのバーコードの情報をPOS端末3へと出力する。認識結果出力部14は、値引シール認識部13から値引シール6の情報が提供された場合、その値引シール6の情報をPOS端末3へと出力する。 The image processing device 2 is a computer that functions as an image storage unit 11, a barcode recognition unit 12, a discount label recognition unit 13, and a recognition result output unit 14. The image storage unit 11 stores frame images captured by the scanner 1 camera in chronological order. The barcode recognition unit 12 recognizes a barcode 5 from the frame images stored in the image storage unit 11. If the barcode 5 is recognized, the barcode recognition unit 12 provides information about the barcode 5 to the recognition result output unit 14. The discount label recognition unit 13 recognizes a discount label 6 from the frame images stored in the image storage unit 11. If the discount label 6 is recognized, the discount label recognition unit 13 provides information about the discount label 6 to the recognition result output unit 14. If barcode information is provided by the barcode recognition unit 12, the recognition result output unit 14 outputs the barcode information to the POS terminal 3. When information about the discount sticker 6 is provided by the discount sticker recognition unit 13, the recognition result output unit 14 outputs the information about the discount sticker 6 to the POS terminal 3.
POS端末3は、画像処理装置2からバーコード5の情報を取得すると、そのバーコード5によって表される商品コードで識別される商品の価格、商品名、販売点数、販売金額等の商品販売データを登録処理する。POS端末3は、画像処理装置2から値引シール6の情報を取得すると、値引処理を実行する。例えばPOS端末3は、値引シール6の情報を基に値引額を算出し、直前に登録処理した商品販売データに値引額を追加する。あるいはPOS端末3は、値引シールを算出した直後に登録処理した商品販売データにその値引額を追加する。値引額は、例えば値引シールの情報が10円引きである場合には10円である。値引額は、例えば値引シールの情報が10%引きであり、直前又は直後の商品販売データの価格が200円である場合には20円である。 When the POS terminal 3 acquires barcode 5 information from the image processing device 2, it registers product sales data such as the price, product name, sales quantity, and sales amount of the product identified by the product code represented by the barcode 5. When the POS terminal 3 acquires discount label 6 information from the image processing device 2, it executes discount processing. For example, the POS terminal 3 calculates the discount amount based on the information on the discount label 6 and adds the discount amount to the product sales data registered immediately before. Alternatively, the POS terminal 3 adds the discount amount to the product sales data registered immediately after calculating the discount label. For example, if the discount label information indicates a 10 yen discount, the discount amount is 10 yen. For example, if the discount label information indicates a 10% discount and the price in the product sales data immediately before or after is 200 yen, the discount amount is 20 yen.
かかる構成の商品登録システム100において、画像処理装置2は、スキャナ1又はPOS端末3と一体に構成されていてもよいし、スキャナ1及びPOS端末3とは別体で構成されていてもよい。スキャナ1と画像処理装置2とが一体で構成される場合、その装置をスキャナ装置または単にスキャナと称する場合がある。POS端末3と画像処理装置2とが一体で構成される場合、その装置を商品登録装置または単にPOS端末と称する場合がある。画像処理装置2が単体である場合、その装置を情報処理装置またはデータ処理装置と称する場合がある。 In a product registration system 100 configured as described above, the image processing device 2 may be configured integrally with the scanner 1 or POS terminal 3, or may be configured separately from the scanner 1 and POS terminal 3. When the scanner 1 and image processing device 2 are configured integrally, the device may be referred to as a scanner device or simply a scanner. When the POS terminal 3 and image processing device 2 are configured integrally, the device may be referred to as a product registration device or simply a POS terminal. When the image processing device 2 is a standalone device, the device may be referred to as an information processing device or a data processing device.
さて本実施形態では、機械学習を利用して値引シール認識部13を実現する。そこで次に、機械学習を利用した値引シール認識部13の機能構成について、図2のブロック図を用いて説明する。 In this embodiment, the discount sticker recognition unit 13 is realized using machine learning. Next, the functional configuration of the discount sticker recognition unit 13 using machine learning will be explained using the block diagram in Figure 2.
図2に示すように、値引シール認識部13は、推論装置20と機械学習モデル30と学習装置40とを含む。推論装置20は、学習された機械学習モデル30を利用して、画像に写し出された値引シール6の情報を推論することに特化した装置である。推論装置20は、画像取得部21、画像切出部22及び認識処理部23としての機能を有する。画像取得部21は、画像記憶部11から値引シール6が写し出されている画像を取得する。画像切出部22は、画像取得部21が取得した画像から値引シール6の画像を切り出す。認識処理部23は、画像切出部22によって切り出された値引シール6の画像を機械学習モデル30に入力し、その入力に対して機械学習モデル30が認識した結果を取得する。認識処理部23は、取得した認識結果を認識結果出力部14に提供する。 As shown in FIG. 2, the discount sticker recognition unit 13 includes an inference device 20, a machine learning model 30, and a learning device 40. The inference device 20 is a device specialized in inferring information about a discount sticker 6 displayed in an image using a trained machine learning model 30. The inference device 20 has the functions of an image acquisition unit 21, an image clipping unit 22, and a recognition processing unit 23. The image acquisition unit 21 acquires an image of a discount sticker 6 from the image storage unit 11. The image clipping unit 22 clips an image of the discount sticker 6 from the image acquired by the image acquisition unit 21. The recognition processing unit 23 inputs the image of the discount sticker 6 clipped by the image clipping unit 22 into the machine learning model 30 and acquires the recognition result of the machine learning model 30 in response to the input. The recognition processing unit 23 provides the acquired recognition result to the recognition result output unit 14.
機械学習モデル30は、入力された値引シール6の画像を、DNN、CNN又はRNN等の機械学習の手法を利用して解析し、認識した結果を出力する。具体的には、機械学習モデル30は、入力された画像から値引シールに表記されている値引の情報、例えば値引額、割引率等を認識し得た場合には、その値引の情報を認識結果として出力する。機械学習モデル30は、入力された画像から値引シールに表記されている値引の情報を認識し得なかった場合には、認識不可の情報を認識結果として出力する。認識結果の出力先は、画像の入力元である。すなわち値引シールの画像が推論装置20から入力された場合には、機械学習モデル30は、認識結果を推論装置20に出力する。値引シールの画像が学習装置40から入力された場合には、機械学習モデル30は、認識結果を学習装置40に出力する。 The machine learning model 30 analyzes the input image of the discount sticker 6 using a machine learning technique such as DNN, CNN, or RNN, and outputs the recognition result. Specifically, if the machine learning model 30 can recognize the discount information written on the discount sticker from the input image, such as the discount amount or discount rate, it outputs the discount information as the recognition result. If the machine learning model 30 cannot recognize the discount information written on the discount sticker from the input image, it outputs information indicating that it cannot be recognized as the recognition result. The recognition result is output to the source of the image input. In other words, if the image of the discount sticker is input from the inference device 20, the machine learning model 30 outputs the recognition result to the inference device 20. If the image of the discount sticker is input from the learning device 40, the machine learning model 30 outputs the recognition result to the learning device 40.
前述したように、推論装置20に出力された機械学習モデル30の認識結果は、認識結果出力部14を経てPOS端末3へと出力される。POS端末3においては、機械学習モデル30の認識結果として値引シールの情報が与えられた場合には、値引処理が実行される。しかし、機械学習モデル30の認識結果が認識不可であった場合、POS端末3の動作がエラーとなる。そこで、極力、認識結果が認識不可とならないように、想定される様々なパターンの値引シール6を網羅した多数の学習データで機械学習モデル30を学習させる必要がある。その一方で、機械学習モデル30が値引シールの情報を誤って認識してしまうと、商品が間違って値引される可能性がある。例えば、「80円引き」という値引シール6の「8」の左半分が指で隠されてスキャナ1に翳された場合、機械学習モデル30は、値引シール6の情報を「30円引き」と誤認識する可能性がある。このような不具合は、店の信用問題となるため、極力避けなければならない。 As described above, the recognition results of the machine learning model 30 output to the inference device 20 are output to the POS terminal 3 via the recognition result output unit 14. In the POS terminal 3, when discount sticker information is provided as the recognition result of the machine learning model 30, a discount process is executed. However, if the recognition result of the machine learning model 30 is inappropriate, the operation of the POS terminal 3 results in an error. Therefore, to minimize the chance of an inappropriate recognition result, it is necessary to train the machine learning model 30 with a large amount of training data covering various conceivable patterns of discount stickers 6. On the other hand, if the machine learning model 30 incorrectly recognizes the information on the discount sticker, there is a possibility that a product will be erroneously discounted. For example, if a discount sticker 6 that says "80 yen off" has the left half of the "8" covered with a finger and is held over the scanner 1, the machine learning model 30 may erroneously recognize the information on the discount sticker 6 as "30 yen off." Such malfunctions pose a risk to the store's credibility and must be avoided as much as possible.
そこで学習装置40は、値引シール6の認識精度を高めるだけでなく誤認識が発生しないように、機械学習モデル30を学習させることを課題とする。この課題を解決するために、学習装置40は、取得部41、入力部42、特定部43、加工部44及び決定部45としての機能を有する。 The learning device 40 therefore aims to train the machine learning model 30 not only to improve the recognition accuracy of the discount sticker 6 but also to prevent misrecognition. To solve this problem, the learning device 40 has the functions of an acquisition unit 41, an input unit 42, an identification unit 43, a processing unit 44, and a determination unit 45.
取得部41は、学習データセットを取得する機能である。学習データセットは、教師有り学習で用いる学習データの集合体である。すなわち学習データは、値引シール6の画像を機械学習モデル30への入力データとし、その入力データに対して期待される機械学習モデル30での認識結果を正解ラベルとするデータである。取得部41は、例えばネットワークを通じて配信された学習データセットを取得する。取得部41は、例えばフラッシュメモリ等の記憶媒体から学習データセットを読み込んで取得してもよい。取得部41は、取得手段と言い換えることができる。 The acquisition unit 41 has a function for acquiring a training dataset. A training dataset is a collection of training data used in supervised learning. In other words, the training data is data in which an image of a discount sticker 6 is used as input data to the machine learning model 30, and the recognition result expected from the machine learning model 30 for that input data is used as the correct label. The acquisition unit 41 acquires a training dataset distributed, for example, via a network. The acquisition unit 41 may also acquire the training dataset by reading it from a storage medium such as a flash memory. The acquisition unit 41 can be referred to as an acquisition means.
入力部42は、取得部41が取得した学習データセットから1つの学習データを選択し、機械学習モデル30に入力する機能である。また入力部42は、学習データを機械学習モデル30に入力したことによって機械学習モデル30から出力される認識結果を取得する機能も有する。入力部42は、入力手段と言い換えることができる。 The input unit 42 has the function of selecting one piece of training data from the training dataset acquired by the acquisition unit 41 and inputting it into the machine learning model 30. The input unit 42 also has the function of acquiring the recognition result output from the machine learning model 30 by inputting the training data into the machine learning model 30. The input unit 42 can be referred to as an input means.
特定部43は、学習データを入力した機械学習モデル30が認識結果を得る際に当該学習データの入力データに対して注目した注目領域を特定する機能である。この機能は、ニューラルネットワークが入力画像のどこに注目したのかを可視化する技術を利用する。例えば、注目度合いの高い領域をヒートマップで可視化するGrad-CAM(Class Activation Mapping)を利用する。Glad-CAMは、ヒートマップを生成することができる。このヒートマップは、入力画像の注目度合いを表している。したがって、注目度合いの高い領域は、認識に必要な情報が存在する注目領域であると解釈できる。特定部43は、特定手段と言い換えることができる。 The identification unit 43 is a function that identifies the attention area that the machine learning model 30, which has input training data, focuses on in the input data of the training data when obtaining a recognition result. This function uses technology that visualizes which parts of the input image the neural network focuses on. For example, it uses Grad-CAM (Class Activation Mapping), which visualizes areas of high attention using a heat map. Glad-CAM can generate a heat map. This heat map represents the degree of attention in the input image. Therefore, areas of high attention can be interpreted as attention areas where information necessary for recognition is present. The identification unit 43 can be referred to as an identification means.
加工部44は、学習データセットを構成する学習データを拡張するために、入力データを加工する機能である。加工の手法は、実運用の形態に合わせて適切な手法を1種類以上選択する。本実施形態では、入力データが値引シールの画像であるので、回転、遮蔽、ガンマ変換、指当て、弱照明効果、強照明効果の6種類の加工処理を選択して実装する。加工部44は、学習データ毎に6種類の加工処理を順次適用して、学習データの拡張を図る。加工部44は、学習データ毎にランダムに加工処理を0個以上ピックアップして実施してもよい。因みに、0個の場合には加工処理を行わず、素の画像をそのまま使用することとなる。加工部44は、加工手段と言い換えることができる。 The processing unit 44 is a function that processes input data in order to expand the training data that constitutes the training dataset. One or more appropriate processing methods are selected to suit the actual operational form. In this embodiment, the input data is an image of a discount sticker, so six types of processing are selected and implemented: rotation, occlusion, gamma conversion, finger placement, low lighting effect, and high lighting effect. The processing unit 44 sequentially applies the six types of processing to each piece of training data to expand the training data. The processing unit 44 may randomly select zero or more processing methods for each piece of training data and perform them. Incidentally, if there are zero processing methods, no processing is performed and the raw image is used as is. The processing unit 44 can be referred to as processing means.
決定部45は、学習データ毎に、加工部44による入力データの加工領域と特定部43により特定された注目領域とを照合して、当該入力データが加工されて拡張された学習データの正解ラベルを決定する機能である。例えば決定部45は、入力データの加工領域が注目領域の少なくとも一部と重なる場合に、当該入力データが加工された学習データの正解ラベルを、加工前の入力データと組み合わされた正解ラベルから変更する。あるいは決定部45は、入力データの加工領域が注目領域と重なり合う面積が閾値以上の場合に、当該入力データが加工された学習データの正解ラベルを、加工前の入力データと組み合わされた正解ラベルから変更する。あるいは決定部45は、注目領域の重心位置から入力データの加工領域までの距離が閾値以下の場合に、当該入力データが加工された学習データの正解ラベルを、加工前の入力データと組み合わされた正解ラベルから変更する。具体的には決定部45は、入力データの加工領域と注目領域とが正解ラベルの変更条件を満たす場合、正解ラベルを「認識不可(リジェクト)」に変更する。決定部45は、正解ラベルを「認識不可」に変更するのではなく、「不明」という正解ラベルに変更してもよい。又は決定部45は、正解ラベルをネガティブサンプルとして取り扱うように変更してもよい。決定部45は、決定手段と言い換えることができる。 The determination unit 45 is a function that, for each piece of training data, compares the processing area of the input data processed by the processing unit 44 with the area of interest identified by the identification unit 43 and determines the correct label of the training data expanded by processing the input data. For example, if the processing area of the input data overlaps at least a portion of the area of interest, the determination unit 45 changes the correct label of the training data resulting from the processing of the input data from the correct label combined with the input data before processing. Alternatively, if the area where the processing area of the input data overlaps with the area of interest is equal to or greater than a threshold, the determination unit 45 changes the correct label of the training data resulting from the processing of the input data from the correct label combined with the input data before processing. Alternatively, if the distance from the center of gravity of the area of interest to the processing area of the input data is equal to or less than a threshold, the determination unit 45 changes the correct label of the training data resulting from the processing of the input data from the correct label combined with the input data before processing. Specifically, if the processing area of the input data and the area of interest satisfy the correct label change condition, the determination unit 45 changes the correct label to "unrecognizable (reject)." The determination unit 45 may change the correct label to "unknown" instead of "unrecognizable." Alternatively, the determination unit 45 may change the correct label so that it is treated as a negative sample. The determination unit 45 can be referred to as a determination means.
図3は、ハードウェアによって学習装置40を構成する場合に必要な回路構成部品を示すブロック図である。なお、図3に示される回路構成部品は、学習装置40と推論装置20とを構成する回路構成部品であるともいえる。さらには、機械学習モデル30を含む値引シール認識部13の回路構成部品であるともいえる。あるいは、画像処理装置2の回路構成部品であるといってもよい。 Figure 3 is a block diagram showing the circuit components required when configuring the learning device 40 using hardware. The circuit components shown in Figure 3 can also be considered to be the circuit components that make up the learning device 40 and the inference device 20. They can also be considered to be the circuit components of the discount sticker recognition unit 13, which includes the machine learning model 30. Alternatively, they can be considered to be the circuit components of the image processing device 2.
図3に示すように、学習装置40は、CPU(Central Processing Unit)51、GPU(Graphics Processing Unit)52、ROM(Read Only Memory)53、RAM(Random Access Memory)54、補助記憶デバイス55、デバイスインターフェース56、通信インターフェース57及びシステム伝送路58等を備える。システム伝送路58は、アドレスバス、データバス、制御信号線等を含む。学習装置40は、CPU51と、GPU52、ROM53、RAM54、補助記憶デバイス55、デバイスインターフェース56及び通信インターフェース57とをシステム伝送路58で接続することにより、コンピュータを構成する。 As shown in FIG. 3, the learning device 40 includes a CPU (Central Processing Unit) 51, a GPU (Graphics Processing Unit) 52, a ROM (Read Only Memory) 53, a RAM (Random Access Memory) 54, an auxiliary storage device 55, a device interface 56, a communication interface 57, and a system transmission path 58. The system transmission path 58 includes an address bus, a data bus, control signal lines, and the like. The learning device 40 constitutes a computer by connecting the CPU 51 with the GPU 52, ROM 53, RAM 54, the auxiliary storage device 55, the device interface 56, and the communication interface 57 via the system transmission path 58.
CPU51は、上記コンピュータの中枢部分に相当する。CPU51は、オペレーティングシステム又はアプリケーションプログラムに従って、学習装置40としての各種の機能を実現するべく各部を制御する。 The CPU 51 corresponds to the central part of the computer. The CPU 51 controls each part to realize the various functions of the learning device 40 in accordance with the operating system or application program.
GPU52は、CPU51が行う演算処理を補助するアクセラレータとして機能する演算装置である。学習装置40において、GPU52は、主に画像処理の演算を高速に実行するために使用される。 The GPU 52 is a computing device that functions as an accelerator to assist the computational processing performed by the CPU 51. In the learning device 40, the GPU 52 is primarily used to perform image processing calculations at high speed.
ROM53及びRAM54は、上記コンピュータの主記憶部分に相当する。不揮発性のメモリ領域であるROM53は、オペレーティングシステム又はアプリケーションプログラムを記憶する。またROM53は、CPU51が各部を制御するための処理を実行する上で必要なデータを記憶する場合もある。揮発性のメモリ領域であるRAM54は、データが適宜書き換えられるワークエリアとして使用される。またRAM54は、アプリケーションプログラムを記憶したり、CPU51が各部を制御するための処理を実行する上で必要なデータを記憶したりする場合もある。 ROM 53 and RAM 54 correspond to the main memory of the computer. ROM 53, a non-volatile memory area, stores an operating system or application programs. ROM 53 may also store data necessary for CPU 51 to execute processes to control each part. RAM 54, a volatile memory area, is used as a work area where data can be rewritten as needed. RAM 54 may also store application programs or data necessary for CPU 51 to execute processes to control each part.
補助記憶デバイス55は、上記コンピュータの補助記憶部分に相当する。例えばEEPROM(Electric Erasable Programmable Read-Only Memory)、HDD(Hard Disk Drive)、あるいはSSD(Solid State Drive)等が補助記憶デバイス55となり得る。補助記憶デバイス55は、CPU51又はGPU52が各種の処理を行う上で使用するデータ、その処理によって作成されたデータ等を保存する。補助記憶デバイス55は、上記のアプリケーションプログラムを記憶する場合もある。 The auxiliary storage device 55 corresponds to the auxiliary storage portion of the computer. For example, the auxiliary storage device 55 can be an EEPROM (Electric Erasable Programmable Read-Only Memory), a HDD (Hard Disk Drive), or an SSD (Solid State Drive). The auxiliary storage device 55 stores data used by the CPU 51 or GPU 52 when performing various processes, data created by those processes, etc. The auxiliary storage device 55 may also store the application programs mentioned above.
デバイスインターフェース56は、入力デバイス59から入力されるデータ信号を入力する機能と、表示デバイス60に表示データを出力する機能とを有する。入力デバイス59は、キーボード、ポインティングデバイス、タッチパネル等である。表示デバイス60は、ディスプレイ、タッチパネル等である。 The device interface 56 has the function of inputting data signals input from the input device 59 and the function of outputting display data to the display device 60. The input device 59 is a keyboard, pointing device, touch panel, etc. The display device 60 is a display, touch panel, etc.
通信インターフェース57は、外部機器とデータ通信を行うための回路である。外部機器は、学習データセットを配信するコンピュータ装置、機械学習モデル30を記憶する記憶装置等を含む。 The communication interface 57 is a circuit for communicating data with external devices. External devices include a computer device that distributes the training dataset, a storage device that stores the machine learning model 30, etc.
かかる構成の学習装置40は、CPU51が、他のGPU52、ROM53、RAM54、補助記憶デバイス55、デバイスインターフェース56及び通信インターフェース57と協働して、取得部41、入力部42、特定部43、加工部44及び決定部45としての機能を実現するために、学習プログラムを実装している。学習プログラムは、ROM53又は補助記憶デバイス55にインストールされたアプリケーションソフトウェアである。学習プログラムをROM53又は補助記憶デバイス55にインストールする方法は、特に限定されない。リムーバブルな記録媒体に学習プログラムを記録して、あるいはネットワークを介した通信により学習プログラムを配信して、学習プログラムをROM53又は補助記憶デバイス55にインストールすることができる。記録媒体は、SDメモリカード、USBメモリ等のようにプログラムを記憶でき、かつ装置が読み取り可能であれば、その形態は問わない。 In the learning device 40 configured as described above, the CPU 51 implements a learning program to cooperate with the other GPU 52, ROM 53, RAM 54, auxiliary storage device 55, device interface 56, and communication interface 57 to realize the functions of the acquisition unit 41, input unit 42, identification unit 43, processing unit 44, and determination unit 45. The learning program is application software installed in the ROM 53 or auxiliary storage device 55. There are no particular limitations on the method for installing the learning program in the ROM 53 or auxiliary storage device 55. The learning program can be installed in the ROM 53 or auxiliary storage device 55 by recording it on a removable recording medium or by distributing it via communication over a network. The recording medium can be in any form, such as an SD memory card or USB memory, as long as it can store the program and is readable by the device.
また、学習装置40は、加工部44としての機能をサポートするために、加工処理テーブル70(図4を参照)をRAM54又は補助記憶デバイス55で記憶している。 In addition, to support the function of the processing unit 44, the learning device 40 stores a processing table 70 (see Figure 4) in RAM 54 or the auxiliary storage device 55.
図4は、加工処理テーブル70の主要なデータ構造を示す模式図である。図示するように加工処理テーブル70は、一連のテーブル番号と関連付けて、加工コード、加工処理名称及び欠落タイプフラグの各データを記述するようにしたデータテーブルである。加工コードのフィールドには、学習データの入力データである値引シール6の画像を加工する複数種類の加工処理を個々に識別するために設定された固有の加工コードが記述される。加工処理名称のフィールドには、対応する加工コードで識別される加工処理の名称が記述される。欠落タイプフラグのフィールドには、対応する加工コードで識別される加工処理が、認識に必要な情報の欠落が発生しないタイプか否かを識別するための1ビットデータである欠落タイプフラグが記述される。欠落タイプフラグは、例えば、認識に必要な情報の欠落が発生しないタイプの加工処理に対しては“0”が記述され、認識に必要な情報の欠落が発生するタイプの加工処理に対しては“1”が記述される。 Figure 4 is a schematic diagram showing the main data structure of the processing table 70. As shown, the processing table 70 is a data table that stores data such as processing codes, processing names, and missing type flags in association with a series of table numbers. The processing code field stores a unique processing code that is set to individually identify multiple types of processing used to process the image of the discount sticker 6, which is the input data for the learning data. The processing name field stores the name of the processing identified by the corresponding processing code. The missing type flag field stores a missing type flag, which is one-bit data that identifies whether the processing identified by the corresponding processing code is a type that does not result in the loss of information necessary for recognition. For example, the missing type flag is set to "0" for processing that does not result in the loss of information necessary for recognition, and "1" for processing that does result in the loss of information necessary for recognition.
本実施形態において、加工コード「1001」は、加工処理「回転」の識別コードである。加工処理「回転」は、値引シール6の画像を、任意の角度で回転させた画像に加工する処理である。加工処理「回転」によって加工された画像は、認識に必要な情報の欠落が発生しない。したがって、欠落タイプフラグは“0”となる。 In this embodiment, the processing code "1001" is the identification code for the "rotation" processing. The "rotation" processing is a process for rotating the image of the discount sticker 6 at an arbitrary angle. Images processed using the "rotation" processing do not lose any information necessary for recognition. Therefore, the loss type flag is set to "0".
加工コード「1002」は、加工処理「遮蔽」の識別コードである。加工処理「遮蔽」は、値引シール6の画像を、その一部を任意の形状の部材で遮蔽した画像に加工する処理である。加工処理「遮蔽」によって加工された画像は、認識に必要な情報の欠落が発生する場合がある。したがって、欠落タイプフラグは“1”となる。 The processing code "1002" is the identification code for the "Occlusal" processing. The "Occlusal" processing is a process that processes the image of the discount sticker 6 into an image in which part of it is obscured by a component of any shape. Images processed using the "Occlusal" processing may lack information necessary for recognition. Therefore, the loss type flag is set to "1".
加工コード「1003」は、加工処理「ガンマ変換」の識別コードである。加工処理「ガンマ変換」は、値引シール6の画像を、任意のγ(ガンマ)値で明るさを調整した画像に加工する処理である。加工処理「ガンマ変換」によって加工された画像は、認識に必要な情報の欠落が発生しない。したがって、欠落タイプフラグは“0”となる。 The processing code "1003" is the identification code for the "gamma conversion" processing. The "gamma conversion" processing is a process that processes the image of the discount sticker 6 into an image with brightness adjusted using an arbitrary γ (gamma) value. Images processed using the "gamma conversion" processing do not lose any information necessary for recognition. Therefore, the loss type flag is set to "0".
加工コード「1004」は、加工処理「指当て」の識別コードである。加工処理「指当て」は、値引シール6の画像を、その一部を指で隠した画像に加工する処理である。加工処理「指当て」によって加工された画像は、認識に必要な情報の欠落が発生する場合がある。したがって、欠落タイプフラグは“1”となる。 The processing code "1004" is the identification code for the "finger place" processing. The "finger place" processing is a process that processes the image of the discount sticker 6 into an image in which part of it is covered by a finger. Images processed using the "finger place" processing may lack information necessary for recognition. Therefore, the loss type flag is set to "1".
加工コード「1005」は、加工処理「弱照明効果」の識別コードである。加工処理「弱照明効果」は、値引シール6の画像を、強度の弱い照明光を照射した画像に加工する処理である。加工処理「弱照明効果」によって加工された画像は、認識に必要な情報の欠落が発生しない。したがって、欠落タイプフラグは“0”となる。 The processing code "1005" is the identification code for the "weak lighting effect" processing. The "weak lighting effect" processing is a process that processes the image of the discount sticker 6 into an image illuminated with weak lighting. Images processed using the "weak lighting effect" processing do not lose any information necessary for recognition. Therefore, the loss type flag is set to "0".
加工コード「1006」は、加工処理「強照明効果」の識別コードである。加工処理「強照明効果」は、値引シール6の画像を、白飛びが生じる程度に強度の強い照明光を照射した画像に加工する処理である。加工処理「強照明効果」によって加工された画像は、認識に必要な情報の欠落が発生する場合がある。したがって、欠落タイプフラグは“1”となる。 The processing code "1006" is the identification code for the "Strong Lighting Effect" processing. The "Strong Lighting Effect" processing processes the image of the discount sticker 6 into an image illuminated with strong lighting light to the extent that whiteout occurs. Images processed using the "Strong Lighting Effect" processing may lack information necessary for recognition. Therefore, the loss type flag is set to "1".
ここに、加工処理テーブル70は、加工処理毎に、加工領域が注目領域に関わるタイプであるか否かを設定する設定手段として機能する。
次に、学習装置40の主要な動作について、図5及び図6の流れ図、さらには図7及び図8の画像例を用いて説明する。なお、以下に説明する動作の手順は一例である。同様な作用効果を奏するのであれば、その手順は適宜変更できる。
Here, the processing table 70 functions as a setting means for setting, for each processing, whether or not the processing area is of a type related to the area of interest.
Next, the main operations of the learning device 40 will be explained using the flowcharts in Figures 5 and 6, and the example images in Figures 7 and 8. Note that the operation procedure explained below is an example. The procedure can be changed as appropriate as long as the same operational effect is achieved.
図5は、学習装置40のCPU51が学習プログラムにしたがって実行する情報処理の要部手順を示す流れ図である。例えば、入力デバイス59からの入力信号により学習プログラムの起動が指令されると、CPU51は、図5の流れ図に示す手順の情報処理を開始する。先ずCPU51は、ACT1として取得部41としての機能により学習データセットを取得する。 Figure 5 is a flowchart showing the main steps of the information processing executed by the CPU 51 of the learning device 40 in accordance with the learning program. For example, when an input signal from the input device 59 commands the start of the learning program, the CPU 51 starts the information processing steps shown in the flowchart of Figure 5. First, in ACT 1, the CPU 51 acquires a learning dataset by functioning as the acquisition unit 41.
学習データセットを取得したCPU51は、ACT2へと進む。CPU51は、ACT2として入力部42としての機能により学習データセットから1つの学習データを選択して機械学習モデル30に入力する。そしてCPU51は、ACT3として機械学習モデル30に学習を実行させる。 After acquiring the training data set, the CPU 51 proceeds to ACT 2. In ACT 2, the CPU 51 selects one piece of training data from the training data set using its function as the input unit 42 and inputs it into the machine learning model 30. Then, in ACT 3, the CPU 51 causes the machine learning model 30 to perform training.
選択した学習データによる学習を終えると、CPU51は、ACT4へと進む。CPU51は、ACT4として特定部43の機能により注目領域を特定する。例えばCPU51は、Grad-CAM等の可視化技術によって生成されたヒートマップを二値化し、前景領域となった領域を注目領域として取得する。 Once learning using the selected learning data is complete, the CPU 51 proceeds to ACT 4. In ACT 4, the CPU 51 identifies the region of interest using the function of the identification unit 43. For example, the CPU 51 binarizes a heat map generated using visualization technology such as Grad-CAM, and acquires the region that becomes the foreground region as the region of interest.
図7は、特定部43の概要を説明するために用いる画像の一例を示す図である。同図において、画像80は、値引情報が「30円引き」の値引シールを示している。すなわち、この値引シールの画像80を入力データとする学習データの正解ラベルは、「30円引き」となる。機械学習モデル30は、画像80の「30円」が示さられた箇所に注目することで、正解ラベルで示される「30円引き」という結果を得ることができる。よって、特定部43では、値引シールの全体を示す画像90のうち、「30円」を囲う領域が注目領域91として特定される。 Figure 7 shows an example of an image used to explain the overview of the identification unit 43. In the figure, image 80 shows a discount sticker with discount information "30 yen off." In other words, the correct label for learning data that uses image 80 of this discount sticker as input data is "30 yen off." By focusing on the part of image 80 where "30 yen" is indicated, the machine learning model 30 can obtain the result of "30 yen off," which is indicated by the correct label. Therefore, the identification unit 43 identifies the area surrounding "30 yen" as the area of interest 91 in image 90 showing the entire discount sticker.
注目領域を特定し終えると、CPU51は、ACT5として学習データセットに未処理の学習データが存在するか否かを確認する。未処理の学習データが存在する場合、CPU51は、ACT2へと戻る。すなわちCPU51は、未処理の学習データを選択して機械学習モデル30に入力し、機械学習モデル30に学習を実行させる。そしてCPU51は、その学習データに対して注目領域を特定する。 Once the region of interest has been identified, the CPU 51 checks in ACT 5 whether unprocessed training data exists in the training dataset. If unprocessed training data exists, the CPU 51 returns to ACT 2. That is, the CPU 51 selects the unprocessed training data and inputs it into the machine learning model 30, causing the machine learning model 30 to perform training. The CPU 51 then identifies the region of interest for that training data.
こうして、学習データセットにセットされている全ての学習データについて注目領域を特定したならば、CPU51は、ACT6へと進む。CPU51は、ACT6として加工部44及び決定部45としての機能によりデータ拡張処理を実行する。データ拡張処理の詳細については後述するが、データ拡張処理により、学習データセットにセットされている学習データ毎に、入力データが加工された1以上の拡張学習データが生成されるので、CPU51は、ACT7としてその拡張学習データを機械学習モデル30に入力する。そしてCPU51は、ACT8として機械学習モデル30に学習を実行させる。 Once the CPU 51 has identified the regions of interest for all of the learning data set in the learning dataset in this way, the CPU 51 proceeds to ACT 6. In ACT 6, the CPU 51 executes data augmentation processing using the functions of the processing unit 44 and the determination unit 45. Details of the data augmentation processing will be described later, but the data augmentation processing generates one or more pieces of augmented learning data in which the input data has been processed for each piece of learning data set in the learning dataset, and the CPU 51 inputs the augmented learning data to the machine learning model 30 in ACT 7. Then, in ACT 8, the CPU 51 causes the machine learning model 30 to perform learning.
CPU51は、ACT9として機械学習モデル30の再学習が必要か否かを判定する。例えばCPU51は、機械学習モデル30が期待する認識性能に達しているか否かを検証することによって、再学習の必要可否を判定する。具体的には、機械学習モデル30が期待する認識性能に達していない場合に再学習が必要と判定する。あるいはCPU51は、予め設定された回数の再学習が実行されたか否かを検証することによって、再学習の必要可否を判定する。具体的には、再学習の回数が設定数に達していない場合に再学習が必要と判定する。CPU51は、他の判定方式によって再学習の必要可否を判定してもよい。 In ACT 9, the CPU 51 determines whether re-learning of the machine learning model 30 is necessary. For example, the CPU 51 determines whether re-learning is necessary by verifying whether the machine learning model 30 has reached the expected recognition performance. Specifically, the CPU 51 determines that re-learning is necessary if the machine learning model 30 has not reached the expected recognition performance. Alternatively, the CPU 51 determines whether re-learning is necessary by verifying whether re-learning has been performed a preset number of times. Specifically, the CPU 51 determines that re-learning is necessary if the number of re-learning attempts has not reached the set number. The CPU 51 may also determine whether re-learning is necessary using other determination methods.
CPU51は、ACT9において再学習が必要と判定した場合、ACT6へと戻る。すなわちCPU51は、データ拡張処理を再度実行する。CPU51は、ACT9において再学習が不要と判定した場合、学習プログラムに基づく手順の情報処理を終了する。 If the CPU 51 determines in ACT 9 that re-learning is necessary, it returns to ACT 6. That is, the CPU 51 executes the data expansion process again. If the CPU 51 determines in ACT 9 that re-learning is not necessary, it ends the information processing of the procedure based on the learning program.
図6は、データ拡張処理の一手順を示す流れ図である。本手順は、学習データ毎に、その入力データに回転、遮蔽、ガンマ変換、指当て、弱照明効果、強照明効果の6種類の加工処理を順次実行して、拡張学習データを得るデータ拡張処理の手順である。他の手順としては、例えば、学習データ毎にランダムに加工処理を0個以上ピックアップして実施することにより拡張学習データを得る手順であってもよい。また、上記の手順と同様な作用効果を得られるのであれば、別の手順であってもよい。 Figure 6 is a flow chart showing one procedure for data augmentation processing. This procedure is a data augmentation procedure in which, for each training data, six types of processing - rotation, occlusion, gamma conversion, finger placement, low lighting effect, and high lighting effect - are sequentially performed on the input data to obtain extended training data. Other procedures, for example, may be a procedure in which extended training data is obtained by randomly selecting and performing zero or more processing operations on each training data. Furthermore, other procedures may be used as long as they achieve the same effects as the above procedure.
図5のACT6においてデータ拡張処理に入ると、CPU51は、図6の流れ図に示す手順の情報処理を開始する。先ずCPU51は、ACT11としてカウンタNを“0”にリセットする。次いでCPU51は、ACT12としてカウンタNを“1”だけカウントアップする。そしてCPU51は、ACT13としてカウンタNが加工処理テーブル70におけるテーブル番号の最大値“6”を超えたか否かを確認する。 When the data extension process begins in ACT 6 of Figure 5, the CPU 51 starts information processing according to the procedure shown in the flowchart of Figure 6. First, in ACT 11, the CPU 51 resets the counter N to "0". Next, in ACT 12, the CPU 51 counts up the counter N by "1". Then, in ACT 13, the CPU 51 checks whether the counter N has exceeded the maximum value of "6", the table number in the processing table 70.
カウンタNがテーブル番号の最大値“6”を超えていない場合、CPU51は、ACT14へと進む。CPU51は、加工部44としての機能によりACT14乃至ACT17の処理を実行する。すなわちCPU51は、ACT14として加工処理テーブル70のテーブル番号Nに設定されている加工コードで識別される加工処理を選択する。テーブル番号Nの“N”は、カウンタNの値である。現時点では、カウンタNは“1”である。したがってCPU51は、加工処理「回転」を選択する。 If the counter N does not exceed the maximum value of the table number "6", the CPU 51 proceeds to ACT 14. The CPU 51 executes the processes of ACT 14 to ACT 17 by functioning as the processing unit 44. That is, in ACT 14, the CPU 51 selects a processing operation identified by the processing code set in the table number N of the processing operation table 70. The "N" in the table number N is the value of the counter N. At this time, the counter N is "1". Therefore, the CPU 51 selects the processing operation "rotation".
加工処理を選択した後、CPU51は、ACT15としてその加工処理の処理度合いを決定する。現時点では加工処理「回転」が選択されている。加工処理「回転」の処理度合いは、画像の回転角度である。データ拡張処理の回数に応じて、異なる回転角度が設定されている。現時点は1回目のデータ拡張処理なので、CPU51は、1回目に応じた回転角度を処理度合いとして決定する。因みに、図5のACT9において再学習の必要ありと判定され、2回目以降のデータ拡張処理が実行される場合には、CPU51は、各回に応じた回転角度を処理度合いとして決定する。 After selecting a processing operation, the CPU 51 determines the processing level for that processing operation in ACT 15. Currently, the processing operation "rotation" is selected. The processing level for the processing operation "rotation" is the rotation angle of the image. Different rotation angles are set depending on the number of times the data extension process has been performed. Since the first data extension process is currently being performed, the CPU 51 determines the rotation angle corresponding to the first time as the processing level. Incidentally, if it is determined in ACT 9 of Figure 5 that re-learning is necessary and the data extension process is to be performed for the second or subsequent time, the CPU 51 determines the rotation angle corresponding to each time as the processing level.
加工処理の処理度合いを決定したならば、CPU51は、ACT16へと進む。CPU51は、ACT16として学習データセットから1つの学習データを抽出する。そしてCPU51は、ACT17として抽出した学習データの入力データに対し、ACT14の処理で選択した加工処理を、ACT15の処理で決定した処理度合いで実行する。 Once the processing level of the processing has been determined, the CPU 51 proceeds to ACT 16. In ACT 16, the CPU 51 extracts one piece of learning data from the learning dataset. Then, in ACT 17, the CPU 51 performs the processing selected in the processing of ACT 14 on the input data of the extracted learning data at the processing level determined in the processing of ACT 15.
図8は、加工部44の概要を説明するために用いる画像の一例を示す図である。同図において、画像80は、加工前の値引シールの画像を示す。この画像80に対し、加工処理「回転」を決定された処理度合いで実行すると、例えば画像81が生成される。 Figure 8 shows an example of an image used to explain the overview of the processing unit 44. In the figure, image 80 shows an image of a discount sticker before processing. When the processing process "rotation" is performed on this image 80 at a determined processing level, for example, image 81 is generated.
加工処理を終えると、CPU51は、決定部45としての機能によりACT18乃至ACT24の処理を実行する。すなわちCPU51は、ACT18として加工処理が認識に必要な情報の欠落が発生するタイプ、すなわち欠落タイプの処理であるか否かを確認する。テーブル番号Nに対応した欠落タイプフラグが“0”の場合、加工処理は欠落タイプではない。テーブル番号Nに対応した欠落タイプフラグが“1”の場合、加工処理は欠落タイプである。 Once the processing is complete, the CPU 51 executes the processing in ACT 18 to ACT 24 by functioning as the determination unit 45. That is, in ACT 18, the CPU 51 checks whether the processing is of a type that causes a loss of information necessary for recognition, i.e., whether it is a loss-type processing. If the loss-type flag corresponding to table number N is "0", the processing is not a loss-type processing. If the loss-type flag corresponding to table number N is "1", the processing is a loss-type processing.
加工処理「回転」は、欠落タイプではない。CPU51は、ACT19へと進む。CPU51は、ACT19として加工後の画像81を入力データとする学習データの正解ラベルを、加工前の画像80を入力データとする学習データの正解ラベルの値とする。例えば、画像80を入力データとする学習データの場合、正解ラベルは「30円引き」なので、画像81を入力データとする学習データの正解ラベルは「30円引き」となる。 The processing "rotation" is not of the missing type. The CPU 51 proceeds to ACT 19. In ACT 19, the CPU 51 sets the correct label of the training data in which the processed image 81 is input data to the value of the correct label of the training data in which the unprocessed image 80 is input data. For example, in the case of the training data in which the input data is image 80, the correct label is "30 yen off", so the correct label of the training data in which the input data is image 81 is "30 yen off".
ACT19の処理を終えたCPU51は、ACT23へと進む。CPU51は、ACT23として加工処理によって拡張された学習データを学習データセットに追加する。すなわちCPU51は、画像81を入力データとし正解ラベルを「30円引き」とする拡張学習データを学習データセットに追加する。 After completing the processing in ACT 19, the CPU 51 proceeds to ACT 23. In ACT 23, the CPU 51 adds the training data expanded by the processing process to the training dataset. That is, the CPU 51 adds expanded training data, which uses image 81 as input data and has the correct label "30 yen discount," to the training dataset.
CPU51は、ACT24として学習データセットから未処理の学習データを抽出し終えたか否かを確認する。未処理の学習データとは、ACT1の処理で取得した学習データセットを構成する学習データのうち、ACT16の処理で抽出されていない学習データである。以下では、ACT1の処理で取得した学習データセットを、ACT23の処理で追加された拡張学習データと識別するために素の学習データと称する。 In ACT 24, the CPU 51 checks whether or not it has finished extracting unprocessed learning data from the learning dataset. Unprocessed learning data is learning data that constitutes the learning dataset acquired in the processing of ACT 1 and that has not been extracted in the processing of ACT 16. Hereinafter, the learning dataset acquired in the processing of ACT 1 will be referred to as raw learning data to distinguish it from the extended learning data added in the processing of ACT 23.
素の学習データのうち未処理の学習データが存在する場合、CPU51は、ACT16に戻る。CPU51は、学習データセットから未処理の学習データを抽出する。そしてCPU51は、その学習データの入力データに対して加工処理「回転」を、決定された回転角度で実行し、加工後の入力データと正解ラベルとを組み合わせた拡張学習データを学習データセットに追加する。 If unprocessed learning data exists among the raw learning data, the CPU 51 returns to ACT 16. The CPU 51 extracts the unprocessed learning data from the learning dataset. The CPU 51 then performs the "rotation" processing on the input data of that learning data at the determined rotation angle, and adds expanded learning data that combines the processed input data with the correct label to the learning dataset.
以後、CPU51は、未処理の学習データの入力データに対してそれぞれ加工処理「回転」を、決定された回転角度で実行し、加工後の入力データと正解ラベルとを組み合わせた拡張学習データを学習データセットに追加する処理を繰り返す。 The CPU 51 then performs the "rotation" processing process on each piece of unprocessed training data input data at the determined rotation angle, and repeats the process of adding expanded training data that combines the processed input data with the correct label to the training dataset.
こうして、全ての素の学習データについてACT16以降の処理を実行し終えたならば、CPU51は、ACT12へと戻る。CPU51は、カウンタNを“1”だけカウントアップする。その結果、カウンタNは“2”となるので、CPU51は、ACT14へと進む。すなわちCPU51は、加工処理「遮蔽」を選択する。また、CPU51は、加工処理「遮蔽」の処理度合いとして、遮蔽部材の形状と遮蔽する画像の位置を決定する。加工処理「遮蔽」の処理度合いもデータ拡張処理の回数に応じて設定されている。現時点は1回目のデータ拡張処理なので、CPU51は、1回目に応じた遮蔽部材の形状と遮蔽する画像の位置を処理度合いとして決定する。因みに、図5のACT9において再学習の必要ありと判定され、2回目以降のデータ拡張処理が実行される場合には、CPU51は、各回に応じた遮蔽部材の形状と遮蔽する画像の位置を処理度合いとして決定する。 Once the CPU 51 has completed the processing of ACT 16 and subsequent steps for all raw learning data, it returns to ACT 12. The CPU 51 increments the counter N by 1. As a result, the counter N becomes 2, and the CPU 51 proceeds to ACT 14. That is, the CPU 51 selects the "shielding" processing. The CPU 51 also determines the shape of the shielding member and the position of the image to be shied as the processing level for the "shielding" processing. The processing level for the "shielding" processing is also set according to the number of times the data expansion processing has been performed. Since the current data expansion processing is the first time, the CPU 51 determines the shape of the shielding member and the position of the image to be shied that correspond to the first time as the processing level. Incidentally, if it is determined in ACT 9 of Figure 5 that re-learning is necessary and the data expansion processing is to be performed for the second or subsequent time, the CPU 51 determines the shape of the shielding member and the position of the image to be shied that correspond to each time as the processing level.
加工処理「遮蔽」を選択し、その処理度合いを決定したならば、CPU51は、学習データセットにセットされている素の学習データを順次抽出する。そしてCPU51は、抽出した学習データの入力データに対して加工処理「遮蔽」を、決定された処理度合いで実行する。 Once the "masking" processing is selected and the processing level is determined, the CPU 51 sequentially extracts the raw learning data set from the learning dataset. The CPU 51 then performs the "masking" processing on the input data of the extracted learning data at the determined processing level.
図8において、加工前の値引シールの画像80に対し、加工処理「遮蔽」を決定された処理度合いで実行すると、例えば画像82が生成される。 In Figure 8, when the "masking" processing is performed on the unprocessed discount sticker image 80 at the determined processing level, image 82, for example, is generated.
加工処理を終えると、CPU51は、ACT18においてその加工処理が欠落タイプの処理であるか否かを確認する。加工処理「遮蔽」は欠落タイプである。よって、CPU51は、ACT18からACT20へと進む。CPU51は、ACT20として加工領域を特定する。図8における画像82の場合、加工領域は、部材によって遮蔽された領域821である。 When the processing is completed, the CPU 51 checks in ACT 18 whether the processing is a loss-type processing. The processing "obscuration" is a loss-type processing. Therefore, the CPU 51 proceeds from ACT 18 to ACT 20. In ACT 20, the CPU 51 identifies the processing area. In the case of image 82 in Figure 8, the processing area is area 821 obscured by a member.
加工領域821を特定したCPU51は、ACT21へと進む。CPU51は、ACT21として加工領域821が画像80に対する注目領域91と少なくとも一部で重なっているか否かを確認する。図8の画像例の場合、加工領域821の一部が注目領域91と重なっている。したがってCPU51は、ACT21からACT22へと進む。CPU51は、ACT22として加工後の画像82を入力データとする学習データの正解ラベルを認識不可(リジェクト)とする。 After identifying the processing area 821, the CPU 51 proceeds to ACT 21. In ACT 21, the CPU 51 checks whether the processing area 821 overlaps at least partially with the attention area 91 for the image 80. In the example image of Figure 8, a portion of the processing area 821 overlaps with the attention area 91. Therefore, the CPU 51 proceeds from ACT 21 to ACT 22. In ACT 22, the CPU 51 determines that the correct label of the learning data in which the processed image 82 is used as input data cannot be recognized (rejects).
一方、加工処理「遮蔽」の処理度合いによっては、加工領域821が画像80に対する注目領域91と重なっていない場合もあり得る。その場合には、CPU51は、ACT21からACT19へと進む。すなわちCPU51は、加工後の画像を入力データとする学習データの正解ラベルを、加工前の画像80を入力データとする学習データの正解ラベル「30円引き」とする。 On the other hand, depending on the degree of processing of the "obscuration" processing, it is possible that the processing area 821 does not overlap with the area of interest 91 for the image 80. In that case, the CPU 51 proceeds from ACT 21 to ACT 19. That is, the CPU 51 sets the correct label of the learning data in which the processed image is used as input data to "30 yen off," which is the correct label of the learning data in which the unprocessed image 80 is used as input data.
ACT19又はACT22の処理を終えると、CPU51は、ACT23へと進む。CPU51は、ACT23として加工処理によって拡張された学習データを学習データセットに追加する。すなわちCPU51は、画像82を入力データとし正解ラベルを「認識不可(リジェクト)」とする拡張学習データを学習データセットに追加する。あるいはCPU51は、加工後の画像を入力データとし正解ラベルを「30円引き」とした拡張学習データを学習データセットに追加する。 After completing the processing in ACT 19 or ACT 22, the CPU 51 proceeds to ACT 23. In ACT 23, the CPU 51 adds the training data expanded by the processing process to the training dataset. That is, the CPU 51 adds the expanded training data in which the image 82 is used as input data and the correct label is "unrecognizable (reject)" to the training dataset. Alternatively, the CPU 51 adds the expanded training data in which the processed image is used as input data and the correct label is "30 yen discount" to the training dataset.
その後、CPU51は、ACT24として学習データセットから未処理の学習データを抽出し終えたか否かを確認する。未処理の学習データが存在する場合、CPU51は、ACT16に戻る。CPU51は、学習データセットから未処理の学習データを抽出する。そしてCPU51は、その学習データの入力データに対して加工処理「遮蔽」を、決定された処理度合いで実行し、加工後の入力データと正解ラベルとを組み合わせた拡張学習データを学習データセットに追加する。すなわち、加工領域821が注目領域91に重なっていない場合には、加工後の画像を入力データとし、正解ラベル「30円引き」を組み合わせた拡張学習データを追加する。加工領域821が注目領域91の少なくとも一部と重なっている場合には、加工後の画像を入力データとし、正解ラベル「認識不可」を組み合わせた拡張学習データを追加する。 Then, in ACT 24, the CPU 51 checks whether or not the extraction of unprocessed training data from the training dataset has been completed. If unprocessed training data exists, the CPU 51 returns to ACT 16. The CPU 51 extracts unprocessed training data from the training dataset. The CPU 51 then performs the "masking" processing on the input data of the training data at the determined processing level, and adds extended training data that combines the processed input data with the correct label to the training dataset. That is, if the processing area 821 does not overlap the attention area 91, the CPU 51 uses the processed image as input data and adds extended training data that combines the correct label "30 yen off". If the processing area 821 overlaps at least a portion of the attention area 91, the CPU 51 uses the processed image as input data and adds extended training data that combines the correct label "unrecognizable".
こうして、全ての素の学習データについてACT16以降の処理を実行し終えたならば、CPU51は、ACT12へと戻る。CPU51は、カウンタNを“1”だけカウントアップする。その結果、カウンタNは“3”となるので、CPU51は、ACT14へと進む。すなわちCPU51は、加工処理「ガンマ変換」を選択する。また、CPU51は、加工処理「ガンマ変換」の処理度合いとして、γ値を決定する。加工処理「ガンマ変換」の処理度合いもデータ拡張処理の回数に応じて設定されている。現時点は1回目のデータ拡張処理なので、CPU51は、1回目に応じたγ値を処理度合いとして決定する。因みに、図5のACT9において再学習の必要ありと判定され、2回目以降のデータ拡張処理が実行される場合には、CPU51は、各回に応じたγ値を処理度合いとして決定する。 Once the processing from ACT 16 onwards has been performed on all raw learning data in this way, the CPU 51 returns to ACT 12. The CPU 51 counts up the counter N by "1". As a result, the counter N becomes "3", and the CPU 51 proceeds to ACT 14. That is, the CPU 51 selects the processing "gamma conversion". The CPU 51 also determines a gamma value as the processing level for the processing "gamma conversion". The processing level for the processing "gamma conversion" is also set according to the number of times the data extension processing has been performed. Since the current time is the first data extension processing, the CPU 51 determines the gamma value corresponding to the first time as the processing level. Incidentally, if it is determined in ACT 9 of Figure 5 that re-learning is necessary and the data extension processing is to be performed for the second or subsequent times, the CPU 51 determines the gamma value corresponding to each time as the processing level.
加工処理「ガンマ変換」を選択し、その処理度合いを決定したならば、CPU51は、学習データセットにセットされている素の学習データを順次抽出する。そしてCPU51は、抽出した学習データの入力データに対して加工処理「ガンマ変換」を、決定された処理度合いで実行する。 Once the "gamma conversion" processing is selected and the degree of processing is determined, the CPU 51 sequentially extracts the raw learning data set set in the learning dataset. The CPU 51 then performs the "gamma conversion" processing on the input data of the extracted learning data at the determined degree of processing.
図8において、加工前の値引シールの画像80に対し、加工処理「ガンマ変換」を決定された処理度合いで実行すると、例えば画像83が生成される。 In Figure 8, when the "gamma conversion" processing is performed on the unprocessed discount sticker image 80 at the determined processing level, image 83, for example, is generated.
加工処理を終えると、CPU51は、ACT18においてその加工処理が欠落タイプの処理であるか否かを確認する。加工処理「ガンマ変換」は欠落タイプでない。よって、CPU51は、加工処理「回転」の場合と同様に、加工処理、正解ラベルの決定処理及び拡張学習データの追加処理を、全ての素の学習データについて実行する。このときの拡張学習データの正解ラベルは、全て「30円引き」である。 When the processing is complete, the CPU 51 checks in ACT 18 whether the processing is a loss-type processing. The processing "gamma conversion" is not a loss-type processing. Therefore, the CPU 51 performs the processing, correct label determination process, and extended learning data addition process for all raw learning data, just as in the case of the processing "rotation." At this time, the correct label for all extended learning data is "30 yen discount."
続いて、カウンタNは“4”となるので、CPU51は、加工処理「指当て」を選択する。また、CPU51は、加工処理「指当て」の処理度合いとして、画像に当てる指の位置を決定する。加工処理「指当て」の処理度合いもデータ拡張処理の回数に応じて設定されている。現時点は1回目のデータ拡張処理なので、CPU51は、1回目に応じた指の位置を処理度合いとして決定する。因みに、図5のACT9において再学習の必要ありと判定され、2回目以降のデータ拡張処理が実行される場合には、CPU51は、各回に応じた指の位置を処理度合いとして決定する。 Next, since counter N becomes "4", CPU 51 selects the "finger placement" processing. CPU 51 also determines the position of the finger to place on the image as the processing level of the "finger placement" processing. The processing level of the "finger placement" processing is also set according to the number of times the data extension processing has been performed. Since the current data extension processing is the first time, CPU 51 determines the finger position corresponding to the first time as the processing level. Incidentally, if it is determined in ACT 9 of Figure 5 that re-learning is necessary and the data extension processing is performed for the second or subsequent time, CPU 51 determines the finger position corresponding to each time as the processing level.
加工処理「指当て」を選択し、その処理度合いを決定したならば、CPU51は、学習データセットにセットされている素の学習データを順次抽出する。そしてCPU51は、抽出した学習データの入力データに対して加工処理「指当て」を、決定された処理度合いで実行する。 Once the "finger placement" processing is selected and the processing level is determined, the CPU 51 sequentially extracts the raw learning data set from the learning dataset. The CPU 51 then performs the "finger placement" processing on the input data of the extracted learning data at the determined processing level.
図8において、加工前の値引シールの画像80に対し、加工処理「指当て」を決定された処理度合いで実行すると、例えば画像84が生成される。 In Figure 8, when the "finger touch" processing is performed on the unprocessed discount sticker image 80 at the determined processing level, image 84, for example, is generated.
加工処理を終えると、CPU51は、ACT18においてその加工処理が欠落タイプの処理であるか否かを確認する。加工処理「指当て」は欠落タイプである。よって、CPU51は、ACT20において加工領域を特定する。図8における画像84の場合、加工領域は、指を示す領域841である。 When the processing is completed, the CPU 51 checks in ACT 18 whether the processing is a missing-type processing. The processing "finger contact" is a missing-type processing. Therefore, the CPU 51 identifies the processing area in ACT 20. In the case of image 84 in Figure 8, the processing area is area 841 indicating the finger.
加工領域841を特定したCPU51は、ACT21において加工領域841が画像80に対する注目領域91と少なくとも一部で重なっているか否かを確認する。図8の画像例の場合、加工領域841の一部が注目領域91と重なっている。したがってCPU51は、ACT22において加工後の画像84を入力データとする学習データの正解ラベルを認識不可(リジェクト)とする。 After identifying the processing area 841, the CPU 51 checks in ACT 21 whether the processing area 841 overlaps at least partially with the attention area 91 for the image 80. In the example image of Figure 8, a portion of the processing area 841 overlaps with the attention area 91. Therefore, in ACT 22, the CPU 51 determines that the correct answer label of the learning data in which the processed image 84 is used as input data cannot be recognized (rejects).
一方、加工処理「指当て」の処理度合いによっては、加工領域841が画像80に対する注目領域91と重なっていない場合もあり得る。その場合には、CPU51は、ACT19において、加工後の画像を入力データとする学習データの正解ラベルを、加工前の画像80を入力データとする学習データの正解ラベル「30円引き」とする。 On the other hand, depending on the degree of processing of the "finger touch" processing, it is possible that the processing area 841 does not overlap with the attention area 91 for the image 80. In that case, in ACT 19, the CPU 51 sets the correct label of the learning data in which the processed image is used as input data to "30 yen off," which is the correct label of the learning data in which the unprocessed image 80 is used as input data.
ACT19又はACT22の処理を終えると、CPU51は、ACT23において加工処理によって拡張された学習データを学習データセットに追加する。すなわちCPU51は、画像84を入力データとし正解ラベルを「認識不可(リジェクト)」とする拡張学習データを学習データセットに追加する。あるいはCPU51は、加工後の画像を入力データとし正解ラベルを「30円引き」とした拡張学習データを学習データセットに追加する。 After completing the processing in ACT 19 or ACT 22, the CPU 51 adds the training data expanded by the processing process in ACT 23 to the training dataset. That is, the CPU 51 adds the expanded training data in which the image 84 is used as input data and the correct label is "unrecognizable (reject)" to the training dataset. Alternatively, the CPU 51 adds the expanded training data in which the processed image is used as input data and the correct label is "30 yen discount" to the training dataset.
その後、CPU51は、ACT24において学習データセットから未処理の学習データを抽出し終えたか否かを確認する。未処理の学習データが存在する場合、CPU51は、ACT16に戻る。CPU51は、学習データセットから未処理の学習データを抽出する。そしてCPU51は、その学習データの入力データに対して加工処理「指当て」を、決定された処理度合いで実行し、加工後の入力データと正解ラベルとを組み合わせた拡張学習データを学習データセットに追加する。すなわち、加工領域841が注目領域91に重なっていない場合には、加工後の画像を入力データとし、正解ラベル「30円引き」を組み合わせた拡張学習データを追加する。加工領域841が注目領域91の少なくとも一部と重なっている場合には、加工後の画像を入力データとし、正解ラベル「認識不可」を組み合わせた拡張学習データを追加する。 Then, in ACT 24, the CPU 51 checks whether or not the extraction of unprocessed learning data from the learning dataset has been completed. If unprocessed learning data exists, the CPU 51 returns to ACT 16. The CPU 51 extracts unprocessed learning data from the learning dataset. The CPU 51 then performs the "finger placement" processing on the input data of the learning data at the determined processing level, and adds extended learning data that combines the processed input data with the correct label to the learning dataset. That is, if the processing area 841 does not overlap the attention area 91, the CPU 51 uses the processed image as input data and adds extended learning data that combines the correct label "30 yen off". If the processing area 841 overlaps at least a portion of the attention area 91, the CPU 51 uses the processed image as input data and adds extended learning data that combines the correct label "unrecognizable".
こうして、全ての素の学習データについてACT16以降の処理を実行し終えたならば、CPU51は、ACT12へと戻る。CPU51は、カウンタNを“1”だけカウントアップする。その結果、カウンタNは“5”となるので、CPU51は、ACT14へと進む。すなわちCPU51は、加工処理「弱照明効果」を選択する。また、CPU51は、加工処理「弱照明効果」の処理度合いとして、画像に当てる照明の強度と位置を決定する。
加工処理「弱照明効果」の処理度合いもデータ拡張処理の回数に応じて設定されている。現時点は1回目のデータ拡張処理なので、CPU51は、1回目に応じた照明の強度と位置を処理度合いとして決定する。因みに、図5のACT9において再学習の必要ありと判定され、2回目以降のデータ拡張処理が実行される場合には、CPU51は、各回に応じた照明の強度と位置を処理度合いとして決定する。
In this way, when the processing from ACT 16 onwards has been executed for all raw learning data, the CPU 51 returns to ACT 12. The CPU 51 counts up the counter N by "1". As a result, the counter N becomes "5", so the CPU 51 proceeds to ACT 14. That is, the CPU 51 selects the processing "weak lighting effect". In addition, the CPU 51 determines the intensity and position of the lighting to be applied to the image as the processing level of the processing "weak lighting effect".
The processing level of the "weak lighting effect" processing is also set according to the number of times the data extension process has been performed. Since the first data extension process is currently being performed, the CPU 51 determines the lighting intensity and position corresponding to the first time as the processing level. Incidentally, if it is determined in ACT 9 of FIG. 5 that re-learning is necessary and the data extension process is to be performed for the second or subsequent time, the CPU 51 determines the lighting intensity and position corresponding to each time as the processing level.
加工処理「弱照明効果」を選択し、その処理度合いを決定したならば、CPU51は、学習データセットにセットされている素の学習データを順次抽出する。そしてCPU51は、抽出した学習データの入力データに対して加工処理「弱照明効果」を、決定された処理度合いで実行する。 Once the "weak lighting effect" processing is selected and the processing level is determined, the CPU 51 sequentially extracts the raw learning data set from the learning dataset. The CPU 51 then applies the "weak lighting effect" processing to the input data of the extracted learning data at the determined processing level.
図8において、加工前の値引シールの画像80に対し、加工処理「弱照明効果」を決定された処理度合いで実行すると、例えば画像85が生成される。 In Figure 8, when the "weak lighting effect" processing is performed at a determined processing level on the unprocessed discount sticker image 80, image 85, for example, is generated.
加工処理を終えると、CPU51は、ACT18においてその加工処理が欠落タイプの処理であるか否かを確認する。加工処理「弱照明効果」は欠落タイプでない。よって、CPU51は、加工処理「回転」の場合と同様に、加工処理、正解ラベルの決定処理及び拡張学習データの追加処理を、全ての素の学習データについて実行する。このときの拡張学習データの正解ラベルは、全て「30円引き」である。 When the processing is complete, the CPU 51 checks in ACT 18 whether the processing is a missing type processing. The processing "weak lighting effect" is not a missing type processing. Therefore, the CPU 51 performs the processing, correct label determination process, and extended learning data addition process for all raw learning data, just as in the case of the processing "rotation." At this time, the correct label for all extended learning data is "30 yen discount."
続いて、カウンタNは“6”となるので、CPU51は、加工処理「強照明効果」を選択する。また、CPU51は、加工処理「強照明効果」の処理度合いとして、画像に当てる照明の強度と位置を決定する。加工処理「強照明効果」の処理度合いもデータ拡張処理の回数に応じて設定されている。現時点は1回目のデータ拡張処理なので、CPU51は、1回目に応じた照明の強度と位置を処理度合いとして決定する。因みに、図5のACT9において再学習の必要ありと判定され、2回目以降のデータ拡張処理が実行される場合には、CPU51は、各回に応じた照明の強度と位置を処理度合いとして決定する。 Next, since counter N becomes "6", CPU 51 selects the "strong lighting effect" processing. CPU 51 also determines the intensity and position of the lighting to be applied to the image as the processing level for the "strong lighting effect" processing. The processing level for the "strong lighting effect" processing is also set according to the number of times the data extension processing has been performed. Since the first data extension processing is currently being performed, CPU 51 determines the lighting intensity and position corresponding to the first time as the processing level. Incidentally, if it is determined in ACT 9 of Figure 5 that re-learning is necessary and the data extension processing is to be performed for the second or subsequent time, CPU 51 determines the lighting intensity and position corresponding to each time as the processing level.
加工処理「強照明効果」を選択し、その処理度合いを決定したならば、CPU51は、学習データセットにセットされている素の学習データを順次抽出する。そしてCPU51は、抽出した学習データの入力データに対して加工処理「強照明効果」を、決定された処理度合いで実行する。 Once the "strong lighting effect" processing is selected and the processing level is determined, the CPU 51 sequentially extracts the raw learning data set from the learning dataset. The CPU 51 then applies the "strong lighting effect" processing to the input data of the extracted learning data at the determined processing level.
図8において、加工前の値引シールの画像80に対し、加工処理「強照明効果」を決定された処理度合いで実行すると、例えば画像86が生成される。 In Figure 8, when the "strong lighting effect" processing is performed at a determined processing level on the unprocessed discount sticker image 80, image 86, for example, is generated.
加工処理を終えると、CPU51は、ACT18においてその加工処理が欠落タイプの処理であるか否かを確認する。加工処理「強照明効果」は欠落タイプである。よって、CPU51は、ACT20において加工領域を特定する。図8における画像86の場合、加工領域は、白飛びが生じている領域861である。 When the processing is complete, the CPU 51 checks in ACT 18 whether the processing is a loss-type processing. The processing "Strong Lighting Effect" is a loss-type processing. Therefore, the CPU 51 identifies the processing area in ACT 20. In the case of image 86 in Figure 8, the processing area is area 861 where blown-out highlights occur.
加工領域861を特定したCPU51は、ACT21において加工領域861が画像80に対する注目領域91と少なくとも一部で重なっているか否かを確認する。図8の画像例の場合、加工領域861の一部が注目領域91と重なっている。したがってCPU51は、ACT22において加工後の画像86を入力データとする学習データの正解ラベルを認識不可(リジェクト)とする。 After identifying the processing area 861, the CPU 51 checks in ACT 21 whether the processing area 861 overlaps at least partially with the attention area 91 for the image 80. In the example image of Figure 8, a portion of the processing area 861 overlaps with the attention area 91. Therefore, in ACT 22, the CPU 51 determines that the correct answer label of the learning data in which the processed image 86 is used as input data cannot be recognized (rejects).
一方、加工処理「強照明効果」の処理度合いによっては、加工領域861が画像80に対する注目領域91と重なっていない場合もあり得る。その場合には、CPU51は、ACT19において、加工後の画像を入力データとする学習データの正解ラベルを、加工前の画像80を入力データとする学習データの正解ラベル「30円引き」とする。 On the other hand, depending on the degree of processing of the "strong lighting effect" processing, it is possible that the processing area 861 does not overlap with the area of interest 91 for the image 80. In that case, in ACT 19, the CPU 51 sets the correct label of the learning data in which the processed image is used as input data to "30 yen off," which is the correct label of the learning data in which the unprocessed image 80 is used as input data.
ACT19又はACT22の処理を終えると、CPU51は、ACT23において加工処理によって拡張された学習データを学習データセットに追加する。すなわちCPU51は、画像86を入力データとし正解ラベルを「認識不可(リジェクト)」とする拡張学習データを学習データセットに追加する。あるいはCPU51は、加工後の画像を入力データとし正解ラベルを「30円引き」とした拡張学習データを学習データセットに追加する。 After completing the processing in ACT 19 or ACT 22, the CPU 51 adds the training data expanded by the processing process in ACT 23 to the training dataset. That is, the CPU 51 adds expanded training data in which image 86 is used as input data and the correct label is "unrecognizable (reject)" to the training dataset. Alternatively, the CPU 51 adds expanded training data in which the processed image is used as input data and the correct label is "30 yen discount" to the training dataset.
その後、CPU51は、ACT24において学習データセットから未処理の学習データを抽出し終えたか否かを確認する。未処理の学習データが存在する場合、CPU51は、ACT16に戻る。CPU51は、学習データセットから未処理の学習データを抽出する。そしてCPU51は、その学習データの入力データに対して加工処理「強照明効果」を、決定された処理度合いで実行し、加工後の入力データと正解ラベルとを組み合わせた拡張学習データを学習データセットに追加する。すなわち、加工領域861が注目領域91に重なっていない場合には、加工後の画像を入力データとし、正解ラベル「30円引き」を組み合わせた拡張学習データを追加する。加工領域861が注目領域91の少なくとも一部と重なっている場合には、加工後の画像を入力データとし、正解ラベル「認識不可」を組み合わせた拡張学習データを追加する。 Then, in ACT 24, the CPU 51 checks whether or not the extraction of unprocessed learning data from the learning dataset has been completed. If unprocessed learning data exists, the CPU 51 returns to ACT 16. The CPU 51 extracts unprocessed learning data from the learning dataset. The CPU 51 then performs the "strong lighting effect" processing on the input data of the learning data at the determined processing level, and adds extended learning data that combines the processed input data with the correct label to the learning dataset. That is, if the processing area 861 does not overlap the attention area 91, the CPU 51 uses the processed image as input data and adds extended learning data that combines the correct label "30 yen off". If the processing area 861 overlaps at least a portion of the attention area 91, the CPU 51 uses the processed image as input data and adds extended learning data that combines the correct label "unrecognizable".
こうして、全ての素の学習データについてACT16以降の処理を実行し終えたならば、CPU51は、ACT12へと戻る。CPU51は、カウンタNを“1”だけカウントアップする。その結果、カウンタNは“7”となるので、CPU51は、データ拡張処理を終了する。 Once the processing from ACT 16 onwards has been performed for all raw learning data, the CPU 51 returns to ACT 12. The CPU 51 counts up the counter N by "1". As a result, the counter N becomes "7", and the CPU 51 ends the data extension processing.
以上のように、本実施形態における学習装置40は、複数の学習データの集合体である学習データセットから、各学習データの入力データをそれぞれ加工して拡張学習データを得、学習データセットに追加する。かくして学習装置40は、想定される様々なパターンを網羅した多数の入力データとその入力データに対する正解ラベルとを組み合わせた大量の学習データで、機械学習モデル30を学習させることができる。 As described above, the learning device 40 in this embodiment processes the input data of each learning data set, which is a collection of multiple learning data sets, to obtain extended learning data and add it to the learning data set. In this way, the learning device 40 can train the machine learning model 30 with a large amount of learning data that combines a large number of input data sets that cover a variety of expected patterns and correct labels for those input data sets.
しかも学習装置40は、加工前の学習データを入力した機械学習モデル30が当該学習データの正解ラベルで示される結果を得る際に当該学習データの入力データに対して注目した注目領域を特定し、その学習データの入力データを加工した際の加工領域の少なくとも一部が注目領域と重なっている場合には、拡張学習データの正解ラベルを、素の学習データの正解ラベルではなく、例えば「認識不可(リジェクト)」という正解ラベルに変更する。入力データに対する加工処理によっては、機械学習モデル30が認識結果を得る際に注目する領域まで加工されたために、実際には入力データから正解ラベルの結果が得られない場合がある。このような場合、本実施形態では、認識結果が「認識不可(リジェクト)」となるので、誤認識にはならない。よって、拡張学習データで学習することで機械学習モデル30の精度が低下するのを防ぐことができる。 Furthermore, the learning device 40 identifies a region of interest that was focused on in the input data of the training data when the machine learning model 30, which received input training data before processing, obtained a result indicated by the correct label of the training data. If at least a portion of the processed region when the input data of the training data was processed overlaps with the region of interest, the learning device 40 changes the correct label of the extended training data to a correct label such as "unrecognizable (reject)" instead of the correct label of the raw training data. Depending on the processing performed on the input data, even the region of interest that the machine learning model 30 focused on when obtaining the recognition result may have been processed, making it impossible to actually obtain a correct label from the input data. In such cases, in this embodiment, the recognition result is "unrecognizable (reject)," so no erroneous recognition occurs. Therefore, learning with the extended training data can prevent a decrease in the accuracy of the machine learning model 30.
ところで、本実施形態では、加工処理の種類によって加工領域が注目領域に関わるタイプであるか否かを予め設定する。そして、加工領域が注目領域に係らないタイプの加工処理については、無条件で素の学習データの正解ラベルを拡張学習データの正解ラベルとしている。したがって、全ての加工処理について加工領域が注目領域の少なくも一部と重複しているか否かを判定する処理を実行する場合と比較して、CPU51の処理負荷を軽減できる効果を奏し得る。 In this embodiment, whether or not the processing area is related to the area of interest is set in advance depending on the type of processing. For processing operations in which the processing area is not related to the area of interest, the correct label of the raw learning data is unconditionally used as the correct label of the extended learning data. Therefore, compared to executing a process to determine whether the processing area overlaps with at least a portion of the area of interest for all processing operations, this can effectively reduce the processing load on the CPU 51.
以上、学習装置及びそのプログラムの一実施形態について説明したが、この実施形態は、例として提示したものであり、発明の範囲を限定することを意図してはいない。 The above describes one embodiment of a learning device and its program, but this embodiment is presented as an example and is not intended to limit the scope of the invention.
例えば前記実施形態では、値引シール6の画像認識に利用される機械学習モデル30を学習させる学習装置40を示したが、認識対象となる画像は値引シール6の画像に限定されない。例えば商品登録システム100に関しても、バーコードの画像認識、あるいは商品の画像認識に対する機械学習モデル30の学習装置であってもよい。また、音声認識に利用される機械学習モデルを学習させる学習装置、あるいは文字認識に利用される機械学習モデルを学習させる学習装置等に対しても、同様に適用することが可能である。 For example, in the above embodiment, a learning device 40 was shown that trains a machine learning model 30 used for image recognition of discount labels 6, but the images to be recognized are not limited to images of discount labels 6. For example, the product registration system 100 may also be a learning device for a machine learning model 30 for image recognition of barcodes or image recognition of products. It can also be similarly applied to a learning device that trains a machine learning model used for voice recognition, or a learning device that trains a machine learning model used for character recognition.
これら新規な実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。これら実施形態及びその変形は、発明の範囲に含まれるとともに、特許請求の範囲に記載された発明とその均等の範囲に含まれる。 These novel embodiments may be embodied in a variety of other forms, and various omissions, substitutions, and modifications may be made without departing from the spirit of the invention. These embodiments and their variations are included within the scope of the invention, as well as within the scope of the inventions and their equivalents as set forth in the claims.
1…スキャナ、2…画像処理装置、3…POS端末、4…商品、5…バーコード、6…値引シール、11…画像記憶部、12…バーコード認識部、13…値引シール認識部、14…認識結果出力部、20…推論装置、21…画像取得部、22…画像切出部、23…認識処理部、30…機械学習モデル、40…学習装置、41…取得部、42…入力部、43…特定部、44…加工部、45…決定部、51…CPU、52…GPU、53…ROM、54…RAM、55…補助記憶デバイス、56…デバイスインターフェース、57…通信インターフェース、58…システム伝送路、59…入力デバイス、60…表示デバイス、70…加工処理テーブル、80,81,82,83,84,85,86,90…画像、821,841,861…加工領域、91…注目領域。 1...Scanner, 2...Image processing device, 3...POS terminal, 4...Product, 5...Barcode, 6...Discount sticker, 11...Image storage unit, 12...Barcode recognition unit, 13...Discount sticker recognition unit, 14...Recognition result output unit, 20...Inference device, 21...Image acquisition unit, 22...Image extraction unit, 23...Recognition processing unit, 30...Machine learning model, 40...Learning device, 41...Acquisition unit, 42...Input unit, 43...Identification unit, 44...Processing unit, 45...Determination unit, 51...CPU, 52...GPU, 53...ROM, 54...RAM, 55...Auxiliary storage device, 56...Device interface, 57...Communication interface, 58...System transmission path, 59...Input device, 60...Display device, 70...Processing processing table, 80, 81, 82, 83, 84, 85, 86, 90...Image, 821, 841, 861...Processing area, 91...Area of interest.
Claims (6)
前記学習データを前記機械学習モデルに入力する入力手段と、
前記学習データを入力した前記機械学習モデルが当該学習データの正解ラベルで示される結果を得る際に当該学習データの入力データに対して注目した注目領域を特定する特定手段と、
前記学習データにおける前記入力データを加工する加工手段と、
前記加工手段による前記入力データの加工領域と前記特定手段により特定された注目領域とに基づいて当該入力データが加工された前記学習データの正解ラベルを決定する決定手段と、
を具備する学習装置。 A learning device that trains a machine learning model using training data that combines input data and a correct answer label that indicates an expected result for the input data,
an input means for inputting the learning data into the machine learning model;
an identification means for identifying an area of interest that is focused on the input data of the learning data when the machine learning model, to which the learning data is input, obtains a result indicated by the correct label of the learning data;
processing means for processing the input data in the learning data;
a determining means for determining a correct label of the learning data obtained by processing the input data based on the processing area of the input data processed by the processing means and the attention area identified by the identifying means;
A learning device comprising:
前記複数種類の加工処理毎に、加工領域が前記注目領域に関わるタイプであるか否かを設定する設定手段、
をさらに具備し、
前記決定手段は、前記加工領域が前記注目領域に関わるタイプの加工処理が施された前記入力データにおける学習データの正解ラベルを決定する、請求項1乃至4のうちいずれか一記載の学習装置。 the processing means processes the input data using a plurality of types of processing;
a setting means for setting, for each of the plurality of types of processing, whether or not the processing area is a type related to the area of interest;
Further comprising:
5. The learning device according to claim 1, wherein the determining means determines a correct label of learning data in the input data that has been subjected to a type of processing in which the processing region relates to the region of interest.
前記学習データを前記機械学習モデルに入力する入力手段、
前記学習データを入力した前記機械学習モデルが当該学習データの正解ラベルで示される結果を得る際に当該学習データの入力データに対して注目した注目領域を特定する特定手段、
前記学習データにおける前記入力データを加工する加工手段、及び、
前記加工手段による前記入力データの加工領域と前記特定手段により特定された注目領域とに基づいて当該入力データが加工された前記学習データの正解ラベルを決定する決定手段、
として機能させるためのプログラム。
A computer of a learning device that trains a machine learning model using training data that combines input data and correct labels that indicate expected results for the input data,
an input means for inputting the training data into the machine learning model;
an identification means for identifying an area of interest that is focused on the input data of the learning data when the machine learning model to which the learning data is input obtains a result indicated by the correct label of the learning data;
processing means for processing the input data in the training data; and
a determination means for determining a correct label of the learning data obtained by processing the input data based on the processing area of the input data processed by the processing means and the attention area identified by the identification means;
A program to function as a
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2022122621A JP7793492B2 (en) | 2022-08-01 | 2022-08-01 | Learning devices and programs |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2022122621A JP7793492B2 (en) | 2022-08-01 | 2022-08-01 | Learning devices and programs |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2024019876A JP2024019876A (en) | 2024-02-14 |
| JP7793492B2 true JP7793492B2 (en) | 2026-01-05 |
Family
ID=89853896
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2022122621A Active JP7793492B2 (en) | 2022-08-01 | 2022-08-01 | Learning devices and programs |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7793492B2 (en) |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20210225001A1 (en) | 2020-01-22 | 2021-07-22 | Fujitsu Limited | Image processing apparatus, image processing method, and storage medium |
-
2022
- 2022-08-01 JP JP2022122621A patent/JP7793492B2/en active Active
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20210225001A1 (en) | 2020-01-22 | 2021-07-22 | Fujitsu Limited | Image processing apparatus, image processing method, and storage medium |
| JP2021117548A (en) | 2020-01-22 | 2021-08-10 | 富士通株式会社 | Image processing apparatus, image processing method and image processing program |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2024019876A (en) | 2024-02-14 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US9904873B2 (en) | Extracting card data with card models | |
| CN110163096B (en) | Person identification method, person identification device, electronic equipment and computer readable medium | |
| US20200193241A1 (en) | Surgical instrument detection system and computer program | |
| CN112990205B (en) | Method and device for generating handwritten character sample, electronic equipment and storage medium | |
| CN111680546A (en) | Attention detection method, attention detection device, electronic equipment and storage medium | |
| CN112541394A (en) | Black eye and rhinitis identification method, system and computer medium | |
| JP2019220014A (en) | Image analysis device, image analysis method, and program | |
| CN111656397A (en) | Reading system, reading method and storage medium | |
| US20210342876A1 (en) | Registration system, registration method, and non-transitory storage medium | |
| CN112801067B (en) | Method for detecting iris light spot and computing equipment | |
| CN110414522A (en) | A kind of character identifying method and device | |
| JP7793492B2 (en) | Learning devices and programs | |
| JP2023015768A (en) | Model evaluation method and model evaluation system | |
| CN115359490B (en) | Text orientation recognition methods, devices, equipment and storage media | |
| US12073642B2 (en) | Object detection using neural networks | |
| US11562561B2 (en) | Object verification/recognition with limited input | |
| CN113474786B (en) | Electronic purchase order identification method, device and terminal equipment | |
| JP7355111B2 (en) | Learning data generation device, learning data generation method, and program | |
| US12118808B2 (en) | Image generation method, computing device, and storage medium | |
| US12079793B2 (en) | Registration apparatus, registration method, and non-transitory storage medium | |
| JP7647496B2 (en) | Information processing device, image display method, and image display program | |
| JP7847793B2 (en) | Information processing system | |
| CN114529777A (en) | Training method, device and equipment for commodity feature recognition model | |
| Zlobin et al. | Lightweight neural network-based pipeline for barcode image preprocessing. Computer Optics 2025; 49 (6): 1071-1080. DOI: 10.18287/COJ1759 | |
| US20200394637A1 (en) | Registration apparatus, registration method, and non-transitory storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| RD02 | Notification of acceptance of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7422 Effective date: 20230104 |
|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20241217 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20251113 |
|
| 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: 20251118 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20251217 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7793492 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |