JP2021070122A - Learning data generation method - Google Patents

Learning data generation method Download PDF

Info

Publication number
JP2021070122A
JP2021070122A JP2019199418A JP2019199418A JP2021070122A JP 2021070122 A JP2021070122 A JP 2021070122A JP 2019199418 A JP2019199418 A JP 2019199418A JP 2019199418 A JP2019199418 A JP 2019199418A JP 2021070122 A JP2021070122 A JP 2021070122A
Authority
JP
Japan
Prior art keywords
image
grid
learning
feature amount
estimation
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
JP2019199418A
Other languages
Japanese (ja)
Inventor
芳宏 中野
Yoshihiro Nakano
芳宏 中野
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.)
MinebeaMitsumi Inc
Original Assignee
MinebeaMitsumi Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by MinebeaMitsumi Inc filed Critical MinebeaMitsumi Inc
Priority to JP2019199418A priority Critical patent/JP2021070122A/en
Priority to PCT/JP2020/040702 priority patent/WO2021085561A1/en
Publication of JP2021070122A publication Critical patent/JP2021070122A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)
  • Manipulator (AREA)

Abstract

To readily generate learning data that is used when a machine learns a gripping operation.SOLUTION: A learning data generation method includes a step of generating an image of works loaded in bulk with an image generation software to use the image as learning data for machine learning.SELECTED DRAWING: Figure 1

Description

本発明は、学習データ生成方法に関する。 The present invention relates to a learning data generation method.

バラ積みされた複数の対象物(ワーク)をロボットアーム等により把持するために、ワークの三次元形状をモデル化した仮想的な作業空間である仮想作業空間内に複数のワークモデルを積み上げ、バラ積みピッキング動作を検証するシミュレーションを行う技術が知られている。 In order to grip a plurality of objects (workpieces) stacked separately by a robot arm or the like, a plurality of work models are stacked in a virtual work space that is a virtual work space that models the three-dimensional shape of the work, and the pieces are separated. A technique for performing a simulation for verifying a stacking picking operation is known.

特開2018−144152号公報JP-A-2018-144152

しかし、バラ積みされた実在のワークを多数3次元モデル化し、さらに、ピッキング動作のシミュレーションを行うには長い時間を要する。 However, it takes a long time to model a large number of real works stacked separately in three dimensions and to simulate the picking operation.

本発明は、上記課題を一例とするものであり、ロボットアーム等による把持動作を機械学習するための学習データを、画像生成ソフトウェアを利用して作成する学習データ生成方法、この学習データを利用した機械学習方法及びこの機械学習方法を利用した把持装置を提供することを目的とする。 The present invention is an example of the above problem, and is a learning data generation method for creating learning data for machine learning a gripping motion by a robot arm or the like by using image generation software, and using this learning data. It is an object of the present invention to provide a machine learning method and a gripping device using this machine learning method.

本発明の一態様に係る学習データ生成方法は、画像生成ソフトウェアによりバラ積みされたワークの画像を生成し、機械学習の学習データとする。 In the learning data generation method according to one aspect of the present invention, images of works stacked separately by image generation software are generated and used as learning data for machine learning.

本発明の一態様によれば、把持動作の機械学習に用いる学習データを容易に生成することができる。 According to one aspect of the present invention, learning data used for machine learning of gripping motion can be easily generated.

図1は、第1の実施形態に係る画像処理装置を実装した物体把持システムの一例を示す図である。FIG. 1 is a diagram showing an example of an object grasping system equipped with the image processing device according to the first embodiment. 図2は、第1の実施形態に係る物体把持システムの構成の一例を示すブロック図である。FIG. 2 is a block diagram showing an example of the configuration of the object gripping system according to the first embodiment. 図3は、学習処理の一例を示すフローチャートである。FIG. 3 is a flowchart showing an example of the learning process. 図4は、対象物の三次元データの一例を示す図である。FIG. 4 is a diagram showing an example of three-dimensional data of an object. 図5は、複数の対象物が配置された仮想空間のキャプチャ画像の一例を示す図である。FIG. 5 is a diagram showing an example of a captured image of a virtual space in which a plurality of objects are arranged. 図6は、ロボットアームの制御に関する処理の一例を示す図である。FIG. 6 is a diagram showing an example of processing related to control of the robot arm. 図7は、ロボットアームの制御に関する処理の別の一例を示す図である。FIG. 7 is a diagram showing another example of processing related to control of the robot arm. 図8は、第1の実施形態に係る検出モデルの一例を示す図である。FIG. 8 is a diagram showing an example of a detection model according to the first embodiment. 図9は、第1の実施形態に係る特徴検出層(u1)が出力する特徴マップの一例を示す図である。FIG. 9 is a diagram showing an example of a feature map output by the feature detection layer (u1) according to the first embodiment. 図10は、第1の実施形態に係る対象物の位置及び姿勢の推定結果の一例を示す図である。FIG. 10 is a diagram showing an example of an estimation result of the position and posture of the object according to the first embodiment. 図11は、第1の実施形態に係る対象物の把持位置の推定結果の別の一例を示す図である。FIG. 11 is a diagram showing another example of the estimation result of the gripping position of the object according to the first embodiment. 図12は、第1の実施形態に係るステレオカメラにより撮影されたバラ積み画像の一例を示す図である。FIG. 12 is a diagram showing an example of loosely stacked images taken by the stereo camera according to the first embodiment. 図13は、第1の実施形態に係るバラ積み画像とマッチングマップとの関係の一例を示す図である。FIG. 13 is a diagram showing an example of the relationship between the loosely stacked images and the matching map according to the first embodiment. 図14は、第1の実施形態に係る推定処理の一例を示すフローチャートである。FIG. 14 is a flowchart showing an example of the estimation process according to the first embodiment. 図15は、第1の実施形態に係る推定処理の一例を示す図である。FIG. 15 is a diagram showing an example of the estimation process according to the first embodiment. 図16は、変形例に係るトレイを含むバラ積み画像の一例を示す図である。FIG. 16 is a diagram showing an example of a loosely stacked image including a tray according to a modified example. 図17は、変形例に係る位置ずれ推定モデルの一例を示す図である。FIG. 17 is a diagram showing an example of a position deviation estimation model according to a modified example. 図18は、変形例に係る位置ずれ推定モデルの別の一例を示す図である。FIG. 18 is a diagram showing another example of the position deviation estimation model according to the modified example.

以下、実施形態に係る画像処理装置及び画像処理方法について図面を参照して説明する。なお、この実施形態によりこの発明が限定されるものではない。また、図面における各要素の寸法の関係、各要素の比率などは、現実と異なる場合がある。図面の相互間においても、互いの寸法の関係や比率が異なる部分が含まれている場合がある。また、1つの実施形態や変形例に記載された内容は、原則として他の実施形態や変形例にも同様に適用される。 Hereinafter, the image processing apparatus and the image processing method according to the embodiment will be described with reference to the drawings. The present invention is not limited to this embodiment. In addition, the relationship between the dimensions of each element in the drawing, the ratio of each element, and the like may differ from reality. Even between drawings, there may be parts where the relationship and ratio of dimensions are different from each other. Further, in principle, the contents described in one embodiment or modification are similarly applied to other embodiments or modifications.

(第1の実施形態)
第1の実施形態における画像処理装置は、例えば物体把持システム1において用いられる。図1は、第1の実施形態に係る画像処理装置を実装した物体把持システムの一例を示す図である。図1に示す物体把持システム1は、図示しない画像処理装置10と、カメラ20と、ロボットアーム30とを備える。カメラ20は、例えば、ロボットアーム30と、ロボットアーム30が把持する対象物となる、バラ積みされたワーク41、42等との両方を撮影可能な位置に設けられる。カメラ20は、例えば、ロボットアーム30と、ワーク41、42の画像とを撮影し、画像処理装置10に出力する。なお、ロボットアーム30とバラ積みされたワーク41,42等とは別々のカメラで撮影してもよい。第1の実施形態におけるカメラ20には、図1に示されるように、例えば公知のステレオカメラ等、複数の画像を撮影できるカメラが用いられる。画像処理装置10は、カメラ20から出力された画像を用いて、ワーク41、42等の位置及び姿勢を推定する。画像処理装置10は、推定されたワーク41、42等の位置及び姿勢に基づいて、ロボットアーム30の動作を制御する信号を出力する。ロボットアーム30は、画像処理装置10から出力された信号に基づいて、ワーク41、42等を把持する動作を行う。なお、図1においては、複数の異なる種類のワーク41、42等が開示されているが、ワークの種類は1種類であってもよい。第1の実施形態においては、ワークが1種類である場合について説明する。また、ワーク41、42等は、位置及び姿勢が不規則であるように配置されている。図1に示すように、例えば、複数のワークが上面視において重なるように配置されていてもよい。また、ワーク41、42は、対象物の一例である。
(First Embodiment)
The image processing apparatus in the first embodiment is used, for example, in the object grasping system 1. FIG. 1 is a diagram showing an example of an object grasping system equipped with the image processing device according to the first embodiment. The object grasping system 1 shown in FIG. 1 includes an image processing device 10 (not shown), a camera 20, and a robot arm 30. The camera 20 is provided at a position where, for example, both the robot arm 30 and the loosely stacked workpieces 41, 42, etc., which are objects to be gripped by the robot arm 30, can be photographed. The camera 20 captures, for example, images of the robot arm 30 and the works 41 and 42 and outputs them to the image processing device 10. The robot arm 30 and the workpieces 41, 42 and the like stacked separately may be photographed by different cameras. As the camera 20 in the first embodiment, as shown in FIG. 1, a camera capable of capturing a plurality of images, such as a known stereo camera, is used. The image processing device 10 estimates the positions and orientations of the works 41, 42, etc. using the image output from the camera 20. The image processing device 10 outputs a signal for controlling the operation of the robot arm 30 based on the estimated positions and postures of the works 41, 42, and the like. The robot arm 30 performs an operation of gripping the works 41, 42, and the like based on the signal output from the image processing device 10. Although a plurality of different types of works 41, 42 and the like are disclosed in FIG. 1, the type of work may be one type. In the first embodiment, a case where there is only one type of work will be described. Further, the works 41, 42 and the like are arranged so that their positions and postures are irregular. As shown in FIG. 1, for example, a plurality of workpieces may be arranged so as to overlap each other in a top view. The works 41 and 42 are examples of objects.

図2は、第1の実施形態に係る物体把持システムの構成の一例を示すブロック図である。図2に示すように、画像処理装置10は、カメラ20及びロボットアーム30と、ネットワークNWを通じて通信可能に接続されている。また、図2に示すように、画像処理装置10は、通信I/F(インターフェース)11と、入力I/F12と、ディスプレイ13と、記憶回路14と、処理回路15とを備える。 FIG. 2 is a block diagram showing an example of the configuration of the object gripping system according to the first embodiment. As shown in FIG. 2, the image processing device 10 is communicably connected to the camera 20 and the robot arm 30 through the network NW. Further, as shown in FIG. 2, the image processing device 10 includes a communication I / F (interface) 11, an input I / F 12, a display 13, a storage circuit 14, and a processing circuit 15.

通信I/F11は、ネットワークNWを通じた外部装置とのデータ入出力の通信を制御する。例えば、通信I/F11は、ネットワークカードやネットワークアダプタ、NIC(Network Interface Controller)等によって実現され、カメラ20から出力される画像のデータを受信するとともに、ロボットアーム30に出力する信号を送信する。 The communication I / F 11 controls data input / output communication with an external device through the network NW. For example, the communication I / F 11 is realized by a network card, a network adapter, a NIC (Network Interface Controller), etc., receives image data output from the camera 20, and transmits a signal to be output to the robot arm 30.

入力I/F12は、処理回路15に接続され、画像処理装置10の管理者(不図示)から受け付けた入力操作を電気信号に変換して処理回路15に出力する。例えば、入力I/F12は、スイッチボタン、マウス、キーボード、タッチパネル等である。 The input I / F 12 is connected to the processing circuit 15, converts the input operation received from the administrator (not shown) of the image processing device 10 into an electric signal, and outputs the input operation to the processing circuit 15. For example, the input I / F12 is a switch button, a mouse, a keyboard, a touch panel, or the like.

ディスプレイ13は、処理回路15に接続され、処理回路15から出力される各種情報及び各種画像データを表示する。例えば、ディスプレイ13は、液晶モニタやCRT(Cathode Ray Tube)モニタ、タッチパネル等によって実現される。 The display 13 is connected to the processing circuit 15 and displays various information and various image data output from the processing circuit 15. For example, the display 13 is realized by a liquid crystal monitor, a CRT (Cathode Ray Tube) monitor, a touch panel, or the like.

記憶回路14は、例えば、メモリ等の記憶装置により実現される。記憶回路14には、処理回路15により実行される各種のプログラムが記憶されている。また、記憶回路14には、処理回路15により各種のプログラムが実行される際に用いられる各種のデータが一時的に記憶される。記憶回路14は、機械(深層)学習モデル141を有する。さらに、機械(深層)学習モデル141はニューラルネットワーク構造141aと学習パラメータ141bを備えている。ニューラルネットワーク構造141aは、例えば、図8の畳み込みニューラルネットワークb1のような公知のネットワークを応用したもので、後述する図15に示されるネットワーク構造である。学習パラメータ141bは、例えば、畳み込みニューラルネットワークの畳み込みフィルタの重みであり、対象物の位置及び姿勢を推定するために学習され、最適化されるパラメータである。ニューラルネットワーク構造141aは、推定部152に備えられていても構わない。なお、本発明における機械(深層)学習モデル141は学習済みモデルを例として説明するが、これに限定されない。なお、以下において、機械(深層)学習モデル141を、単に「学習モデル141」と表記する場合がある。 The storage circuit 14 is realized by, for example, a storage device such as a memory. The storage circuit 14 stores various programs executed by the processing circuit 15. Further, the storage circuit 14 temporarily stores various data used when various programs are executed by the processing circuit 15. The storage circuit 14 has a machine (deep) learning model 141. Further, the machine (deep) learning model 141 includes a neural network structure 141a and learning parameters 141b. The neural network structure 141a is an application of a known network such as the convolutional neural network b1 of FIG. 8, and is a network structure shown in FIG. 15 described later. The learning parameter 141b is, for example, the weight of the convolutional filter of the convolutional neural network, and is a parameter that is learned and optimized for estimating the position and orientation of the object. The neural network structure 141a may be provided in the estimation unit 152. The machine (deep) learning model 141 in the present invention will be described by taking a trained model as an example, but the present invention is not limited to this. In the following, the machine (deep) learning model 141 may be simply referred to as a “learning model 141”.

学習モデル141は、カメラ20から出力された画像から、ワークの位置及び姿勢を推定する処理に用いられる。学習モデル141は、例えば、複数のワークの位置及び姿勢と、当該複数のワークを撮影した画像とを教師データして学習することにより生成される。なお、第1の実施形態においては、学習モデル141が、例えば、処理回路15により生成されるが、これに限られず、外部のコンピュータにより生成されてもよい。以下においては、図示しない学習装置により、学習モデル141が生成及び更新される実施形態について説明する。 The learning model 141 is used in a process of estimating the position and orientation of the work from the image output from the camera 20. The learning model 141 is generated, for example, by learning the positions and postures of a plurality of works and images of the plurality of works as teacher data. In the first embodiment, the learning model 141 is generated by, for example, the processing circuit 15, but the learning model 141 is not limited to this, and may be generated by an external computer. In the following, an embodiment in which the learning model 141 is generated and updated by a learning device (not shown) will be described.

第1の実施形態において、学習モデル141の生成に用いられる大量の画像は、例えば、仮想空間上に複数のワークを配置し、当該仮想空間の画像をキャプチャすることにより生成されてもよい。図3は、学習処理の一例を示すフローチャートである。図3に示すように、学習装置は、対象物の三次元データを取得する(ステップS101)。三次元データは、例えば公知の3Dスキャン等の手法により取得することができる。図4は、対象物の三次元データの一例を示す図である。三次元データを取得することにより、仮想空間上において、ワークの姿勢を任意に変更して配置させることができる。 In the first embodiment, the large number of images used to generate the learning model 141 may be generated by, for example, arranging a plurality of works in the virtual space and capturing the images in the virtual space. FIG. 3 is a flowchart showing an example of the learning process. As shown in FIG. 3, the learning device acquires three-dimensional data of the object (step S101). The three-dimensional data can be acquired by a method such as a known 3D scan. FIG. 4 is a diagram showing an example of three-dimensional data of an object. By acquiring the three-dimensional data, the posture of the work can be arbitrarily changed and arranged in the virtual space.

次に、学習装置は、仮想空間上に、対象物を配置する際の各種条件を設定する(ステップS102)。仮想空間への対象物の配置は、例えば公知の画像生成ソフトウェア等を用いて行うことができる。配置する対象物の数や位置、姿勢などの条件は、画像生成ソフトウェアがランダムに対象物を生成するように設定することも可能だが、これに限らず、画像処理装置10の管理者が任意に設定してもよい。次に、学習装置は、設定された条件に従い、仮想空間上に対象物を配置する(ステップS103)。次に、学習装置は、例えば、複数の対象物が配置された仮想空間をキャプチャすることにより、配置された対象物の画像、位置及び姿勢を取得する(ステップS104)。第1の実施形態において、対象物の位置及び姿勢は、例えば三次元座標(x,y,z)により示され、対象物の姿勢は、物体の姿勢又は回転状態を表す四元数であるクオタニオン(qx,qy,qz,qw)により示される。図5は、複数の対象物が配置された仮想空間のキャプチャ画像の一例を示す図である。図5に示すように、仮想空間上には、複数の対象物W1a及びW1bが、それぞれランダムな位置及び姿勢にて配置される。また、以下において、ランダムに配置された対象物の画像を、「バラ積み画像」と表記する場合がある。次に、学習装置は、取得された画像と、配置された対象物の位置及び姿勢を記憶回路14に保存する(ステップS105)。さらに、学習装置は、ステップS102からステップS105をあらかじめ定められた回数繰り返す(ステップS106)。なお、ここで記憶回路14に保存される、上記ステップによって取得された画像と対象物が配置された位置及び姿勢との組み合わせを「教師データ」と表記する場合がある。ステップS102からステップS105までの処理を所定の回数繰り返すことにより、学習処理を繰り返し行うために十分な数の教師データが生成される。 Next, the learning device sets various conditions for arranging the object in the virtual space (step S102). The object can be placed in the virtual space by using, for example, known image generation software or the like. Conditions such as the number, position, and posture of the objects to be arranged can be set so that the image generation software randomly generates the objects, but the present invention is not limited to this, and the administrator of the image processing device 10 arbitrarily sets the conditions. You may. Next, the learning device arranges the object in the virtual space according to the set conditions (step S103). Next, the learning device acquires an image, a position, and a posture of the arranged objects by capturing, for example, a virtual space in which a plurality of objects are arranged (step S104). In the first embodiment, the position and orientation of the object are indicated by, for example, three-dimensional coordinates (x, y, z), and the attitude of the object is a quaternion which is a quaternion representing the attitude or rotational state of the object. It is indicated by (qx, qy, qz, qw). FIG. 5 is a diagram showing an example of a captured image of a virtual space in which a plurality of objects are arranged. As shown in FIG. 5, a plurality of objects W1a and W1b are arranged at random positions and postures in the virtual space, respectively. Further, in the following, an image of randomly arranged objects may be referred to as a “separately stacked image”. Next, the learning device stores the acquired image and the position and orientation of the arranged object in the storage circuit 14 (step S105). Further, the learning device repeats steps S102 to S105 a predetermined number of times (step S106). Here, the combination of the image acquired in the above step and the position and posture in which the object is arranged, which is stored in the storage circuit 14, may be referred to as “teacher data”. By repeating the processes from step S102 to step S105 a predetermined number of times, a sufficient number of teacher data is generated to repeat the learning process.

そして、学習装置は、生成された教師データを用いて所定の回数学習処理を行うことにより、ニューラルネットワーク構造141aにおいて重み付けとして用いられる学習パラメータ141bを生成し、又は更新する(ステップS107)。このように、三次元データが取得された対象物を仮想空間上に配置することにより、学習処理に用いられる、対象物の画像と、位置及び姿勢の組み合わせとを含む教師データを、容易に生成することができる。 Then, the learning device generates or updates the learning parameter 141b used as weighting in the neural network structure 141a by performing the learning process a predetermined number of times using the generated teacher data (step S107). By arranging the object from which the three-dimensional data has been acquired in this way on the virtual space, it is easy to generate teacher data including the image of the object and the combination of the position and the posture used in the learning process. can do.

図2に戻って、処理回路15は、CPU(Central Processing Unit)等のプロセッサにより実現される。処理回路15は、画像処理装置10全体を制御する。処理回路15は、記憶回路14に記憶された各種のプログラムを読み取り、読み取ったプログラムを実行することで、各種の処理を実行する。例えば、処理回路15は、画像取得部151と、推定部152と、ロボット制御部153とを有することとなる。 Returning to FIG. 2, the processing circuit 15 is realized by a processor such as a CPU (Central Processing Unit). The processing circuit 15 controls the entire image processing device 10. The processing circuit 15 reads various programs stored in the storage circuit 14 and executes the read programs to execute various processes. For example, the processing circuit 15 includes an image acquisition unit 151, an estimation unit 152, and a robot control unit 153.

画像取得部151は、例えば、通信I/F11を通じて、バラ積み画像を取得し、推定部152に出力する。画像取得部151は、取得部の一例である。 The image acquisition unit 151 acquires the separately stacked images through the communication I / F11, for example, and outputs the images to the estimation unit 152. The image acquisition unit 151 is an example of an acquisition unit.

推定部152は、出力されたバラ積み画像を用いて、対象物の位置及び姿勢を推定する。推定部152は、例えば、学習モデル141を用いて、対象物の画像に対する推定処理を行い、推定結果をロボット制御部153に出力する。なお、推定部152は、例えば、対象物が配置されるトレイ等の位置及び姿勢をさらに推定してもよい。トレイの位置及び姿勢を推定する構成については、後に説明する。 The estimation unit 152 estimates the position and orientation of the object using the output loose-stacked image. The estimation unit 152 performs estimation processing on an image of an object using, for example, the learning model 141, and outputs the estimation result to the robot control unit 153. The estimation unit 152 may further estimate the position and orientation of the tray or the like on which the object is placed, for example. The configuration for estimating the position and orientation of the tray will be described later.

ロボット制御部153は、推定された対象物の位置及び姿勢に基づいて、ロボットアーム30を制御する信号を生成し、通信I/F11を通じてロボットアーム30に出力する。ロボット制御部153は、例えば、現在のロボットアーム30の位置及び姿勢に関する情報を取得する。そして、ロボット制御部153は、現在のロボットアーム30の位置及び姿勢と、推定された対象物の位置及び姿勢に応じて、ロボットアーム30が対象物を把持する際に移動する軌道を生成する。なお、ロボット制御部153は、トレイ等の位置及び姿勢に基づいて、ロボットアーム30が移動する軌道を修正してもよい。 The robot control unit 153 generates a signal for controlling the robot arm 30 based on the estimated position and orientation of the object, and outputs the signal to the robot arm 30 through the communication I / F 11. The robot control unit 153 acquires, for example, information regarding the current position and posture of the robot arm 30. Then, the robot control unit 153 generates a trajectory that the robot arm 30 moves when gripping the object according to the current position and posture of the robot arm 30 and the estimated position and posture of the object. The robot control unit 153 may correct the trajectory in which the robot arm 30 moves based on the position and posture of the tray or the like.

図6は、ロボットアームの制御に関する処理の一例を示す図である。図6に示すように、推定部152は、バラ積み画像から、ターゲットとなる対象物の位置及び姿勢を推定する。同様に、推定部152は、バラ積み画像から、対象物が配置されたトレイ等の位置及び姿勢を推定してもよい。ロボット制御部153は、推定された対象物及びトレイ等のモデルに基づいて、ロボットアーム30の手先の位置の座標及び姿勢を算出し、ロボットアーム30の軌道を生成する。 FIG. 6 is a diagram showing an example of processing related to control of the robot arm. As shown in FIG. 6, the estimation unit 152 estimates the position and orientation of the target object from the images stacked separately. Similarly, the estimation unit 152 may estimate the position and orientation of the tray or the like on which the object is placed from the images stacked separately. The robot control unit 153 calculates the coordinates and posture of the hand position of the robot arm 30 based on the estimated model of the object and the tray, and generates the trajectory of the robot arm 30.

なお、ロボット制御部153は、ロボットアーム30が対象物を把持した後に、把持した対象物を整列させるためのロボットアーム30の動作を制御する信号を、さらに出力してもよい。図7は、ロボットアームの制御に関する処理の別の一例を示す図である。図7に示すように、画像取得部151は、カメラ20により撮影された、ロボットアーム30により把持された対象物を撮影した画像を取得する。推定部152は、ターゲットとなる、ロボットアーム30に把持された対象物の位置及び姿勢を推定し、ロボット制御部153に出力する。また、画像取得部151は、カメラ20により撮影された、把持された対象物の移動先となる、整列先のトレイ等の画像をさらに取得してもよい。その際、画像取得部151は、整列先のトレイ等に既に整列された対象物の画像(整列済み画像)をさらに取得する。推定部152は、整列先の画像、又は整列済み画像から、整列先となるトレイ等の位置及び姿勢、並びに既に整列済みである対象物の位置及び姿勢を推定する。そして、ロボット制御部153は、推定された、ロボットアーム30に把持された対象物の位置及び姿勢、整列先となるトレイ等の位置及び姿勢、並びに既に整列済みである対象物の位置及び姿勢に基づいて、ロボットアーム30の手先の位置の座標及び姿勢を算出し、対象物を整列させる際のロボットアーム30の軌道を生成する。 After the robot arm 30 grips the object, the robot control unit 153 may further output a signal for controlling the operation of the robot arm 30 for aligning the gripped object. FIG. 7 is a diagram showing another example of processing related to control of the robot arm. As shown in FIG. 7, the image acquisition unit 151 acquires an image of an object gripped by the robot arm 30 taken by the camera 20. The estimation unit 152 estimates the position and posture of the target object gripped by the robot arm 30, and outputs the position and orientation to the robot control unit 153. Further, the image acquisition unit 151 may further acquire an image of a tray or the like of the alignment destination, which is a movement destination of the grasped object, taken by the camera 20. At that time, the image acquisition unit 151 further acquires an image (arranged image) of the object already aligned on the tray or the like of the alignment destination. The estimation unit 152 estimates the position and orientation of the tray and the like to be aligned, and the position and orientation of the already aligned objects from the aligned image or the aligned image. Then, the robot control unit 153 determines the estimated position and orientation of the object held by the robot arm 30, the position and orientation of the tray or the like to be aligned, and the position and orientation of the already aligned object. Based on this, the coordinates and posture of the hand position of the robot arm 30 are calculated, and the trajectory of the robot arm 30 when aligning the objects is generated.

次に、推定部152における推定処理について説明する。推定部152は、例えば公知のダウンサンプリング、アップサンプリング、スキップコネクションを持つ物体検出モデルを応用したモデルを用いて、対象物の特徴量を抽出する。図8は、第1の実施形態に係る検出モデルの一例を示す図である。図8に示す物体検出モデルにおいて、d1層は、例えばバラ積み画像P1(320×320ピクセル)を畳み込みニューラルネットワークb1を介してダウンサンプリングによって縦横40×40グリッドに区分し、各グリッドについて複数の特徴量(例えば256種類)を算出する。また、d1層より下位の層にあたるd2層は、d1層で区分されたグリッドを、d1層よりも粗く(例えば20×20グリッドに)区分して、各グリッドの特徴量を算出する。同様に、d1層及びd2層よりも下位の層にあたるd3層及びd4層は、d2層で区分されたグリッドを、それぞれより粗く区分する。d4層はアップサンプリングによって、より精細な区分で特徴量を算出し、同時にスキップコネクションs3によりd3層の特徴量と統合してu3層を生成する。スキップコネクションは、単純な加算、特徴量の連結でも良く、d3層の特徴量に対して畳み込みニューラルネットワークのような変換が加えられていても良い。同様にu3層をアップサンプリングして算出した特徴量とd2層の特徴量をスキップコネクションs2により統合してu2層を生成する。さらに同様にu1層を生成する。この結果、u1層においては、d1層と同様に、40×40グリッドに区分された各グリッドの特徴量が算出される。 Next, the estimation process in the estimation unit 152 will be described. The estimation unit 152 extracts the feature amount of the object by using, for example, a model to which an object detection model having known downsampling, upsampling, and skip connection is applied. FIG. 8 is a diagram showing an example of a detection model according to the first embodiment. In the object detection model shown in FIG. 8, for example, the d1 layer divides the loosely stacked image P1 (320 × 320 pixels) into 40 × 40 grids in length and width by downsampling via a convolutional neural network b1, and has a plurality of features for each grid. Calculate the amount (for example, 256 types). Further, in the d2 layer, which is a layer lower than the d1 layer, the grid divided by the d1 layer is divided coarser than the d1 layer (for example, 20 × 20 grids), and the feature amount of each grid is calculated. Similarly, the d3 layer and the d4 layer, which are lower layers than the d1 layer and the d2 layer, divide the grid divided by the d2 layer more coarsely, respectively. The d4 layer calculates the feature amount in a finer division by upsampling, and at the same time, integrates with the feature amount of the d3 layer by the skip connection s3 to generate the u3 layer. The skip connection may be a simple addition or a connection of features, or a transformation such as a convolutional neural network may be added to the features of the d3 layer. Similarly, the feature amount calculated by upsampling the u3 layer and the feature amount of the d2 layer are integrated by the skip connection s2 to generate the u2 layer. Further, the u1 layer is generated in the same manner. As a result, in the u1 layer, the feature amount of each grid divided into 40 × 40 grids is calculated as in the d1 layer.

図9は、第1の実施形態に係る特徴抽出層(u1)が出力する特徴マップの一例を示す図である。図9に示す特徴マップの水平方向は、40×40のグリッドに区分されたバラ積み画像P1の水平方向の各グリッドを示し、垂直方向は、垂直方向の各グリッドを示す。また、図9に示す特徴マップの奥行方向は、各グリッドにおける特徴量の要素を示す。 FIG. 9 is a diagram showing an example of a feature map output by the feature extraction layer (u1) according to the first embodiment. The horizontal direction of the feature map shown in FIG. 9 indicates each grid in the horizontal direction of the loosely stacked image P1 divided into 40 × 40 grids, and the vertical direction indicates each grid in the vertical direction. Further, the depth direction of the feature map shown in FIG. 9 indicates an element of the feature amount in each grid.

図10は、第1の実施形態に係る対象物の位置及び姿勢の推定結果の一例を示す図である。図10に示すように、推定部は、対象物の位置を示す2次元座標(Δx,Δy)、対象物の姿勢を示すクオタニオン(qx,qy,qz,qw)、及びクラス分類のスコア(C0,C1,…,Cn)を出力する。なお、第1の実施形態においては、推定結果として、対象物の位置を示す座標のうち、カメラ20から対象物までの距離を示す深度の値は算出されない。深度の値を算出する構成については、後に説明する。なお、ここで言う深度とは、カメラの光軸に平行なz軸方向における、カメラのz座標から対象物のz座標までの距離をいう。なお、クラス分類のスコアはグリッドごとに出力される値であって、そのグリッドに対象物の中心点が含まれている確率である。例えば、対象物の種類がn種類だった場合に、これに“対象物の中心点が含まれていない確率”を加えてn+1個のクラス分類のスコアが出力される。例えば、対象物となるワークが1種類のみの場合は、2個のクラス分類のスコアが出力される。また、同一グリッド内に複数の対象物が存在する場合、より上に積まれている物体の確率を出力する。 FIG. 10 is a diagram showing an example of an estimation result of the position and posture of the object according to the first embodiment. As shown in FIG. 10, the estimation unit includes two-dimensional coordinates (Δx, Δy) indicating the position of the object, quaternions (qx, qy, qz, qw) indicating the posture of the object, and a classification score (C0). , C1, ..., Cn) is output. In the first embodiment, as an estimation result, among the coordinates indicating the position of the object, the value of the depth indicating the distance from the camera 20 to the object is not calculated. The configuration for calculating the depth value will be described later. The depth referred to here means the distance from the z-coordinate of the camera to the z-coordinate of the object in the z-axis direction parallel to the optical axis of the camera. The classification score is a value output for each grid, and is the probability that the center point of the object is included in the grid. For example, when there are n types of objects, the score of n + 1 class classifications is output by adding the "probability that the center point of the object is not included". For example, when there is only one type of target work, the scores of two classifications are output. Also, when there are a plurality of objects in the same grid, the probability of the objects stacked on top is output.

図10において、点CはグリッドGxの中心を示し、座標(Δx,Δy)である点ΔCは、例えば、検出された対象物の中心点を示す。すなわち、図10に示す例において、対象物の中心は、グリッドGxの中心点Cから、x軸方向にΔx、y軸方向にΔyだけオフセットしている。 In FIG. 10, the point C indicates the center of the grid Gx, and the point ΔC which is the coordinates (Δx, Δy) indicates, for example, the center point of the detected object. That is, in the example shown in FIG. 10, the center of the object is offset from the center point C of the grid Gx by Δx in the x-axis direction and Δy in the y-axis direction.

なお、図10に代えて、図11に示すように対象物の中心以外の任意の点a、b、cを設定し、グリッドGxの中心の点Cからの任意の点a、b、cの座標(Δx1,Δy1、Δz1、Δx2,Δy2、Δz2、x3,Δy3、Δz3)を出力してもよい。なお、任意の点は対象物のどの位置に設定してもよく、1点でも複数の点でも構わない。 Instead of FIG. 10, arbitrary points a, b, and c other than the center of the object are set as shown in FIG. 11, and arbitrary points a, b, and c from the center point C of the grid Gx are set. The coordinates (Δx1, Δy1, Δz1, Δx2, Δy2, Δz2, x3, Δy3, Δz3) may be output. Any point may be set at any position of the object, and may be one point or a plurality of points.

なお、対象物の大きさに比してグリッドの区分が粗いと、複数の対象物が一つのグリッドに入ってしまい、各対象物の特徴が交じり合って誤検出するおそれがあるため、第1の実施形態においては、最終的に生成された精細な(40×40グリッドの)特徴量が算出される特徴抽出層(u1)の出力である特徴マップのみ利用する。 If the grid division is coarser than the size of the object, a plurality of objects may be included in one grid, and the features of the objects may be mixed and erroneously detected. In the embodiment of the above, only the feature map which is the output of the feature extraction layer (u1) in which the finally generated fine (40 × 40 grid) feature amount is calculated is used.

また、第1の実施形態においては、例えばステレオカメラを用いて、左右2種類の画像を撮影することにより、カメラ20から対象物までの距離を特定する。図12は、第1の実施形態に係るステレオカメラにより撮影されたバラ積み画像の一例を示す図である。図12に示すように、画像取得部151は、左画像P1L及び右画像P1Rの2種類のバラ積み画像を取得する。また、推定部152は、左画像P1L及び右画像P1Rの両方に対して、学習モデル141を用いた推定処理を行う。なお、推定処理を行う際に、左画像P1Lに対して用いられる学習パラメータ141bの一部、またはすべてを、右画像P1Rに対する重み付けとして共有してもよい。なお、ステレオカメラではなく、1台のカメラを用い、カメラの位置をずらして、2か所で左右2種の画像に相当する画像を撮影してもよい。 Further, in the first embodiment, the distance from the camera 20 to the object is specified by taking two types of images on the left and right, for example, using a stereo camera. FIG. 12 is a diagram showing an example of loosely stacked images taken by the stereo camera according to the first embodiment. As shown in FIG. 12, the image acquisition unit 151 acquires two types of loosely stacked images, the left image P1L and the right image P1R. Further, the estimation unit 152 performs estimation processing using the learning model 141 on both the left image P1L and the right image P1R. When performing the estimation process, a part or all of the learning parameters 141b used for the left image P1L may be shared as weighting for the right image P1R. It should be noted that, instead of using a stereo camera, one camera may be used, and the positions of the cameras may be shifted to capture images corresponding to two types of left and right images at two locations.

そこで、第1の実施形態における推定部152は、左画像P1Lの特徴量と、右画像P1Rの特徴量とを組み合わせたマッチングマップを用いることにより、対象物の誤認識を抑制する。第1の実施形態において、マッチングマップは、各特徴量について、右画像P1Rと左画像P1Lとで特徴量の相関の強弱を示す。すなわち、マッチングマップを用いることにより、各画像における特徴量に着目して、左画像P1Lと右画像P1Rとのマッチングを図ることができる。 Therefore, the estimation unit 152 in the first embodiment suppresses erroneous recognition of the object by using a matching map in which the feature amount of the left image P1L and the feature amount of the right image P1R are combined. In the first embodiment, the matching map shows the strength of the correlation between the right image P1R and the left image P1L for each feature amount. That is, by using the matching map, it is possible to match the left image P1L and the right image P1R by paying attention to the feature amount in each image.

図13は、第1の実施形態に係るバラ積み画像とマッチングマップとの関係の一例を示す図である。図13に示すように、左画像P1Lを基準とし、右画像P1Rとの対応をとったマッチングマップMLにおいては、左画像P1Lの対象物W1Lの中心点が含まれるグリッドの特徴量と、右画像P1Rに含まれる特徴量との相関が最も大きいグリッドMLaが強調して表示される。同様に、右画像P1Rを基準とし、左画像P1Lとの対応をとったマッチングマップMRにおいても、右画像P1Rの対象物W1Rの中心点が含まれるグリッドの特徴量と、左画像P1Lに含まれる特徴量との相関が最も大きいグリッドMRaが強調して表示される。また、マッチングマップMLにおいて相関が最も大きいグリッドMLaは、左画像P1Lにおける対象物W1Lが位置するグリッドに対応し、マッチングマップMRにおいて相関が最も大きいグリッドMRaは、右画像P1Rにおける対象物W1Rが位置するグリッドに対応する。これにより、左画像P1Lにおいて対象物W1Lが位置するグリッドと、右画像P1Rにおいて対象物W1Rが位置するグリッドとが一致することを特定できる。すなわち、図12においては、一致するグリッドは、左画像P1LのグリッドG1Lと、右画像P1RのグリッドG1Rである。これにより、左画像P1Lにおける対象物W1LのX座標と、右画像P1Rにおける対象物W1RのX座標とに基づいて、対象物W1に対する視差を特定できるので、カメラ20から対象物W1までの深度zを特定することができる。 FIG. 13 is a diagram showing an example of the relationship between the loosely stacked images and the matching map according to the first embodiment. As shown in FIG. 13, in the matching map ML that is based on the left image P1L and corresponds to the right image P1R, the feature amount of the grid including the center point of the object W1L of the left image P1L and the right image. The grid MLa having the largest correlation with the feature amount contained in P1R is highlighted and displayed. Similarly, in the matching map MR that is based on the right image P1R and corresponds to the left image P1L, the feature amount of the grid including the center point of the object W1R of the right image P1R and the left image P1L are included. The grid MRa, which has the largest correlation with the feature amount, is highlighted and displayed. Further, the grid MLa having the largest correlation in the matching map ML corresponds to the grid on which the object W1L in the left image P1L is located, and the grid MRa having the largest correlation in the matching map MR is the position of the object W1R in the right image P1R. Corresponds to the grid to be. Thereby, it can be specified that the grid on which the object W1L is located in the left image P1L and the grid on which the object W1R is located in the right image P1R match. That is, in FIG. 12, the matching grids are the grid G1L of the left image P1L and the grid G1R of the right image P1R. As a result, the parallax with respect to the object W1 can be specified based on the X coordinate of the object W1L in the left image P1L and the X coordinate of the object W1R in the right image P1R. Can be identified.

図14は、第1の実施形態に係る推定処理の一例を示すフローチャートである。また、図15は、第1の実施形態に係る推定処理の一例を示す図である。以降、図12〜図15を用いて説明する。まず、画像取得部151は、図12に示す左画像P1L及び右画像P1Rのように、対象物の左右の各画像を取得する(ステップS201)。次に、推定部152は、左右の各画像の水平方向の各グリッドについて、特徴量を算出する。ここで、上で述べたように、各画像を40×40のグリッドに区分し、各グリッドについて256個の特徴量を算出する場合、各画像の水平方向において、式(1)の左辺第1項及び第2項に示すような40行40列の行列が得られる。 FIG. 14 is a flowchart showing an example of the estimation process according to the first embodiment. Further, FIG. 15 is a diagram showing an example of the estimation process according to the first embodiment. Hereinafter, description will be made with reference to FIGS. 12 to 15. First, the image acquisition unit 151 acquires the left and right images of the object as shown in the left image P1L and the right image P1R shown in FIG. 12 (step S201). Next, the estimation unit 152 calculates the feature amount for each grid in the horizontal direction of each of the left and right images. Here, as described above, when each image is divided into 40 × 40 grids and 256 features are calculated for each grid, the first left side of the equation (1) is calculated in the horizontal direction of each image. A 40-by-40 matrix as shown in the terms and the second term is obtained.

Figure 2021070122
Figure 2021070122

次に、推定部152は、図15に示す処理mを実行する。まず、推定部152は、例えば、式(1)により、左画像P1Lから抽出した特定の列の特徴量に、右画像P1Rから抽出した同じ列の特徴量を転置したものの行列積を計算する。式(1)において、左辺第1項は、左画像P1Lの特定の列の水平方向における1番目のグリッドにおける各特徴量l11乃至l1nが、それぞれ行方向に並んでいる。一方、式(1)の左辺第2項においては、右画像P1R特定の列の水平方向における1番目のグリッドの各特徴量r11乃至r1nが、それぞれ列方向に並んでいる。すなわち、左辺第2項の行列は、右画像P1Rの特定の列の水平方向にグリッドの各特徴量r11乃至r1mがそれぞれ行方向に並んだ行列を転置したものである。また、式(1)の右辺は、左辺第1項の行列と、左辺第2項の行列の行列積とを計算したものである。式(1)の右辺の1列目は、右画像P1Rから抽出した1グリッド目の特徴量と左画像P1Lから抽出した特定の列の水平方向の各グリッドの特徴量の相関を表し、1行目は、左画像P1Lから抽出した1グリッド目の特徴量と右画像P1Rから抽出した特定の列の水平方向の各グリッドの特徴量の相関を表す。すなわち、式(1)の右辺は、左画像P1Lの各グリッドの特徴量と、右画像P1Rの各グリッドの特徴量との相関マップを示す。なお、式(1)において、添字「m」は各画像の水平方向のグリッドの位置を示し、添え字「n」は各グリッドにおける特徴量の番号を示す。すなわち、mは1〜40であり、nは1〜256である。 Next, the estimation unit 152 executes the process m shown in FIG. First, the estimation unit 152 calculates, for example, the matrix product of the feature amount of the same column extracted from the right image P1R transposed to the feature amount of the specific column extracted from the left image P1L by the equation (1). In the formula (1), in the first term on the left side, the feature amounts l11 to l1n in the first grid in the horizontal direction of the specific column of the left image P1L are arranged in the row direction, respectively. On the other hand, in the second term on the left side of the equation (1), the feature amounts r11 to r1n of the first grid in the horizontal direction of the right image P1R specific column are arranged in the column direction, respectively. That is, the matrix of the second term on the left side is a transposed matrix in which the feature amounts r11 to r1m of the grid are arranged in the row direction in the horizontal direction of the specific column of the right image P1R. Further, the right side of the equation (1) is a calculation of the matrix product of the first term on the left side and the matrix of the second term on the left side. The first column on the right side of the equation (1) represents the correlation between the feature amount of the first grid extracted from the right image P1R and the feature amount of each horizontal grid of the specific column extracted from the left image P1L, and one row. The eye represents the correlation between the feature amount of the first grid extracted from the left image P1L and the feature amount of each horizontal grid of a specific column extracted from the right image P1R. That is, the right side of the equation (1) shows a correlation map between the feature amount of each grid of the left image P1L and the feature amount of each grid of the right image P1R. In the equation (1), the subscript "m" indicates the position of the grid in the horizontal direction of each image, and the subscript "n" indicates the number of the feature amount in each grid. That is, m is 1 to 40 and n is 1 to 256.

次に、推定部152は、算出された相関マップを用いて、行列(1)に示すような左画像P1Lに対する右画像P1RのマッチングマップMLを算出する。左画像P1Lに対する右画像P1RのマッチングマップMLは、例えば、相関マップの行方向に対してSoftmax関数を適用することにより算出される。これにより、水平方向の相関の値を正規化している。つまり、行方向の値をすべて合計すると1になるよう変換している。 Next, the estimation unit 152 calculates the matching map ML of the right image P1R with respect to the left image P1L as shown in the matrix (1) by using the calculated correlation map. The matching map ML of the right image P1R with respect to the left image P1L is calculated, for example, by applying the Softmax function to the row direction of the correlation map. This normalizes the value of the correlation in the horizontal direction. That is, all the values in the row direction are converted so that the sum is 1.

Figure 2021070122
Figure 2021070122

次に、推定部152は、算出されたマッチングマップMLに、例えば、式(2)により、右画像P1Rから抽出された特徴量を畳み込む。式(2)の左辺第1項は、行列(1)を転置したものであり、左辺第2項は、式(1)の左辺第1項の行列である。なお、本発明では、相関を取るための特徴量と、マッチングマップに畳み込むための特徴量とは同じものを用いているが、抽出された特徴量から畳み込みニューラルネットワーク等によって、新たに相関を取るための特徴量と畳み込むための特徴量を別々に生成しても良い。 Next, the estimation unit 152 convolves the calculated matching map ML with the feature amount extracted from the right image P1R by, for example, the equation (2). The first term on the left side of the equation (2) is a transposed version of the matrix (1), and the second term on the left side is the matrix of the first term on the left side of the equation (1). In the present invention, the feature amount for correlating and the feature amount for convolution in the matching map are the same, but a new correlation is obtained from the extracted feature amount by a convolutional neural network or the like. The feature amount for convolution and the feature amount for convolution may be generated separately.

次に、推定部152は式(2)で得られた特徴量を左画像P1Lから抽出された特徴量に連結させて、例え畳み込みニューラルネットワークによって新たな特徴量を生成する。このように、左右の画像の特徴量を統合することにより、位置、姿勢の推定精度が向上する。なお、図15における処理mは複数回繰り返しても良い。 Next, the estimation unit 152 connects the feature amount obtained by the equation (2) to the feature amount extracted from the left image P1L, and generates a new feature amount by, for example, a convolutional neural network. By integrating the features of the left and right images in this way, the estimation accuracy of the position and orientation is improved. The process m in FIG. 15 may be repeated a plurality of times.

Figure 2021070122
Figure 2021070122

次に、推定部152はここで得られた特徴量から、例えば畳み込みニューラルネットワークによって位置、姿勢及びクラス分類を推定する。あわせて、推定部152は、算出された相関マップを用いて、行列(2)に示すような右画像P1Rに対する左画像P1LのマッチングマップMRを算出する(ステップS202)。右画像P1Rに対する左画像P1LのマッチングマップMRも、左画像P1Lに対する右画像P1RのマッチングマップMLと同様に、例えば、相関マップの行方向に対してSoftmax関数を適用することにより算出される。 Next, the estimation unit 152 estimates the position, orientation, and classification from the features obtained here, for example, by a convolutional neural network. At the same time, the estimation unit 152 calculates the matching map MR of the left image P1L with respect to the right image P1R as shown in the matrix (2) using the calculated correlation map (step S202). The matching map MR of the left image P1L with respect to the right image P1R is also calculated by applying the Softmax function to the row direction of the correlation map, for example, in the same manner as the matching map ML of the right image P1R with respect to the left image P1L.

Figure 2021070122
Figure 2021070122

次に、推定部152は、算出されたマッチングマップに、例えば、式(3)により、左画像P1Lの特徴量を畳み込む。式(3)の左辺第1項は、行列(2)であり、左辺第2項は、式(1)の左辺第2項の行列の転置前のものである。 Next, the estimation unit 152 convolves the feature amount of the left image P1L into the calculated matching map by, for example, the equation (3). The first term on the left side of the equation (3) is the matrix (2), and the second term on the left side is the one before the transposition of the second term on the left side of the equation (1).

Figure 2021070122
Figure 2021070122

次に推定部152は、あらかじめ設定しておいた閾値と、左画像P1Lから推定したターゲット(対象物)のクラス分類の推定結果が一番大きいグリッドを選択して比較する(ステップS203)。閾値をこえていなかった場合は、ターゲットが無いとして終了する。閾値をこえていた場合は、そのグリッドに対する右画像P1RとのマッチングマップMLから、一番大きい値のグリッドを選択する(ステップS204)。 Next, the estimation unit 152 selects and compares the preset threshold value and the grid with the largest estimation result of the target (object) classification estimated from the left image P1L (step S203). If the threshold is not exceeded, it ends as if there is no target. If the threshold value is exceeded, the grid with the largest value is selected from the matching map ML with the right image P1R for that grid (step S204).

次に、選択したグリッドにおいて、右画像P1Rのターゲットのクラス分類の推定結果とあらかじめ設定しておいた閾値とを比較する(ステップS208)。閾値をこえていた場合は、そのグリッドに対する左画像P1LとのマッチングマップMLから一番大きい値のグリッドを選択する(ステップS209)。閾値を超えていない場合は、左画像P1Lの推定結果から選択したグリッドのクラス分類スコアを0にしてステップS203へ戻る(ステップS207)。 Next, in the selected grid, the estimation result of the target classification of the right image P1R is compared with the preset threshold value (step S208). If the threshold value is exceeded, the grid with the largest value is selected from the matching map ML with the left image P1L for that grid (step S209). If the threshold value is not exceeded, the classification score of the grid selected from the estimation result of the left image P1L is set to 0, and the process returns to step S203 (step S207).

次に、ステップS209にて選択したマッチングマップMLのグリッドと、ステップS204にて左画像P1Lの推定結果から選択したグリッドが等しいかを比較する(ステップS210)。グリッドが異なる場合は、ステップS204にて左画像P1Lの推定結果から選択したグリッドのクラス分類スコアを0にして、ステップS203のグリッドの選択に戻る(ステップS207)。最終的に、左画像P1L及び右画像P1Rで選択したグリッドの位置情報(例えば、図1における水平方向xの値)の検出結果から視差を算出する(ステップS211)。 Next, it is compared whether the grid of the matching map ML selected in step S209 and the grid selected from the estimation result of the left image P1L in step S204 are equal (step S210). If the grids are different, the classification score of the grid selected from the estimation result of the left image P1L in step S204 is set to 0, and the process returns to the grid selection in step S203 (step S207). Finally, the parallax is calculated from the detection result of the position information (for example, the value of x in the horizontal direction in FIG. 1) of the grid selected in the left image P1L and the right image P1R (step S211).

次に、ステップS211から算出した視差をもとに、ターゲットの深度を算出する(ステップS212)。なお、複数のターゲットに対して深度を算出する場合は、ステップS211の後、左画像P1L及び右画像P1Rの推定結果から選択したグリッドのクラス分類スコアを0にしてからステップS203に戻り、以後、ステップS212までを繰り返せば良い。 Next, the depth of the target is calculated based on the parallax calculated from step S211 (step S212). When calculating the depth for a plurality of targets, after step S211, the classification score of the grid selected from the estimation results of the left image P1L and the right image P1R is set to 0, and then the process returns to step S203. The process up to step S212 may be repeated.

以上述べたように、第1の実施形態における画像処理装置10は、取得部と、推定部と、を備える。取得部は、バラ積みされたワークを撮影した第1の画像及び第2の画像を取得する。推定部は、第1の画像の特徴量と、第2の画像の特徴量とのマッチングマップを生成し、第1の画像と第2の画像それぞれに対してターゲットとなる各ワークの位置と姿勢とクラス分類スコアを推定し、前記アテンションマップを用いたマッチング結果と位置の推定結果に基づいて、ワーク位置を推定することにより、ステレオカメラからワークまでの深度を算出する。これにより、物体認識における誤検出を抑制できる。 As described above, the image processing apparatus 10 in the first embodiment includes an acquisition unit and an estimation unit. The acquisition unit acquires a first image and a second image obtained by photographing the workpieces stacked separately. The estimation unit generates a matching map of the feature amount of the first image and the feature amount of the second image, and the position and orientation of each target work for each of the first image and the second image. And the classification score is estimated, and the depth from the stereo camera to the work is calculated by estimating the work position based on the matching result and the position estimation result using the attention map. As a result, erroneous detection in object recognition can be suppressed.

(変形例)
以上、本発明の実施形態について説明したが、本発明は上記実施形態に限定されるものではなく、その趣旨を逸脱しない限りにおいて種々の変更が可能である。例えば、第1の実施形態では、対象物(ワーク)が1種類である場合について説明したが、これに限られず、画像処理装置10が、複数のワークの種類を検出するような構成であってもよい。また、画像処理装置10は、対象物を検出するだけでなく、対象物が配置されたトレイ等の位置や姿勢をさらに検出してもよい。図16は、変形例に係るトレイを含むバラ積み画像の一例を示す図である。図16に示す例において、画像処理装置10は、対象物が配置されたトレイの位置及び姿勢を特定することにより、ロボットアーム30がトレイに衝突しないような軌道を設定することができる。なお、検出する対象であるトレイは、障害物の一例である。画像処理装置10は、トレイ以外のその他の障害物となるものを検出するような構成であってもよい。
(Modification example)
Although the embodiments of the present invention have been described above, the present invention is not limited to the above embodiments, and various modifications can be made without departing from the spirit of the present invention. For example, in the first embodiment, the case where the object (work) is one type has been described, but the present invention is not limited to this, and the image processing device 10 is configured to detect a plurality of types of the work. May be good. Further, the image processing device 10 may not only detect the object, but may further detect the position and orientation of the tray or the like on which the object is placed. FIG. 16 is a diagram showing an example of a loosely stacked image including a tray according to a modified example. In the example shown in FIG. 16, the image processing device 10 can set a trajectory so that the robot arm 30 does not collide with the tray by specifying the position and posture of the tray on which the object is placed. The tray to be detected is an example of an obstacle. The image processing device 10 may be configured to detect other obstacles other than the tray.

また、画像処理装置10が、例えばバラ積み画像を40×40のグリッドに区分する例について説明したが、これに限られず、より細かな、あるいは、より粗いグリッドに区分して対象物を検出してもよく、また画素単位で推定処理を行ってもよい。これにより、画像処理装置10は、より精度よくカメラと対象物との距離を算出することができる。図17は、変形例に係る位置ずれ推定モデルの一例を示す図である。図17に示すように、画像処理装置10は、左画像P1Lと右画像P1Rのうち、推定位置周辺のグリッドよりもサイズが小さい部分を切り出して結合してもよい。そして、第1の実施形態における推定処理と同様に推定処理を行い、処理結果に基づいて位置ずれを推定してもよい。 Further, the example in which the image processing device 10 divides the loosely stacked images into a grid of 40 × 40 has been described, but the present invention is not limited to this, and the object is detected by dividing the images into a finer or coarser grid. The estimation process may be performed on a pixel-by-pixel basis. As a result, the image processing device 10 can calculate the distance between the camera and the object more accurately. FIG. 17 is a diagram showing an example of a position deviation estimation model according to a modified example. As shown in FIG. 17, the image processing apparatus 10 may cut out a portion of the left image P1L and the right image P1R that is smaller in size than the grid around the estimated position and combine them. Then, the estimation process may be performed in the same manner as the estimation process in the first embodiment, and the positional deviation may be estimated based on the processing result.

また、細かな、あるいは、粗いグリッド単位や画素単位で推定処理を行う場合に、第1の実施形態と同様に、左画像P1Lと右画像P1Rとで、それぞれ個別に推定処理を行ってもよい。図18は、変形例に係る位置ずれ推定モデルの別の一例を示す図である。図18に示す例では、画像処理装置10は、左画像P1Lと右画像P1Rとに対し、それぞれ別々に推定処理を行う。この場合においても、画像処理装置10は、第1の実施形態と同様に、それぞれの推定処理を行う際に、左画像P1Lに対する重み付けを、右画像P1Rに対する重み付けと共有してもよい。 Further, when the estimation process is performed in fine or coarse grid units or pixel units, the estimation process may be performed individually for the left image P1L and the right image P1R as in the first embodiment. .. FIG. 18 is a diagram showing another example of the position deviation estimation model according to the modified example. In the example shown in FIG. 18, the image processing device 10 separately performs estimation processing on the left image P1L and the right image P1R. In this case as well, the image processing apparatus 10 may share the weighting for the left image P1L with the weighting for the right image P1R when performing each estimation processing, as in the first embodiment.

また、以上述べた推定処理を、バラ積みされたワーク41、42の画像に対してではなく、ロボットアーム30や、ロボットアーム30に保持されたワーク41、42、又は整列先に整列されたワーク41、42に対して行ってもよい。 Further, the estimation process described above is not applied to the images of the workpieces 41 and 42 stacked separately, but to the robot arm 30, the workpieces 41 and 42 held by the robot arm 30, or the workpieces aligned at the alignment destination. You may go to 41, 42.

また、上記実施の形態により本発明が限定されるものではない。上述した各構成要素を適宜組み合わせて構成したものも本発明に含まれる。また、さらなる効果や変形例は、当業者によって容易に導き出すことができる。よって、本発明のより広範な態様は、上記の実施の形態に限定されるものではなく、様々な変更が可能である。 Moreover, the present invention is not limited by the above-described embodiment. The present invention also includes a configuration in which the above-mentioned components are appropriately combined. Further, further effects and modifications can be easily derived by those skilled in the art. Therefore, the broader aspect of the present invention is not limited to the above-described embodiment, and various modifications can be made.

1 物体把持システム
10 画像処理装置
20 カメラ
30 ロボットアーム
41、42 ワーク
1 Object grasping system 10 Image processing device 20 Camera 30 Robot arm 41, 42 Work

Claims (3)

画像生成ソフトウェアによりバラ積みされたワークの画像を生成し、機械学習の学習データとする学習データ生成方法。 A learning data generation method that generates images of workpieces stacked separately by image generation software and uses them as learning data for machine learning. 把持対象のワークの三次元モデルを取得し、
前記三次元モデルの位置及び姿勢を決定し、
複数の前記三次元モデルを、決定された前記位置及び姿勢に基づいて仮想空間上に配置し、
前記三次元モデルが配置された前記仮想空間を撮像した画像を取得することにより、前記バラ積みされたワークの画像を生成する、請求項1に記載の学習データ生成方法。
Obtain a 3D model of the workpiece to be gripped and
Determine the position and orientation of the 3D model and
A plurality of the three-dimensional models are arranged in the virtual space based on the determined position and orientation, and the three-dimensional models are arranged in the virtual space.
The learning data generation method according to claim 1, wherein an image of the loosely stacked workpieces is generated by acquiring an image of the virtual space in which the three-dimensional model is arranged.
前記バラ積みされた各ワークの座標及び姿勢と、前記バラ積みされたワークの画像とを含む教師データを用いた機械学習処理をさらに行う、請求項1又は2に記載の学習データ生成方法。 The learning data generation method according to claim 1 or 2, further performing machine learning processing using teacher data including the coordinates and orientations of the loosely stacked workpieces and images of the loosely stacked workpieces.
JP2019199418A 2019-10-31 2019-10-31 Learning data generation method Pending JP2021070122A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2019199418A JP2021070122A (en) 2019-10-31 2019-10-31 Learning data generation method
PCT/JP2020/040702 WO2021085561A1 (en) 2019-10-31 2020-10-29 Training data generation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019199418A JP2021070122A (en) 2019-10-31 2019-10-31 Learning data generation method

Publications (1)

Publication Number Publication Date
JP2021070122A true JP2021070122A (en) 2021-05-06

Family

ID=75712112

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019199418A Pending JP2021070122A (en) 2019-10-31 2019-10-31 Learning data generation method

Country Status (2)

Country Link
JP (1) JP2021070122A (en)
WO (1) WO2021085561A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023027187A1 (en) * 2021-08-27 2023-03-02 京セラ株式会社 Trained model generation method, trained model generation device, trained model, and device for estimating maintenance state
WO2023073780A1 (en) * 2021-10-25 2023-05-04 ファナック株式会社 Device for generating learning data, method for generating learning data, and machine learning device and machine learning method using learning data

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116416217B (en) * 2023-03-06 2023-11-28 赛那德科技有限公司 Method, system and equipment for generating unordered stacking parcel image

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017102755A (en) * 2015-12-02 2017-06-08 池上通信機株式会社 Machine learning support device
JP2019058960A (en) * 2017-09-25 2019-04-18 ファナック株式会社 Robot system and workpiece take-out method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019057250A (en) * 2017-09-22 2019-04-11 Ntn株式会社 Work-piece information processing system and work-piece recognition method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017102755A (en) * 2015-12-02 2017-06-08 池上通信機株式会社 Machine learning support device
JP2019058960A (en) * 2017-09-25 2019-04-18 ファナック株式会社 Robot system and workpiece take-out method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023027187A1 (en) * 2021-08-27 2023-03-02 京セラ株式会社 Trained model generation method, trained model generation device, trained model, and device for estimating maintenance state
WO2023073780A1 (en) * 2021-10-25 2023-05-04 ファナック株式会社 Device for generating learning data, method for generating learning data, and machine learning device and machine learning method using learning data

Also Published As

Publication number Publication date
WO2021085561A1 (en) 2021-05-06

Similar Documents

Publication Publication Date Title
WO2021085561A1 (en) Training data generation method
CN109255813B (en) Man-machine cooperation oriented hand-held object pose real-time detection method
Rambach et al. Learning to fuse: A deep learning approach to visual-inertial camera pose estimation
JP4636016B2 (en) Plane detection apparatus, plane detection method, and robot apparatus equipped with plane detection apparatus
JP6723061B2 (en) Information processing apparatus, information processing apparatus control method, and program
CN112070782B (en) Method, device, computer readable medium and electronic equipment for identifying scene contour
CN112652016A (en) Point cloud prediction model generation method, pose estimation method and device
CN109243575B (en) Virtual acupuncture method and system based on mobile interaction and augmented reality
JP6054831B2 (en) Image processing apparatus, image processing method, and image processing program
CN110503686A (en) Object pose estimation method and electronic equipment based on deep learning
JP6487642B2 (en) A method of detecting a finger shape, a program thereof, a storage medium of the program, and a system for detecting a shape of a finger.
CN105892633A (en) Gesture identification method and virtual reality display output device
CN112102342A (en) Plane contour recognition method and device, computer equipment and storage medium
WO2021085560A1 (en) Image processing device and image processing method
US20210327160A1 (en) Authoring device, authoring method, and storage medium storing authoring program
JP2019211981A (en) Information processor, information processor controlling method and program
Phan et al. Towards 3D human posture estimation using multiple kinects despite self-contacts
WO2021085562A1 (en) Gripping device
JP7474083B2 (en) Method for measuring three-dimensional data of an object, method for generating training data, and training data generating device
KR102333768B1 (en) Hand recognition augmented reality-intraction apparatus and method
Graae et al. Stereoscopic vision for a humanoid robot using genetic programming
WO2021187316A1 (en) Object three-dimensional data measurement method, object three-dimensional data measurement device, learning data generation method, and learning data generation device
JP2022077338A (en) Data generation method for machine learning and data generation device for machine learning
CN108426566A (en) A kind of method for positioning mobile robot based on multiple-camera
Gritsenko et al. Plane-based humanoid robot navigation and object model construction for grasping

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20221026

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20230704

A601 Written request for extension of time

Free format text: JAPANESE INTERMEDIATE CODE: A601

Effective date: 20230901

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20240104