JP2024006730A - Learning device and learning method - Google Patents

Learning device and learning method Download PDF

Info

Publication number
JP2024006730A
JP2024006730A JP2022107900A JP2022107900A JP2024006730A JP 2024006730 A JP2024006730 A JP 2024006730A JP 2022107900 A JP2022107900 A JP 2022107900A JP 2022107900 A JP2022107900 A JP 2022107900A JP 2024006730 A JP2024006730 A JP 2024006730A
Authority
JP
Japan
Prior art keywords
image
domain
image data
region
arithmetic circuit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2022107900A
Other languages
Japanese (ja)
Inventor
譲 中村
Yuzuru Nakamura
育規 石井
Yasunori Ishii
悠樹 丸山
Yuki Maruyama
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.)
Panasonic Intellectual Property Management Co Ltd
Original Assignee
Panasonic Intellectual Property Management Co Ltd
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 Panasonic Intellectual Property Management Co Ltd filed Critical Panasonic Intellectual Property Management Co Ltd
Priority to JP2022107900A priority Critical patent/JP2024006730A/en
Publication of JP2024006730A publication Critical patent/JP2024006730A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a learning device and the like of a machine learning model capable of precisely recognizing images.
SOLUTION: The learning device includes an arithmetic circuit that controls machine learning an image recognition model for recognizing images of an object. The arithmetic circuit extracts a partial region that represents an object region candidate from an image that is included in at least one of first domains that include a first image having correct answer information representing the object area associated with the location of the object and has predetermined properties and a second domain that includes a second image and has properties different from those of the first domain. When a partial region is extracted from the image of the first domain, a piece of composite image data is generated by superimposing the partial region from the first image on the second image. When a partial region is extracted from the image in the second domain, a piece of synthesized image data is generated by superimposing the partial region from the second image on the first image. Based on synthesized image data and correct answer information, the parameters included in the image recognition model are updated through the machine learning.
SELECTED DRAWING: Figure 4
COPYRIGHT: (C)2024,JPO&INPIT

Description

本開示は、ニューラルネットワーク等から構成される機械学習モデルの学習装置、及び学習方法に関する。 The present disclosure relates to a learning device and a learning method for a machine learning model that includes a neural network or the like.

ニューラルネットワークなどを用いた機械学習モデルは、学習データの統計的な分布、即ち学習データのドメインに適合するように学習される。このような学習済みモデルを、例えば実環境での運用時に学習時とは異なるドメインのデータに適用すると、当該モデルによる画像認識などの各種タスクでの性能が、学習時よりも低下するドメインシフト問題が知られている。例えば画像認識を行う機械学習モデルでは、学習時と運用時とにおいて、可視光カメラと赤外線(IR)カメラ、コンピュータグラフィックス(CG)画像と実写画像、日中と夜間、または晴天と悪天候など画像データのドメインが異なる場合がある。 A machine learning model using a neural network or the like is trained to match the statistical distribution of learning data, that is, the domain of the learning data. For example, when such a trained model is applied to data in a domain different from that during training during operation in a real environment, the domain shift problem occurs where the performance of the model in various tasks such as image recognition is lower than during training. It has been known. For example, a machine learning model that performs image recognition uses visible light cameras and infrared (IR) cameras, computer graphics (CG) images and live-action images, daytime and nighttime images, and clear and bad weather images during training and during operation. The data may be in different domains.

このように、画像認識の例では、画像の撮影デバイス、画像データの生成方法、撮影時間帯または天候といった各種の条件が異なることで、ドメインシフト問題が生じ得る。こうしたドメインシフト問題に対処するため、機械学習モデルを適用するデータのドメイン(即ちターゲットドメイン)が学習データのドメイン(即ちソースドメイン)とは異なる場合にも性能低下を抑え、精度良く運用するためのドメイン適応の技術がある。ドメイン適応は、異なるドメイン間で知識を転移する転移学習の一形態とも考えられる。 As described above, in the example of image recognition, a domain shift problem may occur due to differences in various conditions such as the image capturing device, the image data generation method, the capturing time period, or the weather. In order to deal with this domain shift problem, we have developed a system to suppress performance degradation and operate with high accuracy even when the domain of data to which a machine learning model is applied (i.e., target domain) is different from the domain of training data (i.e., source domain). There are techniques for domain adaptation. Domain adaptation can also be considered a form of transfer learning, which transfers knowledge between different domains.

例えば特許文献1は、車載カメラで撮影された前方の画像(第1のドメインのデータ)において、画像に映っている物体の位置の推定等に用いられるニューラルネットワークの学習データを生成する学習装置を開示している。特許文献1の学習装置は、CG画像(第2のドメインのデータ)を第1のドメインのデータに類似するように変換するための第2のニューラルネットワークを学習する。こうした画像変換を行う第2のニューラルネットワークにより、自動で大量に生成可能なCG画像から、第1のドメインのデータでの推定に用いるニューラルネットワークの汎化性能の向上に適した学習データが生成される。 For example, Patent Document 1 discloses a learning device that generates learning data for a neural network used for estimating the position of an object shown in the image, etc. in a front image (first domain data) taken with an on-vehicle camera. Disclosed. The learning device of Patent Document 1 learns a second neural network for converting a CG image (second domain data) to resemble first domain data. The second neural network that performs such image conversion generates learning data suitable for improving the generalization performance of the neural network used for estimation using the first domain data from CG images that can be automatically generated in large quantities. Ru.

また、非特許文献1は、画像上で物体検出を行う物体検出モデルを正解ラベルが付されたソースドメインの画像で学習後、ソースドメインの画像と、正解ラベルが無いターゲットドメインの画像とを用いて、ターゲットドメインに適応させる手法を開示する。正解ラベルは、ソースドメインの画像における検出対象の物体のカテゴリ及び当該物体を囲む検出枠の座標を示す教師情報である。 In addition, Non-Patent Document 1 discloses that after learning an object detection model that detects objects on images using source domain images with correct labels, the source domain images and target domain images without correct labels are used. We will disclose a method to adapt it to the target domain. The correct label is teacher information indicating the category of the object to be detected in the source domain image and the coordinates of the detection frame surrounding the object.

非特許文献1の手法は、ソース及びターゲットの各ドメインの画像から、それぞれランダムに切り抜いたクロップ画像を連結することで、両ドメインのクロップ画像がコラージュ状に連結された画像データを生成する。そして、連結された画像データを用いた学習により、ソースドメインで学習した物体検出モデル等のニューラルネットワークが更新される。このように各ドメインの画像を連結するデータ拡張によれば、ニューラルネットワークによる画像からの特徴抽出において、ソース及びターゲットのドメイン間で不変性を有する、即ちドメインの相違に依存しにくい特徴表現を獲得するための学習が期待される。非特許文献1の手法は、こうしたドメイン不変表現の獲得等を通して、ドメインシフト問題への対処を図っている。 The method disclosed in Non-Patent Document 1 generates image data in which cropped images of both domains are connected in a collage form by connecting cropped images randomly cut out from images of each of the source and target domains. Then, by learning using the connected image data, a neural network such as an object detection model learned in the source domain is updated. In this way, data augmentation that connects images from each domain allows feature extraction from images using a neural network to obtain feature representations that are invariant between the source and target domains, that is, are less dependent on domain differences. Students are expected to learn to do so. The method of Non-Patent Document 1 attempts to deal with the domain shift problem through the acquisition of such domain-invariant expressions.

特開2021-110968号公報JP 2021-110968 Publication

Ramamonjison, Rindra, et al. "Simrod: A simple adaptation method for robust object detection." Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV). 2021.Ramamonjison, Rindra, et al. "Simrod: A simple adaptation method for robust object detection." Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV). 2021. Yang, Ceyuan, et al. "Instance localization for self-supervised detection pretraining." Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). 2021.Yang, Ceyuan, et al. "Instance localization for self-supervised detection pretraining." Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). 2021. Wang, Feng, et al. "CP2: Copy-Paste Contrastive Pretraining for Semantic Segmentation." arXiv preprint arXiv:2203.11709, 2022Wang, Feng, et al. "CP2: Copy-Paste Contrastive Pretraining for Semantic Segmentation." arXiv preprint arXiv:2203.11709, 2022 Ghiasi, Golnaz, et al. "Simple copy-paste is a strong data augmentation method for instance segmentation." Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). 2021.Ghiasi, Golnaz, et al. "Simple copy-paste is a strong data augmentation method for instance segmentation." Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). 2021. Uijlings, J., van de Sande, et al. "A. Selective search for object recognition". International journal of computer vision 104.2, 2013.Uijlings, J., van de Sande, et al. "A. Selective search for object recognition". International journal of computer vision 104.2, 2013.

本開示は、例えば物体検出等の画像認識を精度良く実現できる機械学習モデルの学習装置、及び学習方法を提供する。 The present disclosure provides a machine learning model learning device and a learning method that can realize image recognition such as object detection with high accuracy, for example.

本開示の一態様に係る学習装置は、画像データが示す画像において物体の画像認識を行う画像認識モデルの機械学習を制御する演算回路を備える。演算回路は、物体の位置に関連付けられた物体領域を示す正解情報を有する第1の画像を含み、かつ所定の特性を有する第1のドメインと、第2の画像を含み、かつ第1のドメインの特性とは異なる特性を有する第2のドメインとの少なくとも一方に含まれる画像から、物体領域の候補を示す部分領域を抽出する。演算回路は、第1のドメインの画像から部分領域を抽出する場合には第1の画像からの部分領域を第2の画像に重畳させて合成した画像データを生成する。演算回路は、第2のドメインの画像から部分領域を抽出する場合には第2の画像からの部分領域を前記第1の画像に重畳させて合成した画像データを生成する。演算回路は、合成した画像データ及び正解情報に基づいて、前記画像認識モデルが含むパラメータを機械学習により更新する。 A learning device according to one aspect of the present disclosure includes an arithmetic circuit that controls machine learning of an image recognition model that performs image recognition of an object in an image indicated by image data. The arithmetic circuit includes a first image having correct information indicating an object region associated with a position of the object, and a first domain having predetermined characteristics; A partial region indicating an object region candidate is extracted from an image included in at least one of the second domain and the second domain having characteristics different from the characteristics of the second domain. When extracting a partial region from the image of the first domain, the arithmetic circuit generates image data by superimposing the partial region from the first image on the second image. When extracting a partial region from the image of the second domain, the arithmetic circuit generates image data by superimposing the partial region from the second image on the first image. The arithmetic circuit updates parameters included in the image recognition model by machine learning based on the synthesized image data and correct answer information.

本開示は、方法及びコンピュータプログラム、並びにこれらの組み合わせによっても、実現可能である。 The present disclosure can also be implemented by methods and computer programs, and combinations thereof.

本開示の学習装置及び学習方法よれば、例えば特性が異なる画像間のドメインシフトに対応して、画像認識を精度良く実現可能な機械学習モデルを学習することができる。 According to the learning device and learning method of the present disclosure, it is possible to learn a machine learning model that can accurately realize image recognition in response to, for example, a domain shift between images with different characteristics.

本開示の実施形態1における学習装置によるドメイン適応の概要図A schematic diagram of domain adaptation by a learning device in Embodiment 1 of the present disclosure 実施形態1における学習装置の構成を例示するブロック図Block diagram illustrating the configuration of a learning device in Embodiment 1 実施形態1の学習装置における演算回路の機能的構成を例示するブロック図A block diagram illustrating the functional configuration of an arithmetic circuit in the learning device of Embodiment 1. 実施形態1における学習装置の動作を例示するフローチャートFlowchart illustrating the operation of the learning device in Embodiment 1 実施形態1の学習装置における学習動作を説明するための図Diagram for explaining learning operation in the learning device of Embodiment 1 実施形態1の変形例に係る学習装置における演算回路の機能的構成を例示するブロック図A block diagram illustrating a functional configuration of an arithmetic circuit in a learning device according to a modification of Embodiment 1. 実施形態2の学習装置における学習動作を説明するための図Diagram for explaining learning operation in the learning device of Embodiment 2

(本開示の態様)
本開示の第1態様に係る学習装置は、画像データが示す画像において物体の画像認識を行う画像認識モデルの機械学習を制御する演算回路を備える。前記演算回路は、物体の位置に関連付けられた物体領域を示す正解情報を有する第1の画像を含み、かつ所定の特性を有する第1のドメインと、第2の画像を含み、かつ前記第1のドメインの特性とは異なる特性を有する第2のドメインとの少なくとも一方に含まれる画像から、前記物体領域の候補を示す部分領域を抽出し、前記第1のドメインの画像から部分領域を抽出する場合には前記第1の画像からの部分領域を前記第2の画像に重畳させて合成した画像データを生成し、前記第2のドメインの画像から部分領域を抽出する場合には前記第2の画像からの部分領域を前記第1の画像に重畳させて合成した画像データを生成し、前記合成した画像データ及び正解情報に基づいて、前記画像認識モデルが含むパラメータを機械学習により更新する。
(Aspects of this disclosure)
A learning device according to a first aspect of the present disclosure includes an arithmetic circuit that controls machine learning of an image recognition model that performs image recognition of an object in an image indicated by image data. The arithmetic circuit includes a first image having correct answer information indicating an object region associated with a position of the object, and includes a first domain having predetermined characteristics, and a second image, and extracting a partial region indicating the object region candidate from an image included in at least one of a second domain having characteristics different from characteristics of the domain; and extracting a partial region from the image of the first domain. In this case, a partial region from the first image is superimposed on the second image to generate synthesized image data, and when a partial region is extracted from the image of the second domain, the partial region from the second domain is superimposed on the second image. A partial region from the image is superimposed on the first image to generate synthesized image data, and parameters included in the image recognition model are updated by machine learning based on the synthesized image data and correct answer information.

本開示の第2態様によると、第1態様に記載の学習装置において、前記第2の画像は前記正解情報を有する。 According to a second aspect of the present disclosure, in the learning device according to the first aspect, the second image has the correct answer information.

本開示の第3態様によると、第1態様に記載の学習装置において、前記第2の画像は前記正解情報を有しない。 According to a third aspect of the present disclosure, in the learning device according to the first aspect, the second image does not have the correct answer information.

本開示の第4態様によると、第1から第3態様のいずれかに記載の学習装置において、前記演算回路は、前記第1および第2のドメインの画像の各々から、前記物体領域の候補を示す部分領域を抽出し、前記第1の画像からの部分領域を前記第2の画像に重畳させて合成した画像データ、および、前記第2の画像からの部分領域を前記第1の画像に重畳させて合成した画像データに基づいて、前記画像認識モデルが含むパラメータを機械学習により更新する。 According to a fourth aspect of the present disclosure, in the learning device according to any one of the first to third aspects, the arithmetic circuit calculates the object region candidate from each of the first and second domain images. image data obtained by extracting a partial region shown in the first image and superimposing the partial region from the first image on the second image, and superimposing the partial region from the second image onto the first image. Parameters included in the image recognition model are updated by machine learning based on the image data synthesized.

本開示の第5態様によると、第1から第4態様のいずれかに記載の学習装置において、前記演算回路は、前記第1の画像における前記物体領域の正解情報に基づいて、前記第1の画像から部分領域を抽出する。 According to a fifth aspect of the present disclosure, in the learning device according to any one of the first to fourth aspects, the arithmetic circuit calculates the first image based on the correct answer information of the object region in the first image. Extract a partial region from an image.

本開示の第6態様によると、第1から第5態様のいずれかに記載の学習装置において、前記画像認識モデルは、前記第1の画像を示す画像データと、前記第1の画像における前記物体領域の正解情報とに基づいて学習されている。 According to a sixth aspect of the present disclosure, in the learning device according to any one of the first to fifth aspects, the image recognition model includes image data indicating the first image and the object in the first image. It is learned based on the correct answer information of the area.

本開示の第7態様によると、第3から第6態様のいずれかに記載の学習装置において前記演算回路は、前記第2の画像を示す画像データに基づいて前記第2の画像における物体領域の候補を推定し、前記推定した候補から選択するように、前記第2の画像からの部分領域を抽出する。 According to a seventh aspect of the present disclosure, in the learning device according to any one of the third to sixth aspects, the arithmetic circuit calculates an object area in the second image based on image data indicating the second image. A candidate is estimated, and a partial region from the second image is extracted so as to be selected from the estimated candidates.

本開示の第8態様によると、第3から第6態様のいずれかに記載の学習装置において前記演算回路は、前記第2の画像においてランダムな位置及び大きさを有する部分領域として、前記第2の画像からの部分領域を抽出する。 According to an eighth aspect of the present disclosure, in the learning device according to any one of the third to sixth aspects, the arithmetic circuit calculates the second image as a partial area having a random position and size in the second image. Extract a partial region from the image.

本開示の第9態様によると、第1から第8態様のいずれかに記載の学習装置において前記第1の画像と前記第2の画像とは、可視光画像か赤外画像かの種別、コンピュータグラフィックス画像か実写画像かの種別、各画像の撮影場所、各画像の撮影時間、または各画像の撮影条件において特性が異なる。 According to a ninth aspect of the present disclosure, in the learning device according to any one of the first to eighth aspects, the first image and the second image may be of a visible light image or an infrared image; The characteristics differ in the type of graphics image or real image, the location where each image was taken, the time each image was taken, or the conditions under which each image was taken.

本開示の第10態様によると、第3態様に記載の学習装置において前記第2のドメインは、さらに、前記正解情報を有する第3の画像を含み、前記演算回路は、前記第2のドメインの画像から部分領域を抽出する場合には、前記第3の画像からの部分領域を前記第1の画像に重畳させて合成した画像データを生成する。 According to a tenth aspect of the present disclosure, in the learning device according to the third aspect, the second domain further includes a third image having the correct answer information, and the arithmetic circuit is configured to control the learning device in the second domain. When extracting a partial region from an image, the partial region from the third image is superimposed on the first image to generate combined image data.

本開示の第11態様によると、第3態様に記載の学習装置において前記第2のドメインは、さらに、前記正解情報を有する第3の画像を含み、前記演算回路は、前記第1のドメインの画像から部分領域を抽出する場合には、前記第1の画像からの部分領域を前記第3の画像に重畳させて合成した画像データを生成する According to an eleventh aspect of the present disclosure, in the learning device according to the third aspect, the second domain further includes a third image having the correct answer information, and the arithmetic circuit is configured to When extracting a partial region from an image, the partial region from the first image is superimposed on the third image to generate combined image data.

本開示の第12態様によると、第1から第11態様のいずれかに記載の学習装置において、前記画像認識モデルは、ニューラルネットワークから構成されて、画像データから特徴量を抽出する特徴抽出器と、前記抽出された特徴量に基づき、前記画像データが示す画像において前記物体領域を検出する物体検出器とを含む。演算回路は、前記合成した画像データにおける前記物体検出器による認識結果と、前記合成した画像データが示す画像における物体領域の正解情報とに基づいて、第1の損失を計算し、前記画像認識モデルにおいて、前記第1の損失を最小化するように前記物体検出器及び前記特徴抽出器のパラメータを更新する。 According to a twelfth aspect of the present disclosure, in the learning device according to any one of the first to eleventh aspects, the image recognition model includes a feature extractor configured from a neural network and extracts feature amounts from image data. , an object detector that detects the object region in the image indicated by the image data based on the extracted feature amount. The arithmetic circuit calculates a first loss based on the recognition result by the object detector in the synthesized image data and the correct information of the object region in the image indicated by the synthesized image data, and calculates the first loss based on the recognition result by the object detector in the synthesized image data, and In this step, parameters of the object detector and the feature extractor are updated to minimize the first loss.

本開示の第13態様によると、第12態様に記載の学習装置において、前記画像認識モデルは、前記特徴抽出器により画像データから抽出される特徴量に基づいて、前記特徴量を抽出した画像データ内の所定の領域が前記第1または第2のドメインのいずれに属するかを識別するドメイン識別器をさらに備え、前記合成した画像データには、前記合成した画像データが示す画像において重畳された部分領域の位置を示す識別情報が対応付けられており、前記演算回路は、前記合成した画像データにおける前記ドメイン識別器の識別結果と、前記合成した画像データに対応付けられた前記識別情報との差分による第2の損失を計算し、前記画像認識モデルにおいて、前記第2の損失を最大化するように、前記特徴抽出器のパラメータを更新し、前記第2の損失を最小化するように、前記ドメイン識別器のパラメータを更新する。 According to a thirteenth aspect of the present disclosure, in the learning device according to the twelfth aspect, the image recognition model is based on the feature amount extracted from the image data by the feature extractor, and the image recognition model extracts the feature amount from the image data. The synthesized image data further includes a domain identifier for identifying whether a predetermined area in the domain belongs to the first domain or the second domain, and the synthesized image data includes a superimposed portion in the image indicated by the synthesized image data. Identification information indicating the position of the region is associated, and the arithmetic circuit calculates the difference between the identification result of the domain classifier in the synthesized image data and the identification information associated with the synthesized image data. and updating parameters of the feature extractor in the image recognition model to maximize the second loss, and to minimize the second loss. Update the domain identifier parameters.

本開示の第14態様によると、第12態様に記載の学習装置において、前記演算回路は、前記第1のドメインに含まれる複数の画像に、前記第2のドメインに含まれる一の画像からの共通する部分領域を重畳させるように、及び/または前記第2のドメインに含まれる複数の画像に、前記第1のドメインに含まれる一の画像からの共通する部分領域を重畳させるように、前記合成した画像データを生成し、前記合成した画像データに基づいて、前記共通する部分領域を重畳させた前記複数の画像間の比較による第3の損失を計算し、前記画像認識モデルにおいて、前記第3の損失を最小化するように、前記物体検出器及び前記特徴抽出器のパラメータを更新する。 According to a fourteenth aspect of the present disclosure, in the learning device according to the twelfth aspect, the arithmetic circuit adds information from one image included in the second domain to a plurality of images included in the first domain. the plurality of images included in the second domain so as to overlap a common partial area, and/or to overlap a common partial area from one image included in the first domain on a plurality of images included in the second domain; Generate synthesized image data, calculate a third loss based on the comparison between the plurality of images in which the common partial areas are superimposed, and calculate the third loss based on the synthesized image data, and The parameters of the object detector and the feature extractor are updated to minimize a loss of 3.

本開示の第15態様による学習方法は、コンピュータの演算回路により実行されて、物体の位置を示す物体領域に関連付けられた正解情報を有する第1の画像を含み、所定の特性を有する第1のドメインと、第2の画像を含み、かつ前記第1のドメインの特性とは異なる特性を有する第2のドメインとの少なくとも一方における画像データが示す画像から、前記物体領域の候補を示す部分領域を抽出すること、前記第1のドメインの画像から部分領域を抽出する場合には前記第1の画像からの部分領域を前記第2の画像に重畳させて合成した画像データを生成すること、前記第2のドメインの画像から部分領域を抽出する場合には前記第2の画像からの部分領域を前記第1の画像に重畳させて合成した画像データを生成すること、及び画像データが示す画像において物体の画像認識を行う画像認識モデルが含むパラメータを、前記合成した画像データ及び正解情報に基づいて機械学習により更新することを含む。 A learning method according to a fifteenth aspect of the present disclosure is executed by an arithmetic circuit of a computer, and includes a first image having correct answer information associated with an object region indicating a position of an object, and a first image having predetermined characteristics. A partial region indicating the object region candidate is extracted from an image indicated by image data in at least one of a domain and a second domain that includes a second image and has characteristics different from the characteristics of the first domain. when extracting a partial region from the image of the first domain, generating composite image data by superimposing the partial region from the first image on the second image; When extracting a partial region from an image of the second domain, the partial region from the second image is superimposed on the first image to generate composite image data, and an object is detected in the image indicated by the image data. The method includes updating parameters included in an image recognition model that performs image recognition by machine learning based on the synthesized image data and correct answer information.

本開示の第16態様によると、第15態様に記載の学習方法を前記演算回路に実行させるためのプログラムが提供される。 According to a sixteenth aspect of the present disclosure, there is provided a program for causing the arithmetic circuit to execute the learning method according to the fifteenth aspect.

以下、適宜図面を参照しながら、実施の形態を詳細に説明する。但し、必要以上に詳細な説明は省略する場合がある。例えば、既によく知られた事項の詳細説明や実質的に同一の構成に対する重複説明を省略する場合がある。これは、以下の説明が不必要に冗長になるのを避け、当業者の理解を容易にするためである。 Hereinafter, embodiments will be described in detail with reference to the drawings as appropriate. However, more detailed explanation than necessary may be omitted. For example, detailed explanations of well-known matters or redundant explanations of substantially the same configurations may be omitted. This is to avoid unnecessary redundancy in the following description and to facilitate understanding by those skilled in the art.

なお、添付図面および以下の説明は、当業者が本開示を十分に理解するために、提供されるのであって、これらにより特許請求の範囲に記載の主題を限定することは意図されていない。 The accompanying drawings and the following description are provided to enable those skilled in the art to fully understand the present disclosure, and are not intended to limit the subject matter recited in the claims.

(実施形態1)
実施形態1では、本開示に係る学習装置の一例として、ニューラルネットワークから構成される画像認識モデル(以下では「画像認識ニューラルネットワーク」という。)の機械学習を行う学習装置について説明する。
(Embodiment 1)
In Embodiment 1, as an example of a learning device according to the present disclosure, a learning device that performs machine learning of an image recognition model composed of a neural network (hereinafter referred to as an “image recognition neural network”) will be described.

1.概要
実施形態1に係る学習装置の概要を、図1を用いて説明する。
1. Overview An overview of the learning device according to the first embodiment will be described using FIG. 1.

図1は、本実施形態の学習装置1によるドメイン適応の概要図である。本実施形態の学習装置1は、画像認識ニューラルネットワーク21の機械学習において、画像データに関するドメイン適応を行う。以下「ニューラルネットワーク」を「NN」と略記する。 FIG. 1 is a schematic diagram of domain adaptation by the learning device 1 of this embodiment. The learning device 1 of this embodiment performs domain adaptation regarding image data in machine learning of the image recognition neural network 21. Hereinafter, "neural network" will be abbreviated as "NN".

図1(A)は、画像認識NN21の利用例を示す。図1(A)は、学習後の画像認識NN21における推論時の動作を例示する。画像認識NN21は、例えば車載カメラにより車両の進行方向を撮影した赤外線画像において、他の車両及び人物等の物体を検出する物体検出に適用される。画像認識NN21は、入力された画像において物体の位置を認識して、例えば認識された物体の位置に応じた検出領域を出力する。図1(A)の例では、車両が映った赤外線画像Td20において、当該車両を検出した検出領域Pr20が出力されている。 FIG. 1A shows an example of how the image recognition NN 21 is used. FIG. 1A illustrates an example of the operation during inference in the image recognition NN 21 after learning. The image recognition NN 21 is applied, for example, to object detection for detecting objects such as other vehicles and people in an infrared image taken in the direction of travel of a vehicle by an on-vehicle camera. The image recognition NN 21 recognizes the position of an object in the input image and outputs, for example, a detection area according to the recognized position of the object. In the example of FIG. 1A, in an infrared image Td20 in which a vehicle is reflected, a detection region Pr20 where the vehicle is detected is output.

画像認識NN21の機械学習では、例えば、検出対象の物体が映った画像を示す画像データと、当該画像における物体の位置及び種類等を示す正解ラベルと、を対応付けた学習データが用いられる。ここで、例えば新たに正解ラベルを付与するアノテーション作業のコストといった観点から、赤外線画像に限らず、正解ラベル付きの可視光画像の画像データが学習データに用いられ得る。例えば、画像認識NN21を予めデータ量が豊富な学習データで学習しておく事前学習が行われる。本実施形態では、赤外線画像、即ちターゲットドメインの画像について、画像認識NN21の学習時に、画像データは利用できるが、対応する正解ラベルが利用可能でない場合の例を説明する。 In the machine learning of the image recognition NN 21, for example, learning data is used in which image data indicating an image in which an object to be detected is reflected is associated with a correct label indicating the position, type, etc. of the object in the image. Here, for example, from the viewpoint of the cost of annotation work to newly add a correct answer label, image data of a visible light image with a correct answer label can be used as the learning data, instead of being limited to an infrared image. For example, pre-learning is performed in which the image recognition NN 21 is trained in advance using learning data with a large amount of data. In this embodiment, an example will be described in which, regarding an infrared image, that is, an image of a target domain, image data can be used during learning of the image recognition NN 21, but the corresponding correct label is not available.

図1(B)は、可視光画像のみの画像データと対応する正解ラベルとを学習データに用いて、画像認識NN21を事前学習する例を示す。学習装置1は、学習データの画像データに基づいて、例えば正解ラベルと画像認識NN21の認識結果との間で、物体の位置ずれ及び種類の分類誤差等を示す検出損失を最小化するように、画像認識NN21の機械学習を行う。図1(B)の例では、学習装置1により、学習データの可視光画像Sd1において、正解ラベルによる物体の位置を示す正解領域Gr1と、画像認識NN21による検出領域Pr1とに基づいて検出損失Ldが計算される。 FIG. 1B shows an example in which the image recognition NN 21 is trained in advance using image data of only visible light images and corresponding correct labels as learning data. Based on the image data of the learning data, the learning device 1 minimizes the detection loss indicating the positional deviation of the object, the classification error of the type, etc., between the correct label and the recognition result of the image recognition NN 21, for example, based on the image data of the learning data. Perform machine learning for image recognition NN21. In the example of FIG. 1(B), the learning device 1 uses the detection loss Ld in the visible light image Sd1 of the learning data based on the correct region Gr1 indicating the position of the object by the correct label and the detection region Pr1 by the image recognition NN21. is calculated.

上述のような可視光画像のみの学習データを用いて事前学習された画像認識NN21を、赤外線画像における物体検出にそのまま適用すると、可視光画像と赤外線画像との特性の相違から、学習時よりも認識性能の低下を生じる場合がある。即ち、ソースドメインの可視光画像と、ターゲットドメインの赤外線画像との間のドメインシフトから、画像認識NN21による物体検出等の画像認識を精度良く行い難いことが考えられる。 If the image recognition NN21 pre-trained using training data of only visible light images as described above is applied as is to object detection in infrared images, it will be slower than during training due to the difference in characteristics between visible light images and infrared images. Recognition performance may deteriorate. That is, it is conceivable that it is difficult to accurately perform image recognition such as object detection by the image recognition NN 21 due to the domain shift between the visible light image in the source domain and the infrared image in the target domain.

そこで、本実施形態の学習装置1は、例えば可視光画像及び赤外線画像の両方の画像データと、可視光画像に対応する正解ラベルとを用いた画像認識NN21の学習により、画像認識NN21が有するパラメータを更新することでドメイン適応を行う。図1(C)は、本実施形態の学習装置1において、ドメイン適応を行うように画像認識NN21を学習する例を示す。 Therefore, the learning device 1 of the present embodiment learns the parameters of the image recognition NN 21 by learning the image recognition NN 21 using image data of both visible light images and infrared images and correct labels corresponding to the visible light images. Perform domain adaptation by updating . FIG. 1C shows an example in which the image recognition NN 21 is trained to perform domain adaptation in the learning device 1 of this embodiment.

本実施形態の学習装置1は、後述するように物体領域を考慮してソースドメイン及びターゲットドメインの画像データを合成し、合成した画像データを用いて計算した検出損失Ld等の損失Lmを最適化することで、画像認識NN21を学習する。図1(C)例では、学習装置1は、ソースドメインの可視光画像Sd1における正解領域Gr1をターゲットドメインの赤外線画像Td1に、及び赤外線画像Td1から物体領域の推定領域Er1を可視光画像Sd1に重畳させるように、画像データを合成する。推定領域Er1は、物体領域の候補を推定した領域を示す。 The learning device 1 of this embodiment combines image data of a source domain and a target domain in consideration of the object region, as described later, and optimizes losses Lm such as detection loss Ld calculated using the combined image data. By doing so, the image recognition NN 21 is learned. In the example of FIG. 1C, the learning device 1 converts the correct region Gr1 in the visible light image Sd1 of the source domain into an infrared image Td1 of the target domain, and converts the estimated region Er1 of the object region from the infrared image Td1 into the visible light image Sd1. Image data is combined so that they are superimposed. The estimated area Er1 indicates an area in which a candidate for an object area is estimated.

以上のように、学習装置1において、ソース及びターゲットの各ドメインの画像から物体領域を考慮して合成した画像データを学習データに用いることで、例えば画像認識NN21による物体検出に適したドメイン不変表現の獲得が期待される。このように、本実施形態の学習装置1によれば、例えばソースドメインとは特性が異なるターゲットドメインの画像においても、物体検出等の画像認識を精度良く実現可能な画像認識NN21の機械学習を行うことができる。 As described above, in the learning device 1, by using the image data synthesized from the source and target domain images in consideration of the object area as the learning data, domain-invariant expression suitable for object detection by the image recognition NN 21, for example. is expected to be acquired. In this way, according to the learning device 1 of the present embodiment, machine learning of the image recognition NN 21 is performed, which can realize image recognition such as object detection with high accuracy even in images of a target domain whose characteristics are different from those of the source domain. be able to.

2.構成
実施形態1に係る学習装置の構成について、図2及び図3を用いて説明する。
2. Configuration The configuration of the learning device according to the first embodiment will be described using FIGS. 2 and 3.

2-1.学習装置の構成
図2は、本実施形態の学習装置1の構成を例示するブロック図である。学習装置1は、例えば汎用コンピュータを用いて構成される。学習装置1は、例えば図2に示すように、演算回路10、記憶装置20、通信回路30、及び、各構成を接続するバス40を備える。学習装置1は、例えば機械学習用のコンピュータなど、各種の専用コンピュータを用いて構成されてもよい。
2-1. Configuration of Learning Device FIG. 2 is a block diagram illustrating the configuration of the learning device 1 of this embodiment. The learning device 1 is configured using, for example, a general-purpose computer. The learning device 1 includes, for example, as shown in FIG. 2, an arithmetic circuit 10, a storage device 20, a communication circuit 30, and a bus 40 that connects each component. The learning device 1 may be configured using various dedicated computers, such as a computer for machine learning, for example.

演算回路10は、例えばCPU(Central Processing Unit)、またはGPU(Graphical Processing Unit)などの汎用プロセッサ、あるいはそれらの組み合わせを実現する回路である。図2に示す演算回路10は、例えば機能的構成として、画像生成部11、画像認識部12、及び更新部13を備える。各機能部11~13の処理の具体的な説明については後述する。図2では、本実施形態に関する主要な機能部11~13を例示しているが、演算回路10が有する機能はこれらに限られない。 The arithmetic circuit 10 is, for example, a general-purpose processor such as a CPU (Central Processing Unit) or a GPU (Graphical Processing Unit), or a circuit that implements a combination thereof. The arithmetic circuit 10 shown in FIG. 2 includes, for example, an image generation section 11, an image recognition section 12, and an update section 13 as functional configurations. A detailed explanation of the processing of each of the functional units 11 to 13 will be described later. Although FIG. 2 illustrates the main functional units 11 to 13 related to this embodiment, the functions possessed by the arithmetic circuit 10 are not limited to these.

演算回路10は、上記のような汎用プロセッサに限らず、例えば特定用途向け集積回路(Application Specific Integrated Circuit:ASIC)、プログラマブル論理デバイス(例えば、単純プログラマブル論理デバイス(Simple Programmable Logic Device:SPLD)、複合プログラマブル論理デバイス(Complex Programmable Logic Device:CPLD)、フィールドプログラマブルゲートアレイ(Field Programmable Gate Array:FPGA))などの回路であってもよい。 The calculation circuit 10 is not limited to the general -purpose processor as described above, but for example, integrated circuits for specific applications (Application SPECIFIC INTEGRATED CIRCUIT: ASIC), programable logical devices (eg, simple programable logical devices (SIMP). LE PROGRAMMABLE LOGIC DEVICE: SPLD) The circuit may be a programmable logic device (CPLD), a field programmable gate array (FPGA), or the like.

学習装置1で実行される各機能の処理は、例えば後述する制御プログラム22など、コンピュータによって実行可能な各種のプログラムの形態で記憶装置20に記憶されている。演算回路10は、記憶装置20からプログラムを読み出して実行することで、各プログラムに対応する機能を実現する。例えば、各プログラムを読み出した状態の演算回路10は、図2の各機能部11~13として機能する。演算回路10は、例えば各種のデータ及びプログラムを保持する一時的な記憶領域として内部メモリを備えてもよい。 The processing of each function executed by the learning device 1 is stored in the storage device 20 in the form of various programs executable by a computer, such as a control program 22 described later. The arithmetic circuit 10 reads programs from the storage device 20 and executes them, thereby realizing functions corresponding to each program. For example, the arithmetic circuit 10 in a state where each program is read functions as each of the functional units 11 to 13 in FIG. The arithmetic circuit 10 may include an internal memory as a temporary storage area that holds various data and programs, for example.

なお、図2では、単一の演算回路10に各機能部11~13を図示しているが、複数の独立したプロセッサ等を組み合わせて演算回路10を構成しても構わない。この場合、各機能の処理がプログラムとして構成されてもよいし、特定の機能が専用の独立したプログラム実行回路に実装されてもよい。 Although FIG. 2 shows the functional units 11 to 13 in a single arithmetic circuit 10, the arithmetic circuit 10 may be configured by combining a plurality of independent processors. In this case, the processing of each function may be configured as a program, or a specific function may be implemented in a dedicated and independent program execution circuit.

演算回路10は記憶装置20に保存されたプログラムを読み出し実行することで各種の機能を実現する。なお、記憶装置20にプログラムを保存する代わりに、演算回路10の回路内にプログラムを直接組み込むよう構成しても構わない。この場合、演算回路10は、回路内に組み込まれたプログラムを読み出し実行することで各種の機能を実現する。 The arithmetic circuit 10 realizes various functions by reading and executing programs stored in the storage device 20. Note that instead of storing the program in the storage device 20, the program may be directly incorporated into the arithmetic circuit 10. In this case, the arithmetic circuit 10 realizes various functions by reading and executing programs built into the circuit.

記憶装置20は、例えば演算回路10の各機能部11~13による処理に伴うデータなどを必要に応じて記憶する。記憶装置20は、例えば画像認識NN21として、ニューラルネットワークを機能させるためのプログラム及び重みパラメータを記憶している。重みパラメータは、例えば画像認識NN21の学習により更新されて、記憶装置20に格納される。また、本実施形態の記憶装置20は、画像認識NN21の機械学習を制御する制御プログラム22といった各種プログラム、及び各種の処理に用いられるデータを記憶する。 The storage device 20 stores, for example, data associated with processing by each of the functional units 11 to 13 of the arithmetic circuit 10, as needed. The storage device 20 stores a program and weight parameters for operating a neural network, for example as an image recognition NN 21. The weight parameters are updated, for example, by learning of the image recognition NN 21 and stored in the storage device 20. Further, the storage device 20 of this embodiment stores various programs such as a control program 22 that controls machine learning of the image recognition NN 21, and data used for various processes.

例えば、記憶装置20は、RAM(Random Access Memory)またはフラッシュメモリなどの半導体メモリ素子、ハードディスク、あるいは光ディスクなどの記憶媒体である。また、記憶装置20は、学習装置1の外部の記憶装置で代替されてもよい。記憶装置20は、LAN(Local Area Network)またはインターネットなどの通信ネットワークにより伝達されたプログラムをダウンロードして、記憶または一時記憶(即ち保持)した記憶媒体であってもよい。また、記憶装置20は、1つの記憶媒体に限らず、複数の記憶媒体から構成されてもよい。記憶装置20は、演算回路10の作業領域として機能するRAM等の記憶素子を備えてもよい。 For example, the storage device 20 is a storage medium such as a semiconductor memory device such as a RAM (Random Access Memory) or a flash memory, a hard disk, or an optical disk. Furthermore, the storage device 20 may be replaced by a storage device external to the learning device 1. The storage device 20 may be a storage medium that downloads and stores or temporarily stores (that is, holds) a program transmitted through a communication network such as a LAN (Local Area Network) or the Internet. Further, the storage device 20 is not limited to one storage medium, but may be configured from a plurality of storage media. The storage device 20 may include a storage element such as a RAM that functions as a work area for the arithmetic circuit 10.

記憶装置20には、あらかじめ画像認識NN21の機械学習に用いる画像データ及び当該画像データに対応する正解ラベルが格納されていてもよい。本実施形態において、記憶装置20には、例えばソースドメイン(第1のドメインの一例)の画像データ及び対応する正解ラベルと、ターゲットドメイン(第2のドメインの一例)の画像データとが格納される。あるいは学習装置1とは別のサーバなどの装置にあらかじめ格納されている前述のデータを、LANなどを介して一部ずつ読み出し、記憶装置20に格納してもよい。 The storage device 20 may store in advance image data used for machine learning of the image recognition NN 21 and correct labels corresponding to the image data. In this embodiment, the storage device 20 stores, for example, image data of a source domain (an example of a first domain) and the corresponding correct answer label, and image data of a target domain (an example of a second domain). . Alternatively, the above-mentioned data previously stored in a device such as a server other than the learning device 1 may be read out in part via a LAN or the like and stored in the storage device 20.

画像認識NN21は、例えば畳み込みニューラルネットワーク(CNN)等から構成され、画像認識処理により、画像から特徴量(「特徴表現」ともいう。)を抽出して、抽出した特徴量に基づき当該画像における物体領域の検出等を行う。画像認識NN21は、例えば各画像において、物体領域の複数の候補を検出して、検出した各候補の物体領域を示す検出領域に信頼度のスコアを対応付けた認識結果を出力してもよい。信頼度は、例えば各検出領域において検出対象の物体が映っている確率を示す。画像認識NN21の詳細については後述する。 The image recognition NN 21 is composed of, for example, a convolutional neural network (CNN), etc., and uses image recognition processing to extract feature quantities (also referred to as "feature expressions") from an image, and identifies objects in the image based on the extracted feature quantities. Perform area detection, etc. The image recognition NN 21 may detect a plurality of object region candidates in each image, for example, and output a recognition result in which a reliability score is associated with a detection region indicating the object region of each detected candidate. The reliability indicates, for example, the probability that the object to be detected is reflected in each detection area. Details of the image recognition NN 21 will be described later.

通信回路30は、例えば有線または無線で学習装置1と接続された外部装置と、情報の入出力を行うインタフェース回路である。通信回路30は、通信ネットワークに接続して通信を行ってもよい。通信回路は、所定の通信規格に従い通信を行う。所定の通信規格には、例えばIEEE802.3,IEEE802.11a,4G,5G,USB等が含まれる。 The communication circuit 30 is an interface circuit that inputs and outputs information with an external device connected to the learning device 1, for example, by wire or wirelessly. The communication circuit 30 may be connected to a communication network to perform communication. The communication circuit performs communication according to a predetermined communication standard. The predetermined communication standards include, for example, IEEE802.3, IEEE802.11a, 4G, 5G, USB, and the like.

2-2.演算回路の機能的構成
次に、演算回路10が有する各機能部11~13について、図3を用いて説明する。
2-2. Functional Configuration of Arithmetic Circuit Next, each of the functional units 11 to 13 included in the arithmetic circuit 10 will be explained using FIG. 3.

図3は、本実施形態の学習装置1における演算回路10の機能的構成を例示するブロック図である。以下、演算回路10における画像生成部11、画像認識部12及び更新部13の各機能を説明する。図3では、実線の矢印は画像データの流れを示し、点線の矢印は画像における位置及び画像のサイズ等の情報の流れを示す。図3第1入力画像はソースドメインから得られる画像であり、第2入力画像はターゲットドメインから得られる画像である。第1及び第2 FIG. 3 is a block diagram illustrating the functional configuration of the arithmetic circuit 10 in the learning device 1 of this embodiment. Each function of the image generation section 11, image recognition section 12, and update section 13 in the arithmetic circuit 10 will be explained below. In FIG. 3, solid line arrows indicate the flow of image data, and dotted line arrows indicate the flow of information such as the position in the image and the size of the image. FIG. 3 The first input image is an image obtained from the source domain, and the second input image is an image obtained from the target domain. 1st and 2nd

画像生成部11は、例えば上述のように、ソースドメイン及びターゲットの各画像を合成した画像データを生成する。図3に示す画像生成部11は、例えば、機能的構成として、第1及び第2入力部111a,111b、第1及び第2切出部112a,112b、第1及び第2合成位置選定部113a,113b、並びに第1及び第2合成部114a,114bをさらに含む。各機能部111~114は、例えばソースドメイン及びターゲットドメインの各々について設けられ、第1及び第2入力画像から合成した画像データを生成するための一連の処理を実行する。 The image generation unit 11 generates image data by combining the source domain and target images, for example, as described above. The image generation unit 11 shown in FIG. 3 has, for example, functional configurations such as first and second input units 111a and 111b, first and second cutout units 112a and 112b, and first and second combination position selection units 113a. , 113b, and first and second combining sections 114a and 114b. Each of the functional units 111 to 114 is provided for each of the source domain and the target domain, for example, and executes a series of processes for generating image data synthesized from the first and second input images.

第1入力部111aは、例えば演算回路10に記憶装置20から読み出される第1入力画像の画像データを入力する。第1入力部111aは、例えば第1入力画像の画像データを第1切出部112a及び第1合成部114aに供給する。第2入力部111bは、例えば第1入力部111aと同様に、演算回路10に記憶装置20から読み出される第2入力画像の画像データを入力し、第2切出部112b及び第2合成部114bに供給する。 The first input unit 111a inputs image data of a first input image read from the storage device 20 to the arithmetic circuit 10, for example. The first input section 111a supplies, for example, image data of the first input image to the first cutting section 112a and the first combining section 114a. The second input section 111b inputs the image data of the second input image read out from the storage device 20 to the arithmetic circuit 10, for example, similarly to the first input section 111a, and inputs the image data of the second input image read out from the storage device 20 to the second cutting section 112b and the second combining section 114b. supply to.

第1切出部112aは、第1入力部111aからの第1入力画像において、例えば1つまたは複数の小領域を選定して切り出しを行う。小領域は、例えば第1入力画像等の入力画像全体における物体領域の候補を示す部分領域として選定される。第1切出部112aは、例えば第1入力画像において物体が映った位置を示す第1物***置情報として、第1入力画像に対応する正解ラベルに基づいて、小領域の選定及び切り出しを行う。第1切出部112aは、例えば切り出した各小領域を含む第1切出領域群を、第2合成部114bに供給するとともに、第1切出領域群における小領域の個数を示す領域数、及び各小領域のサイズを第2合成位置選定部113bに出力する。 The first cutout section 112a selects and cuts out, for example, one or more small regions in the first input image from the first input section 111a. The small region is selected as a partial region representing a candidate for an object region in the entire input image, such as the first input image. The first cutting unit 112a selects and cuts out a small area based on the correct label corresponding to the first input image, as first object position information indicating the position of the object in the first input image, for example. The first cutout section 112a supplies, for example, a first cutout region group including each cutout small region to the second synthesis section 114b, and also supplies a number of regions indicating the number of small regions in the first cutout region group; and the size of each small area are output to the second synthesis position selection section 113b.

本実施形態では、上述のように、ターゲットドメインからの第2入力画像における物体の位置が既知ではない。そこで、本実施形態の学習装置1において、第2切出部112bは、例えば、まず、第2入力画像の画像データに基づいて第2入力画像における物体領域の候補を推定し、推定結果に基づいて小領域の選定及び切り出しを行う。物体領域の候補を推定する処理については後述する。第2切出部112bは、切り出した1つまたは複数の小領域を含む第2切出領域群を第1合成部114aに供給するとともに、第2切出領域群における領域数及び各小領域のサイズを第1合成位置選定部113aに出力する。 In this embodiment, as mentioned above, the position of the object in the second input image from the target domain is not known. Therefore, in the learning device 1 of the present embodiment, the second cutting unit 112b, for example, first estimates object region candidates in the second input image based on the image data of the second input image, and based on the estimation result. Select and cut out a small area. The process of estimating object region candidates will be described later. The second cutout section 112b supplies a second cutout region group including one or more cutout small regions to the first synthesis section 114a, and also determines the number of regions in the second cutout region group and the number of regions in each small region. The size is output to the first combination position selection section 113a.

第1合成位置選定部113aは、第2切出部112bからの第2切出領域群の領域数と各領域のサイズとに基づき、第1入力画像において第2切出領域群の小領域を重畳させる、即ち第1入力画像の画像データに小領域の画像データを合成する位置を選定する。例えば、第1合成位置選定部113aは、こうした合成位置をランダムに選定し、合成位置を示す合成位置情報を第1合成部114aに出力する。なお、合成位置は、ランダムに限らず、任意の手法を用いて選定可能である。同様に第2合成位置選定部113bは、第1切出部112aからの第1切出領域群の領域数と各領域のサイズとに基づいて、第1入力画像における第2切出領域群の小領域の合成位置を選定して、合成位置情報を第2合成部114bに出力する。 The first synthesis position selection unit 113a selects small areas of the second cutout area group in the first input image based on the number of areas and the size of each area of the second cutout area group from the second cutout unit 112b. The position where the image data of the small area is to be superimposed, that is, the image data of the small area is combined with the image data of the first input image is selected. For example, the first synthesis position selection unit 113a randomly selects such a synthesis position and outputs synthesis position information indicating the synthesis position to the first synthesis unit 114a. Note that the synthesis position is not limited to random selection, and can be selected using any method. Similarly, the second combination position selection unit 113b selects the second cutout area group in the first input image based on the number of areas in the first cutout area group and the size of each area from the first cutout unit 112a. The combining position of the small area is selected and the combining position information is output to the second combining unit 114b.

第1合成部114aは、第1合成位置選定部113aからの合成位置情報に基づいて、第1入力画像において選定された合成位置に、第2切出部112bからの第2切出領域群の各領域を重畳させるように合成した画像データを生成する。第1合成位置選定部113aは、例えば第1入力画像において合成する領域上の画素値を変更することで画像データの合成を行う。第1合成位置選定部113aは、例えば合成した画像データを画像認識部12に供給する。同様に第2合成部114bは、第2合成位置選定部113bからの合成位置情報に基づいて、第2入力画像において選定された合成位置に第1切出領域群の各領域を重畳させるように合成した画像データを生成して、画像認識部12に供給する。 The first compositing unit 114a places the second clipping area group from the second clipping unit 112b at the compositing position selected in the first input image based on the compositing position information from the first compositing position selecting unit 113a. Generate image data that is synthesized so that each region is superimposed. The first synthesis position selection unit 113a synthesizes image data, for example, by changing pixel values on a region to be synthesized in the first input image. The first combination position selection unit 113a supplies, for example, combined image data to the image recognition unit 12. Similarly, the second compositing unit 114b superimposes each region of the first cutout region group on the compositing position selected in the second input image based on the compositing position information from the second compositing position selecting unit 113b. The combined image data is generated and supplied to the image recognition section 12.

第1及び第2合成部114a,114bからの合成画像データが示す各合成画像は、例えば合成画像群Imとして集約される。画像認識部12は、例えば合成画像群Imの画像データを画像認識NN21に入力し、合成画像群Imにおいて画像認識処理を実行させることで、各合成画像において抽出される特徴量及び検出される物体領域等の認識結果を取得して、更新部13に出力する。 The composite images indicated by the composite image data from the first and second composition units 114a and 114b are aggregated, for example, as a composite image group Im. For example, the image recognition unit 12 inputs the image data of the composite image group Im to the image recognition NN 21 and executes image recognition processing on the composite image group Im, thereby identifying the feature amount extracted in each composite image and the detected object. The recognition result of the area etc. is acquired and output to the updating unit 13.

更新部13は、例えば画像認識部12からの、合成画像群Imにおける認識結果及び第1物***置情報(例えばソースドメインの画像における正解ラベル)等に基づいて、画像認識NN21のパラメータを更新する。パラメータを更新する処理の詳細については後述する。 The updating unit 13 updates the parameters of the image recognition NN 21 based on, for example, the recognition result in the composite image group Im and the first object position information (for example, the correct label in the source domain image) from the image recognition unit 12. Details of the process for updating parameters will be described later.

3.動作
以上のように構成される学習装置1の動作について、以下説明する。
3. Operation The operation of the learning device 1 configured as described above will be explained below.

3-1.ドメイン適応に関する課題
学習装置1は、例えば図1(C)に示すように、ソースドメインの可視光画像Sd1及びターゲットドメインの赤外線画像Td1の両方の画像データと、可視光画像に対応する正解ラベルとを用いて、ドメイン適応させるように画像認識NN21を学習する。こうしたドメイン適応により、ドメイン間での不変性を有する特徴表現、即ちドメイン不変表現を獲得するような画像認識NN21の機械学習を実現できる。このようにドメイン不変表現の獲得を通してドメイン適応を実現する際の課題に関して、以下説明する。
3-1. Issues related to domain adaptation As shown in FIG. 1C, for example, the learning device 1 uses image data of both the visible light image Sd1 of the source domain and the infrared image Td1 of the target domain, and the correct label corresponding to the visible light image. The image recognition NN 21 is trained to adapt to the domain using . Through such domain adaptation, it is possible to realize machine learning of the image recognition NN 21 that acquires feature expressions that are invariant between domains, that is, domain-invariant expressions. Issues in achieving domain adaptation through the acquisition of domain-invariant representations will be explained below.

ドメイン適応として、例えば特許文献1のような画像変換を行うニューラルネットワークにより、正解ラベルが対応付けられたソースドメインの画像データからターゲットドメインの画像データを疑似的に生成して、学習データに用いることが考えられる。この場合、例えば、画像認識NN21の学習データとは別に、画像変換用の学習データを用意して、画像変換のニューラルネットワークを学習させる必要がある。さらに、画像変換によっては、各ドメインにおける画像のテクスチャ等の細部までを再現することが困難な場合もある。 As domain adaptation, for example, using a neural network that performs image conversion as in Patent Document 1, image data of a target domain is generated in a pseudo manner from image data of a source domain associated with a correct label, and used as training data. is possible. In this case, for example, it is necessary to prepare learning data for image conversion in addition to learning data for the image recognition NN 21 and to train the neural network for image conversion. Furthermore, depending on the image conversion, it may be difficult to reproduce details such as image texture in each domain.

また、ドメイン不変表現を獲得するためのドメイン適応として、例えば非特許文献1のように、各ドメインの画像から切り出したクロップ画像を連結して学習データに用いることも考えられる。しかし、非特許文献1のクロップ画像は、物体領域を含む場合もあるが、各画像から物体領域以外の背景といった領域として、または背景を含んで切り出される場合もある。この場合、例えばクロップ画像を連結した画像とソースドメインの正解ラベルとを用いてニューラルネットワークを学習しても、物体検出等の画像認識を精度良く実現可能なドメイン不変表現を獲得し難いことが懸念される。 Furthermore, as domain adaptation to obtain a domain-invariant representation, it is also conceivable to connect cropped images cut out from images of each domain and use them as learning data, as in Non-Patent Document 1, for example. However, although the cropped image in Non-Patent Document 1 may include an object region, it may also be cropped from each image as a region other than the object region, such as the background, or including the background. In this case, there is concern that even if a neural network is trained using, for example, an image that is a concatenation of cropped images and correct labels from the source domain, it will be difficult to obtain a domain-invariant representation that can accurately perform image recognition such as object detection. be done.

