WO2025041210A1 - Inference device, inference method, and inference program - Google Patents
Inference device, inference method, and inference program Download PDFInfo
- Publication number
- WO2025041210A1 WO2025041210A1 PCT/JP2023/029898 JP2023029898W WO2025041210A1 WO 2025041210 A1 WO2025041210 A1 WO 2025041210A1 JP 2023029898 W JP2023029898 W JP 2023029898W WO 2025041210 A1 WO2025041210 A1 WO 2025041210A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- task
- parameters
- inference
- prediction
- relationship
- 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
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
Definitions
- the present invention relates to an inference device, an inference method, and an inference program.
- inference results for multiple tasks such as object detection, region segmentation, and pose estimation for images
- a method called DETR Detection TRansformer
- Object Query a structure called a Transformer and parameters that serve as the basis for prediction called Object Query
- DETR Detection TRansformer
- the method that uses a Transformer and Object Query is known to be effective for various tasks such as pose estimation and region segmentation in addition to object detection.
- the present invention was made in consideration of the above, and aims to make it possible to efficiently execute inference on multiple tasks.
- the inference device is characterized by having an acquisition unit that acquires, for a plurality of tasks for a given medium, a feature of the medium and parameters representing the feature of each task, and a prediction unit that predicts the task feature of each task in the medium from the parameters acquired by the acquisition unit, using a first relationship between the parameters representing the feature of each task across different tasks, and a second relationship between the feature of the media and the parameters representing the feature of each task.
- the present invention makes it possible to efficiently execute inference on multiple tasks.
- FIG. 1 is a diagram for explaining an overview of the inference device of this embodiment.
- FIG. 2 is a diagram for explaining an overview of the inference device of this embodiment.
- FIG. 3 is a diagram for explaining an overview of the inference device of this embodiment.
- FIG. 4 is a schematic diagram illustrating a schematic configuration of the inference device of this embodiment.
- FIG. 5 is a diagram for explaining the processing of the inference device.
- FIG. 6 is a diagram for explaining the processing of the inference device.
- FIG. 7 is a flowchart showing the procedure of the inference process.
- FIG. 8 is a flowchart showing the procedure of the inference process.
- FIG. 9 is a flowchart showing the procedure of the inference process.
- FIG. 10 is a flowchart showing the procedure of the inference process.
- FIG. 10 is a flowchart showing the procedure of the inference process.
- FIG. 11 is a flowchart showing the procedure of the inference process.
- FIG. 12 is a diagram for explaining the second embodiment.
- FIG. 13 is a flowchart showing an inference processing procedure according to the second embodiment.
- FIG. 14 is a diagram for explaining the embodiment.
- FIG. 15 is a diagram illustrating an example of a computer that executes an inference program.
- FIG. 1 is a diagram for explaining an outline of an inference device of this embodiment.
- the media is, for example, any one of an image, a voice, and a natural language.
- FIG. 1 illustrates a method of using a Transformer and an Object Query to predict a single task for media.
- a model for an image is composed of a CNN (Convolutional Neural Network) part called a backbone created for image classification, and a part called a task head that predicts each task. Then, the image feature amount, which is the output of the backbone, and the Object Query, which is a parameter related to the task, are input to the Transformer to obtain the output of each task.
- CNN Convolutional Neural Network
- the Transformer is composed of a Transformer Encoder and a Transformer Decoder, as shown in Figure 1.
- the Transformer Encoder is designed to be common to each model of multiple tasks, and refines the backbone image features through nonlinear transformation using Attention, a mechanism for learning noteworthy parts of the input by extracting features based on the similarity between the input features.
- the Transformer Decoder also receives the image features and Object Query output from the Transformer Encoder, and repeats the processing of multiple layers (L layers). This allows each Object Query to grasp the state of its own prediction and recognize its role within the image, gradually predicting the desired task.
- This Transformer Decoder is mainly composed of Self-Attention and Cross-Attention.
- Self-Attention extracts the relationship between predictions corresponding to each of multiple Object Queries.
- Cross-Attention extracts the relationship between image features and predictions corresponding to each of multiple Object Queries.
- Attention is a mechanism that performs nonlinear transformation by extracting features based on the similarity between input features.
- Self-Attention processing is often almost the same for each task model, while Cross-Attention processing often differs depending on the task and method. Therefore, while methods using Transformers are generally effective for a variety of tasks, it is necessary to create a model specialized for one task.
- the inference device provides a specific improvement over the conventional method using Transformer and Object Query, which required creating task-specific models for each task and performing inference, resulting in costs according to the number of tasks, and represents an advancement in the technical field related to multitask AI.
- FIG. 2 and Fig. 3 show an example of the processing in the inference device of this embodiment. Specifically, as shown in Fig. 2, in the inference device, the Transformer Decoder and Object Query are expanded to multitask in order to solve multiple tasks simultaneously.
- the inference device prepares the same number of types of Object Queries as the number of tasks for each task, inputs them together into the Self-Attention of the Transformer Decoder, and performs a process to extract the relationships between the predictions of the Object Queries. This makes it possible to extract the relationships between the predictions of multiple tasks.
- Cross-Attention branches as many times as the number of tasks, and performs processing to extract the relationship between image features and the prediction of the Object Query for each type of Object Query corresponding to each task.
- This makes it possible to incorporate Cross-Attention technology that has developed independently for each task.
- the inference device uses a multi-task Object Query to perform Self-Attention processing across tasks in the Transformer Decoder, and Cross-Attention processing unique to the branched task. This makes it possible to perform multi-task inference more efficiently than the conventional processing for a single task as illustrated in Figure 3(a).
- FIG. 4 is a schematic diagram illustrating the general configuration of the inference device of this embodiment.
- Fig. 5 and Fig. 6 are diagrams for explaining the processing of the inference device.
- the inference device 10 of this embodiment is realized by a general-purpose computer such as a personal computer, and includes an input unit 11, an output unit 12, a communication control unit 13, a storage unit 14, and a control unit 15.
- the input unit 11 is realized using input devices such as a keyboard and a mouse, and inputs various instruction information such as starting processing to the control unit 15 in response to input operations by an operator.
- the output unit 12 is realized by a display device such as a liquid crystal display, a printing device such as a printer, etc. For example, the output unit 12 displays the results of the inference processing described below.
- the communication control unit 13 is realized by a NIC (Network Interface Card) or the like, and controls communication between the control unit 15 and external devices via telecommunication lines such as a LAN (Local Area Network) or the Internet.
- the communication control unit 13 controls communication between the control unit 15 and a management device that manages various types of information.
- Image 14a stores the image to be processed and input to the inference process described below.
- image feature generation parameters 14b image feature generation parameters used in the inference process described below are stored.
- the image feature generation parameters are parameters of a neural network model, and are obtained by supervised learning of a general neural network using learning data for the task.
- image feature refinement parameters 14c image feature refinement parameters used in the inference process described below are stored.
- the image feature refinement parameters are parameters of a neural network model, and like the image feature generation parameters, are obtained by supervised learning of a general neural network using the learning data for the task.
- Prediction generation parameters 14d store prediction generation parameters used in the inference process described below.
- the prediction generation parameters are parameters of a neural network model, and like the image feature generation parameters, are obtained by supervised learning of a general neural network using learning data for the task.
- Query parameters 14e store query parameters used in the inference process described below.
- the query parameters are parameters that represent the feature quantities of a task, such as an Object Query, and the same number of query parameters as the number of tasks N are stored corresponding to each of the multiple tasks.
- N types of query parameters are stored: task 1 query parameters, task 2 query parameters, ..., task N query parameters.
- the image feature generating unit 15b uses the image feature generating parameters acquired from the storage unit 14 and the image to be processed to generate image features for the image to be processed based on the image feature generating parameters.
- the image feature generating unit 15b corresponds to, for example, a Transformer Encoder.
- the image feature refinement unit 15c further refines the image feature generated by the image feature generation unit 15b based on the image feature refinement parameters acquired from the storage unit 14.
- the image feature refinement unit 15c corresponds to a Transformer Encoder, and refines the feature of the media by performing a nonlinear transformation based on Attention, which is a mechanism for further extracting features using the similarity between the features of the media.
- the image feature refinement unit 15c processes the image features of multiple images, it is sufficient to obtain the image feature refinement parameters only the first time.
- the aforementioned acquisition unit 15a may acquire refined image features and transfer them to the prediction generation unit 15d described below.
- the acquisition unit 15a acquires media features and task parameters representing the features of each task for multiple tasks on a specific media, such as an image.
- the prediction generation unit 15d predicts the task features of each task in the media from the query parameters acquired by the acquisition unit 15a, using a first relationship between the query parameters representing the features of each task across different tasks, and a second relationship between the features of the media and the query parameters representing the features of each task.
- the prediction generation unit 15d predicts the desired task using the prediction generation parameters and query parameters acquired from the storage unit 14, and the image features refined by the image feature refinement unit 15c.
- the prediction generation unit 15d processes image features of multiple images, it is sufficient to obtain the prediction generation parameters and query parameters only the first time.
- query parameters corresponding to each of a plurality of tasks there are query parameters corresponding to each of a plurality of tasks.
- the query parameters for object detection and the query parameters for pose estimation are input to the prediction generation unit 15d, and prediction results for the two tasks, object detection and pose estimation, are output from the image features refined by the image feature refinement unit 15c.
- the prediction generation unit 15d predicts task features by repeatedly converting parameters using the similarity between the query parameters as the first relationship, and converting parameters using the similarity between the media features and the query parameters as the second relationship.
- the prediction generation unit 15d performs nonlinear transformation of the query parameters of each task based on an attention mechanism that further extracts features using the similarity between the query parameters of each task, and performs nonlinear transformation of the query parameters of each task based on an attention mechanism that further extracts features using the similarity between the features of the media and the query parameters of each task.
- the prediction generation unit 15d repeats this process to predict task features of each task in the media.
- the prediction generation unit 15d is a decoder of a transformer, which is a pre-trained neural network, and extracts the first relationship by a self-attention mechanism and the second relationship by a cross-attention mechanism.
- the prediction generation unit 15d is a decoder of a transformer, in which Self-Attention extracts the relationship between the query parameters of each task across different tasks, and Cross-Attention extracts the relationship between the media features and the query parameters of each task for each task, thereby predicting the task features of each task in the media.
- FIG. 6 is a diagram for explaining the processing of the prediction generation unit.
- the prediction generation unit 15d includes an inter-prediction relationship extraction unit 15e and an image-inter-prediction relationship extraction unit 15f.
- the inter-prediction relationship extraction unit 15e corresponds to, for example, a self-attention of a transformer decoder, and performs the same processing across tasks regardless of the type and number of tasks.
- the image-inter-prediction relationship extraction unit 15f corresponds to, for example, a cross-attention of a transformer decoder, and performs different processing depending on the type of task, so that the same number of image-inter-prediction relationship extraction units 15f as the number of tasks perform processing in parallel.
- the prediction generation unit 15d has a predetermined number L of layers, each of which is a pair of an inter-prediction relationship extraction unit 15e and an image-inter-prediction relationship extraction unit 15f.
- the query parameters change gradually with each layer, and finally a prediction is output, which is the inference result for each task.
- inter-prediction relationship extraction unit 15e extracts relationships between each query parameter based on the prediction generation parameters, and updates each query parameter based on the extracted relationships (hereinafter, the updated query parameters may be referred to as "query parameters (prediction)").
- image-prediction relationship extraction unit 15f extracts relationships between image features and the updated query parameters (prediction) of each task based on the prediction generation parameters, and updates the query parameters of each task based on the extracted relationships.
- the prediction relationship extraction unit 15e extracts relationships between each query parameter (prediction) based on the updated prediction generation parameters, and updates each query parameter based on the extracted relationships.
- the image-prediction relationship extraction unit 15f extracts relationships between image features and the updated query parameters (prediction) of each task based on the prediction generation parameters, and updates the query parameters of each task based on the extracted relationships.
- the inter-prediction relationship extraction unit 15e and the image-prediction relationship extraction unit 15f repeat the same process up to the L layer, thereby outputting a prediction that is the inference result for each task.
- the inference device 10 can efficiently execute inference for multiple tasks for media. Furthermore, learning of various parameters can also be performed collectively for multiple tasks, making it possible to execute the learning efficiently.
- Fig. 7 to Fig. 11 are flowcharts showing the procedure of the inference process. First, in Fig. 7, the flowchart starts at the timing when the user performs an operation input to instruct the start of the process.
- the acquisition unit 15a acquires from the storage unit 14 the image to be processed, parameters for generating image features, parameters for refining image features, parameters for predictive generation, parameters for queries, etc., to be used in the inference process.
- the image feature generating unit 15b uses the image feature generating parameters and the image to be processed to generate image features for the image to be processed based on the image feature generating parameters (step S1).
- the image feature refinement unit 15c further refines the image features generated by the image feature generation unit 15b based on the image feature refinement parameters (step S2).
- the prediction generation unit 15d uses the prediction generation parameters, the refined image features, and the query parameters for each task to generate a prediction of the features of each task in the image (step S3), and outputs the generated prediction (step S4). This completes the series of inference processes.
- FIG. 8 illustrates the processing procedure of the image feature generation unit in step S1 shown in FIG. 7.
- the image feature generation unit 15b acquires image feature generation parameters and an input image to be processed from the acquisition unit 15a or the storage unit 14 (steps S101 to S102).
- the image feature generating unit 15b generates image features for the input image to be processed based on the image feature generation parameters (step S103).
- the image feature generating unit 15b also outputs the generated image features to the downstream image feature refining unit 15c (step S104), and the series of processes ends.
- FIG. 9 illustrates the processing procedure of the image feature generation unit in step S2 shown in FIG. 7.
- the image feature refinement unit 15c acquires parameters for image feature refinement from the acquisition unit 15a or the storage unit 14 (step S201), and acquires the image feature amount generated from the image feature generation unit 15b (step S202).
- the image feature refinement unit 15c refines the image feature based on the image feature refinement parameters (step S203).
- the image feature generation unit 15b outputs the refined image feature to the downstream prediction generation unit 15d (step S204), and the series of processes ends.
- FIG. 10 illustrates the processing procedure of the prediction generation unit in steps S3 to S4 shown in FIG. 7.
- the prediction generation unit 15d acquires prediction generation parameters and query parameters from the acquisition unit 15a or the storage unit 14 (steps S301 to S302), and acquires refined image features from the image feature refinement unit 15c (step S303).
- FIG. 11 also illustrates a detailed processing procedure for the process of step S304 shown in FIG. 10.
- the prediction generation unit 15d performs the first layer processing shown in FIG. 6. Specifically, the prediction relationship extraction unit 15e extracts relationships between query parameters for each task based on the prediction generation parameters, and updates each query parameter based on the extracted relationships (step S401).
- the image-prediction relationship extraction unit 15f extracts relationships between the image features and the updated query parameters for each task, and further updates the query parameters for each task based on the extracted relationships (step S402).
- the prediction generation unit 15d repeats the same process up to the Lth layer (step S413), and sets the updated query parameters in the Lth layer as a prediction for the generated task (step S404). After that, the prediction generation unit 15d outputs the prediction for the generated task (step S305), and ends the series of processes.
- the prediction generation unit 15d is a decoder of a transformer, which is a pre-trained neural network, and extracts the first relationship by a self-attention mechanism and the second relationship by a cross-attention mechanism.
- the inference program is stored in the hard disk drive 1031, for example, as a program module 1093 in which instructions to be executed by the computer 1000 are written. Specifically, the program module 1093 in which each process executed by the inference device 10 described in the above embodiment is written is stored in the hard disk drive 1031.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Health & Medical Sciences (AREA)
- Image Analysis (AREA)
Abstract
Description
本発明は、推論装置、推論方法、および推論プログラムに関する。 The present invention relates to an inference device, an inference method, and an inference program.
従来、画像、音声、自然言語等のメディアに対して、例えば画像に対する物体検出、領域分割、姿勢推定等の複数のタスクの推論結果が必要となる場合がある。複数のタスクに対応可能な推論手法として、例えば、Transformerと呼ばれる構造とObject Queryと呼ばれる予測の元となるパラメータを用いて物体検出を解くDETR(Detection TRansformer)と呼ばれる手法が知られている(非特許文献1参照)。TransformerとObject Queryとを用いる手法は、物体検出の他にも姿勢推定や領域分割等の様々なタスクに有効であることが知られている。 Conventionally, for media such as images, audio, and natural language, inference results for multiple tasks, such as object detection, region segmentation, and pose estimation for images, may be required. As an inference method that can handle multiple tasks, for example, a method called DETR (Detection TRansformer) is known that solves object detection using a structure called a Transformer and parameters that serve as the basis for prediction called Object Query (see Non-Patent Document 1). The method that uses a Transformer and Object Query is known to be effective for various tasks such as pose estimation and region segmentation in addition to object detection.
しかしながら、従来技術によれば、複数のタスクを同時に解くことは困難である。例えば、TransformerとObject Queryとを用いる手法は、様々なタスクに有効であるにも関わらず、各タスクに特化してタスク特化型モデルを作成して推論する必要がある。すなわち、タスクの数だけモデルを作成して推論を行うため、タスクの数に応じたコストがかかるという課題がある。 However, with conventional technology, it is difficult to solve multiple tasks simultaneously. For example, although a method using a Transformer and Object Query is effective for a variety of tasks, it is necessary to create a task-specific model specialized for each task and perform inference. In other words, there is an issue that a cost corresponding to the number of tasks is incurred because a model is created for each task and inference is performed.
本発明は、上記に鑑みてなされたものであって、複数のタスクの推論を効率よく実行可能とすることを目的とする。 The present invention was made in consideration of the above, and aims to make it possible to efficiently execute inference on multiple tasks.
上述した課題を解決し、目的を達成するために、本発明に係る推論装置は、所定のメディアに対する複数のタスクについて、前記メディアの特徴量と、各タスクの特徴量を表すパラメータとを取得する取得部と、異なるタスクを横断した各タスクの特徴量を表すパラメータの間の第1関係、および前記メディアの特徴量と各タスクの特徴量を表すパラメータとの第2関係を用いて、前記取得部で取得された前記パラメータから前記メディアにおける各タスクのタスク特徴量を予測する予測部と、を有することを特徴とする。 In order to solve the above-mentioned problems and achieve the object, the inference device according to the present invention is characterized by having an acquisition unit that acquires, for a plurality of tasks for a given medium, a feature of the medium and parameters representing the feature of each task, and a prediction unit that predicts the task feature of each task in the medium from the parameters acquired by the acquisition unit, using a first relationship between the parameters representing the feature of each task across different tasks, and a second relationship between the feature of the media and the parameters representing the feature of each task.
本発明によれば、複数のタスクの推論を効率よく実行することが可能となる。 The present invention makes it possible to efficiently execute inference on multiple tasks.
以下、図面を参照して、本発明の一実施形態を詳細に説明する。なお、この実施形態により本発明が限定されるものではない。また、図面の記載において、同一部分には同一の符号を付して示している。 Below, one embodiment of the present invention will be described in detail with reference to the drawings. Note that the present invention is not limited to this embodiment. In addition, in the drawings, the same parts are denoted by the same reference numerals.
[推論装置の概要]
図1は、本実施形態の推論装置の概要を説明するための図である。本実施形態において、メディアとは、例えば、画像、音声、自然言語のいずれかである。図1には、メディアに対する単一のタスクの予測に、TransformerとObject Queryとを用いる手法が例示されている。この手法における例えば画像に対するモデルは、画像分類用に作られたバックボーンと呼ばれるCNN(Convolutional Neural Network)部分と、各タスクの予測を行うタスクヘッドと呼ばれる部分からなる。そして、バックボーンの出力である画像特徴量と、タスクに関するパラメータであるObject QueryとをTransformerに入力することにより、各タスクの出力を得る。
[Outline of the inference device]
FIG. 1 is a diagram for explaining an outline of an inference device of this embodiment. In this embodiment, the media is, for example, any one of an image, a voice, and a natural language. FIG. 1 illustrates a method of using a Transformer and an Object Query to predict a single task for media. In this method, for example, a model for an image is composed of a CNN (Convolutional Neural Network) part called a backbone created for image classification, and a part called a task head that predicts each task. Then, the image feature amount, which is the output of the backbone, and the Object Query, which is a parameter related to the task, are input to the Transformer to obtain the output of each task.
ここで、Transformerは、図1に例示するように、Transformer EncoderとTransformer Decoderとで構成される。Transformer Encoderは、複数のタスクのそれぞれのモデルに共通に設計されており、入力された特徴量間の類似度をもとに特徴量を抽出することにより、入力のうちの注目すべき箇所を学習する仕組みであるAttentionによる非線形変換で、バックボーンの画像特徴量を精製する。 Here, the Transformer is composed of a Transformer Encoder and a Transformer Decoder, as shown in Figure 1. The Transformer Encoder is designed to be common to each model of multiple tasks, and refines the backbone image features through nonlinear transformation using Attention, a mechanism for learning noteworthy parts of the input by extracting features based on the similarity between the input features.
また、Transformer Decoderは、Transformer Encoderから出力された画像特徴量とObject Queryとの入力を受け付けて、複数層(L層)の処理を繰り返す。これにより、各Object Queryがそれぞれの予測の状態の把握と画像内での役割の認識とを行いつつ、徐々に所望のタスクの予測になっていく。 The Transformer Decoder also receives the image features and Object Query output from the Transformer Encoder, and repeats the processing of multiple layers (L layers). This allows each Object Query to grasp the state of its own prediction and recognize its role within the image, gradually predicting the desired task.
このTransformer Decoderは、主にSelf-AttentionとCross-Attentionとで構成される。Self-Attentionでは、複数のObject Queryのそれぞれに対応する予測の間の関係を抽出する。また、Cross-Attentionでは、画像特徴量と複数のObject Queryのそれぞれに対応する予測との間の関係を抽出する。ここで、Attentionは、入力された特徴量間の類似度をもとに特徴量を抽出することにより、非線形変換を行う機構である。 This Transformer Decoder is mainly composed of Self-Attention and Cross-Attention. Self-Attention extracts the relationship between predictions corresponding to each of multiple Object Queries. Cross-Attention extracts the relationship between image features and predictions corresponding to each of multiple Object Queries. Here, Attention is a mechanism that performs nonlinear transformation by extracting features based on the similarity between input features.
Self-Attentionの処理は、各タスクのモデルでほとんど同じであることが多く、Cross-Attentionの処理は、タスクや手法によって異なることが多い。そのため、一般にTransformerを用いた手法は、様々なタスクで有効である一方、1つのタスクに特化したモデルを作成する必要がある。 Self-Attention processing is often almost the same for each task model, while Cross-Attention processing often differs depending on the task and method. Therefore, while methods using Transformers are generally effective for a variety of tasks, it is necessary to create a model specialized for one task.
そこで、本実施形態に係る推論装置は、タスクの数だけタスクに特化したモデルを作成して推論を行う必要がありタスクの数に応じたコストがかかっていた従来のTransformerとObject Queryとを用いる手法に対して特定の改善を提供するものであり、マルチタスクAIに係る技術分野の向上を示すものである。 The inference device according to this embodiment provides a specific improvement over the conventional method using Transformer and Object Query, which required creating task-specific models for each task and performing inference, resulting in costs according to the number of tasks, and represents an advancement in the technical field related to multitask AI.
ここで、図2および図3には、本実施形態の推論装置における処理が例示されている。具体的には、図2に例示するように、推論装置では、複数のタスクを同時に解くために、Transformer DecoderとObject Queryとがマルチタスクに拡張されている。 Here, Fig. 2 and Fig. 3 show an example of the processing in the inference device of this embodiment. Specifically, as shown in Fig. 2, in the inference device, the Transformer Decoder and Object Query are expanded to multitask in order to solve multiple tasks simultaneously.
すなわち、推論装置では、図3(b)に例示するように、各タスクに対応して、タスクの数と同数の種類のObject Queryを用意して、Transformer DecoderのSelf-Attentionにまとめて入力し、Object Queryの予測間の関係を抽出する処理を行う。これにより、複数のタスクの予測間の関係を抽出可能となる。 In other words, as shown in FIG. 3(b), the inference device prepares the same number of types of Object Queries as the number of tasks for each task, inputs them together into the Self-Attention of the Transformer Decoder, and performs a process to extract the relationships between the predictions of the Object Queries. This makes it possible to extract the relationships between the predictions of multiple tasks.
また、Cross-Attention(CA)では、タスクの数だけ分岐させ、各タスクに対応した種類のObject Queryごとに、画像特徴量とObject Queryの予測との間の関係を抽出する処理を行う。これにより、各タスクについて独自に発展してきたCross-Attentionの技術を取り込むことが可能となる。このように、推論装置では、マルチタスクのObject Queryを用いて、Transformer Decoderにおけるタスクを横断したSelf-Attentionの処理と、分岐したタスク独自のCross-Attentionの処理を行う。これにより、図3(a)に例示した従来の1つのタスクに対する処理と比較して、効率的にマルチタスクの推論を行うことが可能となる。 In addition, Cross-Attention (CA) branches as many times as the number of tasks, and performs processing to extract the relationship between image features and the prediction of the Object Query for each type of Object Query corresponding to each task. This makes it possible to incorporate Cross-Attention technology that has developed independently for each task. In this way, the inference device uses a multi-task Object Query to perform Self-Attention processing across tasks in the Transformer Decoder, and Cross-Attention processing unique to the branched task. This makes it possible to perform multi-task inference more efficiently than the conventional processing for a single task as illustrated in Figure 3(a).
[推論装置の構成]
図4は、本実施形態の推論装置の概略構成を例示する模式図である。また、図5および図6は、推論装置の処理を説明するための図である。まず、図4に例示するように、本実施形態の推論装置10は、パソコン等の汎用コンピュータで実現され、入力部11、出力部12、通信制御部13、記憶部14、および制御部15を備える。
[Configuration of inference device]
Fig. 4 is a schematic diagram illustrating the general configuration of the inference device of this embodiment. Fig. 5 and Fig. 6 are diagrams for explaining the processing of the inference device. First, as illustrated in Fig. 4, the inference device 10 of this embodiment is realized by a general-purpose computer such as a personal computer, and includes an input unit 11, an output unit 12, a
入力部11は、キーボードやマウス等の入力デバイスを用いて実現され、操作者による入力操作に対応して、制御部15に対して処理開始などの各種指示情報を入力する。出力部12は、液晶ディスプレイなどの表示装置、プリンター等の印刷装置等によって実現される。例えば、出力部12には、後述する推論処理の結果が表示される。 The input unit 11 is realized using input devices such as a keyboard and a mouse, and inputs various instruction information such as starting processing to the control unit 15 in response to input operations by an operator. The output unit 12 is realized by a display device such as a liquid crystal display, a printing device such as a printer, etc. For example, the output unit 12 displays the results of the inference processing described below.
通信制御部13は、NIC(Network Interface Card)等で実現され、LAN(Local Area Network)やインターネットなどの電気通信回線を介した外部の装置と制御部15との通信を制御する。例えば、通信制御部13は、各種情報を管理する管理装置等と制御部15との通信を制御する。
The
記憶部14は、RAM(Random Access Memory)、フラッシュメモリ(Flash Memory)等の半導体メモリ素子、または、ハードディスク、光ディスク等の記憶装置によって実現される。記憶部14には、推論装置10を動作させる処理プログラムや、処理プログラムの実行中に使用されるデータなどが予め記憶され、あるいは処理の都度一時的に記憶される。なお、記憶部14は、通信制御部13を介して制御部15と通信する構成でもよい。
The storage unit 14 is realized by a semiconductor memory element such as a RAM (Random Access Memory) or a flash memory, or a storage device such as a hard disk or an optical disk. The storage unit 14 stores in advance the processing program that operates the inference device 10 and data used during execution of the processing program, or stores the data temporarily each time processing is performed. The storage unit 14 may be configured to communicate with the control unit 15 via the
本実施形態において、記憶部14は、後述する推論処理に用いられる、画像14a、画像特徴生成用パラメータ14b、画像特徴精製用パラメータ14c、予測生成用パラメータ14d、クエリ用パラメータ14e等を記憶する。これらの情報は、後述する推論処理に先立って予め、あるいは推論処理の最中に、入力部11を介して、あるいは通信制御部13を介して各種情報を管理する管理装置等から取得され、記憶部14に格納される。
In this embodiment, the storage unit 14 stores an
画像14aには、後述する推論処理に入力される処理対象の画像が格納される。
画像特徴生成用パラメータ14bには、後述する推論処理に用いられる画像特徴生成用パラメータが格納される。画像特徴生成用パラメータは、ニューラルネットワークモデルのパラメータであり、タスクの学習用データを用いた一般的なニューラルネットワークの教師あり学習によって得られる。
In image
画像特徴精製用パラメータ14cには、後述する推論処理に用いられる画像特徴精製用パラメータが格納される。画像特徴精製用パラメータは、ニューラルネットワークモデルのパラメータであり、画像特徴生成用パラメータと同様に、タスクの学習用データを用いた一般的なニューラルネットワークの教師あり学習によって得られる。
In image
予測生成用パラメータ14dには、後述する推論処理に用いられる予測生成用パラメータが格納される。予測生成用パラメータは、ニューラルネットワークモデルのパラメータであり、画像特徴生成用パラメータと同様に、タスクの学習用データを用いた一般的なニューラルネットワークの教師あり学習によって得られる。
クエリ用パラメータ14eには、後述する推論処理に用いられるクエリ用パラメータが格納される。クエリ用パラメータは、例えばObject Query等のタスクの特徴量を表すパラメータであり、複数の各タスクに対応してタスク数Nと同数種類のクエリ用パラメータが格納されている。図5に示す例では、タスク1クエリ用パラメータ、タスク2クエリ用パラメータ、…、タスクNクエリ用パラメータのN種類のクエリ用パラメータが格納されている。
各タスクに対応したクエリ用パラメータは、ランダムに初期化され、ニューラルネットワークの一般的な教師あり学習を経て得られる。また、クエリ用パラメータは、後述する推論処理において処理されるベクトルと同じ次元のベクトルである。 The query parameters for each task are randomly initialized and obtained through typical supervised learning of neural networks. The query parameters are vectors of the same dimensions as the vectors processed in the inference process described below.
制御部15は、CPU(Central Processing Unit)やNP(Network Processor)やFPGA(Field Programmable Gate Array)等を用いて実現され、メモリに記憶された処理プログラムを実行する。これにより、制御部15は、図4に例示するように、取得部15a、画像特徴生成部15b、画像特徴精製部15c、予測生成部15d、予測間関係抽出部15eおよび画像-予測間関係抽出部15fとして機能して、推論処理を実行する。なお、これらの機能部は、それぞれ、あるいは一部が異なるハードウェアに実装されてもよい。また、制御部15は、その他の機能部を備えてもよい。
The control unit 15 is realized using a CPU (Central Processing Unit), NP (Network Processor), FPGA (Field Programmable Gate Array), etc., and executes a processing program stored in memory. As a result, the control unit 15 functions as an acquisition unit 15a, an image
取得部15aは、入力部11あるいは通信制御部13を介して、後述する推論処理に用いられる処理対象の画像、画像特徴生成用パラメータ、画像特徴精製用パラメータ、予測生成用パラメータ、クエリ用パラメータ等を記憶部14から取得する。
The acquisition unit 15a acquires, via the input unit 11 or the
なお、取得部15aに代えて、後述する機能部が処理を行う際に上記のそれぞれの情報を記憶部14から取得してもよい。 In addition, instead of the acquisition unit 15a, each of the above information may be acquired from the storage unit 14 when a functional unit described below performs processing.
画像特徴生成部15bは、図5に例示するように、記憶部14から取得された画像特徴生成用パラメータと、処理対象の画像とを用いて、処理対象の画像に対して画像特徴生成用パラメータに基づいて画像特徴量を生成する。画像特徴生成部15bは、例えば、Transformer Encoderに相当する。
As shown in FIG. 5, the image
ここで、処理対象の画像は、縦×横×RGBの3次元ベクトルとして取得される。また、画像特徴生成部15bは、複数の画像に対する処理を行う場合には、画像特徴生成用パラメータは、最初の1回だけ取得すればよい。
Here, the image to be processed is acquired as a three-dimensional vector of length x width x RGB. Furthermore, when processing multiple images, the image
画像特徴精製部15cは、図5に例示するように、記憶部14から取得された画像特徴精製用パラメータに基づいて、画像特徴生成部15bが生成した画像特徴量をさらに精製する。具体的には、画像特徴精製部15cは、Transformer Encoderに相当し、メディアの特徴量間の類似度を用いてさらに特徴量を抽出する機構であるAttentionに基づいて非線形変換を行うことにより、該メディアの特徴量を精製する。
5, the image
ここで、画像特徴精製部15cは、複数の画像の画像特徴量に対する処理を行う場合には、画像特徴精製用パラメータは、最初の1回だけ取得すればよい。
Here, when the image
なお、前述の取得部15aが、精製された画像特徴量を取得して、以下に説明する予測生成部15dに転送してもよい。この場合に、取得部15aが、例えば画像等の所定のメディアに対する複数のタスクについて、メディアの特徴量と、各タスクの特徴量を表すタスク用パラメータとを取得する。
The aforementioned acquisition unit 15a may acquire refined image features and transfer them to the
予測生成部15dは、異なるタスクを横断した各タスクの特徴量を表すクエリ用パラメータの間の第1関係、およびメディアの特徴量と各タスクの特徴量を表すクエリ用パラメータとの第2関係を用いて、取得部15aで取得されたクエリ用パラメータからメディアにおける各タスクのタスク特徴量を予測する。
The
具体的には、予測生成部15dは、図5に例示するように、記憶部14から取得された予測生成用パラメータとクエリ用パラメータと、画像特徴精製部15cが精製した画像特徴量とを用いて、所望のタスクの予測を行う。
Specifically, as illustrated in FIG. 5, the
ここで、予測生成部15dは、複数の画像の画像特徴量に対する処理を行う場合には、予測生成用パラメータおよびクエリ用パラメータは、最初の1回だけ取得すればよい。
Here, when the
また、クエリ用パラメータは、図5に例示するように、複数の各タスクに対応したクエリ用パラメータが存在する。例えば、物体検出、姿勢推定の2つのタスクを推論処理の対象とする場合に、物体検出のクエリ用パラメータと、姿勢推定のクエリ用パラメータとが、予測生成部15dに入力され、画像特徴精製部15cが精製した画像特徴量から、物体検出、姿勢推定の2つのタスクの予測結果が出力される。
Furthermore, as shown in FIG. 5, there are query parameters corresponding to each of a plurality of tasks. For example, when two tasks, object detection and pose estimation, are the targets of inference processing, the query parameters for object detection and the query parameters for pose estimation are input to the
予測生成部15dは、第1関係としてクエリ用パラメータの間の類似度を用いてパラメータの変換を行い、第2関係としてメディアの特徴量とクエリ用パラメータとの間の類似度を用いてパラメータの変換を行うことを繰り返すことで、タスク特徴量を予測する。
The
すなわち、予測生成部15dは、各タスクのクエリ用パラメータの間の類似度を用いてさらに特徴量を抽出するAttention機構に基づいて各タスクのクエリ用パラメータの非線形変換を行い、メディアの特徴量と各タスクのクエリ用パラメータとの間の類似度を用いてさらに特徴量を抽出するAttention機構に基づいて各タスクのクエリ用パラメータの非線形変換を行う。予測生成部15dは、この処理を繰り返すことにより、メディアにおける各タスクのタスク特徴量を予測する。
In other words, the
具体的には、予測生成部15dは、あらかじめ学習済みのニューラルネットワークであるTransformerのDecoderであり、第1関係をSelf-Attention機構により抽出し、第2関係をCross-Attention機構により抽出する。
Specifically, the
すなわち、予測生成部15dは、TransformerのDecoderであり、Self-Attentionが異なるタスクを横断して各タスクのクエリ用パラメータの間の関係を抽出し、Cross-Attentionがタスクごとにメディアの特徴量と各タスクのクエリ用パラメータとの関係を抽出することにより、メディアにおける各タスクのタスク特徴量を予測する。
In other words, the
ここで、図6は、予測生成部の処理を説明するための図である。図6に例示するように、予測生成部15dは、予測間関係抽出部15eと画像-予測間関係抽出部15fとを含む。予測間関係抽出部15eは、例えば、Transformer DecoderのSelf-Attentionに相当し、タスクの種類や数によらず横断的に同じ処理を行う。一方、画像-予測間関係抽出部15fは、例えば、Transformer DecoderのCross-Attentionに相当し、タスクの種類によって異なる処理を行うため、タスクの数と同数の画像-予測間関係抽出部15fが並列に処理を行う。
Here, FIG. 6 is a diagram for explaining the processing of the prediction generation unit. As illustrated in FIG. 6, the
予測生成部15dには、1対の予測間関係抽出部15eと画像-予測間関係抽出部15fとのペアからなる層が所定数Lだけ存在し、各層を経るごとにクエリ用パラメータが徐々に変化し、最終的に各タスクの推論結果である予測が出力される。
The
具体的には、まず、1層目において、予測間関係抽出部15eは、予測生成用パラメータに基づいて、各クエリ用パラメータ間の関係を抽出し、抽出した関係をもとに各クエリ用パラメータを更新する(以下、更新されたクエリ用パラメータを「クエリ用パラメータ(予測)」と記す場合もある)。次に、画像-予測間関係抽出部15fが、予測生成用パラメータに基づいて、画像特徴量と各タスクの更新されたクエリ用パラメータ(予測)のとの間の関係を抽出し、抽出した関係をもとに各タスクのクエリ用パラメータを更新する。
Specifically, first, in the first layer, inter-prediction
次に、2層目において、予測間関係抽出部15eは、更新された予測生成用パラメータに基づいて、各クエリ用パラメータ(予測)の間の関係を抽出し、抽出した関係をもとに各クエリ用パラメータを更新する。次に、画像-予測間関係抽出部15fが、予測生成用パラメータに基づいて、画像特徴量と各タスクの更新されたクエリ用パラメータ(予測)との間の関係を抽出し、抽出した関係をもとに各タスクのクエリ用パラメータを更新する。
Next, in the second layer, the prediction
このように、予測間関係抽出部15eおよび画像-予測間関係抽出部15fは、同様の処理をL層まで繰り返すことにより、各タスクの推論結果である予測を出力する。このように、推論装置10によれば、メディアに対する複数のタスクの推論を効率よく実行可能となる。また、各種パラメータの学習も、複数のタスクについてまとめて行えるので、効率よく実行可能となる。
In this way, the inter-prediction
[推論処理]
次に、図7~図11を参照して、本実施形態に係る推論装置10による推論処理について説明する。図7~図11は、推論処理手順を示すフローチャートである。まず、図7には、図7のフローチャートは、例えば、ユーザが開始を指示する操作入力を行ったタイミングで開始される。
[Inference processing]
Next, the inference process performed by the inference device 10 according to this embodiment will be described with reference to Fig. 7 to Fig. 11. Fig. 7 to Fig. 11 are flowcharts showing the procedure of the inference process. First, in Fig. 7, the flowchart starts at the timing when the user performs an operation input to instruct the start of the process.
まず、取得部15aが、推論処理に用いられる処理対象の画像、画像特徴生成用パラメータ、画像特徴精製用パラメータ、予測生成用パラメータ、クエリ用パラメータ等を記憶部14から取得する。 First, the acquisition unit 15a acquires from the storage unit 14 the image to be processed, parameters for generating image features, parameters for refining image features, parameters for predictive generation, parameters for queries, etc., to be used in the inference process.
そして、画像特徴生成部15bが、画像特徴生成用パラメータと、処理対象の画像とを用いて、処理対象の画像に対して画像特徴生成用パラメータに基づいて画像特徴量を生成する(ステップS1)。
Then, the image
また、画像特徴精製部15cが、画像特徴精製用パラメータに基づいて、画像特徴生成部15bが生成した画像特徴量をさらに精製する(ステップS2)。
The image
次に、予測生成部15dが、予測生成用パラメータを用いて、精製された画像特徴量と各タスクのクエリ用パラメータとを用いて、画像における各タスクの特徴量の予測を生成し(ステップS3)、生成した予測を出力する(ステップS4)。これにより、一連の推論処理が終了する。
Next, the
次に、図8には、図7に示したステップS1の画像特徴生成部の処理手順が例示されている。まず、画像特徴生成部15bは、取得部15aあるいは記憶部14から、画像特徴生成用パラメータと処理対象の入力画像とを取得する(ステップS101~S102)。
Next, FIG. 8 illustrates the processing procedure of the image feature generation unit in step S1 shown in FIG. 7. First, the image
次に、画像特徴生成部15bは、処理対象の入力画像に対して画像特徴生成用パラメータに基づいて画像特徴量を生成する(ステップS103)。また、画像特徴生成部15bは、生成した画像特徴量を後段の画像特徴精製部15cに対して出力して(ステップS104)、一連の処理を終了する。
Next, the image
次に、図9には、図7に示したステップS2の画像特徴生成部の処理手順が例示されている。まず、画像特徴精製部15cは、取得部15aあるいは記憶部14から、画像特徴精製用パラメータを取得し(ステップS201)、画像特徴生成部15bから生成された画像特徴量を取得する(ステップS202)。
Next, FIG. 9 illustrates the processing procedure of the image feature generation unit in step S2 shown in FIG. 7. First, the image
次に、画像特徴精製部15cは、画像特徴量に対して画像特徴精製用パラメータに基づいて画像特徴量を精製する(ステップS203)。また、画像特徴生成部15bは、精製した画像特徴量を後段の予測生成部15dに対して出力して(ステップS204)、一連の処理を終了する。
Next, the image
次に、図10には、図7に示したステップS3~S4の予測生成部の処理手順が例示されている。まず、予測生成部15dは、取得部15aあるいは記憶部14から、予測生成用パラメータと、クエリ用パラメータを取得し(ステップS301~S302)、画像特徴精製部15cから精製された画像特徴量を取得する(ステップS303)。
Next, FIG. 10 illustrates the processing procedure of the prediction generation unit in steps S3 to S4 shown in FIG. 7. First, the
次に、予測生成部15dは、画像特徴量とクエリ用パラメータとに対し、予測生成用パラメータに基づいてタスクの特徴量の予測を生成する(ステップS304)。そして、予測生成部15dは、生成したタスクの予測を出力して(ステップS305)、一連の処理を終了する。
Then, the
また、図11には、図10に示したステップS304の処理の詳細な処理手順が例示されている。ステップS303の処理で画像特徴精製部15cから精製された画像特徴量を取得した後、予測生成部15dは、図6に示した1層目の処理を行う。具体的には、予測間関係抽出部15eが、各タスクのクエリ用パラメータに対して、予測生成用パラメータに基づいてクエリ用パラメータ間の関係を抽出し、抽出した関係をもとに各クエリ用パラメータを更新する(ステップS401)。次に、画像-予測間関係抽出部15fが、画像特徴量と更新された各タスクのクエリ用パラメータとの間の関係を抽出し、抽出した関係をもとにさらに各タスクのクエリ用パラメータを更新する(ステップS402)。
FIG. 11 also illustrates a detailed processing procedure for the process of step S304 shown in FIG. 10. After obtaining refined image features from the image
次に、予測生成部15dは、2層目の処理を行う。すなわち、予測間関係抽出部15eが、更新された各タスクのクエリ用パラメータに対して、予測生成用パラメータに基づいてクエリ用パラメータ間の関係を抽出し、抽出した関係をもとに各クエリ用パラメータを更新する。また、画像-予測間関係抽出部15fが、画像特徴量と更新された各タスクのクエリ用パラメータとの間の関係を抽出し、抽出した関係をもとにさらに各タスクのクエリ用パラメータを更新する。
Next, the
このように、予測生成部15dは、L層目まで同様の処理を繰り返し(ステップS403)、L層目で更新されたクエリ用パラメータを生成したタスクの予測とする(ステップS404)。その後、予測生成部15dは、生成したタスクの予測を出力して(ステップS305)、一連の処理を終了する。
In this way, the
なお、上記の処理におけるメディアは、画像に限定されない。上記のとおり、メディアとして、音声、自然言語にも同様の処理を適用可能である。その場合には、各メディアの処理を行う際に一般的な特徴量抽出を行って、モデルへの入力とすればよい。 Note that the media in the above processing is not limited to images. As mentioned above, similar processing can also be applied to speech and natural language as media. In that case, general feature extraction can be performed when processing each media, and these can be used as input to the model.
[第2の実施形態]
図12は、第2の実施形態の推論装置の処理を説明するための図である。なお以下では、上記の第1の実施形態の推論装置10の推論処理と異なる点についてのみ説明を行い、共通する点についての説明を省略する。
Second Embodiment
12 is a diagram for explaining the processing of the inference device of the second embodiment. Note that, below, only the points that are different from the inference processing of the inference device 10 of the first embodiment described above will be explained, and a description of the points in common will be omitted.
第2の本実施形態に係る推論装置10も、上記実施形態の推論装置10と同様に、タスクの数だけタスクに特化したモデルを作成して推論を行う必要がありタスクの数に応じたコストがかかっていた従来のTransformerとObject Queryとを用いる手法に対して特定の改善を提供するものであり、マルチタスクAIに係る技術分野の向上を示すものである。 The inference device 10 according to the second embodiment, like the inference device 10 according to the above embodiment, provides a specific improvement over the conventional method of using a Transformer and Object Query, which required creating task-specific models for each task and performing inference, resulting in costs according to the number of tasks, and represents an advancement in the technical field related to multitask AI.
具体的には、上記実施形態の推論装置10では、図6に示したように、予測生成部15dでは、予測間関係抽出部15eが処理を行った後に、画像-予測間関係抽出部15fが処理を行っているが、この処理順に限定されない。すなわち、図12に示すように、画像-予測間関係抽出部15fが処理を行った後に、予測間関係抽出部15eが処理を行ってもよい。
Specifically, in the inference device 10 of the above embodiment, as shown in FIG. 6, in the
この場合にも、上記実施形態の推論装置10と同様に、メディアに対する複数のタスクの推論を効率よく実行可能となる。また、各種パラメータの学習も、複数のタスクについてまとめて行えるので、効率よく実行可能となる。 In this case, as with the inference device 10 of the above embodiment, inference of multiple tasks for media can be efficiently executed. Furthermore, learning of various parameters can also be performed for multiple tasks collectively, so that it can be executed efficiently.
図13は、第2の実施形態の推論処理手順を示すフローチャーとである。図13に示すように、図11のフローチャートとは、ステップS411~S413の処理が異なる。 FIG. 13 is a flowchart showing the inference processing procedure of the second embodiment. As shown in FIG. 13, the processing of steps S411 to S413 differs from the flowchart in FIG. 11.
具体的には、ステップS303の処理で画像特徴精製部15cから精製された画像特徴量を取得した後、予測生成部15dは、図12に示した1層目の処理を行う。具体的には、画像-予測間関係抽出部15fが、画像特徴量と各タスクのクエリ用パラメータとの間の関係を抽出し、抽出した関係をもとに各クエリ用パラメータを更新する(ステップS411)。次に、予測間関係抽出部15eが、更新された各タスクのクエリ用パラメータに対して、予測生成用パラメータに基づいてクエリ用パラメータ間の関係を抽出し、抽出した関係をもとに各クエリ用パラメータを更新する(ステップS412)。
Specifically, after obtaining refined image features from image
次に、予測生成部15dは、2層目の処理を行う。すなわち、画像-予測間関係抽出部15fが、画像特徴量と更新された各タスクのクエリ用パラメータとの間の関係を抽出し、抽出した関係をもとに各タスクのクエリ用パラメータを更新する。また、予測間関係抽出部15eが、更新された各タスクのクエリ用パラメータに対して、予測生成用パラメータに基づいてクエリ用パラメータ間の関係を抽出し、抽出した関係をもとに各クエリ用パラメータを更新する。
Next, the
このように、予測生成部15dは、L層目まで同様の処理を繰り返し(ステップS413)、L層目で更新されたクエリ用パラメータを生成したタスクの予測とする(ステップS404)。その後、予測生成部15dは、生成したタスクの予測を出力して(ステップS305)、一連の処理を終了する。
In this way, the
[効果]
以上、説明したように、本実施形態の推論装置10において、取得部15aが、所定のメディアに対する複数のタスクについて、メディアの特徴量と、各タスクの特徴量を表すクエリ用パラメータとを取得する。予測生成部15dは、異なるタスクを横断した各タスクの特徴量を表すクエリ用パラメータの間の第1関係、およびメディアの特徴量と各タスクの特徴量を表すクエリ用パラメータとの第2関係を用いて、取得部15aで取得されたクエリ用パラメータからメディアにおける各タスクのタスク特徴量を予測する。
[effect]
As described above, in the inference device 10 of this embodiment, the acquisition unit 15a acquires, for a plurality of tasks for a predetermined medium, the feature amounts of the media and the query parameters representing the feature amounts of each task. The
具体的には、予測生成部15dは、第1関係としてクエリ用パラメータの間の類似度を用いてパラメータの変換を行い、第2関係としてメディアの特徴量とクエリ用パラメータとの間の類似度を用いてパラメータの変換を行うことを繰り返すことで、タスク特徴量を予測する。
Specifically, the
例えば、予測生成部15dは、あらかじめ学習済みのニューラルネットワークであるTransformerのDecoderであり、第1関係をSelf-Attention機構により抽出し、第2関係をCross-Attention機構により抽出する。
For example, the
これにより、複数のタスクの推論を効率よく実行可能となる。また、複数のタスクに対する各種パラメータの学習も、まとめて行えるので、効率よく実行可能となる。 This makes it possible to efficiently execute inference for multiple tasks. In addition, learning of various parameters for multiple tasks can also be performed simultaneously, making execution more efficient.
また、メディアは、画像、音声、自然言語のいずれかである。このように、推論装置10によれば、多様なメディアにおける複数のタスクの推論処理が効率よく実行可能となる。 The media can be images, audio, or natural language. In this way, the inference device 10 can efficiently execute inference processing for multiple tasks in a variety of media.
[実施例]
図14は、実施例を説明するための図である。本実施例では、タスクを物体検出および姿勢推定として、従来のTransformerを使ったモデルと上記実施形態の推論装置10との推論時間および学習時間を比較した。従来のTransformerを使ったモデルとして、物体検出にはDeformable DETRを用い、姿勢推定にはPETR(Position Embedding TRansformation)を用いた。また、バックボーンとしてR-50を用いた。これに対し、上記実施形態のモデルのバックボーンとして、R-50を用いた場合の他、Swin-Tを用いた場合についても比較した。
[Example]
FIG. 14 is a diagram for explaining an example. In this example, the tasks were object detection and pose estimation, and the inference time and learning time of a model using a conventional Transformer were compared with the inference device 10 of the above embodiment. As a model using a conventional Transformer, Deformable DETR was used for object detection, and PETR (Position Embedding TRansformation) was used for pose estimation. In addition, R-50 was used as the backbone. In contrast, a comparison was made between the case where R-50 was used as the backbone of the model of the above embodiment, and the case where Swin-T was used.
図14に例示するように、バックボーンが同じR-50である場合に、上記実施形態の推論装置10では、学習時間・推論時間ともに従来の70%に抑えられ、90%以上の精度を達成することが確認された。また、R-50より大きいバックボーンSwin-Tを使った場合には、推論装置10であ、従来の80%の学習時間・推論時間で、優れた精度を達成することが確認された。 As shown in FIG. 14, when the backbone is the same R-50, it was confirmed that the inference device 10 of the above embodiment reduces both the learning time and inference time to 70% of the conventional time, and achieves an accuracy of 90% or more. Furthermore, when using a backbone Swin-T that is larger than R-50, it was confirmed that the inference device 10 achieves excellent accuracy with 80% of the conventional learning time and inference time.
[プログラム]
上記実施形態に係る推論装置10が実行する処理をコンピュータが実行可能な言語で記述したプログラムを作成することもできる。一実施形態として、推論装置10は、パッケージソフトウェアやオンラインソフトウェアとして上記の推論処理を実行する推論プログラムを所望のコンピュータにインストールさせることによって実装できる。例えば、上記の推論プログラムを情報処理装置に実行させることにより、情報処理装置を推論装置10として機能させることができる。ここで言う情報処理装置には、デスクトップ型またはノート型のパーソナルコンピュータが含まれる。また、その他にも、情報処理装置にはスマートフォン、携帯電話機やPHS(Personal Handyphone System)などの移動体通信端末、さらには、PDA(Personal Digital Assistant)などのスレート端末などがその範疇に含まれる。また、推論装置10の機能を、クラウドサーバに実装してもよい。
[program]
A program in which the process executed by the inference device 10 according to the above embodiment is written in a language executable by a computer can also be created. As an embodiment, the inference device 10 can be implemented by installing an inference program that executes the above inference process as package software or online software on a desired computer. For example, the inference program can be executed by an information processing device, causing the information processing device to function as the inference device 10. The information processing device referred to here includes desktop or notebook personal computers. In addition, the information processing device also includes mobile communication terminals such as smartphones, mobile phones, and PHS (Personal Handyphone System), and even slate terminals such as PDA (Personal Digital Assistant). The functions of the inference device 10 may be implemented on a cloud server.
図15は、推論プログラムを実行するコンピュータの一例を示す図である。コンピュータ1000は、例えば、メモリ1010と、CPU1020と、ハードディスクドライブインタフェース1030と、ディスクドライブインタフェース1040と、シリアルポートインタフェース1050と、ビデオアダプタ1060と、ネットワークインタフェース1070とを有する。これらの各部は、バス1080によって接続される。
FIG. 15 is a diagram showing an example of a computer that executes an inference program. The
メモリ1010は、ROM(Read Only Memory)1011およびRAM1012を含む。ROM1011は、例えば、BIOS(Basic Input Output System)等のブートプログラムを記憶する。ハードディスクドライブインタフェース1030は、ハードディスクドライブ1031に接続される。ディスクドライブインタフェース1040は、ディスクドライブ1041に接続される。ディスクドライブ1041には、例えば、磁気ディスクや光ディスク等の着脱可能な記憶媒体が挿入される。シリアルポートインタフェース1050には、例えば、マウス1051およびキーボード1052が接続される。ビデオアダプタ1060には、例えば、ディスプレイ1061が接続される。
The
ここで、ハードディスクドライブ1031は、例えば、OS(Operating System)1091、アプリケーションプログラム1092、プログラムモジュール1093およびプログラムデータ1094を記憶する。上記実施形態で説明した各情報は、例えばハードディスクドライブ1031やメモリ1010に記憶される。
Here, the hard disk drive 1031 stores, for example, an OS (Operating System) 1091,
また、推論プログラムは、例えば、コンピュータ1000によって実行される指令が記述されたプログラムモジュール1093として、ハードディスクドライブ1031に記憶される。具体的には、上記実施形態で説明した推論装置10が実行する各処理が記述されたプログラムモジュール1093が、ハードディスクドライブ1031に記憶される。
The inference program is stored in the hard disk drive 1031, for example, as a
また、推論プログラムによる情報処理に用いられるデータは、プログラムデータ1094として、例えば、ハードディスクドライブ1031に記憶される。そして、CPU1020が、ハードディスクドライブ1031に記憶されたプログラムモジュール1093やプログラムデータ1094を必要に応じてRAM1012に読み出して、上述した各手順を実行する。
In addition, data used for information processing by the inference program is stored as
なお、推論プログラムに係るプログラムモジュール1093やプログラムデータ1094は、ハードディスクドライブ1031に記憶される場合に限られず、例えば、着脱可能な記憶媒体に記憶されて、ディスクドライブ1041等を介してCPU1020によって読み出されてもよい。あるいは、推論プログラムに係るプログラムモジュール1093やプログラムデータ1094は、LANやWAN(Wide Area Network)等のネットワークを介して接続された他のコンピュータに記憶され、ネットワークインタフェース1070を介してCPU1020によって読み出されてもよい。
The
以上の実施形態に関し、更に以下の付記を開示する。 The following notes are further provided with respect to the above embodiment.
(付記項1)
メモリと、
前記メモリに接続された少なくとも1つのプロセッサと、
を含み、
前記プロセッサは、
所定のメディアに対する複数のタスクについて、前記メディアの特徴量と、各タスクの特徴量を表すパラメータとを取得し、
異なるタスクを横断した各タスクの特徴量を表すパラメータの間の第1関係、および前記メディアの特徴量と各タスクの特徴量を表すパラメータとの第2関係を用いて、取得された前記パラメータから前記メディアにおける各タスクのタスク特徴量を予測する。
推論装置。
(Additional Note 1)
Memory,
at least one processor coupled to the memory;
Including,
The processor,
acquiring, for a plurality of tasks for a predetermined medium, a feature of the medium and a parameter representing the feature of each task;
A task feature of each task in the medium is predicted from the acquired parameters using a first relationship between parameters representing the feature of each task across different tasks and a second relationship between the feature of the medium and the parameters representing the feature of each task.
Inference device.
(付記項2)
付記項1に記載の推論装置による推論処理を実行するようにコンピュータによって実行可能なプログラムを記憶した非一時的記憶媒体。
(Additional Note 2)
A non-transitory storage medium storing a program executable by a computer to perform inference processing by the inference device described in appended claim 1.
以上、本発明者によってなされた発明を適用した実施形態について説明したが、本実施形態による本発明の開示の一部をなす記述および図面により本発明は限定されることはない。すなわち、本実施形態に基づいて当業者等によりなされる他の実施形態、実施例および運用技術等は全て本発明の範疇に含まれる。 The above describes an embodiment of the invention made by the inventor, but the present invention is not limited to the descriptions and drawings that form part of the disclosure of the present invention according to this embodiment. In other words, other embodiments, examples, operational techniques, etc. made by those skilled in the art based on this embodiment are all included in the scope of the present invention.
10 推論装置
11 入力部
12 出力部
13 通信制御部
14 記憶部
14a 画像
14b 画像特徴生成用パラメータ
14c 画像特徴精製用パラメータ
14d 予測生成用パラメータ
14e クエリ用パラメータ
15 制御部
15a 取得部
15b 画像特徴生成部
15c 画像特徴精製部
15d 予測生成部(予測部)
15e 予測間関係抽出部
15f 画像-予測間関係抽出部
REFERENCE LIST 10 Inference device 11 Input unit 12
15e Inter-prediction
Claims (6)
異なるタスクを横断した各タスクの特徴量を表すパラメータの間の第1関係、および前記メディアの特徴量と各タスクの特徴量を表すパラメータとの第2関係を用いて、前記取得部で取得された前記パラメータから前記メディアにおける各タスクのタスク特徴量を予測する予測部と、
を有することを特徴とする推論装置。 an acquisition unit that acquires, for a plurality of tasks for a predetermined medium, a feature amount of the medium and a parameter that represents the feature amount of each task;
a prediction unit that predicts a task feature of each task in the medium from the parameters acquired by the acquisition unit, using a first relationship between parameters that represent feature amounts of each task across different tasks and a second relationship between the feature amounts of the medium and parameters that represent feature amounts of each task;
An inference device comprising:
所定のメディアに対する複数のタスクについて、前記メディアの特徴量と、各タスクの特徴量を表すパラメータとを取得する取得工程と、
異なるタスクを横断した各タスクの特徴量を表すパラメータの間の第1関係、および前記メディアの特徴量と各タスクの特徴量を表すパラメータとの第2関係を用いて、前記取得工程で取得された前記パラメータから前記メディアにおける各タスクのタスク特徴量を予測する予測工程と、
を含んだことを特徴とする推論方法。 An inference method executed by an inference device, comprising:
an acquisition step of acquiring, for a plurality of tasks for a predetermined medium, a feature amount of the medium and a parameter representing a feature amount of each task;
a prediction step of predicting a task feature of each task in the medium from the parameters acquired in the acquisition step, using a first relationship between parameters representing feature amounts of each task across different tasks and a second relationship between the feature amounts of the medium and the parameters representing feature amounts of each task;
23. An inference method comprising:
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2025541172A JPWO2025041210A1 (en) | 2023-08-18 | 2023-08-18 | |
| PCT/JP2023/029898 WO2025041210A1 (en) | 2023-08-18 | 2023-08-18 | Inference device, inference method, and inference program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/JP2023/029898 WO2025041210A1 (en) | 2023-08-18 | 2023-08-18 | Inference device, inference method, and inference program |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2025041210A1 true WO2025041210A1 (en) | 2025-02-27 |
Family
ID=94731785
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/JP2023/029898 Pending WO2025041210A1 (en) | 2023-08-18 | 2023-08-18 | Inference device, inference method, and inference program |
Country Status (2)
| Country | Link |
|---|---|
| JP (1) | JPWO2025041210A1 (en) |
| WO (1) | WO2025041210A1 (en) |
-
2023
- 2023-08-18 WO PCT/JP2023/029898 patent/WO2025041210A1/en active Pending
- 2023-08-18 JP JP2025541172A patent/JPWO2025041210A1/ja active Pending
Non-Patent Citations (3)
| Title |
|---|
| RANFTL RENE; BOCHKOVSKIY ALEXEY; KOLTUN VLADLEN: "Vision Transformers for Dense Prediction", 2021 IEEE/CVF INTERNATIONAL CONFERENCE ON COMPUTER VISION (ICCV), IEEE, 10 October 2021 (2021-10-10), pages 12159 - 12168, XP034093831, DOI: 10.1109/ICCV48922.2021.01196 * |
| vol. 13, 1 January 1900, SPRINGER, article CARION NICOLAS; MASSA FRANCISCO; SYNNAEVE GABRIEL; USUNIER NICOLAS; KIRILLOV ALEXANDER; ZAGORUYKO SERGEY: "End-to-End Object Detection with Transformers", pages: 213 - 229, XP047569461, DOI: 10.1007/978-3-030-58452-8_13 * |
| XU YANGYANG; LI XIANGTAI; YUAN HAOBO; YANG YIBO; ZHANG LEFEI: "Multi-Task Learning With Multi-Query Transformer for Dense Prediction", IEEE TRANSACTIONS ON CIRCUITS AND SYSTEMS FOR VIDEO TECHNOLOGY, IEEE, USA, vol. 34, no. 2, 6 July 2023 (2023-07-06), USA, pages 1228 - 1240, XP011959532, ISSN: 1051-8215, DOI: 10.1109/TCSVT.2023.3292995 * |
Also Published As
| Publication number | Publication date |
|---|---|
| JPWO2025041210A1 (en) | 2025-02-27 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP7286013B2 (en) | Video content recognition method, apparatus, program and computer device | |
| US12548306B2 (en) | Method, device and storage medium for training model based on multi-modal data joint learning | |
| US20230229898A1 (en) | Data processing method and related device | |
| CN114970522B (en) | Pre-training method, device, equipment and storage medium of language model | |
| CN113094125B (en) | Business process processing method, device, server and storage medium | |
| JP7269972B2 (en) | Model improvement method and apparatus based on pre-trained semantic model | |
| CN116543075B (en) | Image generation method, device, electronic equipment and storage medium | |
| CN115809325B (en) | Document processing model training method, document processing method, device and equipment | |
| WO2025261111A1 (en) | Multimodal interleaved image-text generative model based on dynamic feature synchronizer | |
| CN118520912A (en) | Sparse processing method, device and electronic device for sparse attention network | |
| JP2023160198A (en) | Continuing learning devices, continuing learning methods, and continuing learning programs | |
| CN118364061A (en) | Multimodal processing method and device based on tool-enhanced large language model | |
| JP2023533404A (en) | DRIVABLE 3D CHARACTER GENERATION METHOD, APPARATUS, ELECTRONIC DEVICE, AND STORAGE MEDIUM | |
| CN116362240A (en) | Method, device, device and medium for text processing | |
| CN116976467A (en) | Multi-tasking methods, systems and computing devices based on large models | |
| Mediakov et al. | Specifics of Designing and Construction of the System for Deep Neural Networks Generation | |
| CN113919490A (en) | Inference engine adaptation method, device and electronic device | |
| US20240403636A1 (en) | Self-attention based neural networks for processing network inputs from multiple modalities | |
| US12288102B2 (en) | System and method for queuing node load in data preprocessing | |
| WO2020095655A1 (en) | Selection device and selection method | |
| CN113312555B (en) | Conversion rate prediction method, device, electronic device and storage medium | |
| CN117273069A (en) | A reasoning method, device, equipment and medium based on neural network model | |
| CN115756692A (en) | Method for automatically combining and displaying pages based on style attributes and related equipment thereof | |
| US11640428B2 (en) | Collation device, collation method, and collation program | |
| CN118394483A (en) | Task execution method and device for large model, electronic equipment and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 23949672 Country of ref document: EP Kind code of ref document: A1 |
|
| ENP | Entry into the national phase |
Ref document number: 2025541172 Country of ref document: JP Kind code of ref document: A |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 2025541172 Country of ref document: JP |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |