JP2022088146A - Learning data generation device, person identifying device, learning data generation method, and learning data generation program - Google Patents
Learning data generation device, person identifying device, learning data generation method, and learning data generation program Download PDFInfo
- Publication number
- JP2022088146A JP2022088146A JP2020200432A JP2020200432A JP2022088146A JP 2022088146 A JP2022088146 A JP 2022088146A JP 2020200432 A JP2020200432 A JP 2020200432A JP 2020200432 A JP2020200432 A JP 2020200432A JP 2022088146 A JP2022088146 A JP 2022088146A
- Authority
- JP
- Japan
- Prior art keywords
- person
- face
- face image
- learning data
- unit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 55
- 238000001514 detection method Methods 0.000 claims abstract description 32
- 239000013598 vector Substances 0.000 claims description 114
- 238000000605 extraction Methods 0.000 claims description 46
- 230000005484 gravity Effects 0.000 claims description 41
- 238000012549 training Methods 0.000 claims description 14
- 238000012545 processing Methods 0.000 description 29
- 238000004891 communication Methods 0.000 description 16
- 238000010586 diagram Methods 0.000 description 12
- 238000006243 chemical reaction Methods 0.000 description 9
- 230000001815 facial effect Effects 0.000 description 9
- 230000006870 function Effects 0.000 description 8
- 238000013136 deep learning model Methods 0.000 description 6
- 230000000694 effects Effects 0.000 description 4
- 238000013135 deep learning Methods 0.000 description 3
- 239000000284 extract Substances 0.000 description 3
- 238000012217 deletion Methods 0.000 description 2
- 230000037430 deletion Effects 0.000 description 2
- 235000006481 Colocasia esculenta Nutrition 0.000 description 1
- 240000004270 Colocasia esculenta var. antiquorum Species 0.000 description 1
- 230000032683 aging Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 238000002372 labelling Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
Abstract
Description
本発明は、画像内の人物を識別するための装置、方法及びプログラムに関する。 The present invention relates to devices, methods and programs for identifying a person in an image.
カメラなどから取得した画像に写っている人物を識別する手法は長年研究されており、家庭などで利用されるコミュニケーションロボットやIoTデバイスの他、様々な場面で利用されている。 Techniques for identifying a person in an image acquired from a camera or the like have been studied for many years, and are used in various situations such as communication robots and IoT devices used at home.
人物の識別を行うためには、一般に顔検出処理と顔識別処理の2つの処理を行う必要がある。
顔検出処理は、入力された画像から人物の顔が写っている矩形領域(顔領域)を検出する処理である。顔検出処理としては、非特許文献1のようなカスケード検出器を用いた手法や、非特許文献2及び非特許文献3のような深層学習による物体検出手法などが提案されている。また、深層学習による物体検出手法を用いる場合、人物の顔検出に特化したデータセットとして、非特許文献4を用いることができる。
In order to identify a person, it is generally necessary to perform two processes, a face detection process and a face identification process.
The face detection process is a process of detecting a rectangular area (face area) in which a person's face is reflected from an input image. As the face detection process, a method using a cascade detector such as Non-Patent
一方、顔識別処理は、与えられた顔画像が既知の人物のいずれか、若しくは未知の人物であることを推定する処理である。入力される顔画像は、一人の人物の顔領域のみが写っている画像、又は前述の顔検出処理により検出された顔領域が指定された画像である。顔識別処理は、識別対象の人物を登録する学習ステップと、入力された顔画像の人物を識別する推定ステップと、の2つから構成される。 On the other hand, the face recognition process is a process of estimating that a given face image is one of known persons or an unknown person. The input face image is an image in which only the face area of one person is shown, or an image in which the face area detected by the above-mentioned face detection process is specified. The face identification process is composed of two steps: a learning step of registering a person to be identified and an estimation step of identifying a person in an input face image.
学習ステップでは、識別したい人物の顔画像が特徴ベクトルに変換され、データベースに保存される。顔画像を特徴ベクトルに変換する手法は、例えば、非特許文献5で提案されている。
推定ステップでは、入力された顔画像が学習ステップと同様の方法で特徴ベクトルへと変換され、事前に登録された人物の特徴ベクトルと比較することで、入力された顔画像の人物が事前に登録した人物のいずれと一致するのか、若しくはいずれとも一致しないのかの推定結果が出力される。
In the learning step, the face image of the person to be identified is converted into a feature vector and stored in the database. A method for converting a face image into a feature vector has been proposed, for example, in Non-Patent
In the estimation step, the input face image is converted into a feature vector in the same way as in the learning step, and the person in the input face image is registered in advance by comparing with the feature vector of the pre-registered person. The estimation result of which of the people who made the match or which does not match is output.
また、学習ステップに必要な顔画像を収集する方法についても、様々な方法が提案されている。
例えば、特許文献1では、ユーザの顔をシステムに登録する際、システムがユーザに対して顔の向きなどを指示することで、様々な角度から撮影した画像を収集する装置が提案されている。
例えば、特許文献2では、ユーザの顔をシステムに登録する際、ロボットが自らユーザに指示することで登録処理を円滑に行う装置が提案されている。
例えば、特許文献3では、ロボットがユーザに抱きかかえられたときに登録処理を行うことで、ユーザに負荷をかけることなく、高品質な顔画像を取得する装置が提案されている。
In addition, various methods have been proposed for collecting facial images necessary for the learning step.
For example,
For example,
For example,
人物識別処理を行うコミュニケーションロボット又はIoTデバイスなどでは、初期設定時にユーザの顔登録を行うことが一般的である。その際、特許文献1又は特許文献2で提案されているように、ロボット又はIoTデバイスなどが音声又はテキスト表示などによりユーザに対して指示を出し、ユーザは、その指示に従って顔を様々な方向に動かすことで顔登録を行う。ロボット又はIoTデバイスが家族で共用するものである場合、この顔登録を人数分行う必要がある。また、人間の顔は加齢と共に変化していくため、定期的に登録情報を更新しないと正しく人物識別ができなくなる可能性がある。したがって、ロボット又はIoTデバイスでの顔登録は、ユーザに負荷が発生し、使用するユーザ数が多くなるとその分、全体の負荷が増加していた。
In a communication robot or an IoT device that performs a person identification process, it is common to register a user's face at the time of initial setting. At that time, as proposed in
この課題を解決する手段として、例えば、特許文献3の手法が利用できる。この手法では、顔登録におけるユーザの負荷を低減できるが、この手法を導入するロボットは、抱きかかえることが可能なデザインとする必要があり、ロボットの内部にも抱きかかえられたことを検知するセンサデバイスを実装する必要がある。したがって、ロボットのデザインに制約が生じ、IoTデバイスでは実現できないことが問題となり、汎用性が高い手法とは言えなかった。
As a means for solving this problem, for example, the method of
また、コミュニケーションロボットやIoTデバイスは家庭で使用されることが多いため、ユーザの集合の中には、遺伝的に顔が似ている人物が存在することが想定される。非特許文献5のように顔画像を特徴ベクトルに変換する手法の多くは、非特許文献6のような大規模な顔画像データセットを用いて学習を行う。このような大規模な顔画像データセットには、様々な属性(年齢、性別、人種など)の人物が含まれており、このようなデータセットで学習することで汎用的な顔特徴抽出が行えるようになることが期待される。しかし、コミュニケーションロボットやIoTデバイスなど、家庭で使用することを想定したシステムの場合、実際に識別する必要のある人物の属性は限られている。すると、従来の汎用的な顔特徴抽出手法では顔が似ている人物は特徴空間上の近い位置に配置されるため、異なる人物でありながら特徴ベクトルの距離が近いことが誤識別の原因となる課題があった。
In addition, since communication robots and IoT devices are often used at home, it is assumed that there are people who have genetically similar faces in the set of users. Most of the methods for converting a face image into a feature vector as in Non-Patent
本発明は、ユーザによる事前の顔登録を必要とせず、顔が似ているユーザが存在する場合でも高精度に識別ができる人物識別装置、人物識別方法及び人物識別プログラムを提供することを目的とする。 An object of the present invention is to provide a person identification device, a person identification method, and a person identification program that can perform highly accurate identification even when there are users with similar faces without requiring prior face registration by the user. do.
本発明に係る学習データ生成装置は、カメラで撮影された画像群から人物の顔画像の領域を検出する顔検出部と、閾値未満の時間内に撮影された2つの画像から、前記顔画像の座標に基づいて同一人物を判定し、当該同一人物の顔画像に同一の人物IDを割り当て、他の顔画像に別の人物IDを割り当てる対応関係推定部と、顔画像を前記人物IDと対応付けて記録すると共に、同時刻に撮影された画像群から得られた前記人物IDのペアを記録する学習データ記録部と、前記人物IDが同一の顔画像が2枚、及び当該人物IDと前記ペアを構成している人物IDの顔画像が1枚からなるTriplet形式の学習データを生成する学習データセット生成部と、を備え、顔画像を入力とした人物識別のための前記学習データを出力する。 The learning data generation device according to the present invention has a face detection unit that detects a region of a person's face image from a group of images taken by a camera, and two images taken within a time less than a threshold, from the face image. Correspondence relationship estimation unit that determines the same person based on the coordinates, assigns the same person ID to the face image of the same person, and assigns another person ID to another face image, and associates the face image with the person ID. A learning data recording unit that records a pair of the person IDs obtained from a group of images taken at the same time, two face images having the same person ID, and the person ID and the pair. It is provided with a learning data set generation unit for generating triplet format training data in which the face image of the person ID constituting the above is composed of one sheet, and outputs the training data for person identification using the face image as an input. ..
前記学習データ生成装置は、前記顔画像の座標に基づいて、人物方向を導出する人物方向推定部を備え、前記対応関係推定部は、同時刻に撮影された2つの画像から、差が閾値未満の人物方向が導出された場合、当該人物方向に対応する2つの顔画像に同一の人物IDを割り当ててもよい。 The learning data generation device includes a person direction estimation unit that derives a person direction based on the coordinates of the face image, and the correspondence estimation unit has a difference of less than a threshold value from two images taken at the same time. When the person direction is derived, the same person ID may be assigned to the two face images corresponding to the person direction.
前記対応関係推定部は、同時刻に撮影された2つの画像から、差が閾値未満の人物方向が導出された場合、又は閾値未満の時間内に撮影された2つの画像から、差が閾値未満の人物方向が導出された場合に、当該人物方向に対応する2つの顔画像に同一の人物IDを割り当て、他の顔画像に別の人物IDを割り当ててもよい。 In the correspondence estimation unit, the difference is less than the threshold when the person direction whose difference is less than the threshold is derived from the two images taken at the same time, or from the two images taken within the time less than the threshold. When the person direction is derived, the same person ID may be assigned to the two face images corresponding to the person direction, and another person ID may be assigned to the other face images.
同一人物が同時に写らない位置に複数のカメラが配置され、前記対応関係推定部は、閾値未満の時間内に撮影された2つの画像から、座標間の距離が閾値未満の2つの顔画像が検出された場合に、当該2つの顔画像に同一の人物IDを割り当て、他の顔画像に別の人物IDを割り当ててもよい。 Multiple cameras are placed at positions where the same person is not captured at the same time, and the correspondence estimation unit detects two face images whose distance between coordinates is less than the threshold from two images taken within the time less than the threshold. If this is the case, the same person ID may be assigned to the two face images, and another person ID may be assigned to the other face images.
本発明に係る人物識別装置は、前記学習データ生成装置から出力された前記学習データを用いて、特徴抽出モデルを学習するモデル学習部と、前記特徴抽出モデルにより前記顔画像を特徴ベクトルに変換し、当該特徴ベクトルの間の距離に基づいて前記人物IDを統合したユーザID毎に、特徴ベクトルの重心ベクトルを記録する特徴記録部と、新たに撮影された画像に含まれる顔画像を、前記特徴抽出モデルにより特徴ベクトルに変換する顔特徴抽出部と、前記顔特徴抽出部により得られた特徴ベクトルを、前記ユーザID毎の前記重心ベクトルと比較し、閾値未満の距離にあるユーザIDを人物の推定結果として出力する人物推定部と、を備える。 The person identification device according to the present invention uses the training data output from the training data generation device to learn a feature extraction model, and converts the face image into a feature vector by the feature extraction model. For each user ID that integrates the person ID based on the distance between the feature vectors, the feature recording unit that records the center of gravity vector of the feature vector and the face image included in the newly captured image are described as the feature. The face feature extraction unit that converts to a feature vector by the extraction model and the feature vector obtained by the face feature extraction unit are compared with the center of gravity vector for each user ID, and the user ID at a distance less than the threshold is the person's. It is provided with a person estimation unit that outputs an estimation result.
前記特徴記録部は、識別対象のユーザ数の入力を受け付け、前記人物ID毎の重心ベクトルを当該ユーザ数にクラスタリングしてユーザIDを割り当ててもよい。 The feature recording unit may receive an input of the number of users to be identified, cluster the center of gravity vector for each person ID to the number of users, and assign the user ID.
前記特徴記録部は、前記ユーザIDに対応する顔画像を提示し、ユーザ名の入力を受け付けて、前記重心ベクトルと共に記録してもよい。 The feature recording unit may present a face image corresponding to the user ID, accept input of a user name, and record the face image together with the center of gravity vector.
前記特徴記録部は、提示した顔画像のうち識別対象外の顔画像を指示されると、当該指示された顔画像が含まれる人物IDを除外して、再度クラスタリングを行ってもよい。 When the feature recording unit is instructed to use a face image that is not the identification target among the presented face images, the feature recording unit may exclude the person ID including the instructed face image and perform clustering again.
本発明に係る学習データ生成方法は、カメラで撮影された画像群から人物の顔画像の領域を検出する顔検出ステップと、閾値未満の時間内に撮影された2つの画像から、前記顔画像の座標に基づいて同一人物を判定し、当該同一人物の顔画像に同一の人物IDを割り当て、他の顔画像に別の人物IDを割り当てる対応関係推定ステップと、顔画像を前記人物IDと対応付けて記録すると共に、同時刻に撮影された画像群から得られた前記人物IDのペアを記録する学習データ記録ステップと、前記人物IDが同一の顔画像が2枚、及び当該人物IDと前記ペアを構成している人物IDの顔画像が1枚からなるTriplet形式の学習データを生成する学習データセット生成ステップと、をコンピュータが実行し、顔画像を入力とした人物識別のための前記学習データを出力する。 The learning data generation method according to the present invention is a face detection step of detecting a region of a person's face image from a group of images taken by a camera, and two images taken within a time less than a threshold of the face image. Correspondence estimation step of determining the same person based on the coordinates, assigning the same person ID to the face image of the same person, and assigning another person ID to another face image, and associating the face image with the person ID. A learning data recording step of recording a pair of the person IDs obtained from a group of images taken at the same time, two face images having the same person ID, and the person ID and the pair. The computer executes a training data set generation step of generating triplet format training data consisting of one face image of a person ID constituting the above, and the training data for person identification using the face image as an input. Is output.
本発明に係る学習データ生成プログラムは、前記学習データ生成装置としてコンピュータを機能させるためのものである。 The learning data generation program according to the present invention is for making a computer function as the learning data generation device.
本発明によれば、事前の顔登録を行わずに、周囲にいる人物を高精度に識別できる。 According to the present invention, it is possible to identify a person in the vicinity with high accuracy without performing prior face registration.
本発明の実施形態における人物識別装置は、コミュニケーションロボット又はIoTデバイスなどの稼働中に、周囲にいるユーザの顔画像を収集して学習用のデータセットを自動構築し、構築したデータセットを用いて特定のタイミングで深層学習モデルを学習する。
このとき、人物識別装置は、カメラに写った人物の顔領域を検出し、ラベリングしたデータをデータベースに蓄積する。ラベリングを行う際は、前後のフレームで近い位置にいた人物は同一人物、同時に写った人物は異なる人物という性質を利用する。
The person identification device according to the embodiment of the present invention collects facial images of users in the vicinity during operation of a communication robot, an IoT device, or the like, automatically constructs a data set for learning, and uses the constructed data set. Learn a deep learning model at a specific timing.
At this time, the person identification device detects the face area of the person captured by the camera and stores the labeled data in the database. When labeling, the property that the people who were close to each other in the previous and next frames are the same person, and the people who are shown at the same time are different people is used.
[第1実施形態]
以下、本発明の第1実施形態を例示して説明する。本実施形態の人物識別装置1は、コミュニケーションロボット又はIoTデバイスに搭載された、複数台のカメラを持つカメラアレイを入力デバイスとして、周囲にいる人物を自動で識別する装置である。
[First Embodiment]
Hereinafter, the first embodiment of the present invention will be illustrated and described. The
図1は、人物識別装置1の機能構成を示す図である。
人物識別装置1は、制御部10及び記憶部20の他、各種のインターフェースを備えた情報処理装置であり、記憶部20に格納されたソフトウェア(人物識別プログラム)を制御部10が実行することにより、本実施形態の各種機能が実現される。
FIG. 1 is a diagram showing a functional configuration of the
The
制御部10は、顔検出部11と、人物方向推定部12と、対応関係推定部13と、学習データ記録部14と、学習データセット生成部15と、モデル学習部16と、特徴ベクトル生成部17(特徴記録部)と、顔特徴抽出部18と、人物推定部19とを備える。
また、記憶部20は、人物識別プログラムの他、人物メモリ21と、顔画像データベース(DB)22と、人物ペアデータベース(DB)23と、顔特徴抽出モデル24と、顔特徴データベース(DB)25とを備える。
The
In addition to the person identification program, the
顔検出部11は、コミュニケーションロボット又はIoTデバイスなどに接続されたカメラアレイから画像を取得し、取得した画像に写っている人物の顔を検出する。
カメラアレイは、例えば、円柱状の筐体に複数台のカメラが埋め込まれたデバイスであり、水平方向に45度おきに8台のカメラを設置すると、全方位の映像を収集することができる。なお、カメラアレイは、必ずしも全方位の映像を収集する必要はなく、コミュニケーションロボット又はIoTデバイスなどの使用時にユーザが存在する位置が写っていればよい。
また、カメラアレイを構成する複数台のカメラによる同時撮影には限られず、人物の動きに比べて十分に速い間隔で1台又は数台のカメラが周囲を連続的に撮影する構成であってもよい。
The
A camera array is, for example, a device in which a plurality of cameras are embedded in a cylindrical housing, and if eight cameras are installed at intervals of 45 degrees in the horizontal direction, images in all directions can be collected. It should be noted that the camera array does not necessarily have to collect images in all directions, and it is sufficient that the position where the user is present is captured when the communication robot, IoT device, or the like is used.
Further, it is not limited to simultaneous shooting by a plurality of cameras constituting the camera array, and even if one or several cameras continuously shoot the surroundings at intervals sufficiently faster than the movement of a person. good.
顔画像の検出には、例えば、非特許文献1で提案されているようなカスケード検出器を用いた手法や、非特許文献2又は非特許文献3で提案されているような深層学習による物体検出手法などが利用できる。顔検出部11は、カメラアレイに搭載された各カメラから取得した画像それぞれに対して顔検出処理を行い、画像内での顔領域の位置を示す座標情報を人物方向推定部12へ出力する。
なお、人物識別装置1は、一連の処理が終了し、人物推定結果を出力すると、カメラアレイから新たに画像を取得して顔検出部11の処理を再度実行する。
For the detection of the face image, for example, a method using a cascade detector as proposed in
When the
人物方向推定部12は、顔検出部11により検出された顔の画像内での位置をもとに、人物のいる方向を推定する。
人物方向の推定には、例えば、次の文献Aで提案されている方法が用いられる。この場合、人物方向推定部12は、カメラ画像のピクセルの位置と、人物識別装置1を搭載したロボットなどから見た角度とを対応づけた角度変換表を、カメラアレイのカメラ毎に事前に用意し、これらを用いることで人物方向を推定する。
文献A: 萩尾 勇太 他,“人と一緒にテレビを視聴するコミュニケーションロボットの試作と検証,” 電子情報通信学会技術研究報告,vol.119,no.446,CNR2019-46,pp.7-12,2020.
The person
For the estimation of the person direction, for example, the method proposed in the following document A is used. In this case, the person
Reference A: Yuta Hagio et al., "Prototype and verification of a communication robot for watching TV with humans," IEICE Technical Report, vol. 119, no. 446, CNR2019-46, pp. 7-12, 2020.
図2は、人物方向推定部12の処理例を示す図である。
なお、この例では、説明の簡略化のため、カメラアレイのカメラは2台としている。
ここでは、顔検出部11から出力された顔検出結果を用いて、人物の方向が推定される。具体的には、人物方向推定部12は、顔検出結果として得られた顔領域の中心座標を、カメラ毎に予め用意されている角度変換表により角度へと変換する。
FIG. 2 is a diagram showing a processing example of the person
In this example, for the sake of simplicity of explanation, the number of cameras in the camera array is two.
Here, the direction of the person is estimated using the face detection result output from the
この例では、カメラAに1人、カメラBに2人の人物が写っている。人物方向推定部12は、カメラ毎の角度変換表において、顔領域の中心座標に対応する数値を参照し、人物方向の推定結果として、カメラAからは75°、カメラBからは75°及び115°が得られている。
角度変換表は、実際にはカメラの画素数と同様の大きさであるが、ここでは、説明のため簡略化している。角度変換表に格納されている数値は、この例では1°単位で設定されているが、1°より細かい角度が設定されてもよい。
また、この例では水平方向の角度のみが推定されるが、垂直方向の角度も推定できるように、角度変換表に2次元の数値(角度)を格納して拡張してもよい。
In this example, one person is shown in camera A and two people are shown in camera B. The person
The angle conversion table is actually the same size as the number of pixels of the camera, but here, it is simplified for the sake of explanation. The numerical value stored in the angle conversion table is set in units of 1 ° in this example, but an angle finer than 1 ° may be set.
Further, in this example, only the horizontal angle is estimated, but a two-dimensional numerical value (angle) may be stored in the angle conversion table and expanded so that the vertical angle can also be estimated.
対応関係推定部13は、人物方向推定部12により得られた人物方向及び人物メモリ21に格納されている過去の人物方向データから、人物の対応関係を推定し、学習データ記録部14及び顔特徴抽出部18に出力すると共に、人物メモリ21のデータを更新する。
The
人物メモリ21には、人物ID、顔画像、人物方向、更新時刻が記録されており、対応関係推定部13の処理を行うたびに内容が更新される。
ここで、人物IDは、前後のフレーム(時間的に近い2つの画像)の比較により同一人物であると推定されるユーザを管理するための識別子であり、新たに人物IDを発行する場合は、過去に使用された人物IDと重複しないものが使用される。
The person ID, the face image, the person direction, and the update time are recorded in the
Here, the person ID is an identifier for managing users who are presumed to be the same person by comparing the frames before and after (two images close in time), and when issuing a new person ID, the person ID is used. A person ID that does not overlap with the person ID used in the past is used.
対応関係推定部13は、まず、人物方向推定部12から得られた人物方向に基づいて、同一人物の顔画像を推定する。これは、カメラアレイに搭載された複数のカメラの画角の一部が重なっており、複数のカメラにより同一人物を異なる角度から同時に撮影したことを推定する処理である。対応関係推定部13は、コミュニケーションロボット又はIoTデバイスから見て、ほぼ同時刻に同じ方向に存在する人物は同一人物であると仮定して推定を行う。複数のカメラから取得した画像より推定した人物方向に対し、事前に設定した同一人物方向閾値以内の角度の推定結果が存在する場合、対応関係推定部13は、これらの人物を同一の人物と推定する。なお、同一人物方向閾値以内に複数の人物が存在し、一意に定まらない場合、制御部10は、一連の処理を中断し、再度新たな画像を取得して顔検出部11の処理から実行する。
First, the
その後、対応関係推定部13は、推定された人物方向を、人物メモリ21に格納されている過去の人物方向と比較し、同一人物であるかを推定する。ここでは、特定の人物がある方向に存在したとき、次に取得された画像でも近い方向に存在すると仮定して推定される。
具体的には、対応関係推定部13は、人物方向推定部12から得られた人物の人物方向が人物メモリ21に記録されている人物の人物方向と、事前に設定した人物移動閾値以内だった場合、これらを同一人物とみなして同一の人物IDを割り当てる。人物方向推定部12から得られた人物のうち、人物メモリ21に記録されている人物と同一人物とみなすことができない人物が存在する場合、対応関係推定部13は、過去に使用していない新たな人物IDを割り当て、人物メモリ21に記録する。
対応関係推定部13は、人物メモリ21のデータを更新すると共に、更新情報を学習データ記録部14及び顔特徴抽出部18に出力する。
After that, the
Specifically, in the
The
また、事前にタイムアウト閾値が設定され、対応関係推定部13は、更新時刻からの経過時間がタイムアウト閾値を超えているデータが人物メモリ21に存在している場合、これらのデータを人物メモリ21から削除した後、同一人物の推定及び人物IDの割り当てを行う。
例えば、タイムアウト閾値は、人物移動閾値に相当する距離の移動時間に対して十分に短い時間で設定される。これにより、顔検出に失敗するなどの検出漏れが発生した場合にも、人物メモリ21に存在する数フレーム前に検出された人物との照合により、人物IDの割り当てが可能となる。
Further, when a timeout threshold is set in advance and the
For example, the time-out threshold value is set in a sufficiently short time with respect to the movement time of the distance corresponding to the person movement threshold value. As a result, even if a detection omission such as a failure in face detection occurs, a person ID can be assigned by collating with a person detected several frames before existing in the
図3は、対応関係推定部13の処理例を示す図である。
この例では、同一人物方向閾値が5°、人物移動閾値が10°、タイムアウト閾値が5秒と設定されている。人物方向推定部12により75°、75°、115°という3人分の人物方向が推定されており、人物メモリ21には人物IDが3の人物が72°の方向に存在するというデータが格納されている。
FIG. 3 is a diagram showing a processing example of the correspondence
In this example, the same person direction threshold is set to 5 °, the person movement threshold is set to 10 °, and the timeout threshold is set to 5 seconds. The person
対応関係推定部13は、まず、人物方向推定部12から得られた人物のうち、データIDが01の人物とデータIDが02の人物とは同一人物方向閾値の5°以内となっているため、同一人物と推定する。なお、データIDは、人物方向推定部12の出力データに対して付与した識別子である。
First, among the persons obtained from the person
次に、人物メモリ21に記録されている人物IDが3のデータは72°方向となっており、データIDが01の人物とデータIDが02の人物とが人物移動閾値の10°以内となっているため、対応関係推定部13は、データIDが01の人物とデータIDが02の人物には人物IDとして3を割り当てる。一方、データIDが03の推定角度と人物移動閾値以内のデータは人物メモリ21には含まれていないため、対応関係推定部13は、データIDが03の人物に、新たに人物IDとして4を割り当てる。
対応関係推定部13は、これらのデータにより人物メモリ21を更新する。なお、今回のデータには更新時刻からの経過時間がタイムアウト閾値の5秒を超えているデータは存在しないため、人物メモリ21から削除するデータはない。
Next, the data with the
The
学習データ記録部14は、対応関係推定部13より出力された顔画像及び人物IDを元に、顔画像DB22及び人物ペアDB23にデータを記録する。
顔画像DB22には、画像ID、顔画像及び人物IDのセットが記録され、人物ペアDB23には、同時刻に存在した人物IDのペアが記録されている。人物識別装置1は、同時に存在した人物IDの異なる人物同士は、異なる人物の顔画像であることを利用して人物識別を行う。
The learning
A set of an image ID, a face image, and a person ID is recorded in the
図4は、学習データ記録部14の処理例を示す図である。
この例では、対応関係推定部13より人物IDが3の顔画像2枚と、人物IDが4の顔画像1枚とが入力されている。
学習データ記録部14は、まず、これらのデータを顔画像DB22に追加し、その後、人物IDの3及び4が同時に存在していることを示すデータを、人物ペアDB23に追加する。
FIG. 4 is a diagram showing a processing example of the learning
In this example, two face images having a person ID of 3 and one face image having a person ID of 4 are input from the
The learning
学習データセット生成部15は、顔画像DB22及び人物ペアDB23のデータを用い、顔特徴抽出モデル24(深層学習モデル)の重みを学習させるためのデータセットを生成する。この処理は、顔特徴抽出モデル24を学習させる所定のタイミングで、例えば定期的に実行される。
ここで、学習データ記録部14の処理によって、顔画像DB22には、顔画像と人物IDのセットが記録されており、人物IDが同じ顔画像は同一人物の顔画像である。また、人物ペアDB23に記録されている人物IDのペアは、同一時刻に異なる方向にいた人物であるため、異なる人物である。学習データセット生成部15は、これらの性質を用いて、学習データを生成する。
The learning data
Here, a set of a face image and a person ID is recorded in the
学習データは、画像3枚をセットにしたTriplet形式であり、1枚目の顔画像と同一人物である2枚目の画像(正例)、及び異なる人物である3枚目の顔画像(負例)により構成される。顔画像DB22及び人物ペアDB23のデータを組み合わせることで、多様な組み合わせのTripletデータを生成することができる。
The training data is a triplet format in which three images are set, a second image (normal example) that is the same person as the first face image, and a third face image (negative) that is a different person. Example). By combining the data of the
図5は、学習データセット生成部15の処理例を示す図である。
この例では、人物ペアDB23には、人物ID「1-2」と「3-4」のペアが記録されている。これは、人物IDが1の人物と人物IDが2の人物とは異なる人物であり、人物IDが3の人物と人物IDが4の人物とは異なる人物であることを示している。
FIG. 5 is a diagram showing a processing example of the learning data
In this example, a pair of person IDs "1-2" and "3-4" is recorded in the
学習データセット生成部15は、これらの情報に基づいて、顔画像DB22から顔画像を取り出し、Triplet形式の学習データを生成する。学習データにおいて、顔画像1(参照元)と顔画像2(正例)とは同一の人物IDの顔画像となり、顔画像1(参照元)と顔画像3(負例)とは異なる人物IDで、かつ、人物ペアDB23に記録されているペアとなる。例えば、画像IDが1の顔画像を参照元とすると、画像IDが3の顔画像が正例となり、画像IDが2の顔画像が負例となる。
Based on this information, the learning data
モデル学習部16は、学習データセット生成部15で生成したTriplet形式の学習データを用いて、深層学習モデルである顔特徴抽出モデル24の学習を行う。
ここで用いる深層学習モデルには、例えば、次の文献Bで提案されているTriplet-Based Variational Autoencoder (TVAE)をアーキテクチャとして利用できる。
文献B: H. Ishfaq et al., “TVAE: Triplet-Based Variational Autoencoder using Metric Learning,” ICLR 2018 Workshop.
The
As the deep learning model used here, for example, the Triplet-Based Variational Autoencoder (TVAE) proposed in the following document B can be used as an architecture.
Document B: H. Ishifaq et al. , "TVAE: Triplet-Based Variational Autoencoder using Metric Learning," ICLR 2018 Workshop.
TVAEは、Triplet形式のデータを入力とするVariational Autoencoder(VAE)の一種であり、VAEと同様に、エンコーダの出力である潜在変数をデコーダに入力して得られる再構成データと入力データとの差を評価するReconstruction Lossに加え、正例間及び負例間の潜在変数の距離を評価するTriplet Lossを損失関数とすることで、正例である入力同士は潜在変数が近くに配置されるように、負例である入力同士は潜在変数が遠くに配置されるように学習させるアーキテクチャである。 TVAE is a kind of Variational Autoencoder (VAE) that inputs data in Triplet format, and like VAE, the difference between the reconstructed data obtained by inputting the latent variable that is the output of the encoder to the decoder and the input data. By using Triplet Ross, which evaluates the distance between the positive and negative examples, as the loss function, in addition to the Reaction Loss, which evaluates the data, the latent variables can be placed close to each other. , Negative examples of inputs are architectures that train latent variables to be placed far away.
モデル学習部16は、学習データセット生成部15により生成されたデータセットを用いて、損失が最小となるようにネットワークの重みを更新し、顔特徴抽出モデル24に記録する。
なお、顔特徴抽出モデル24の重みの初期値には、非特許文献6のような大規模な顔画像データセットを利用して学習した学習済みモデルが使用されてもよい。
The
As the initial value of the weight of the face
図6は、モデル学習部16の処理例を示す図である。
モデル学習部16は、学習データセット生成部15により生成されたデータセットからデータを取得し、学習処理、すなわち深層学習モデルの重みの更新を行う。学習処理によって更新する対象は、Encoder Network及びDecoder Networkの重みである。
FIG. 6 is a diagram showing a processing example of the
The
モデル学習部16は、Reconstruction Lossを用いて、画像を復元できるように学習すると共に、Triplet Lossを用いて、潜在変数(例えば、ガウス分布の平均μ)の距離が、正例では近く、負例では遠くなるように学習する。
なお、この例では、Encoder Network及びDecoder Networkが各3つずつ表記されているが、これらのネットワークの重みは同一のものを利用する。
The
In this example, three Encoder Networks and three Encoder Networks are shown, but the same weights are used for these networks.
特徴ベクトル生成部17は、モデル学習部16により更新された顔特徴抽出モデル24を用いて、既知の人物の顔の特徴データを記録する顔特徴DB25を更新する。
顔特徴DB25には、ユーザID、重心ベクトル、人物IDリストが記録される。
ここで、顔画像DB22及び人物ペアDB23に存在する人物IDは、カメラにフレームインした人物に対して次々に付与したものなので、実際に同一の人物であっても、同じ人物IDが利用されているわけではない。したがって、特徴ベクトル生成部17は、顔画像から抽出した特徴ベクトルのユークリッド距離を利用して、次のように顔画像DB22に含まれている人物の分類を行い、分類結果をユーザIDとして顔特徴DB25に記録する。
The feature
The user ID, the center of gravity vector, and the person ID list are recorded in the
Here, since the person IDs existing in the
まず、特徴ベクトル生成部17は、顔画像DB22から顔画像を取得し、これらの画像を、モデル学習部16により更新された顔特徴抽出モデル24のEncoder Networkに入力して特徴ベクトルへと変換する。なお、特徴ベクトルは、Encoder Networkの出力のうち、平均にあたる出力とする。
First, the feature
次に、特徴ベクトル生成部17は、取得した特徴ベクトルに対して、人物ID毎の重心のベクトルを計算する。
そして、特徴ベクトル生成部17は、算出した人物ID毎の重心ベクトルから任意の2つのベクトルを取り出し、これらのベクトルのユークリッド距離を、事前に設定した人物特徴閾値と比較する。2つのベクトル間のユークリッド距離が人物特徴閾値未満であった場合、この2つの人物IDは同一人物とみなされ、人物特徴閾値以上であった場合、この2つの人物IDは異なる人物とみなされる。特徴ベクトル生成部17は、同一人物とみなした人物IDについては、これらを合わせて再度重心ベクトルを計算し、顔特徴DB25に登録する。
なお、人物特徴閾値は、モデル学習部16のTriplet Lossの計算時に使用したマージンの値を基準に決定されてよい。
Next, the feature
Then, the feature
The person feature threshold value may be determined based on the value of the margin used in the calculation of Triplet Ross of the
図7は、特徴ベクトル生成部17の処理例を示す図である。
まず、特徴ベクトル生成部17は、顔画像DB22から人物IDが1~4の顔画像を取得し、モデル学習部16により学習された顔特徴抽出モデル24のEncoder Networkを用いて特徴ベクトルへと変換し、人物ID毎の重心ベクトルを計算する。
FIG. 7 is a diagram showing a processing example of the feature
First, the feature
次に、特徴ベクトル生成部17は、それぞれの重心ベクトル間のユークリッド距離を計算し、計算した距離を人物特徴閾値と比較する。この例では、人物IDが2と3の重心ベクトル間のユークリッド距離は、人物特徴閾値未満であるため、同一人物とみなされ、顔特徴DB25に記録される。
なお、ここでは特徴ベクトルを2次元空間で表現しているが、特徴ベクトルは、より高次元のものが使用されてもよい。また、重心ベクトル間の距離は、ユークリッド距離として説明したが、これには限られず、マハラノビス距離など他の距離が用いられてもよい。
Next, the feature
Although the feature vector is expressed in a two-dimensional space here, a higher-dimensional feature vector may be used. Further, the distance between the centroid vectors has been described as the Euclidean distance, but the distance is not limited to this, and other distances such as the Mahalanobis distance may be used.
顔特徴抽出部18は、対応関係推定部13から得られた顔画像を、顔特徴抽出モデル24のEncoder Networkにより、特徴ベクトルへと変換する。この変換処理は、特徴ベクトル生成部17の処理と同様のものである。
対応関係推定部13から入力された顔画像のうち、同一の人物IDの画像が複数存在した場合、顔特徴抽出部18は、その中から任意の1枚を選択して特徴ベクトルへと変換、あるいは、複数の画像全て若しくは一部画像の特徴ベクトルを統計処理(例えば、平均)して、該当の人物IDの特徴ベクトルとする。
なお、平均した特徴ベクトルを採用することで人物の識別精度の向上が期待できるが、処理負荷及び処理時間が増大するため、状況に応じて処理方法は選択されてよい。
The face
If there are multiple images with the same person ID among the face images input from the
Although it can be expected that the identification accuracy of a person is improved by adopting the averaged feature vector, the processing load and the processing time increase, so that the processing method may be selected depending on the situation.
人物推定部19は、顔特徴抽出部18から入力される各特徴ベクトルを、顔特徴DB25に登録されているユーザIDの重心ベクトルと比較し、ユークリッド距離を計算する。人物推定部19は、計算した距離が人物特徴閾値未満のユーザIDを発見すると、顔画像の人物をそのユーザであると推定する。また、人物推定部19は、顔特徴抽出部18から得られた特徴ベクトルとのユークリッド距離が人物特徴閾値未満である重心ベクトルが顔特徴DB25内に存在しない場合、入力された顔画像は顔特徴DB25に存在しない、未知のユーザと推定する。
The
図8は、人物推定部19の処理例を示す図である。
この例では、顔特徴DB25にユーザA~Cの3人分の重心ベクトルが記録されており、顔特徴抽出部18から、人物IDが14~16の3人分の特徴ベクトルが入力されている。
FIG. 8 is a diagram showing a processing example of the
In this example, the center of gravity vectors for three users A to C are recorded in the
人物推定部19は、入力された特徴ベクトルそれぞれに対し、ユークリッド距離が人物特徴閾値未満の重心ベクトルが顔特徴DB25内に存在するか確認する。この例では、人物IDが14の特徴ベクトルとユーザBの重心ベクトル、人物IDが15の特徴ベクトルとユーザCの重心ベクトルがこの条件を満たしているため、人物IDが14の人物はユーザB、人物IDが15の人物はユーザCと推定される。また、人物IDが16の人物の特徴ベクトルとのユークリッド距離が人物特徴閾値未満である重心ベクトルは顔特徴DB25内に存在しないため、人物IDが16の人物は未知のユーザであると推定される。
The
なお、人物識別装置1におけるモデルの学習機能は、学習データセット生成部15、モデル学習部16、特徴ベクトル生成部17から構成されるが、学習を行うタイミングには様々なパターンが考えられる。例えば、一定の周期で定期的に実行する方法の他、人物推定部19において未知のユーザと推定された顔画像が存在した場合に実行する方法、人物推定部19において異なる人物IDの顔画像が同一のユーザと推定された場合に実行する方法などが挙げられる。
The model learning function in the
図9は、人物識別方法の流れを例示するフローチャートである。
ここでは、一例として、人物推定部19にて異なる人物IDの顔画像が同一のユーザと推定された場合に学習を行う場合を示す。
FIG. 9 is a flowchart illustrating the flow of the person identification method.
Here, as an example, a case where learning is performed when the face images of different person IDs are estimated to be the same user by the
ステップS1において、制御部10は、カメラアレイの各カメラから画像をキャプチャし、取得する。
ステップS2において、顔検出部11は、取得した各画像から顔領域を検出する。
In step S1, the
In step S2, the
ステップS3において、制御部10は、顔領域が検出されたか否かを判定する。この判定がYESの場合、処理はステップS4に移り、判定がNOの場合、すなわち顔領域が1つも検出されなかった場合、処理はステップS1に戻る。
In step S3, the
ステップS4において、人物方向推定部12は、検出された各顔領域の中心座標から人物方向を推定する。
ステップS5において、対応関係推定部13は、人物メモリ21を参照して過去フレームの人物との対応関係、すなわち同一人物か否かを推定する。
In step S4, the person
In step S5, the correspondence
ステップS6において、制御部10は、人物の対応関係を一意に推定できたか否かを判定する。この判定がYESの場合、処理はステップS7に移り、判定がNOの場合、処理はステップS1に戻る。
In step S6, the
ステップS7において、学習データ記録部14は、顔画像及び人物IDを顔画像DB22に、同時に存在した人物IDのペア(別人のペア)を人物ペアDB23に、それぞれ記録する。
In step S7, the learning
ステップS8において、顔特徴抽出部18は、顔特徴抽出モデル24を用いて顔画像を特徴ベクトルへと変換する。
ステップS9において、人物推定部19は、ステップS8で得られた特徴ベクトルと顔特徴DB25に記録されている各ユーザの重心ベクトルとを比較し、人物推定を行う。
In step S8, the face
In step S9, the
ステップS10において、制御部10は、異なる人物IDの人物が同一ユーザと判定されたか否かを判定する。この判定がYESの場合、顔特徴抽出モデル24の学習を行うため、処理はステップS11に移り、判定がNOの場合、処理は終了する。
In step S10, the
ステップS11において、学習データセット生成部15は、顔画像DB22及び人物ペアDB23からデータを取得し、学習用のデータセットを生成する。
ステップS12において、モデル学習部16は、学習用のデータセットを用いて顔特徴抽出モデル24の重みの学習を行う。
ステップS13において、特徴ベクトル生成部17は、顔画像DB22に記録されている顔画像を、顔特徴抽出モデル24を用いて特徴ベクトルに変換し、顔特徴DB25を更新する。
In step S11, the learning data
In step S12, the
In step S13, the feature
本実施形態によれば、人物識別装置1は、カメラで撮影された画像群から人物の顔画像の領域を検出し、閾値未満の時間内に撮影された2つの画像から、顔画像の座標に基づいて同一人物を判定し、同一人物の顔画像に同一の人物IDを割り当て、他の顔画像に別の人物IDを割り当てる。そして、人物識別装置1は、顔画像を人物IDと対応付けて記録すると共に、同時刻に撮影された画像群から得られた人物IDのペアを別人物として記録する。人物識別装置1は、人物IDが同一の顔画像が2枚、及びこの人物IDとペアを構成している人物IDの顔画像が1枚からなるTriplet形式の学習データを生成する。
これにより、人物識別装置1は、ある人物の顔画像と同一人物の顔画像及び異なる人物の顔画像の3つから構成されるTriplet形式の学習データを用いて深層学習モデルを学習できる。
According to the present embodiment, the
Thereby, the
すなわち、人物識別装置1は、生成された学習データを用いて学習した顔特徴抽出モデル24により、顔画像を特徴ベクトルに変換し、この特徴ベクトルの間の距離に基づいて人物IDを統合したユーザID毎に、特徴ベクトルの重心ベクトルを記録する。そして、人物識別装置1は、新たに撮影された画像に含まれる顔画像を、顔特徴抽出モデル24により特徴ベクトルに変換すると、この特徴ベクトルを、ユーザID毎の重心ベクトルと比較し、閾値未満の距離にあるユーザIDを人物の推定結果として出力する。
これにより、人物識別装置1は、ユーザによる事前の顔登録を行わずに、ユーザID毎の特徴ベクトル(重心ベクトル)を自動的に記録し、周囲にいる人物を高精度に識別できる。
That is, the
As a result, the
人物識別装置1は、顔画像の座標に基づいて人物方向を導出することにより、同時刻に撮影された2つの画像から、差が閾値未満の人物方向が導出された場合、これらの人物方向に対応する2つの顔画像に同一の人物IDを割り当てる。
したがって、人物識別装置1は、複数のカメラ画像から得られる顔画像から、同一人物を適切に判定できる。
さらに、人物識別装置1は、閾値未満の時間内に撮影された2つの画像から、差が閾値未満の人物方向が導出された場合に、これらの人物方向に対応する2つの顔画像に同一の人物IDを割り当て、他の顔画像に別の人物IDを割り当てる。
したがって、人物識別装置1は、短時間の間に同一方向に存在する顔画像を同一人物として適切に対応付けることができる。
The
Therefore, the
Further, the
Therefore, the
[第2実施形態]
以下、本発明の第2実施形態について説明する。
本実施形態は、住居又はオフィスなどの各部屋にカメラが設置され、カメラの設置された空間で行動する人物を自動で識別する人物識別装置である。つまり、第1実施形態のカメラアレイとは異なり、複数のカメラに同一人物が同時に写らないことを前提としている。
[Second Embodiment]
Hereinafter, a second embodiment of the present invention will be described.
This embodiment is a person identification device in which a camera is installed in each room such as a house or an office and automatically identifies a person who acts in the space where the camera is installed. That is, unlike the camera array of the first embodiment, it is premised that the same person is not captured by a plurality of cameras at the same time.
図10は、本実施形態における人物識別装置2の機能構成を示す図である。
本実施形態では、第1実施形態と比べて、人物方向推定部12がなく、対応関係推定部13の機能が異なり、人物メモリ21に記録されるデータが異なる。
FIG. 10 is a diagram showing a functional configuration of the
In the present embodiment, as compared with the first embodiment, there is no person
対応関係推定部13は、顔検出部11から出力された顔領域の座標情報を、人物メモリ21に格納された過去の人物の座標データと比較して人物の対応関係を推定し、学習データ記録部14及び顔特徴抽出部18に出力すると共に、人物メモリ21のデータを更新する。
人物メモリ21には、人物ID、顔画像、カメラID、座標、更新時刻が記録されており、対応関係推定部13が処理を行うたびに内容が更新される。カメラIDは、人物を撮影したカメラの識別子であり、座標は画像内の人物の顔領域の中心座標である。人物ID、顔画像及び更新時刻は、第1実施形態と同様である。
The
The person ID, face image, camera ID, coordinates, and update time are recorded in the
対応関係推定部13は、顔領域の中心座標を、人物メモリ21に格納されている過去の人物の座標と比較することで、顔検出部11で得られた人物が人物メモリ21に記録されている人物と同一人物であるかを推定する。ここでは、特定の人物の顔があるカメラ画像のある座標に存在したとき、この人物は、同一のカメラで次にキャプチャされた画像において、元の座標に近い位置に存在すると仮定する。
The
具体的には、顔検出部11から得られた顔領域の座標と人物メモリ21に記録されている人物の座標のユークリッド距離が、事前に設定された人物移動閾値以内だった場合、同一人物とみなして同一の人物IDが割り当てられる。また、顔検出部11から得られた人物のうち、人物メモリ21に記録されている人物と同一人物とみなすことができない人物が存在する場合、過去に使用していない新たな人物IDを割り当て、人物メモリ21に記録される。
なお、タイムアウト閾値による、人物メモリ21からの削除については、第1実施形態と同様である。そして、対応関係推定部13は、人物メモリ21のデータを更新すると共に、更新情報を学習データ記録部14及び顔特徴抽出部18に出力する。
Specifically, when the Euclidean distance between the coordinates of the face area obtained from the
The deletion from the
図11は、対応関係推定部13の処理例を示す図である。
この例では、人物移動閾値を10、タイムアウト閾値を5秒として説明する。顔検出部11から得られた顔領域の中心座標は、カメラAの座標(200,300)、カメラBの座標(250,280)、カメラBの座標(560,250)となっている。また、人物メモリ21に記録されている人物ID:3は、カメラAの座標(198,304)、人物ID:4は、カメラBの座標(563,242)となっている。
FIG. 11 is a diagram showing a processing example of the correspondence
In this example, the person movement threshold value is set to 10 and the timeout threshold value is set to 5 seconds. The center coordinates of the face region obtained from the
同一のカメラにて撮影された顔画像間のユークリッド距離を計算すると、データIDが01の座標と人物IDが3の座標間は4.47、データIDが02の座標と人物IDが4の座標間は315.30、データIDが03の座標と人物IDが4の座標間は3.61となっている。
人物移動閾値が10であるため、対応関係推定部13は、データIDが01の人物には人物ID:3を、データIDが03の人物には人物ID:4を割り当てる。一方、データIDが02の座標に対して、ユークリッド距離が人物移動閾値以内の座標が人物メモリ21には含まれていないため、対応関係推定部13は、データIDが02の人物には新たに人物ID:5を割り当てる。
When calculating the Euclidean distance between face images taken by the same camera, the coordinates between the coordinates with
Since the person movement threshold value is 10, the
対応関係推定部13は、これらのデータにより人物メモリ21を更新する。なお、今回のデータには、更新時刻からの経過時間がタイムアウト閾値5秒を超えているデータは存在しないため、人物メモリ21から削除するデータはない。
また、後段の処理については、第1実施形態と同様である。
The
Further, the subsequent processing is the same as that of the first embodiment.
なお、本実施形態では、複数台のカメラを入力とする前提で説明したが、その限りではなく、カメラは1台であってもよい。また、使用するカメラは、矩形領域を撮影するものとして説明したが、その限りではなく、例えば、周囲全体を撮影できる全天球カメラなどであってもよい。 In the present embodiment, the description has been made on the premise that a plurality of cameras are input, but the present invention is not limited to this, and the number of cameras may be one. Further, the camera to be used has been described as taking a rectangular area, but the present invention is not limited to this, and for example, an omnidirectional camera capable of taking a picture of the entire surroundings may be used.
本実施形態によれば、同一人物が同時に写らない位置に複数のカメラが配置され、人物識別装置2は、閾値未満の時間内に撮影された2つの画像から、座標間の距離が閾値未満の2つの顔画像が検出された場合に、これら2つの顔画像に同一の人物IDを割り当て、他の顔画像に別の人物IDを割り当てる。
したがって、人物識別装置2は、例えば、不特定数の人物が出入りする空間において各部屋にいる人物を識別することができ、各部屋の人物配置をもとに各種IoTデバイス(照明又は家電機器)を制御できる。
According to the present embodiment, a plurality of cameras are arranged at positions where the same person is not captured at the same time, and the
Therefore, the
[第3実施形態]
以下、本発明の第3実施形態について説明する。
従来の顔識別装置を搭載したコミュニケーションロボット又はIoTデバイスの場合、顔登録処理を行うと同時にユーザの名前を登録する形態が多い。本実施形態の人物識別装置は、自動で学習して獲得した特徴ベクトルを、指定された数にクラスタリングすることで、入力されたユーザの名前を含む特徴ベクトルをデータベースに登録する。
[Third Embodiment]
Hereinafter, a third embodiment of the present invention will be described.
In the case of a communication robot or an IoT device equipped with a conventional face recognition device, there are many forms in which a user's name is registered at the same time as performing face registration processing. The person identification device of the present embodiment clusters the feature vectors acquired by automatic learning into a specified number, and registers the feature vectors including the input user's name in the database.
図12は、本実施形態における人物識別装置3の機能構成を示す図である。
本実施形態の人物識別装置3は、第1実施形態と比べて、特徴ベクトル生成部17の代わりに人物登録部17a(特徴記録部)を備え、顔特徴DB25に記録されるデータが異なる。
なお、ここでは第1実施形態の構成をもとにした機能構成を示すが、第2実施形態をもとに、特徴ベクトル生成部17及び顔特徴DB25を変更した機能構成であってもよい。
FIG. 12 is a diagram showing a functional configuration of the
Compared with the first embodiment, the
Although the functional configuration based on the configuration of the first embodiment is shown here, the functional configuration may be a modification of the feature
本実施形態では、人物識別装置3を備えたコミュニケーションロボット又はIoTデバイスを1~数日ほど稼働させ、顔画像DB22及び人物ペアDB23に、十分に学習用のデータが記録された後に、学習データセット生成部15、モデル学習部16及び人物登録部17aによる処理が実行される。また、人物登録部17aにより顔特徴DB25にデータが保存されるまでは、顔特徴抽出部18及び人物推定部19の処理は行われない。
In the present embodiment, a communication robot or an IoT device equipped with a
人物登録部17aは、モデル学習部16により学習された顔特徴抽出モデル24を用いて、顔画像DB22に登録されている顔画像を特徴ベクトルに変換し、クラスタリングした結果をユーザに示すことで、ユーザ名を含むデータを顔特徴DB25に登録する。
顔特徴DB25には、ユーザID、ユーザ名、重心ベクトル、人物IDリストが記録される。
The
A user ID, a user name, a center of gravity vector, and a person ID list are recorded in the
まず、人物登録部17aは、顔画像DB22から顔画像を取得し、これらの画像を、モデル学習部16により学習された顔特徴抽出モデル24のEncoder Networkを利用して特徴ベクトルへと変換する。なお、特徴ベクトルは、Encoder Networkの出力のうち、平均にあたる出力とする。
次に、人物登録部17aは、取得した特徴ベクトルに対して、人物ID毎の重心のベクトルを計算する。
First, the
Next, the
その後、人物登録部17aは、ユーザに対して、識別して欲しいユーザの人数の入力を要求する。例えば、人物識別装置3が搭載されたコミュニケーションロボット又はIoTデバイスが家庭内で利用されるものであった場合、家族の人数が入力されることになる。続いて、人物登録部17aは、人物ID毎に計算した特徴ベクトルの重心に対し、ユーザから入力された人数に応じてk-means法などによるクラスタリングを行う。
After that, the
次に、人物登録部17aは、各クラスタに所属する人物IDの顔画像から数枚を無作為抽出し、ユーザに提示する。ユーザは、提示された数枚の顔画像の人物の名前を入力する。
このとき、提示された顔画像に識別対象でない人物の顔画像が含まれていた場合、ユーザは、その旨を人物識別装置3に入力する。この場合、人物登録部17aは、提示した画像に含まれていた人物IDの重心ベクトルを取り除いたものに対して、再度クラスタリングを実施し、各クラスタに所属する人物IDの顔画像数枚を再度ユーザに提示する。
Next, the
At this time, if the presented face image contains a face image of a person who is not the identification target, the user inputs to that effect to the
具体的には、対象外の顔画像が提示された場合の再クラスタリングは、例えば、次のような手順で行われる。
(1)クラスタ毎に、所属している人物IDから各1枚の顔画像が提示される。ただし、予め提示する顔画像の枚数の上限を設定しておき、この上限を超える枚数は提示されないように制限されてもよい。ユーザは、提示されたクラスタ毎の顔画像リストを確認し、識別対象外の人物が含まれているクラスタを選択する。
(2)ユーザが選択したクラスタに所属する人物IDの顔画像が各1枚、一覧で提示される。ユーザは、一覧の中から識別対象外の顔画像を選択する。
(3)ユーザが選択した顔画像に対応する人物IDを取り除き、再度クラスタリングした結果が提示される。
Specifically, re-clustering when a non-target facial image is presented is performed by, for example, the following procedure.
(1) For each cluster, one face image is presented from the person ID to which the person belongs. However, an upper limit of the number of face images to be presented may be set in advance, and the number of images exceeding this upper limit may be limited so as not to be presented. The user confirms the presented face image list for each cluster, and selects a cluster that includes a person not to be identified.
(2) One face image of each person ID belonging to the cluster selected by the user is presented in a list. The user selects a face image that is not to be identified from the list.
(3) The person ID corresponding to the face image selected by the user is removed, and the result of clustering again is presented.
提示した各クラスタの画像全てに対して名前が入力された場合、人物登録部17aは、クラスタに所属する人物IDの重心ベクトルの重心を計算し、ユーザID、ユーザ名、重心ベクトル、そのクラスタに含まれる人物IDリストを顔特徴DB25に登録する。
When a name is input for all the presented images of each cluster, the
図13は、人物登録部17aの処理例を示す図である。
顔画像DB22から人物IDが1~5の顔画像が取得され、人物登録部17aは、これらの顔画像をそれぞれ、モデル学習部16により学習された顔特徴抽出モデル24のEncoder Networkを用いて特徴ベクトルへと変換し、さらに、人物IDごとの重心ベクトルを計算する。
FIG. 13 is a diagram showing a processing example of the
Face images with
その後、ユーザは、識別して欲しいユーザの人数を入力する。この例では、「3人」と入力されたため、人物登録部17aは、人物ID毎の重心ベクトルをk-means法により3つにクラスタリングする。
After that, the user inputs the number of users to be identified. In this example, since "3 people" is input, the
次に、人物登録部17aは、各クラスタに含まれる人物IDの顔画像の中から無作為に抽出した数枚の顔画像をユーザに提示し、その人物の名前をユーザに入力してもらう。この例では、それぞれ「太郎」、「花子」、「次郎」と入力されている。人物登録部17aは、入力されたこれらの名前と共に、各クラスタに含まれる人物IDの重心ベクトルの重心となるベクトルを、顔特徴DB25に登録する。
このように登録された顔特徴DB25を使用することで、人物推定部19は、推定した人物の名前も取得することができる。
Next, the
By using the
本実施形態によれば、人物識別装置3は、識別対象のユーザ数の入力を受け付け、人物ID毎の重心ベクトルを、このユーザ数にクラスタリングしてユーザIDを割り当てる。
したがって、人物識別装置3は、実際のユーザ数に基づいて特徴ベクトル(重心ベクトル)をクラスタリングでき、これにより、適切にユーザを識別できる。
According to the present embodiment, the
Therefore, the
人物識別装置3は、ユーザIDに対応する顔画像を提示し、ユーザ名の入力を受け付けて、重心ベクトルと共に記録する。
したがって、人物識別装置3は、顔画像を識別したうえで、ユーザ名を推定結果として出力できる。
The
Therefore, the
人物識別装置3は、提示した顔画像のうち識別対象外の顔画像を指示されると、この指示された顔画像が含まれる人物IDを除外して、再度クラスタリングを行う。
したがって、人物識別装置3は、識別対象外の顔画像群を除外した特徴ベクトル(重心ベクトル)を記録できるので、人物の識別精度を向上できる。
When the
Therefore, the
以上、本発明の実施形態について説明したが、本発明は前述した実施形態に限るものではない。また、前述の実施形態に記載された効果は、本発明から生じる最も好適な効果を列挙したに過ぎず、本発明による効果は、実施形態に記載されたものに限定されるものではない。 Although the embodiments of the present invention have been described above, the present invention is not limited to the above-described embodiments. Moreover, the effects described in the above-described embodiments are merely a list of the most preferable effects resulting from the present invention, and the effects according to the present invention are not limited to those described in the embodiments.
前述の実施形態では、顔画像DB22及び人物ペアDB23に記録される人物IDには、未使用のIDが割り当てられていくとしたが、人物IDの数には上限が設けられてもよい。この場合、古い人物IDに紐付けられているデータを削除し、このIDが再利用されてもよい。
In the above-described embodiment, unused IDs are assigned to the person IDs recorded in the
顔画像を取得するためのカメラは、移動しないものとして説明したが、例えば、移動可能なロボットなどに設けられる場合、移動に伴って人物方向が変化するため、人物メモリ21の内容はリセットされ、再度処理される。
The camera for acquiring the face image has been described as not moving, but for example, when the camera is provided in a movable robot or the like, the direction of the person changes with the movement, so that the contents of the
本実施形態では、主に人物識別装置(1、2、3)の構成と動作について説明したが、本発明はこれに限られず、各構成要素を備え、人物を識別するための方法、又はプログラムとして構成されてもよい。 In the present embodiment, the configuration and operation of the person identification device (1, 2, 3) have been mainly described, but the present invention is not limited to this, and the present invention includes each component and is a method or program for identifying a person. It may be configured as.
さらに、人物識別装置(1、2、3)の機能を実現するためのプログラムをコンピュータで読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することによって実現してもよい。 Further, a program for realizing the functions of the person identification device (1, 2, 3) is recorded on a computer-readable recording medium, and the program recorded on the recording medium is read and executed by the computer system. It may be realized by.
ここでいう「コンピュータシステム」とは、OSや周辺機器などのハードウェアを含むものとする。また、「コンピュータで読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD-ROMなどの可搬媒体、コンピュータシステムに内蔵されるハードディスクなどの記憶装置のことをいう。 The term "computer system" as used herein includes hardware such as an OS and peripheral devices. Further, the "computer-readable recording medium" refers to a portable medium such as a flexible disk, a magneto-optical disk, a ROM, or a CD-ROM, and a storage device such as a hard disk built in a computer system.
さらに「コンピュータで読み取り可能な記録媒体」とは、インターネットなどのネットワークや電話回線などの通信回線を介してプログラムを送信する場合の通信線のように、短時刻の間、動的にプログラムを保持するもの、その場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリのように、一定時刻プログラムを保持しているものも含んでもよい。また、上記プログラムは、前述した機能の一部を実現するためのものであってもよく、さらに前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるものであってもよい。 Furthermore, a "computer-readable recording medium" is a communication line that dynamically holds a program for a short period of time, such as a communication line when a program is transmitted via a network such as the Internet or a communication line such as a telephone line. It may also include a program that holds a program for a certain period of time, such as a volatile memory inside a computer system that is a server or a client in that case. Further, the above program may be for realizing a part of the above-mentioned functions, and may be further realized for realizing the above-mentioned functions in combination with a program already recorded in the computer system. ..
1、2、3 人物識別装置(学習データ生成装置)
10 制御部
11 顔検出部
12 人物方向推定部
13 対応関係推定部
14 学習データ記録部
15 学習データセット生成部
16 モデル学習部
17 特徴ベクトル生成部(特徴記録部)
17a 人物登録部(特徴記録部)
18 顔特徴抽出部
19 人物推定部
20 記憶部
21 人物メモリ
22 顔画像DB
23 人物ペアDB
24 顔特徴抽出モデル
25 顔特徴DB
1, 2, 3 Person identification device (learning data generation device)
10
17a Person registration department (feature recording department)
18 Face
23 Person pair DB
24 Face
Claims (10)
閾値未満の時間内に撮影された2つの画像から、前記顔画像の座標に基づいて同一人物を判定し、当該同一人物の顔画像に同一の人物IDを割り当て、他の顔画像に別の人物IDを割り当てる対応関係推定部と、
顔画像を前記人物IDと対応付けて記録すると共に、同時刻に撮影された画像群から得られた前記人物IDのペアを記録する学習データ記録部と、
前記人物IDが同一の顔画像が2枚、及び当該人物IDと前記ペアを構成している人物IDの顔画像が1枚からなるTriplet形式の学習データを生成する学習データセット生成部と、を備え、
顔画像を入力とした人物識別のための前記学習データを出力する学習データ生成装置。 A face detector that detects the area of a person's face image from a group of images taken by a camera,
From two images taken within the time less than the threshold, the same person is determined based on the coordinates of the face image, the same person ID is assigned to the face image of the same person, and another person is assigned to another face image. Correspondence estimation unit that assigns ID and
A learning data recording unit that records a face image in association with the person ID and records a pair of the person IDs obtained from a group of images taken at the same time.
A learning data set generation unit that generates triplet-format learning data including two face images having the same person ID and one face image of the person ID and the person ID constituting the pair. Prepare,
A learning data generation device that outputs the learning data for identifying a person by inputting a face image.
前記対応関係推定部は、同時刻に撮影された2つの画像から、差が閾値未満の人物方向が導出された場合、当該人物方向に対応する2つの顔画像に同一の人物IDを割り当てる請求項1に記載の学習データ生成装置。 A person direction estimation unit for deriving a person direction based on the coordinates of the face image is provided.
The claim that the correspondence estimation unit assigns the same person ID to two face images corresponding to the person direction when the person direction whose difference is less than the threshold is derived from the two images taken at the same time. The learning data generation device according to 1.
前記対応関係推定部は、閾値未満の時間内に撮影された2つの画像から、座標間の距離が閾値未満の2つの顔画像が検出された場合に、当該2つの顔画像に同一の人物IDを割り当て、他の顔画像に別の人物IDを割り当てる請求項1に記載の学習データ生成装置。 Multiple cameras are placed in positions where the same person cannot be seen at the same time.
When two face images in which the distance between coordinates is less than the threshold are detected from the two images taken within the time less than the threshold, the correspondence estimation unit has the same person ID in the two face images. The learning data generation device according to claim 1, wherein a person ID is assigned to another face image.
前記特徴抽出モデルにより前記顔画像を特徴ベクトルに変換し、当該特徴ベクトルの間の距離に基づいて前記人物IDを統合したユーザID毎に、特徴ベクトルの重心ベクトルを記録する特徴記録部と、
新たに撮影された画像に含まれる顔画像を、前記特徴抽出モデルにより特徴ベクトルに変換する顔特徴抽出部と、
前記顔特徴抽出部により得られた特徴ベクトルを、前記ユーザID毎の前記重心ベクトルと比較し、閾値未満の距離にあるユーザIDを人物の推定結果として出力する人物推定部と、を備える人物識別装置。 A model learning unit that learns a feature extraction model using the learning data output from the learning data generator according to any one of claims 1 to 4.
A feature recording unit that converts the face image into a feature vector by the feature extraction model and records the center of gravity vector of the feature vector for each user ID that integrates the person ID based on the distance between the feature vectors.
A face feature extraction unit that converts a face image included in a newly captured image into a feature vector by the feature extraction model, and a face feature extraction unit.
A person identification unit including a person estimation unit that compares the feature vector obtained by the face feature extraction unit with the center of gravity vector for each user ID and outputs a user ID at a distance less than the threshold value as a person estimation result. Device.
閾値未満の時間内に撮影された2つの画像から、前記顔画像の座標に基づいて同一人物を判定し、当該同一人物の顔画像に同一の人物IDを割り当て、他の顔画像に別の人物IDを割り当てる対応関係推定ステップと、
顔画像を前記人物IDと対応付けて記録すると共に、同時刻に撮影された画像群から得られた前記人物IDのペアを記録する学習データ記録ステップと、
前記人物IDが同一の顔画像が2枚、及び当該人物IDと前記ペアを構成している人物IDの顔画像が1枚からなるTriplet形式の学習データを生成する学習データセット生成ステップと、をコンピュータが実行し、
顔画像を入力とした人物識別のための前記学習データを出力する学習データ生成方法。 A face detection step that detects the area of a person's face image from a group of images taken by a camera,
From two images taken within the time less than the threshold, the same person is determined based on the coordinates of the face image, the same person ID is assigned to the face image of the same person, and another person is assigned to another face image. Correspondence estimation step to assign ID and
A learning data recording step of recording a face image in association with the person ID and recording a pair of the person IDs obtained from a group of images taken at the same time.
A training data set generation step of generating triplet-format learning data including two face images having the same person ID and one face image of the person ID and the person ID constituting the pair. Computer run,
A learning data generation method for outputting the learning data for identifying a person using a face image as an input.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020200432A JP2022088146A (en) | 2020-12-02 | 2020-12-02 | Learning data generation device, person identifying device, learning data generation method, and learning data generation program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020200432A JP2022088146A (en) | 2020-12-02 | 2020-12-02 | Learning data generation device, person identifying device, learning data generation method, and learning data generation program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2022088146A true JP2022088146A (en) | 2022-06-14 |
Family
ID=81982193
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2020200432A Pending JP2022088146A (en) | 2020-12-02 | 2020-12-02 | Learning data generation device, person identifying device, learning data generation method, and learning data generation program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2022088146A (en) |
-
2020
- 2020-12-02 JP JP2020200432A patent/JP2022088146A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5008269B2 (en) | Information processing apparatus and information processing method | |
Kar et al. | Study of implementing automated attendance system using face recognition technique | |
WO2018228218A1 (en) | Identification method, computing device, and storage medium | |
CN106295313B (en) | Object identity management method and device and electronic equipment | |
Kamgar-Parsi et al. | Toward development of a face recognition system for watchlist surveillance | |
JP4650669B2 (en) | Motion recognition device | |
JP5567853B2 (en) | Image recognition apparatus and method | |
WO2011102416A1 (en) | Moving object tracking system and moving object tracking method | |
Chen et al. | A fall detection system based on infrared array sensors with tracking capability for the elderly at home | |
KR20180042802A (en) | Method and system for tracking an object in a defined area | |
US20160292536A1 (en) | Individual identification device, and identification threshold setting method | |
JP2020533701A (en) | Camera and image calibration to identify the subject | |
McKenna et al. | Face Recognition in Dynamic Scenes. | |
JP2014182480A (en) | Person recognition device and method | |
JP6618395B2 (en) | Apparatus, program, and method for predicting position of survey object by action value | |
US20070025593A1 (en) | Automated searching for probable matches in a video surveillance system | |
JP2021086322A (en) | Image processing device, image processing method, and program | |
Bhargavas et al. | Human identification using gait recognition | |
JP6377566B2 (en) | Line-of-sight measurement device, line-of-sight measurement method, and program | |
JP2022088146A (en) | Learning data generation device, person identifying device, learning data generation method, and learning data generation program | |
Hewitt et al. | Active learning in face recognition: Using tracking to build a face model | |
WO2019150954A1 (en) | Information processing device | |
JP2021033359A (en) | Emotion estimation device, emotion estimation method, program, information presentation device, information presentation method and emotion estimation system | |
JP5873959B2 (en) | Whitelist inside / outside determination apparatus and method | |
Menon et al. | Biometrics driven smart environments: Abstract framework and evaluation |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20231102 |