ここで、例えば物体検出またはセマンティックセグメンテーションといった、画像上の物体の位置を特定する画像認識タスクに転移し易い画像の特徴表現を獲得するための、自己教師あり学習の手法が提案されている(例えば非特許文献2,3)。例えば非特許文献2,3は、物体が映った前景画像の異なる位置からランダムクロップした領域を、異なる背景画像に合成し、合成画像から前景画像の領域を推定するような疑似タスクを通じて、物体の位置特定(localization)を考慮した特徴表現の獲得を図っている。 Here, self-supervised learning methods have been proposed to obtain image feature representations that are easily transferable to image recognition tasks that identify the location of objects on images, such as object detection or semantic segmentation (e.g. Non-patent literature 2, 3). For example, in Non-Patent Documents 2 and 3, areas randomly cropped from different positions of the foreground image in which the object appears are combined with a different background image, and through a pseudo task that estimates the area of the foreground image from the combined image, We are trying to acquire feature expressions that take localization into consideration.

また、学習データのデータ拡張の分野では、画像において物体が映った領域が既知のデータセットを用いて、スケール等を変更した物体の領域を別の画像に貼り付けるように新たな画像データを生成する手法が提案されている(例えば非特許文献4)。非特許文献4は、こうした単純なデータ拡張により、インスタンスセグメンテーションまたは物体検出といった物体の位置を特定する画像認識タスクの性能が向上することを示している。 In addition, in the field of data expansion of learning data, new image data is generated by using a dataset in which the area where an object appears in the image is known and pasting the area of the object with changed scale etc. onto another image. A method to do this has been proposed (for example, Non-Patent Document 4). Non-Patent Document 4 shows that such simple data augmentation improves the performance of image recognition tasks for locating objects, such as instance segmentation or object detection.

そこで、本実施形態の学習装置1は、ソースドメイン及びターゲットドメインからの各画像において、物体領域に応じて切り出した小領域を、他方のドメインの画像に重畳させるように画像データを合成する。学習装置1は、このように合成した画像データを集約して、合成画像群Imとして画像認識NN21の学習データに用いる。これにより、例えば学習データにおいて、各ドメインの画像に、他方のドメインの画像から、物体の位置の認識に寄与し得る物体領域の情報を反映して、物体検出等を精度良く実現可能なドメイン不変表現を獲得するように画像認識NN21を学習することができる。 Therefore, the learning device 1 of this embodiment synthesizes image data in each image from the source domain and the target domain so that a small region cut out according to the object region is superimposed on the image of the other domain. The learning device 1 aggregates the image data synthesized in this way and uses it as learning data for the image recognition NN 21 as a synthesized image group Im. As a result, for example, in the learning data, information on object regions that can contribute to recognition of object positions is reflected in images in each domain from images in the other domain, making it possible to accurately detect objects and achieve domain invariance. The image recognition NN 21 can be trained to acquire representations.

特に、本実施形態における赤外線画像のように、例えば物体領域の正解ラベルが画像データに付与されたソースドメインとは、潜在的なデータの生成分布等が異なるようなターゲットドメインにおいて、正解ラベルを利用できない場合がある。こうした場合であっても、本実施形態の学習装置1によれば、ソース及びターゲットドメインの両方において精度良く物体検出が可能なドメイン不変表現をするように、画像認識NN21の学習を行うことができる。 In particular, like the infrared image in this embodiment, the correct label is used in a target domain where the potential data generation distribution etc. is different from the source domain where the correct label of the object region is attached to the image data. It may not be possible. Even in such a case, according to the learning device 1 of the present embodiment, the image recognition NN 21 can be trained to perform domain-invariant representation that allows accurate object detection in both the source and target domains. .

3-2.全体動作
本実施形態に係る学習装置1の全体的な動作について、図3及び図4を用いて説明する。
3-2. Overall Operation The overall operation of the learning device 1 according to this embodiment will be explained using FIGS. 3 and 4.

図4は、本実施形態における学習装置1の動作を例示するフローチャートである。図4のフローチャートに示す各処理は、例えば学習装置1の演算回路10が、図3に示すような各機能部11~13として機能することにより実行される。 FIG. 4 is a flowchart illustrating the operation of the learning device 1 in this embodiment. Each process shown in the flowchart of FIG. 4 is executed by, for example, the arithmetic circuit 10 of the learning device 1 functioning as each of the functional units 11 to 13 as shown in FIG.

まず、演算回路10は、画像認識NN21の学習データとして、例えば記憶装置20に格納された第1及び第2入力画像の画像データと、第1入力画像における正解ラベルのデータとを読み出す(S1)。演算回路10は、例えばそれぞれ複数の第1及び第2入力画像の画像データを取得して(S1)、画像毎に以下のステップS2,S3の処理を行う。 First, the arithmetic circuit 10 reads, for example, image data of the first and second input images stored in the storage device 20 and correct label data of the first input image as learning data for the image recognition NN 21 (S1). . For example, the arithmetic circuit 10 acquires image data of a plurality of first and second input images (S1), and performs the following steps S2 and S3 for each image.

演算回路10は、例えば第1及び第2入力部111a,111bとして機能して、読み出された学習データにおける第1及び第2入力画像の各画像データを、それぞれ第1及び第2切出部112a,112bに供給する前処理を実行する(S2)。図1の例では、ソースドメインの可視光画像Sd1が第1入力画像として、ターゲットドメインの赤外線画像Td1が第2入力画像として供給される。 The arithmetic circuit 10 functions, for example, as first and second input units 111a and 111b, and inputs each image data of the first and second input images in the read learning data to the first and second cutting units, respectively. 112a and 112b is executed (S2). In the example of FIG. 1, the visible light image Sd1 of the source domain is supplied as the first input image, and the infrared image Td1 of the target domain is supplied as the second input image.

演算回路10は、第1切出部112aとして、例えば学習データの正解ラベルにおいて物体領域の位置を示す第1物***置情報に基づき、第1入力画像から正解領域Gr1といった小領域を抽出して、第1切出領域群として切り出す前処理を実行する(S3)。演算回路10は、抽出した小領域の領域数及び各小領域のサイズのデータを、例えば内部メモリ等に保持してもよく、保持している当該データに基づいて、第2合成位置選定部113bとしての機能を実行してもよい。また、演算回路10は、例えば第1切出領域群の各小領域の画像データを記憶装置20等に保持して、当該画像データに基づいて、第2合成部114bとしての機能を実行してもよい。 The arithmetic circuit 10, as a first extraction unit 112a, extracts a small area such as the correct area Gr1 from the first input image based on first object position information indicating the position of the object area in the correct label of the learning data, for example. Pre-processing for cutting out as a first cutting region group is performed (S3). The arithmetic circuit 10 may hold data on the number of extracted small areas and the size of each small area in, for example, an internal memory, and based on the held data, the second synthesis position selection unit 113b It may also perform the function of Further, the arithmetic circuit 10 stores, for example, image data of each small region of the first cutout region group in the storage device 20 or the like, and executes the function of the second synthesis section 114b based on the image data. Good too.

演算回路10は、さらに、第2切出部112bとして、第2入力画像において物体領域の候補を推定し、推定結果に基づいて抽出した推定領域Er1等の小領域を第2切出領域群として切り出す前処理を実行する(S3)。演算回路10は、例えば、第2入力画像の画像データに基づいて、Selective Search(非特許文献5)といった物体領域推定の技術により、複数の物体領域の候補を推定し、推定結果からランダムに選定した所定数(例えば3個)の候補を第2切出領域群の小領域として抽出する。Selective Searchでは、画像において、色及びテクスチャ等の特徴が画素間で類似する領域をグルーピングすることで、物体領域であり得る複数の領域が候補として推定される。 The arithmetic circuit 10 further operates as a second cutout section 112b to estimate object region candidates in the second input image, and extract small regions such as the estimated region Er1 based on the estimation results as a second cutout region group. Execute pre-processing for cutting out (S3). For example, the arithmetic circuit 10 estimates a plurality of object region candidates based on the image data of the second input image using an object region estimation technique such as Selective Search (Non-Patent Document 5), and randomly selects one from the estimation results. A predetermined number (for example, three) of candidates are extracted as small regions of the second cutout region group. In selective search, a plurality of regions that can be object regions are estimated as candidates by grouping regions in an image whose pixels have similar features such as color and texture.

演算回路10は、例えば上記のような処理により第2入力画像から切り出した第2切出領域群に関する領域数、サイズ及び画像データを、第1切出領域群の場合と同様に、内部メモリ及び/または記憶装置20等に保持してもよい。また、第1切出領域群が、ソースドメインの正解ラベルによる第1物***置情報に基づいて抽出される場合、正解ラベルにおいて物体の種類を示す情報等が、合成先(ステップS5で後述)の第2入力画像の画像データと対応付けて保持されてもよい。 The arithmetic circuit 10 stores the number of regions, size, and image data regarding the second cutout region group cut out from the second input image by, for example, the above-described processing, in the internal memory and the like in the case of the first cutout region group. /Or it may be held in the storage device 20 or the like. In addition, when the first cutout region group is extracted based on the first object position information based on the correct label of the source domain, information indicating the type of object in the correct label, etc. is transferred to the synthesis destination (described later in step S5). It may be held in association with the image data of the second input image.

次に、演算回路10は、例えば学習データにおけるそれぞれ複数の第1及び第2入力画像から、第1及び第2入力画像を1つずつランダムサンプリング等により選択した組毎に、以下のステップS4,S5の処理を実行する。 Next, the arithmetic circuit 10 selects the first and second input images one by one from the plurality of first and second input images in the learning data by random sampling or the like, and performs the following steps S4, Execute the process of S5.

演算回路10は、第1合成位置選定部113aとして、第1入力画像における第2切出小領域群の各小領域の合成位置を決定し、第2合成位置選定部113bとして、第2入力画像における第1切出小領域群の各小領域の合成位置を決定する(S4)。例えば、演算回路10は、まず、第1及び第2切出領域群の領域数に応じて、ランダムに計算した合成位置を選定する。演算回路10は、例えば各小領域のサイズをランダムに拡大または縮小したサイズを計算して、計算したサイズ及び合成位置において合成した場合に、画像上の位置が既知な物体領域が隠れるか否かを判断する。 The arithmetic circuit 10, as a first synthesis position selection unit 113a, determines the synthesis position of each small area of the second cutout small area group in the first input image, and as a second synthesis position selection unit 113b, determines the synthesis position of each small area in the second cutout small area group in the first input image. The synthesis position of each small region of the first cut out small region group is determined (S4). For example, the arithmetic circuit 10 first selects a randomly calculated combining position according to the number of regions in the first and second cutout region groups. The arithmetic circuit 10 calculates, for example, the size of each small area by randomly expanding or contracting it, and determines whether or not an object area whose position on the image is known will be hidden if the size is combined at the calculated size and combination position. to judge.

例えば、第1入力画像に第2切出領域群の小領域を重畳する際に、第1物***置情報により第1入力画像上の位置が既知な物体領域、即ち正解領域Gr1を隠す場合がある。演算回路10は、例えば画像データを合成する第1入力画像の正解領域Gr1と、拡大または縮小後の各小領域との重なり度合いを示すIoU(Intersection over Union)が所定値以上である場合に、正解領域Gr1が小領域の重畳により隠れると判断する。所定値は、例えば50%である。 For example, when superimposing small regions of the second cutout region group on the first input image, the first object position information may hide an object region whose position on the first input image is known, that is, the correct region Gr1. . For example, when IoU (Intersection over Union), which indicates the degree of overlap between the correct region Gr1 of the first input image for which image data is to be combined and each small region after enlargement or reduction, is equal to or greater than a predetermined value, the arithmetic circuit 10 calculates the following: It is determined that the correct region Gr1 is hidden by the superposition of the small regions. The predetermined value is, for example, 50%.

正解領域Gr1が隠れる場合、演算回路10は、例えばランダムな合成位置を再計算して、正解領域Gr1が隠れなくなる(例えばIoUが50%未満)まで合成位置を再選定することで、各小領域の合成位置を決定する(S4)。演算回路10は、例えば各小領域の合成時のサイズと、決定した合成位置を示す合成位置情報とを内部メモリ等に保持する。 If the correct area Gr1 is hidden, the arithmetic circuit 10 recalculates the random synthesis position, for example, and reselects the synthesis position until the correct area Gr1 is no longer hidden (for example, IoU is less than 50%). (S4). The arithmetic circuit 10 stores, for example, the size of each small area at the time of synthesis and synthesis position information indicating the determined synthesis position in an internal memory or the like.

演算回路10は、第1合成部114aとして、決定された合成位置情報に基づき、第2切出領域群における拡大または縮小後の各小領域を第1入力画像に重畳させるように、合成した画像データを生成する(S5)。また、演算回路10は、第2合成部114bとして、例えば第1合成部114aと同様に合成位置情報に基づき、第1切出領域群における拡大または縮小後の各小領域を第2入力画像に重畳させるように、合成した画像データを生成する(S5)。 The arithmetic circuit 10, as the first synthesis unit 114a, generates a synthesized image based on the determined synthesis position information so that each enlarged or reduced small area in the second cutout area group is superimposed on the first input image. Generate data (S5). Further, the arithmetic circuit 10, as the second compositing unit 114b, converts each enlarged or reduced small region in the first cutout region group into a second input image based on the compositing position information similarly to the first compositing unit 114a, for example. Combined image data is generated so as to be superimposed (S5).

演算回路10は、第1及び第2合成部114a,114bとして生成した画像データが示す各合成画像を、例えば合成画像群Imとして集約する(S6)。演算回路10は、例えば合成画像群Imの画像データを記憶装置20等に格納する。 The arithmetic circuit 10 aggregates each composite image indicated by the image data generated by the first and second compositing units 114a and 114b, for example, as a composite image group Im (S6). The arithmetic circuit 10 stores, for example, image data of the composite image group Im in the storage device 20 or the like.

以上の処理(S1~S6)によれば、それぞれソース及びターゲットドメインからの第1及び第2入力画像において、相互に他方のドメインの画像から切り出した小領域を貼り付けるように合成した画像データが得られる。 According to the above processing (S1 to S6), in the first and second input images from the source and target domains, respectively, the image data is synthesized by pasting small regions cut out from the image of the other domain. can get.

演算回路10は、画像認識部12として、画像認識NN21に合成画像群Imの画像データを入力し、画像認識NN21により各合成画像から特徴量を抽出して、抽出した特徴量に基づいて画像認識処理を実行する(S7)。演算回路10は、例えば合成画像群Imの各合成画像において画像認識処理により物体領域を検出する。 The arithmetic circuit 10, as an image recognition unit 12, inputs the image data of the composite image group Im to the image recognition NN 21, extracts feature amounts from each composite image by the image recognition NN 21, and performs image recognition based on the extracted feature amounts. Processing is executed (S7). The arithmetic circuit 10 detects an object area in each composite image of the composite image group Im by image recognition processing, for example.

画像認識処理を実行後(S7)、演算回路10は、例えば更新部13として、認識結果に基づいて検出損失Ld等を含む損失Lmを計算する(S8)。画像認識処理の認識結果は、合成画像群Imにおいて抽出された特徴量を含んでもよい。損失Lmの詳細については後述する。 After executing the image recognition process (S7), the arithmetic circuit 10, for example as the update unit 13, calculates the loss Lm including the detection loss Ld etc. based on the recognition result (S8). The recognition result of the image recognition process may include the feature amount extracted in the composite image group Im. Details of the loss Lm will be described later.

更新部13としての演算回路10は、計算した損失Lmに基づき、例えば誤差逆伝搬法等により画像認識NN21のパラメータを更新することで、画像認識NN21の機械学習を行う(S9)。 The arithmetic circuit 10 serving as the updating unit 13 performs machine learning of the image recognition NN 21 by updating the parameters of the image recognition NN 21 based on the calculated loss Lm using, for example, the error back propagation method (S9).

演算回路10は、所定の回数(即ちイテレーション数)、読み出した学習データ(S1)を用いて画像認識NN21のパラメータを更新する更新処理(S9)を繰り返したか否かを判定する(ステップS10)。演算回路10は、例えば更新処理(S9)の実行回数を、内部メモリに保持したカウンタ変数等により管理してもよい。 The arithmetic circuit 10 determines whether the update process (S9) of updating the parameters of the image recognition NN 21 using the read learning data (S1) has been repeated a predetermined number of times (ie, the number of iterations) (step S10). The arithmetic circuit 10 may manage, for example, the number of executions of the update process (S9) using a counter variable held in an internal memory.

所定の回数分の更新処理(S9)を繰り返していない場合(ステップS10でNо)、演算回路10は、ステップS1に戻り、ステップS1以降の処理を再度実行する。所定の回数分の更新処理(S9)を繰り返した場合(ステップS10でYes)、演算回路10は、本フローチャートの処理を終了する。 If the update process (S9) has not been repeated the predetermined number of times (No in step S10), the arithmetic circuit 10 returns to step S1 and executes the processes from step S1 onwards again. If the update process (S9) has been repeated a predetermined number of times (Yes in step S10), the arithmetic circuit 10 ends the process of this flowchart.

以上の処理によれば、ドメインが異なる第1及び第2入力画像において、物体領域またはその推定結果を切り出した小領域を、他方のドメインの入力画像に重畳させる合成処理が実行される(S1~S5)。そして、合成処理により生成された合成画像群Im(S6)において画像認識NN21による画像認識処理が実行され(S7)、認識結果等から計算される損失Lm(S8)に基づいて画像認識NN21のパラメータが更新される(S9)。このように、物体領域を考慮した合成処理により異なるドメインの第1及び第2入力画像が合成された合成画像群Imを用いて、画像認識NN21の機械学習を行い、上記のような更新処理(S9)を所定回数繰り返すことで学習済みの画像認識NN21が得られる。これにより、学習装置1において、物体検出といった画像認識を精度良く実現可能な画像認識NN21を学習することができる。 According to the above processing, in the first and second input images of different domains, a synthesis process is executed in which a small region obtained by cutting out the object region or its estimation result is superimposed on the input image of the other domain (S1 to S5). Then, image recognition processing is performed by the image recognition NN 21 on the composite image group Im (S6) generated by the composition processing (S7), and the parameters of the image recognition NN 21 are calculated based on the loss Lm (S8) calculated from the recognition results etc. is updated (S9). In this way, machine learning of the image recognition NN 21 is performed using the synthesized image group Im in which the first and second input images of different domains are synthesized through a synthesis process that takes into account the object area, and the update process ( By repeating S9) a predetermined number of times, a learned image recognition NN 21 is obtained. Thereby, the learning device 1 can learn the image recognition NN 21 that can accurately realize image recognition such as object detection.

上記の処理において、損失Lmは、画像認識NN21に遡及させてパラメータを更新(S9)できれば任意の手法で計算されてよく、例えばタスクに応じて選択される損失関数及びその組み合わせにより計算される(S8)。例えば、L1Loss,L2Loss,CrossEntropyLoss、またはPerceptualLoss等の損失関数が使用されてもよく、これらの損失関数が組み合わせて使用されてもよい。 In the above processing, the loss Lm may be calculated by any method as long as the image recognition NN 21 can be retroactively updated to update the parameters (S9). For example, the loss Lm may be calculated using a loss function selected depending on the task and a combination thereof ( S8). For example, loss functions such as L1Loss, L2Loss, CrossEntropyLoss, or PerceptualLoss may be used, and these loss functions may be used in combination.

上記の処理では、第2切出部112bによる前処理(S3)において、第2入力画像では、物体領域推定による推定結果からランダムに物体領域の候補を選定する例を説明したが、第2切出部112bによる前処理はこれに限らない。 In the above process, in the preprocessing (S3) by the second cutting unit 112b, an example has been described in which object area candidates are randomly selected from the estimation results of object area estimation in the second input image. The preprocessing performed by the output unit 112b is not limited to this.

例えば、第2切出部112bとしての演算回路10は、例えばソースドメインからの第1入力画像の画像データ及び正解ラベルを用いて事前学習された画像認識NN21により、ターゲットドメインの第2入力画像において物体検出を行ってもよい。演算回路10は、例えば認識結果における複数の検出領域から、対応する信頼度が高い順に所定数の検出領域を選択することで、推定領域Er1としての物体領域の候補を選定してもよい。また、演算回路10は、例えば第2入力画像においてランダムに位置及びサイズを決定した所定数の領域を、物体領域の候補として選定してもよい。 For example, the arithmetic circuit 10 as the second extraction unit 112b uses the image recognition NN 21 that has been trained in advance using the image data of the first input image from the source domain and the correct label to generate a second input image of the target domain. Object detection may also be performed. The arithmetic circuit 10 may select object region candidates as the estimated region Er1, for example, by selecting a predetermined number of detection regions in descending order of corresponding reliability from a plurality of detection regions in the recognition results. Further, the arithmetic circuit 10 may select, for example, a predetermined number of regions whose positions and sizes are randomly determined in the second input image as object region candidates.

また、上記の処理において、例えば各ドメインからの第1及び第2入力画像において、一方のドメインの画像からのみ小領域を切り出して、他方のドメインの画像に合成した画像データが生成されてもよい。例えば、演算回路10は、ステップS3において第1入力画像から小領域を切り出した場合、ステップS4では第2入力画像への合成位置を選定して、ステップS5において第2入力画像に第1入力画像からの小領域を合成する。演算回路10は、ステップS3で第2入力画像から小領域を切り出した場合、ステップS4では第1入力画像への合成位置を選定して、ステップS5では第1入力画像に第2入力画像からの小領域を合成する。 Further, in the above processing, for example, in the first and second input images from each domain, image data may be generated by cutting out a small region only from the image of one domain and combining it with the image of the other domain. . For example, when the arithmetic circuit 10 cuts out a small region from the first input image in step S3, in step S4 it selects a position for combining the first input image with the second input image, and in step S5, it selects a position for combining the first input image with the second input image. Combine small regions from. When the arithmetic circuit 10 cuts out a small region from the second input image in step S3, in step S4 it selects a position for merging with the first input image, and in step S5, it selects a combination position from the second input image into the first input image. Combine small areas.

3-3.学習動作の詳細
以上のような学習装置1において機械学習を行う学習動作の詳細について、図5を用いて説明する。
3-3. Details of Learning Operation Details of the learning operation for performing machine learning in the learning device 1 as described above will be explained using FIG. 5.

図5は、本実施形態の学習装置1における学習動作を説明するための図である。学習装置1において、画像認識NN21は、例えば図5に示すように、画像データから特徴量を抽出する特徴抽出器21aと、抽出された特徴量に基づき、当該画像データの画像において物体領域を検出する検出器21bとを含む。 FIG. 5 is a diagram for explaining the learning operation in the learning device 1 of this embodiment. In the learning device 1, the image recognition NN 21 includes a feature extractor 21a that extracts feature amounts from image data, and detects an object region in an image of the image data based on the extracted feature amounts, as shown in FIG. 5, for example. and a detector 21b.

本実施形態では、画像認識NN21は、さらに、特徴抽出器21aにより画像データから抽出される特徴量に基づき、当該画像データ内の所定の領域がソースドメインまたはターゲットドメインのいずれに属するかを識別するドメイン識別器21cを備える。また、図5の画像認識NN21は、特徴抽出器21a及びドメイン識別器21cの学習に用いる勾配反転層(GRL)21dを含む。特徴抽出器21a、検出器21b、及びドメイン識別器21cは、例えば各々がニューラルネットワークで構成されて、パラメータを有する。 In this embodiment, the image recognition NN 21 further identifies whether a predetermined region in the image data belongs to the source domain or the target domain based on the feature amount extracted from the image data by the feature extractor 21a. A domain identifier 21c is provided. The image recognition NN 21 in FIG. 5 also includes a gradient reversal layer (GRL) 21d used for learning the feature extractor 21a and domain classifier 21c. The feature extractor 21a, the detector 21b, and the domain classifier 21c are each configured, for example, by a neural network and have parameters.

演算回路10は、まず、画像生成部11として、例えば学習データの可視光画像Sd1及び赤外線画像Td1から、上述したように合成画像群Imの画像データを生成する(S1~S6)。この際、演算回路10は、可視光画像Sd1において赤外線画像Td1から重畳させた推定領域Er1の位置を示す正解ドメインラベルDg1を内部メモリ等に保持する。同様に、演算回路10は、赤外線画像Td1において可視光画像Sd1から正解領域Gr1を重畳させた位置を示す正解ドメインラベルDg2を保持する。 First, the arithmetic circuit 10, as the image generation unit 11, generates image data of the composite image group Im, as described above, from, for example, the visible light image Sd1 and the infrared image Td1 of the learning data (S1 to S6). At this time, the arithmetic circuit 10 stores in an internal memory or the like a correct domain label Dg1 indicating the position of the estimated region Er1 superimposed from the infrared image Td1 on the visible light image Sd1. Similarly, the arithmetic circuit 10 holds a correct domain label Dg2 indicating the position where the correct area Gr1 is superimposed on the visible light image Sd1 in the infrared image Td1.

正解ドメインラベルDg1,Dg2は、例えば各画像Sd1,Sd2のうちのソースドメインの画像である領域を「0」、ターゲットドメインの画像である領域を「1」として、画素毎等にいずれのドメインに由来するかを対応付ける。これにより、各画像Sd1,Sd2に部分領域として推定領域Er1または正解領域Gr1を重畳させた位置が特定される。 The correct domain labels Dg1 and Dg2 are, for example, "0" for the region of each image Sd1, Sd2 that is an image of the source domain, and "1" for the region that is an image of the target domain. Correlate the origin. As a result, the position where the estimated region Er1 or the correct region Gr1 is superimposed as a partial region on each of the images Sd1 and Sd2 is specified.

次に、演算回路10は、画像認識部12として、画像認識NN21に合成画像群Imの画像データを入力し、画像認識NN21による画像認識処理を実行する(S7)。 Next, the arithmetic circuit 10, as the image recognition unit 12, inputs the image data of the composite image group Im to the image recognition NN 21, and executes image recognition processing by the image recognition NN 21 (S7).

画像認識NN21は、まず、特徴抽出器21aにより、例えば合成画像群Imの画像データから畳み込み演算で特徴量を抽出して、抽出した特徴量を示す特徴マップを出力する。画像認識NN21は、例えば特徴マップを検出器21b及びドメイン識別器21cに入力する。こうした順伝搬時には、勾配反転層21dは、入力された特徴マップをそのまま出力する恒等関数として機能する。特徴マップは、例えば、学習に用いるミニバッチのサンプル数N、CNNにおけるチャンネル数C、高さH、及び幅Wとして、N×C×H×Wのサイズを有する4次元のテンソルである。 The image recognition NN 21 first uses the feature extractor 21a to extract feature amounts from the image data of the composite image group Im, for example, by a convolution operation, and outputs a feature map indicating the extracted feature amounts. The image recognition NN 21 inputs, for example, a feature map to the detector 21b and the domain classifier 21c. During such forward propagation, the gradient inversion layer 21d functions as an identity function that outputs the input feature map as it is. The feature map is, for example, a four-dimensional tensor having a size of N×C×H×W, where N is the number of samples in the mini-batch used for learning, C is the number of channels in the CNN, is a height H, and is a width W.

画像認識NN21は、検出器21bにより、特徴マップに基づいて合成画像群Imの画像データにおける物体検出の画像認識処理を行い、検出領域を出力する。また、画像認識NN21は、ドメイン識別器21cにより、特徴マップに基づいて、例えば、特徴マップの要素毎にソースドメインまたはターゲットドメインを識別した識別結果を出力する。識別結果は、例えばN×1×H×W(即ち1チャンネル)のサイズを有し、要素毎に「0」以上「1」以下の実数値で出力される。識別結果は、特徴マップからダウンサンプリングされて幅及び高さが縮小されてもよい。画像認識NN21は、例えば検出器21bの検出領域及びドメイン識別器21cの識別結果を含む認識結果を出力する。 The image recognition NN 21 uses the detector 21b to perform image recognition processing for object detection in the image data of the composite image group Im based on the feature map, and outputs a detection area. Furthermore, the image recognition NN 21 outputs an identification result in which the source domain or the target domain is identified for each element of the feature map, for example, based on the feature map by the domain classifier 21c. The identification result has a size of, for example, N×1×H×W (that is, one channel), and is output as a real value between “0” and “1” for each element. The identification results may be downsampled from the feature map to reduce the width and height. The image recognition NN 21 outputs a recognition result including, for example, the detection area of the detector 21b and the identification result of the domain classifier 21c.

演算回路10は、例えば更新部13として、画像認識NN21検出領域と正解ラベルとに基づき、検出損失Ldを計算する。演算回路10は、例えば内部メモリ及び/または記憶装置20を参照し、合成画像群Imにおける推定領域Er1を重畳させた可視光画像Sd1に対応付けて、または正解領域Gr1を重畳させた赤外線画像Td1に対応付けて保持された正解ラベルを取得する。 The arithmetic circuit 10, for example as the update unit 13, calculates the detection loss Ld based on the detection area of the image recognition NN 21 and the correct label. The arithmetic circuit 10 refers to the internal memory and/or the storage device 20, for example, and generates an infrared image Td1 in association with the visible light image Sd1 on which the estimated region Er1 in the composite image group Im is superimposed, or an infrared image Td1 on which the correct answer region Gr1 is superimposed. Obtain the correct answer label associated with and retained.

また、更新部13としての演算回路10は、ドメイン識別器21cの識別結果と正解ドメインラベルDg1,Dg2とを比較する演算を行い、特徴抽出器21aとドメイン識別器21cとの敵対的学習のための敵対的損失(Adversarial Loss)Laを計算する。敵対的損失Laは、識別結果と各正解ドメインラベルDg1,Dg2とが一致しない、即ちドメインが誤って識別されると大きくなるように設計される。敵対的損失Laには、例えばLogisticLossまたはLeastSquaresLoss等が用いられてもよい。 In addition, the arithmetic circuit 10 as the update unit 13 performs a computation to compare the classification result of the domain classifier 21c and the correct domain labels Dg1 and Dg2, and performs a computation for the adversarial learning between the feature extractor 21a and the domain classifier 21c. Calculate the adversarial loss La. The adversarial loss La is designed to increase when the identification result and each correct domain label Dg1, Dg2 do not match, that is, when a domain is incorrectly identified. For example, LogisticLoss or LeastSquaresLoss may be used as the adversarial loss La.

演算回路10は、例えば損失Lmとして、上記の検出損失Ld及び敵対的損失Laを計算すると(S8)、更新部13の機能により、損失Lmに基づいて、勾配降下法等により画像認識NN21のパラメータを更新する(S9)。演算回路10は、例えば誤差逆伝搬により検出損失Ldを最小化するように、特徴抽出器21a及び検出器21bのパラメータを更新する。 When the arithmetic circuit 10 calculates the above-mentioned detection loss Ld and adversarial loss La as the loss Lm (S8), the function of the update unit 13 changes the parameters of the image recognition NN 21 by gradient descent or the like based on the loss Lm. is updated (S9). The arithmetic circuit 10 updates the parameters of the feature extractor 21a and the detector 21b so as to minimize the detection loss Ld by, for example, error back propagation.

また、演算回路10は、敵対的損失Laを逆伝搬させ、敵対的損失Laを最小化するように、ドメイン識別器21cのパラメータを更新する。ドメイン識別器21cがドメイン識別を誤るほど敵対的損失Laが大きくなることから、敵対的損失Laの最小化により、ドメイン識別器21cは各ドメインを識別できるように学習される。 Furthermore, the arithmetic circuit 10 back-propagates the adversarial loss La and updates the parameters of the domain discriminator 21c so as to minimize the adversarial loss La. Since the more the domain classifier 21c misidentifies a domain, the larger the adversarial loss La becomes, the domain classifier 21c is trained to identify each domain by minimizing the adversarial loss La.

さらに、演算回路10は、勾配反転層21dにより、敵対的損失Laの勾配の符号を反転させ、特徴抽出器21aに逆伝搬させる。この場合、特徴抽出器21aが抽出した特徴量に基づいてドメイン識別器21cによりドメインが識別されるほど、即ち敵対的損失Laが小さくなるほど特徴抽出器21aに伝搬される勾配は大きくなり、特徴抽出器21aに課されるペナルティが大きくなる。そこで、特徴抽出器21aについては、演算回路10は、敵対的損失Laを最大化するように、パラメータを更新する。これにより、特徴抽出器21aは、ドメイン識別器21cによるドメインの識別が困難な特徴量を抽出するように学習される。 Further, the arithmetic circuit 10 uses the gradient inversion layer 21d to invert the sign of the gradient of the adversarial loss La, and causes it to back-propagate to the feature extractor 21a. In this case, the more a domain is identified by the domain classifier 21c based on the feature amount extracted by the feature extractor 21a, that is, the smaller the adversarial loss La becomes, the larger the gradient propagated to the feature extractor 21a becomes The penalty imposed on the device 21a increases. Therefore, regarding the feature extractor 21a, the arithmetic circuit 10 updates the parameters so as to maximize the adversarial loss La. Thereby, the feature extractor 21a is trained to extract feature amounts whose domains are difficult to identify by the domain classifier 21c.

以上の敵対的損失Laの逆伝搬により、特徴抽出器21aはドメイン識別を誤らせるように、ドメイン識別器21cはドメインを識別できるように、両者が競い合って敵対的に学習される。これにより、画像認識NN21において、特徴抽出器21aは、ドメイン識別が困難なドメイン不変表現を獲得するように学習される。また、検出損失Ldの逆伝搬により、特徴抽出器21aは、例えば物体検出を精度良く行い易い特徴表現を獲得するように学習される。学習後の画像認識NN21による推論時には、以上のように学習された特徴抽出器21a及び検出器21bを用いて、ソースドメイン及びターゲットドメインの何れにおいても精度良く物体検出の画像認識を実現することができる。 Due to the back propagation of the adversarial loss La described above, the feature extractor 21a is trained adversarially so that it can misidentify the domain, and the domain discriminator 21c is trained adversarially so that it can identify the domain. Thereby, in the image recognition NN 21, the feature extractor 21a is trained to obtain domain-invariant expressions that are difficult to identify. Further, by back propagation of the detection loss Ld, the feature extractor 21a is trained to acquire a feature expression that facilitates accurate object detection, for example. At the time of inference by the image recognition NN 21 after learning, it is possible to realize image recognition for object detection with high accuracy in both the source domain and the target domain by using the feature extractor 21a and detector 21b learned as described above. can.

(実施形態1の変形例)
上記の例では、ターゲットドメインの画像に対応する正解ラベルが利用できない教師無しドメイン適応に適用される学習装置1を説明した。学習装置1は、これに限らず、例えばターゲットドメインに、正解ラベルが対応付けられた画像を含む場合のドメイン適応に適用されてもよい。図6を用いて、実施形態1の変形例に係る学習装置1を説明する。
(Modification of Embodiment 1)
In the above example, the learning device 1 is applied to unsupervised domain adaptation where the correct label corresponding to the target domain image is not available. The learning device 1 is not limited to this, and may be applied, for example, to domain adaptation when the target domain includes an image associated with a correct label. A learning device 1 according to a modification of the first embodiment will be described using FIG. 6.

図6は、本変形例の学習装置1における演算回路10の機能的構成を例示するブロック図である。本変形例の学習装置1は、例えば実施形態1と同様の構成において、演算回路10の機能的構成として、画像生成部11に代えて、画像生成部11Aを備える。画像生成部11Aでは、第2入力部111bが、演算回路10に記憶装置20から読み出される第3入力画像を入力する。第3入力画像は、ターゲットドメインから得られる正解ラベル付きの画像である。 FIG. 6 is a block diagram illustrating the functional configuration of the arithmetic circuit 10 in the learning device 1 of this modification. The learning device 1 of this modification has, for example, the same configuration as the first embodiment, but includes an image generation section 11A instead of the image generation section 11 as the functional configuration of the arithmetic circuit 10. In the image generation unit 11A, the second input unit 111b inputs the third input image read out from the storage device 20 to the arithmetic circuit 10. The third input image is an image with a ground truth label obtained from the target domain.

画像生成部11Aの第2切出部112bは、例えば第1切出部112aと同様に、第3入力画像において、物体が映った位置を示す第3物***置情報として、正解ラベルに基づいて小領域の選定及び切り出しを行う。第2切出部112bは、切り出した小領域を含む第3切出領域群を、第1合成部114aに供給するとともに、第3切出領域群における領域数及び各小領域のサイズを第1合成位置選定部113aに出力する。 The second cutout unit 112b of the image generation unit 11A, for example, similarly to the first cutout unit 112a, extracts a small size based on the correct label as third object position information indicating the position where the object appears in the third input image. Select and cut out the area. The second cutout section 112b supplies the third cutout region group including the cutout small regions to the first synthesis section 114a, and sets the number of regions and the size of each small region in the third cutout region group to the first cutout region group. It is output to the combination position selection section 113a.

画像生成部11Aの第2合成位置選定部113bは、第3入力画像に第1切出領域群の小領域を重畳させるような画像データの合成位置を選定する。この際、当該小領域が、第3物***置情報により第3入力画像上の位置が既知な物体領域を隠す場合、第2合成位置選定部113bは、例えば実施形態1のステップS4における第1合成位置選定部113aと同様に、合成位置を再選定する。 The second combination position selection unit 113b of the image generation unit 11A selects a combination position of image data such that the small area of the first cutout area group is superimposed on the third input image. At this time, if the small area hides an object area whose position on the third input image is known based on the third object position information, the second combination position selection unit 113b performs the first combination in step S4 of the first embodiment, for example. Similar to the position selection unit 113a, the combination position is reselected.

画像生成部11Aの第2合成部114bは、第3入力画像において、選定された合成位置に第1切出領域群の各領域を重畳させるように、合成した画像データを生成する。 The second combining unit 114b of the image generating unit 11A generates combined image data such that each area of the first cutout area group is superimposed on the selected combining position in the third input image.

また、画像生成部11Aでは、第1合成位置選定部113aは、第1入力画像に第3切出領域群の小領域を重畳させるような画像データの合成位置を選定する。第1合成部114aは、第1入力画像の選定された合成位置に第3切出領域群の各領域を重畳させるように、合成した画像データを生成する。 Furthermore, in the image generation unit 11A, the first combination position selection unit 113a selects a combination position of image data such that the small area of the third cutout area group is superimposed on the first input image. The first synthesis unit 114a generates synthesized image data so that each region of the third cutout region group is superimposed on the selected synthesis position of the first input image.

なお演算回路10は、例えばターゲットドメインの画像に対応する正解ラベルの有無、即ち第3入力画像を取得するか第2入力画像を取得するかに応じて、画像生成部11Aまたは画像生成部11(図3参照)として機能してもよい。 Note that the arithmetic circuit 10 controls the image generation unit 11A or the image generation unit 11( (see FIG. 3).

以上の学習装置1によれば、例えばターゲットドメインにおいて、正解ラベルを利用可能な画像が含まれる場合にも、ソースドメインの画像データ及び正解ラベルを用いたドメイン適応が可能である。これにより、例えばターゲットドメインの画像についても正解ラベルは利用可能だが、ソースドメインほど十分に多いデータ量が得られない場合等であっても、画像認識を精度良く行える画像認識NN21を学習することができる。 According to the learning device 1 described above, domain adaptation using the image data of the source domain and the correct label is possible even when, for example, the target domain includes an image for which the correct label can be used. As a result, even if, for example, correct labels can be used for images in the target domain, but a sufficiently large amount of data cannot be obtained as in the source domain, it is possible to train the image recognition NN21 that can perform image recognition with high accuracy. can.

4.効果等
以上のように、本実施形態に係る学習装置1は、画像データが示す画像において物体の画像認識を行う画像認識モデルの一例として画像認識NN21の機械学習を制御する演算回路10を備える。演算回路10は、物体の位置に関連付けられた物体領域を示す正解ラベル(正解情報の一例)を有する可視光画像Sd1(第1の画像の一例)を含み、所定の特性を有するソースドメイン(第1のドメインの一例)と、正解ラベルを有しない赤外線画像Td1,Td20(第2の画像の一例)を含み、かつソースドメインの特性とは異なる特性を有するターゲットドメイン(第2のドメインの一例)との少なくとも一方に含まれる画像から、物体領域の候補を示す部分領域の一例として、正解領域Gr1等の第1切出領域群及び推定領域Er1等の第2切出領域群を抽出する(S3)。演算回路10は、ソースドメインの可視光画像Sd1から正解領域Gr1(部分領域の一例)を抽出する場合には可視光画像Sd1からの正解領域Gr1を赤外線画像Td1に重畳させて合成した画像データを生成し、ターゲットドメインの赤外線画像Td1から推定領域Er1(部分領域の一例)を抽出する場合には赤外線画像Td1からの推定領域Er1を可視光画像Sd1に重畳させて合成した画像データの一例として、合成画像群Imの画像データを生成する(S4~S6)。演算回路10は、合成画像群Imの画像データに基づいて、画像認識NN21が含むパラメータを機械学習により更新する(S7~S9)。
4. Effects, etc. As described above, the learning device 1 according to the present embodiment includes the arithmetic circuit 10 that controls machine learning of the image recognition NN 21 as an example of an image recognition model that performs image recognition of an object in an image indicated by image data. The arithmetic circuit 10 includes a visible light image Sd1 (an example of a first image) having a correct label (an example of correct information) indicating an object region associated with the position of the object, and a source domain (an example of a first image) having predetermined characteristics. A target domain (an example of a second domain) that includes an infrared image Td1, Td20 (an example of a second image) that does not have a correct label and has characteristics different from those of the source domain (an example of a second domain) A first cutout region group such as the correct region Gr1 and a second cutout region group such as the estimated region Er1 are extracted from the image included in at least one of ). When extracting the correct region Gr1 (an example of a partial region) from the visible light image Sd1 of the source domain, the arithmetic circuit 10 superimposes the correct region Gr1 from the visible light image Sd1 on the infrared image Td1 and synthesizes the image data. When generating and extracting the estimated region Er1 (an example of a partial region) from the infrared image Td1 of the target domain, as an example of image data synthesized by superimposing the estimated region Er1 from the infrared image Td1 on the visible light image Sd1, Image data of the composite image group Im is generated (S4 to S6). The arithmetic circuit 10 updates the parameters included in the image recognition NN 21 by machine learning based on the image data of the composite image group Im (S7 to S9).

以上の学習装置1によると、ソースドメイン及び/またはターゲットドメインの画像から物体領域に応じた部分領域を抽出し、他方のドメインの画像に重畳させて合成した画像データに基づいて、画像認識NN21の機械学習が行われる。これにより、例えばソースドメインとターゲットドメインとのドメインシフトに対処しながら、物体検出等の画像認識を精度良く実現可能な画像認識NN21の機械学習を行うことができる。 According to the learning device 1 described above, the image recognition NN 21 extracts a partial region corresponding to the object region from an image of the source domain and/or the target domain, and superimposes it on the image of the other domain to synthesize the image data. Machine learning takes place. Thereby, machine learning of the image recognition NN 21 that can accurately realize image recognition such as object detection can be performed while dealing with a domain shift between the source domain and the target domain, for example.

本実施形態において、第2の画像の一例として、ターゲットドメインからの第3入力画像(図6参照)は、正解ラベルを有する。例えばターゲットドメインは、第3入力画像のみを含んでいてもよい。 In this embodiment, as an example of the second image, the third input image from the target domain (see FIG. 6) has a correct label. For example, the target domain may include only the third input image.

本実施形態において、第2の画像の一例として、ターゲットドメインからの第2入力画像(図3参照)は、正解ラベルを有しない。例えばターゲットドメインは、第2入力画像のみを含んでいてもよい。 In this embodiment, as an example of the second image, the second input image from the target domain (see FIG. 3) does not have a ground truth label. For example, the target domain may include only the second input image.

本実施形態において、演算回路10は、ソースドメインの可視光画像Sd1及びターゲッドメインの赤外線画像Td1の各々から、部分領域の一例として正解領域Gr1及び推定領域Er1を抽出(S3)する。演算回路10は、可視光画像Sd1からの正解領域Gr1を赤外線画像Td1に重畳させて合成した画像データ、及び、赤外線画像Td1からの推定領域Er1を可視光画像Sd1に重畳させて合成した画像データ(S4~S6)に基づいて、画像認識NN21が含むパラメータを機械学習により更新する(S7~S9)。これにより、ソースドメイン及びターゲットドメインの各画像Sd1,Td1から、相互に部分領域を切り出して他方のドメインの画像に重畳させ、合成した画像データが得られる。このように相互に部分領域を合成した画像データに基づいて、ソース及びターゲットの両ドメインにおいて物体検出のような画像認識が精度良く実現可能なドメイン不変表現を獲得するように、画像認識NN21の機械学習を行うことができる。 In the present embodiment, the arithmetic circuit 10 extracts a correct region Gr1 and an estimated region Er1 as an example of a partial region from each of the visible light image Sd1 of the source domain and the infrared image Td1 of the target domain (S3). The arithmetic circuit 10 generates image data obtained by superimposing the correct region Gr1 from the visible light image Sd1 on the infrared image Td1, and image data obtained by superimposing the estimated region Er1 from the infrared image Td1 on the visible light image Sd1. Based on (S4 to S6), parameters included in the image recognition NN 21 are updated by machine learning (S7 to S9). As a result, partial regions are mutually cut out from each of the images Sd1 and Td1 of the source domain and the target domain and superimposed on the image of the other domain to obtain combined image data. The image recognition NN21 machine is designed to obtain a domain-invariant representation that can accurately perform image recognition such as object detection in both the source and target domains based on the image data obtained by composing partial regions with each other in this way. Learning can be done.

本実施形態において、演算回路10は、可視光画像Sd1における正解ラベルによる第1物***置情報(第1の画像における物体領域の正解情報の一例)に基づいて、可視光画像Sd1から正解領域Gr1(部分領域の一例)を抽出する(S3)。これにより、正解ラベルから画像における物体領域の位置が既知のソースドメインでは、物体領域に応じた部分領域を精度良く抽出することができる。 In the present embodiment, the arithmetic circuit 10 converts the visible light image Sd1 to the correct region Gr1 ( An example of a partial region) is extracted (S3). As a result, in a source domain where the position of an object region in an image is known from the correct label, a partial region corresponding to the object region can be extracted with high accuracy.

本実施形態において、画像認識NN21は、ソースドメインの可視光画像Td1等(第1の画像の一例)を示す画像データと、可視光画像における物体領域の正解ラベルとに基づいて学習されている。正解ラベルが利用可能なソースドメインの画像を用いた画像認識NN21の事前学習により、例えば画像認識NN21の画像認識処理における汎化性能を高めることができる。 In this embodiment, the image recognition NN 21 is trained based on image data indicating the visible light image Td1 etc. (an example of the first image) of the source domain and the correct label of the object region in the visible light image. By pre-learning the image recognition NN 21 using source domain images for which correct labels are available, the generalization performance of the image recognition NN 21 in image recognition processing can be improved, for example.

本実施形態において、演算回路10は、ターゲットドメインの赤外線画像Td1(第2の画像の一例)を示す画像データに基づいて、赤外線画像Td1における物体領域の候補を推定し、推定した候補から選択するように、赤外線画像Td1からの部分領域の一例である推定領域Er1を抽出する(S3)。これにより、例えば正解ラベルが利用できないターゲットドメインの画像においても物体領域に応じた部分領域を抽出し易くすることができる。なお、演算回路10は、赤外線画像Td1においてランダムな位置及び大きさを有する部分領域を抽出してもよい。 In the present embodiment, the arithmetic circuit 10 estimates object region candidates in the infrared image Td1 based on image data indicating the infrared image Td1 (an example of the second image) of the target domain, and selects from the estimated candidates. An estimated region Er1, which is an example of a partial region, is extracted from the infrared image Td1 (S3). As a result, it is possible to easily extract a partial region corresponding to an object region even in an image of a target domain for which no correct label is available, for example. Note that the arithmetic circuit 10 may extract partial regions having random positions and sizes in the infrared image Td1.

本実施形態において、ターゲットドメイン(第2のドメインの一例)は、正解ラベルを(正解情報の一例)有しない第2入力画像(第2の画像の一例)に加えて正解ラベルを有する第3入力画像(第3の画像の一例)をさらに含んでもよい。演算回路10は、ターゲットドメインの画像から部分領域を抽出する場合には、例えば図6に示すように、画像生成部11Aとして、第3入力画像からの部分領域の一例として第3切出領域群をソースドメインの画像(第1の画像の一例)に重畳させて合成した画像データを生成してもよい。また、ソースドメイン(第1のドメインの一例)の画像から部分領域を抽出する場合には、第1入力画像(第1の画像の一例)からの部分領域の一例として第1切出領域群を第3入力画像に重畳させて合成した画像データを生成してもよい。このように構成することにより、ターゲットドメインに正解ラベルが存在する場合に、正解ラベルを学習に活用することができるため、画像認識モデルの性能を向上させることができる。 In this embodiment, the target domain (an example of a second domain) includes a second input image (an example of a second image) that does not have a correct label (an example of correct information), and a third input image that has a correct label. It may further include an image (an example of a third image). When extracting a partial region from an image of the target domain, the arithmetic circuit 10, as shown in FIG. may be superimposed on the source domain image (an example of the first image) to generate synthesized image data. In addition, when extracting a partial region from an image of a source domain (an example of a first domain), a first cut-out region group is used as an example of a partial region from a first input image (an example of a first image). Image data may be generated by superimposing and synthesizing the third input image. With this configuration, when a correct label exists in the target domain, the correct label can be used for learning, so that the performance of the image recognition model can be improved.

本実施形態において、学習装置1は、画像認識NN21(画像認識モデルの一例)を記憶する記憶装置20をさらに備える。学習された画像認識NN21は、記憶装置20から読み出されて推論に用いられてもよいし、学習装置1の外部の情報処理装置により取得されて推論に用いられてもよい。 In this embodiment, the learning device 1 further includes a storage device 20 that stores an image recognition NN 21 (an example of an image recognition model). The learned image recognition NN 21 may be read from the storage device 20 and used for inference, or may be acquired by an information processing device external to the learning device 1 and used for inference.

本実施形態において、画像認識NN21は、ニューラルネットワークから構成されて、画像データから特徴量を抽出する特徴抽出器21aと、抽出された特徴量に基づき、画像データが示す画像において物体領域を検出する検出器21b(物体検出器の一例)とを含む。演算回路10は、合成した画像データにおける検出器21bによる認識結果(S7)と、合成した画像データが示す画像における物体領域の正解ラベル(正解情報の一例)とに基づいて、検出損失Ld(第1の損失の一例)を計算する(S8)。演算回路10は、画像認識NN21おいて、検出損失Ldを最小化するように検出器21b及び特徴抽出器21aのパラメータを更新する(S9)。これにより、例えば、上述のような合成した画像データ及びターゲットドメインに由来する正解ラベルに基づいて、異なるドメインの画像においても物体検出の画像認識を実現するように、画像認識NN21の機械学習を行うことができる。 In the present embodiment, the image recognition NN 21 is composed of a neural network, and includes a feature extractor 21a that extracts feature amounts from image data, and a feature extractor 21a that extracts feature amounts from image data, and detects an object region in an image indicated by the image data based on the extracted feature amounts. A detector 21b (an example of an object detector) is included. The arithmetic circuit 10 calculates the detection loss Ld (first answer) based on the recognition result (S7) by the detector 21b in the combined image data and the correct label (an example of correct information) of the object region in the image indicated by the combined image data. An example of a loss of 1) is calculated (S8). The arithmetic circuit 10 updates the parameters of the detector 21b and the feature extractor 21a in the image recognition NN 21 so as to minimize the detection loss Ld (S9). As a result, for example, machine learning of the image recognition NN 21 is performed to realize image recognition for object detection even in images of different domains, based on the synthesized image data and correct labels derived from the target domain as described above. be able to.

本実施形態において、画像認識NN21は、特徴抽出器21aにより画像データから抽出される特徴量に基づいて、特徴量を抽出した画像データ内の所定の領域がソースドメインまたはターゲットドメイン(第1または第2のドメインの一例)のいずれに属するかを識別するドメイン識別器21cをさらに備える。合成した画像データには、合成した画像データが示す画像において重畳された部分領域の位置を示す識別情報の一例として、正解ドメインラベルDg1,Dg2が対応付けられている。演算回路10は、合成した画像データにおけるドメイン識別器21cの識別結果と、合成した画像データに対応付けられた正解ドメインラベルDg1,Dg2との差分による敵対的損失La(第2の損失の一例)を計算する(S8)。演算回路10は、画像認識NN21において、敵対的損失Laを最大化するように、特徴抽出器21aのパラメータを更新し、敵対的損失Laを最小化するように、ドメイン識別器21cのパラメータを更新する(S9)。こうした敵対的学習により、物体領域に応じた部分領域を考慮して、物体領域の位置を推定可能にしながらドメインを識別できないようなドメイン不変表現を獲得することが期待できる。 In this embodiment, the image recognition NN 21 determines whether a predetermined region in the image data from which the feature amount has been extracted is a source domain or a target domain (first or target domain) based on the feature amount extracted from the image data by the feature extractor 21a. The device further includes a domain identifier 21c for identifying which of the following domains (an example of 2 domains) the device belongs to. The combined image data is associated with correct domain labels Dg1 and Dg2 as an example of identification information indicating the position of the superimposed partial region in the image represented by the combined image data. The arithmetic circuit 10 generates an adversarial loss La (an example of a second loss) due to the difference between the classification result of the domain classifier 21c in the combined image data and the correct domain labels Dg1 and Dg2 associated with the combined image data. is calculated (S8). In the image recognition NN 21, the arithmetic circuit 10 updates the parameters of the feature extractor 21a so as to maximize the adversarial loss La, and updates the parameters of the domain classifier 21c so as to minimize the adversarial loss La. (S9). Through such adversarial learning, we can expect to obtain a domain-invariant representation that takes into account partial regions corresponding to the object region and that makes it possible to estimate the position of the object region while preventing domain identification.

本実施形態における学習方法は、コンピュータの一例である学習装置1の演算回路10により実行される。学習方法は、物体の位置を示す物体領域に関連付けられた正解ラベル(正解情報の一例)を有する可視光画像Sd1(第1の画像の一例)を含み、かつ所定の特性を有するソースドメイン(第1のドメインの一例)と、正解ラベルを有しない赤外線画像Td1(第2の画像の一例)を含み、ソースドメインの特性とは異なる特性を有するターゲットドメイン(第2のドメインの一例)との少なくとも一方における画像データが示す画像から、物体領域の候補を示す部分領域を抽出すること(S3)、ソースドメインの画像から部分領域を抽出する場合には第1の画像からの部分領域を第2の画像に重畳させて合成した画像データを生成すること(S4~S6)、ターゲットドメインの画像から部分領域を抽出する場合には第2の画像からの部分領域を第1の画像に重畳させて合成した画像データを生成すること(S4~S6)、及び画像データが示す画像において物体の画像認識を行う画像認識NN21(画像認識モデルの一例)が含むパラメータを、合成した画像データ及び正解情報に基づいて機械学習により更新すること(S7~S9)を含む。 The learning method in this embodiment is executed by the arithmetic circuit 10 of the learning device 1, which is an example of a computer. The learning method includes a visible light image Sd1 (an example of a first image) having a correct label (an example of correct information) associated with an object region indicating the position of an object, and a source domain (an example of a first image) having predetermined characteristics. 1) and a target domain (an example of a second domain) that includes an infrared image Td1 (an example of a second image) that does not have a correct label and has characteristics different from those of the source domain. Extracting a partial region indicating an object region candidate from the image indicated by the image data in one (S3); when extracting a partial region from the source domain image, the partial region from the first image is Generate image data that is superimposed on the image and synthesized (S4 to S6), and when extracting a partial region from the image of the target domain, superimpose and synthesize the partial region from the second image on the first image. (S4 to S6), and parameters included in the image recognition NN 21 (an example of an image recognition model) that performs image recognition of objects in the image indicated by the image data, based on the synthesized image data and correct answer information. and updating by machine learning (S7 to S9).

本実施形態において、以上のような学習方法を演算回路10に実行させるためのプログラムの一例として、制御プログラム22、及び画像認識NN21を機能させるためのプログラムが提供される。以上の学習方法及びプログラムによると、例えば物体検出等の画像認識を精度良く実現可能な画像認識NN21の機械学習を行うことができる。 In this embodiment, a control program 22 and a program for operating the image recognition NN 21 are provided as examples of programs for causing the arithmetic circuit 10 to execute the above learning method. According to the learning method and program described above, it is possible to perform machine learning of the image recognition NN 21 that can accurately realize image recognition such as object detection, for example.

(実施形態2)
実施形態1では、画像認識NN21がドメイン識別器21cを含み、敵対的損失Laを用いて画像認識NN21のパラメータを更新する(S7~S9)学習装置1を説明した。実施形態2では、画像認識NN21がドメイン識別器21cを特に含まず、画像間の対照学習により画像認識NN21のパラメータを更新する学習装置1を説明する。
(Embodiment 2)
In the first embodiment, the learning device 1 has been described in which the image recognition NN 21 includes the domain classifier 21c and updates the parameters of the image recognition NN 21 using the adversarial loss La (S7 to S9). In the second embodiment, a learning device 1 will be described in which the image recognition NN 21 does not particularly include the domain classifier 21c and updates the parameters of the image recognition NN 21 through contrastive learning between images.

以下、実施形態1に係る学習装置1と同様の構成、動作の説明は適宜省略して、本実施形態に係る学習装置1について説明する。 Hereinafter, the learning device 1 according to the present embodiment will be described, omitting the explanation of the same configuration and operation as the learning device 1 according to the first embodiment as appropriate.

図7は、本実施形態の学習装置1における学習動作を説明するための図である。本実施形態では、演算回路10は、例えば各ドメインの第1または第2入力画像から所定数の小領域を切り出した後(S3)、ステップS4では、切り出した各小領域について2通りの合成位置を決定する。演算回路10は、ステップS5では、小領域を切り出した画像のドメインとは他方のドメインからの異なる2つの画像に、各小領域を合成する。演算回路10は、例えば合成先のドメインからのランダムサンプル等の、任意の方法で当該2つの画像を取得し得る。 FIG. 7 is a diagram for explaining the learning operation in the learning device 1 of this embodiment. In this embodiment, the arithmetic circuit 10 cuts out a predetermined number of small regions from the first or second input image of each domain (S3), and then in step S4, calculates two combination positions for each cut out small region. Determine. In step S5, the arithmetic circuit 10 combines each small area with two different images from a domain other than the domain of the image from which the small area was cut out. The arithmetic circuit 10 may obtain the two images in any manner, such as by random sampling from a domain to which they are to be combined.

図7は、学習データにおけるターゲットドメインの赤外線画像Td1からの推定領域Er1を、第2切出領域群として、ソースドメインの2つの可視光画像Sd1,Sd2にそれぞれ重畳させた例を示す。このように、例えば2つの可視光画像Sd1,Sd2を背景画像として、1つの画像Td1から切り出した推定領域Er1が、背景画像との差分である前景領域として重畳される。例えば推定領域Er1は、上述のように、Selective Search等の物体領域推定の技術、またはソースドメインの画像データ及び正解ラベルで学習済みの画像認識NN21等を用いて推定できる(S3)。 FIG. 7 shows an example in which the estimated region Er1 from the infrared image Td1 of the target domain in the learning data is superimposed on two visible light images Sd1 and Sd2 of the source domain as a second cut-out region group. In this way, for example, with the two visible light images Sd1 and Sd2 as background images, the estimated region Er1 cut out from one image Td1 is superimposed as a foreground region that is a difference from the background image. For example, as described above, the estimation region Er1 can be estimated using an object region estimation technique such as Selective Search, or the image recognition NN 21 trained using the image data of the source domain and the correct label (S3).

例えば物体領域の位置が未知なターゲットドメインの赤外線画像Td1では、上記の推定結果を疑似的な正解ラベルとみなして推定領域Er1を切り出すことで、物体領域と一致しなくても物体の特徴が顕著に現れやすい領域を前景領域として抽出し得る。 For example, in an infrared image Td1 of a target domain in which the position of the object region is unknown, the above estimation result is regarded as a pseudo-correct label and the estimated region Er1 is cut out, so that the features of the object are noticeable even if they do not match the object region. The area that is likely to appear in the image can be extracted as the foreground area.

なお、図示を省略しているが、ソースドメインの可視光画像からの第1切出領域群をターゲットドメインの2つの可視光画像に重畳させる場合についても、図7の例と同様に実行可能である。また、図7では、検出損失Ldについては実施形態1と同様であるため、図示を省略している。 Although not shown, it is also possible to superimpose the first cutout region group from the visible light image of the source domain onto the two visible light images of the target domain in the same way as in the example of FIG. be. Furthermore, in FIG. 7, the detection loss Ld is the same as in the first embodiment, and therefore is not shown.

演算回路10は、例えば図7に示すように、赤外線画像Td1からの推定領域Er1を重畳させた各可視光画像Sd1,Sd2を、画像認識NN21の特徴抽出器21aに入力して画像認識処理を行う(S7)。特徴抽出器21aは、入力された各可視光画像Sd1,Sd2から特徴量を抽出して、例えば抽出した特徴量を示す特徴マップSm1,Sm2を検出器21bに出力する。検出器21bは、例えば各特徴マップSm1,Sm2に基づいて、物体検出を行い、重畳された前景領域の複数の候補として各検出領域を含む検出結果を出力する。 For example, as shown in FIG. 7, the arithmetic circuit 10 inputs the visible light images Sd1 and Sd2 on which the estimated region Er1 from the infrared image Td1 is superimposed to the feature extractor 21a of the image recognition NN 21 to perform image recognition processing. Execute (S7). The feature extractor 21a extracts feature amounts from each input visible light image Sd1, Sd2, and outputs, for example, feature maps Sm1, Sm2 indicating the extracted feature amounts to the detector 21b. The detector 21b performs object detection based on, for example, each of the feature maps Sm1 and Sm2, and outputs a detection result including each detection area as a plurality of candidates for the superimposed foreground area.

演算回路10は、特徴マップSm1,Sm2上の検出結果における複数の候補から、例えば各画像Sd1,Sd2上の合成位置と最も位置が近い候補を選択して、選択した候補を、前景領域の予測領域群Pm1,Pm2として抽出する。予測領域群Pm1,Pm2は、同じドメインの1つの赤外線画像Td1から切り出されて各可視光画像Sd1,Sd2に重畳された複数の前景領域を、画像Sd1,Sd2に対応する特徴マップSm1,Sm2に基づいて物体検出により予測した領域群である。演算回路10は、例えば特徴マップSm1,Sm2上で矩形上の検出領域の位置を示す座標と、合成位置を示す座標とのユークリッド距離に基づき、検出結果の各候補と合成位置との近さを判断してもよい。 The arithmetic circuit 10 selects, for example, the candidate whose position is closest to the composite position on each image Sd1, Sd2 from the plurality of candidates in the detection results on the feature maps Sm1, Sm2, and uses the selected candidate as a prediction of the foreground region. It is extracted as region groups Pm1 and Pm2. The prediction region groups Pm1, Pm2 are a plurality of foreground regions cut out from one infrared image Td1 of the same domain and superimposed on each visible light image Sd1, Sd2, into feature maps Sm1, Sm2 corresponding to the images Sd1, Sd2. This is a group of regions predicted by object detection based on the above. The arithmetic circuit 10 calculates the proximity of each detection result candidate to the composite position, for example, based on the Euclidean distance between the coordinates indicating the position of the rectangular detection area on the feature maps Sm1 and Sm2 and the coordinates indicating the composite position. You can judge.

ここで、各特徴マップSm1,Sm2は、物体領域に応じた前景領域(即ち推定領域Er1)以外の背景画像(即ち、可視光画像Sd1,Sd2)の情報も含めて抽出されているため、予測領域群Pm1,Pm2の各予測領域は、物体周辺の背景の情報も含み得る。即ち、予測領域群Pm1と予測領域群Pm2とは、前景領域とは異なるドメインの、2つの異なる背景画像の情報を含み得る。 Here, each feature map Sm1, Sm2 is extracted including information on background images (i.e., visible light images Sd1, Sd2) other than the foreground area (i.e., estimated area Er1) corresponding to the object area, so the prediction Each predicted region of the region groups Pm1 and Pm2 may also include information about the background around the object. That is, the prediction region group Pm1 and the prediction region group Pm2 can include information on two different background images in a domain different from the foreground region.

物体検出を精度良く実現可能なドメイン不変表現を獲得する観点からは、上記のような予測領域群Pm1,Pm2間で、予測領域の特徴量は一致または類似していることが望ましい。そこで、本実施形態では、予測領域群Pm1,Pm2間で同じ前景領域に対応する予測領域の特徴量を近づけるように、例えば予測領域の特徴量の類似度に応じた損失関数として対照損失Lcを用いた対照学習を行う。予測領域群Pm1,Pm2間で、各予測領域が同じ前景領域に対応するか否かは、例えば各画像Sd1,Sd2における前景領域の合成位置情報に基づいて特定し得る。 From the viewpoint of obtaining a domain-invariant representation that can accurately realize object detection, it is desirable that the feature amounts of the prediction regions match or be similar between the prediction region groups Pm1 and Pm2 as described above. Therefore, in this embodiment, in order to bring the feature amounts of the prediction regions corresponding to the same foreground region closer between the prediction region groups Pm1 and Pm2, for example, a contrast loss Lc is set as a loss function according to the similarity of the feature amounts of the prediction regions. Perform contrastive learning using Whether or not each prediction area corresponds to the same foreground area between the prediction area groups Pm1 and Pm2 can be determined based on, for example, the combined position information of the foreground area in each image Sd1 and Sd2.

演算回路10は、例えば上記のように、ソースドメインの赤外線画像Td1から抽出した前景領域をターゲットドメインの2つの可視光画像Sd1,Sd2に重畳させた際の各特徴マップSm1,Sm2の特徴量に基づいて、対照損失Lcを計算する(S8)。図7の例では、対照損失(Contrastive Loss)Lcは、例えば、特徴マップSm1,Sm2間で対応する予測領域を正例として、対応する予測領域間の類似度が、予測領域と他の領域との類似度よりも高くなるように計算される。 For example, as described above, the arithmetic circuit 10 calculates the feature amount of each feature map Sm1, Sm2 when the foreground region extracted from the infrared image Td1 of the source domain is superimposed on the two visible light images Sd1, Sd2 of the target domain. Based on this, a control loss Lc is calculated (S8). In the example of FIG. 7, the contrastive loss (Contrastive Loss) Lc is calculated based on, for example, the similarity between the corresponding prediction regions between the prediction region and other regions, with the corresponding prediction regions between the feature maps Sm1 and Sm2 as a positive example. The similarity is calculated to be higher than the similarity of .

図7では図示を省略しているが、対照損失Lcでは、予測領域以外の領域(即ち背景の領域)等は予測領域と類似しない負例として考慮される。対照損失Lcには、例えば類似度の指標に内積を用いて正例と負例のSoftmax分類器の損失関数とみなせるInfoNCE等を用いることができる。 Although not shown in FIG. 7, in the comparison loss Lc, areas other than the predicted area (that is, background areas) are considered as negative examples that are not similar to the predicted area. As the contrastive loss Lc, for example, InfoNCE, which can be regarded as a loss function of a Softmax classifier for positive and negative examples using an inner product as a similarity index, can be used.

演算回路10は、例えば上記のような対照損失Lc、及び検出損失Ldを損失Lmとして計算する(S8)。損失Lmは、例えば対照損失Lcと検出損失Ldの重み付き和として計算されてもよい。演算回路10は、損失Lmを最小化するように、特徴抽出器21a及び検出器21bのパラメータを更新する(S9)。 The arithmetic circuit 10 calculates, for example, the above-mentioned control loss Lc and detection loss Ld as the loss Lm (S8). The loss Lm may be calculated, for example, as a weighted sum of the control loss Lc and the detection loss Ld. The arithmetic circuit 10 updates the parameters of the feature extractor 21a and the detector 21b so as to minimize the loss Lm (S9).

以上の学習動作によれば、前景領域を物体検出で予測した予測領域の対照学習により、例えば異なるドメイン間で、物体領域に応じた前景領域の特徴量の統計的な分布を近づけるようなドメイン不変表現の獲得が期待される。例えば異なるドメイン間で、前景と背景とを特に考慮せずに特徴量の空間全体を近づけるようなドメインアラインメントの学習では、物体領域の特徴量が物体以外の領域の特徴量とも類似して、物体検出を精度良く行い難いことが懸念される。これに対して、本実施形態の学習装置1では、異なるドメイン間の物体領域の対応に着目した対照学習を含み、物体検出等の画像認識を精度良く実現可能なドメイン不変表現の獲得を狙った学習を行うことができる。 According to the above learning operation, for example, domain invariance is achieved by contrast learning of predicted regions in which the foreground region is predicted by object detection, which brings the statistical distribution of features of the foreground region closer to each other between different domains. The acquisition of expression is expected. For example, in domain alignment learning that brings the entire feature space closer together between different domains without particularly considering the foreground and background, the feature values of the object region are similar to the feature values of regions other than the object, and the object region There is a concern that it may be difficult to perform detection with high accuracy. In contrast, the learning device 1 of the present embodiment includes contrastive learning that focuses on the correspondence of object regions between different domains, and aims to acquire domain-invariant representations that can accurately implement image recognition such as object detection. Learning can be done.

以上のように、本実施形態において、演算回路10は、ソースドメイン(第1のドメインの一例)に含まれる複数の画像Sd1,Sd2に、ターゲットドメイン(第2のドメインの一例)に含まれる一の画像Td1からの共通する部分領域の一例である推定領域Er1を重畳させるように、及び/またターゲットドメインに含まれる複数の画像に、ソースドメインに含まれる一の画像からの共通する部分領域を重畳させるように、合成した画像データを生成する(S3~S6)。演算回路10は、合成した画像データに基づいて、共通する部分領域を重畳させた複数の画像間の比較による対照損失Lc(第3の損失の一例)を計算する(S7~S8)。演算回路10は、画像認識NN21(画像認識モデルの一例)において、対照損失Lcを最小化するように、検出器21b(物体検出器の一例)及び特徴抽出器21aのパラメータを更新する(S9)。これにより、例えば異なるドメイン間においても、物体領域に応じた部分領域の特徴量は類似するように対照学習を行って、物体領域を考慮したドメイン不変表現を獲得することが期待できる。 As described above, in the present embodiment, the arithmetic circuit 10 selects a plurality of images Sd1 and Sd2 included in a source domain (an example of a first domain), and an image included in a target domain (an example of a second domain). The estimated region Er1, which is an example of a common partial region from the image Td1 of Combined image data is generated so as to be superimposed (S3 to S6). The arithmetic circuit 10 calculates a comparison loss Lc (an example of a third loss) based on a comparison between a plurality of images in which common partial regions are superimposed (S7 to S8). The arithmetic circuit 10 updates the parameters of the detector 21b (an example of an object detector) and the feature extractor 21a in the image recognition NN 21 (an example of an image recognition model) so as to minimize contrast loss Lc (S9). . As a result, it is expected that, for example, even between different domains, contrastive learning can be performed so that the feature amounts of partial regions corresponding to object regions are similar, and a domain-invariant expression that takes object regions into consideration can be obtained.

(他の実施形態)
以上のように、本出願において開示する技術の例示として実施形態1,2を説明した。しかしながら、本開示における技術は、これに限定されず、適宜、変更、置換、付加、省略などを行った実施の形態にも適用可能である。また、上記各実施形態で説明した各構成要素を組み合わせて、新たな実施の形態とすることも可能である。そこで、以下、他の実施形態を例示する。
(Other embodiments)
As mentioned above, Embodiments 1 and 2 have been described as examples of the technology disclosed in this application. However, the technology in the present disclosure is not limited to this, and can also be applied to embodiments in which changes, substitutions, additions, omissions, etc. are made as appropriate. Furthermore, it is also possible to create a new embodiment by combining the components described in each of the above embodiments. Therefore, other embodiments will be illustrated below.

上記の各実施形態では、画像認識NN21が物体検出に用いられる例を説明した。本実施形態では、画像認識NN21は、物体検出に限らず、例えば画像上に物体が映った位置の回帰、または物体が映った画素を認識するセグメンテーション等、画像において物体の位置を認識する各種の画像認識タスクに適用されてもよい。画像認識NN21は例えば適用タスクに応じて構成されてもよく、適用タスクに応じた損失関数を損失Lmに用いて学習されてもよい。 In each of the above embodiments, an example has been described in which the image recognition NN 21 is used for object detection. In this embodiment, the image recognition NN 21 is used not only for object detection but also for various types of methods for recognizing the position of an object in an image, such as regression of the position of the object on the image, or segmentation for recognizing pixels where the object is displayed. It may also be applied to image recognition tasks. The image recognition NN 21 may be configured according to the applied task, for example, and may be trained using a loss function according to the applied task as the loss Lm.

上記の各実施形態では、画像認識NN21が学習装置1の記憶装置20に格納される例を説明した。本実施形態では、画像認識NN21、が学習装置1とデータ通信可能な外部の情報処理装置等に格納されてもよい。本実施形態の演算回路10は、例えば通信回路30を介して外部の情報処理装置とデータ通信して、画像認識NN21の機械学習を実行してもよい。また、画像認識NN21の学習に用いられる画像データ等が外部の情報処理装置等に格納されてもよく、学習装置1に通信回路30を介して取得されてもよい。 In each of the above embodiments, an example has been described in which the image recognition NN 21 is stored in the storage device 20 of the learning device 1. In this embodiment, the image recognition NN 21 may be stored in an external information processing device or the like that can communicate data with the learning device 1. The arithmetic circuit 10 of this embodiment may perform machine learning of the image recognition NN 21 by communicating data with an external information processing device via the communication circuit 30, for example. Further, image data and the like used for learning of the image recognition NN 21 may be stored in an external information processing device or the like, or may be acquired by the learning device 1 via the communication circuit 30.

上記の各実施形態では、画像認識NN21が、ソースドメインの画像データ及び正解ラベルに基づいて事前学習される例を説明した。本実施形態では、画像認識NN21は、特に事前学習されなくてもよく、例えばパラメータが初期値の状態から合成画像群Imの画像データに基づいて学習されてもよい。 In each of the above embodiments, an example has been described in which the image recognition NN 21 is pre-trained based on the image data of the source domain and the correct label. In this embodiment, the image recognition NN 21 does not need to be particularly trained in advance, and may be trained based on the image data of the composite image group Im, for example, from a state where the parameters are initial values.

上記の各実施形態では、ソースドメインに可視光画像が含まれ、ターゲットドメインに赤外線画像が含まれる例を説明した。本実施形態では、これに限らず、例えば、CG画像か実写画像か、日中と夜間などの撮影時間帯、撮影場所、または晴天と悪天候などの撮影時の天候といった各種の画像の特性が、ソースドメインとターゲットドメインとで異なっていてもよい。 In each of the above embodiments, an example has been described in which the source domain includes a visible light image and the target domain includes an infrared image. In this embodiment, various image characteristics such as, but not limited to, whether the image is a CG image or a live-action image, the shooting time such as daytime or nighttime, the shooting location, or the weather at the time of shooting such as sunny or bad weather, etc. The source domain and target domain may be different.

以上のように、本実施形態において、ソースドメインの画像(第1の画像の一例)とターゲットドメインの画像(第2の画像の一例)とは、可視光画像か赤外画像かの種別に限らず、コンピュータグラフィックス画像か実写画像かの種別、各画像の撮影場所、各画像の撮影時間、または各画像の撮影条件において特性が異なる。学習装置1によるドメイン適応は、こうした各種の異なるドメインに適用可能である。 As described above, in this embodiment, the source domain image (an example of the first image) and the target domain image (an example of the second image) are limited to the visible light image or the infrared image. First, the characteristics differ in the type of computer graphics image or real image, the shooting location of each image, the shooting time of each image, or the shooting conditions of each image. Domain adaptation by the learning device 1 is applicable to these various different domains.

上記の各実施形態では、第2切出部112bにより第2入力画像から物体領域の候補を推定して小領域を切り出す(S3)際に、Selective Searchまたは画像認識NN21を用いる例を説明した。本実施形態では、こうした推定は、例えば第2入力画像においてエッジ抽出による背景との差分に基づいて行われてもよい。例えば、エッジの抽出方法としては、LaplacianまたはDifference of Gaussian等の任意のフィルタ処理が用いられてもよい。また、画素情報から周波数領域に変換を行い、周波数帯域での差分を計算することでエッジ抽出が行われてもよい In each of the above embodiments, an example has been described in which Selective Search or the image recognition NN 21 is used when the second cutting unit 112b estimates object area candidates from the second input image and cuts out a small area (S3). In this embodiment, such estimation may be performed, for example, based on the difference from the background obtained by edge extraction in the second input image. For example, as an edge extraction method, any filter processing such as Laplacian or Difference of Gaussian may be used. Alternatively, edge extraction may be performed by converting pixel information into the frequency domain and calculating the difference in the frequency band.

以上、本開示のいくつかの実施形態を説明したが、これらの実施形態は、例として提示したのであり、特許請求の範囲に記載された発明の範囲を限定することは意図していない。これらの新規な実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。これら実施形態及びその変形は、特許請求の範囲に記載された発明またはその均等の範囲に含まれる。 Although several embodiments of the present disclosure have been described above, these embodiments are presented as examples and are not intended to limit the scope of the invention described in the claims. These novel embodiments can be implemented in various other forms, and various omissions, substitutions, and changes can be made without departing from the gist of the invention. These embodiments and modifications thereof are included within the scope of the invention described in the claims or its equivalents.

本開示に係る学習装置及び学習方法は、画像において物体の位置を認識する画像認識モデルの機械学習に適用可能である。 The learning device and learning method according to the present disclosure can be applied to machine learning of an image recognition model that recognizes the position of an object in an image.

1 学習装置
10 演算回路
11 画像生成部
12 画像認識部
13 更新部
20 記憶装置
21 画像認識ニューラルネットワーク
21a 特徴抽出器
21b 検出器
21c ドメイン識別器
22 制御プログラム
30 通信回路
1 learning device 10 arithmetic circuit 11 image generation section 12 image recognition section 13 update section 20 storage device 21 image recognition neural network 21a feature extractor 21b detector 21c domain discriminator 22 control program 30 communication circuit

Claims (16)

画像データが示す画像において物体の画像認識を行う画像認識モデルの機械学習を制御する演算回路を備え、
前記演算回路は、
物体の位置に関連付けられた物体領域を示す正解情報を有する第1の画像を含み、かつ所定の特性を有する第1のドメインと、第2の画像を含み、かつ前記第1のドメインの特性とは異なる特性を有する第2のドメインとの少なくとも一方に含まれる画像から、前記物体領域の候補を示す部分領域を抽出し、
前記第1のドメインの画像から部分領域を抽出する場合には前記第1の画像からの部分領域を前記第2の画像に重畳させて合成した画像データを生成し、
前記第2のドメインの画像から部分領域を抽出する場合には前記第2の画像からの部分領域を前記第1の画像に重畳させて合成した画像データを生成し、
前記合成した画像データ及び前記正解情報に基づいて、前記画像認識モデルが含むパラメータを機械学習により更新する
学習装置。
Equipped with an arithmetic circuit that controls machine learning of an image recognition model that performs image recognition of objects in images shown by image data,
The arithmetic circuit is
a first domain including a first image having correct information indicating an object region associated with a position of the object and having a predetermined characteristic; and a second domain including a second image and having a characteristic of the first domain. extracts a partial region indicating a candidate for the object region from an image included in at least one of a second domain having different characteristics;
When extracting a partial region from the image of the first domain, superimposing the partial region from the first image on the second image to generate composite image data;
When extracting a partial region from the image of the second domain, superimposing the partial region from the second image on the first image to generate composite image data;
A learning device that updates parameters included in the image recognition model by machine learning based on the synthesized image data and the correct answer information.
前記第2の画像は前記正解情報を有する、
請求項1に記載の学習装置。
the second image has the correct answer information;
The learning device according to claim 1.
前記第2の画像は前記正解情報を有しない、
請求項1に記載の学習装置。
the second image does not have the correct answer information;
The learning device according to claim 1.
前記演算回路は、
前記第1および第2のドメインの画像の各々から、前記物体領域の候補を示す部分領域を抽出し、
前記第1の画像からの部分領域を前記第2の画像に重畳させて合成した画像データ、および、前記第2の画像からの部分領域を前記第1の画像に重畳させて合成した画像データに基づいて、前記画像認識モデルが含むパラメータを機械学習により更新する
請求項1に記載の学習装置。
The arithmetic circuit is
extracting a partial region indicating a candidate for the object region from each of the first and second domain images;
Image data obtained by superimposing a partial region from the first image on the second image, and image data obtained by superimposing a partial region from the second image onto the first image. The learning device according to claim 1, wherein parameters included in the image recognition model are updated by machine learning based on the image recognition model.
前記演算回路は、前記第1の画像における前記物体領域の正解情報に基づいて、前記第1の画像から部分領域を抽出する
請求項1に記載の学習装置。
The learning device according to claim 1, wherein the arithmetic circuit extracts a partial region from the first image based on correct answer information of the object region in the first image.
前記画像認識モデルは、前記第1の画像を示す画像データと、前記第1の画像における前記物体領域の正解情報とに基づいて学習されている
請求項1に記載の学習装置。
The learning device according to claim 1, wherein the image recognition model is trained based on image data indicating the first image and correct answer information of the object region in the first image.
前記演算回路は、前記第2の画像を示す画像データに基づいて前記第2の画像における物体領域の候補を推定し、前記推定した候補から選択するように、前記第2の画像からの部分領域を抽出する
請求項3から6のいずれか1項に記載の学習装置。
The arithmetic circuit estimates object region candidates in the second image based on image data indicating the second image, and selects a partial region from the second image from among the estimated candidates. The learning device according to any one of claims 3 to 6, which extracts.
前記演算回路は、前記第2の画像においてランダムな位置及び大きさを有する部分領域として、前記第2の画像からの部分領域を抽出する
請求項3から6のいずれか1項に記載の学習装置。
The learning device according to any one of claims 3 to 6, wherein the arithmetic circuit extracts a partial region from the second image as a partial region having a random position and size in the second image. .
前記第1の画像と前記第2の画像とは、可視光画像か赤外画像かの種別、コンピュータグラフィックス画像か実写画像かの種別、各画像の撮影場所、各画像の撮影時間、または各画像の撮影条件において特性が異なる
請求項1に記載の学習装置。
The first image and the second image include the type of visible light image or infrared image, the type of computer graphics image or real image, the shooting location of each image, the shooting time of each image, or each image. The learning device according to claim 1, wherein the characteristics differ depending on the image shooting conditions.
前記第2のドメインは、さらに、前記正解情報を有する第3の画像を含み、
前記演算回路は、前記第2のドメインの画像から部分領域を抽出する場合には、前記第3の画像からの部分領域を前記第1の画像に重畳させて合成した画像データを生成する
請求項3に記載の学習装置。
The second domain further includes a third image having the correct answer information,
2. The arithmetic circuit, when extracting a partial region from the image of the second domain, superimposes a partial region from the third image on the first image to generate synthesized image data. 3. The learning device according to 3.
前記第2のドメインは、さらに、前記正解情報を有する第3の画像を含み、
前記演算回路は、前記第1のドメインの画像から部分領域を抽出する場合には、前記第1の画像からの部分領域を前記第3の画像に重畳させて合成した画像データを生成する
請求項3に記載の学習装置。
The second domain further includes a third image having the correct answer information,
2. The arithmetic circuit, when extracting a partial region from the image of the first domain, generates image data by superimposing the partial region from the first image on the third image. 3. The learning device according to 3.
前記画像認識モデルは、ニューラルネットワークから構成されて、画像データから特徴量を抽出する特徴抽出器と、前記抽出された特徴量に基づき、前記画像データが示す画像において前記物体領域を検出する物体検出器とを含み、
前記演算回路は、
前記合成した画像データにおける前記物体検出器による認識結果と、前記合成した画像データが示す画像における物体領域の正解情報とに基づいて、第1の損失を計算し、
前記画像認識モデルにおいて、前記第1の損失を最小化するように前記物体検出器及び前記特徴抽出器のパラメータを更新する
請求項1に記載の学習装置。
The image recognition model is composed of a neural network, and includes a feature extractor that extracts feature amounts from image data, and an object detection device that detects the object region in the image indicated by the image data based on the extracted feature amounts. including vessels,
The arithmetic circuit is
Calculating a first loss based on the recognition result by the object detector in the synthesized image data and correct information of an object region in the image indicated by the synthesized image data,
The learning device according to claim 1, wherein in the image recognition model, parameters of the object detector and the feature extractor are updated so as to minimize the first loss.
前記画像認識モデルは、前記特徴抽出器により画像データから抽出される特徴量に基づいて、前記特徴量を抽出した画像データ内の所定の領域が前記第1または第2のドメインのいずれに属するかを識別するドメイン識別器をさらに備え、
前記合成した画像データには、前記合成した画像データが示す画像において重畳された部分領域の位置を示す識別情報が対応付けられており、
前記演算回路は、
前記合成した画像データにおける前記ドメイン識別器の識別結果と、前記合成した画像データに対応付けられた前記識別情報との差分による第2の損失を計算し、
前記画像認識モデルにおいて、前記第2の損失を最大化するように、前記特徴抽出器のパラメータを更新し、前記第2の損失を最小化するように、前記ドメイン識別器のパラメータを更新する
請求項12に記載の学習装置。
The image recognition model determines whether a predetermined region in the image data from which the feature amount has been extracted belongs to the first or second domain, based on the feature amount extracted from the image data by the feature extractor. further comprising a domain identifier for identifying the
The synthesized image data is associated with identification information indicating a position of a superimposed partial region in an image indicated by the synthesized image data,
The arithmetic circuit is
Calculating a second loss due to the difference between the identification result of the domain classifier in the combined image data and the identification information associated with the combined image data,
In the image recognition model, parameters of the feature extractor are updated to maximize the second loss, and parameters of the domain classifier are updated to minimize the second loss. The learning device according to item 12.
前記演算回路は、
前記第1のドメインに含まれる複数の画像に、前記第2のドメインに含まれる一の画像からの共通する部分領域を重畳させるように、及び/または前記第2のドメインに含まれる複数の画像に、前記第1のドメインに含まれる一の画像からの共通する部分領域を重畳させるように、前記合成した画像データを生成し、
前記合成した画像データに基づいて、前記共通する部分領域を重畳させた前記複数の画像間の比較による第3の損失を計算し、
前記画像認識モデルにおいて、前記第3の損失を最小化するように、前記物体検出器及び前記特徴抽出器のパラメータを更新する
請求項12に記載の学習装置。
The arithmetic circuit is
such that a common partial region from one image included in the second domain is superimposed on a plurality of images included in the first domain, and/or a plurality of images included in the second domain generating the combined image data so as to overlap common partial regions from one image included in the first domain;
Based on the synthesized image data, calculate a third loss by comparison between the plurality of images in which the common partial regions are superimposed,
The learning device according to claim 12, wherein parameters of the object detector and the feature extractor are updated in the image recognition model so as to minimize the third loss.
コンピュータの演算回路により実行されて、
物体の位置を示す物体領域に関連付けられた正解情報を有する第1の画像を含み、かつ所定の特性を有する第1のドメインと、第2の画像を含み、かつ前記第1のドメインの特性とは異なる特性を有する第2のドメインとの少なくとも一方における画像データが示す画像から、前記物体領域の候補を示す部分領域を抽出すること、
前記第1のドメインの画像から部分領域を抽出する場合には前記第1の画像からの部分領域を前記第2の画像に重畳させて合成した画像データを生成すること、
前記第2のドメインの画像から部分領域を抽出する場合には前記第2の画像からの部分領域を前記第1の画像に重畳させて合成した画像データを生成すること、及び
画像データが示す画像において物体の画像認識を行う画像認識モデルが含むパラメータを、前記合成した画像データ及び前記正解情報に基づいて機械学習により更新すること
を含む、学習方法。
Executed by a computer's arithmetic circuit,
a first domain including a first image having correct answer information associated with an object region indicating the position of the object and having predetermined characteristics; and a first domain including a second image and having the characteristics of the first domain. extracting a partial region representing a candidate for the object region from an image represented by image data in at least one of a second domain having different characteristics;
When extracting a partial region from the image of the first domain, generating composite image data by superimposing the partial region from the first image on the second image;
When extracting a partial region from the image of the second domain, generating image data by superimposing the partial region from the second image on the first image, and an image represented by the image data. A learning method comprising updating parameters included in an image recognition model that performs image recognition of an object by machine learning based on the synthesized image data and the correct answer information.
請求項15に記載の学習方法を前記演算回路に実行させるためのプログラム。 A program for causing the arithmetic circuit to execute the learning method according to claim 15.
JP2022107900A 2022-07-04 2022-07-04 Learning device and learning method Pending JP2024006730A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2022107900A JP2024006730A (en) 2022-07-04 2022-07-04 Learning device and learning method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2022107900A JP2024006730A (en) 2022-07-04 2022-07-04 Learning device and learning method

Publications (1)

Publication Number Publication Date
JP2024006730A true JP2024006730A (en) 2024-01-17

Family

ID=89540502

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2022107900A Pending JP2024006730A (en) 2022-07-04 2022-07-04 Learning device and learning method

Country Status (1)

Country Link
JP (1) JP2024006730A (en)

Similar Documents

Publication Publication Date Title
CN110097568B (en) Video object detection and segmentation method based on space-time dual-branch network
Bardes et al. Vicregl: Self-supervised learning of local visual features
CN109299274B (en) Natural scene text detection method based on full convolution neural network
Li et al. Unsupervised video object segmentation with motion-based bilateral networks
Von Stumberg et al. Gn-net: The gauss-newton loss for multi-weather relocalization
US20190294970A1 (en) Systems and methods for polygon object annotation and a method of training an object annotation system
JP6395158B2 (en) How to semantically label acquired images of a scene
Zhao et al. Pseudo mask augmented object detection
CN113657560B (en) Weak supervision image semantic segmentation method and system based on node classification
KR102305230B1 (en) Method and device for improving accuracy of boundary information from image
Bandara et al. Spin road mapper: Extracting roads from aerial images via spatial and interaction space graph reasoning for autonomous driving
CN113657387B (en) Semi-supervised three-dimensional point cloud semantic segmentation method based on neural network
KR102352942B1 (en) Method and device for annotating object boundary information
KR102305229B1 (en) Method and device for producing feature map information for extracting boundary information from image
Dong et al. Mobilexnet: An efficient convolutional neural network for monocular depth estimation
Huang et al. Change detection with various combinations of fluid pyramid integration networks
Li et al. Learning depth via leveraging semantics: Self-supervised monocular depth estimation with both implicit and explicit semantic guidance
Cheng et al. Learning to segment instances in videos with spatial propagation network
Liang et al. Hybrid transformer-CNN networks using superpixel segmentation for remote sensing building change detection
WO2024082602A1 (en) End-to-end visual odometry method and apparatus
Prabhakar et al. Cdnet++: Improved change detection with deep neural network feature correlation
CN117079069A (en) Target detection method and device based on self-supervision auxiliary learning
Deng et al. Text enhancement network for cross-domain scene text detection
CN113657403B (en) Image processing method and training method of image processing network
JP2024006730A (en) Learning device and learning method