Online knowledge distillation system, method, device, and program for multitask learning
The multi-task neural network framework with task-specific losses and online distillation addresses performance imbalances in multi-task learning, enhancing efficiency and performance across tasks.
Patent Information
- Application Number
- JP2023118915
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2022-07-29
- Filing Date
- 2023-07-21
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2043-07-21
AI Technical Summary
Multi-task learning techniques in computer vision and image processing suffer from performance imbalances due to shared architectures, leading to decreased efficiency and performance in certain tasks, known as 'negative transfer', despite maintaining storage and speed advantages.
A method involving a multi-task neural network framework trained with task-specific losses, combining shared transformer backbones and separate task-specific heads, using online distillation and adaptive feature distillation to maintain performance across tasks.
This approach enhances the performance of multi-task neural networks while preserving storage and speed benefits, achieving performance comparable to single-task models through simultaneous training and distillation techniques.
Smart Images

Figure 0007569898000007 
Figure 0007569898000008 
Figure 0007569898000009
Abstract
Description
[Technical field]
[0001] The present disclosure relates to image processing, and more particularly, to image processing using machine learning models and multi-task neural network frameworks. [Background technology]
[0002] Multi-task learning techniques have a wide range of applications in fields related to computer vision and speech recognition. In related techniques, multi-task learning relies on branched architectures where most of the parameters are common across multiple tasks and only a few parameters are dedicated to a specific task. Multi-task learning is configured to leverage information from training data of related tasks to learn shared representations and improve generalization.
[0003] Although multi-task learning is an efficient architecture in terms of storage and speed, multi-task learning techniques perform worse than single-task models, especially in the computer vision and image processing fields. Because the underlying architecture is shared among various tasks, imbalances in task difficulty for some image processing tasks can lead to unexpected emphasis on easier image processing tasks, slowing progress or degrading performance for complex image processing tasks. If multiple tasks are learned using a shared framework that contains a large proportion of shared parameters, it can improve the performance of some tasks at the expense of degrading the performance of other tasks in the multi-task framework. Solutions proposed in the related art cannot maintain the storage and efficiency of multi-task neural network frameworks (e.g., causing increased storage requirements, reduced inference efficiency, etc.). Summary of the Invention [Problem to be solved by the invention]
[0004] Therefore, what is needed is a method, apparatus, and system for multi-task learning that preserves the storage and speed of the multi-task framework while ensuring that the performance of one task is not compromised by another task. [Means for solving the problem]
[0005] According to one aspect of the disclosure, a method of image processing using a multi-task neural network framework may be provided. The method may be executed by one or more processors and may include receiving an input image, performing an image processing task based on the input image using the multi-task neural network framework, and generating an output of the image processing task based on upsampling of an output of the multi-task neural network framework, where the multi-task neural network framework may be trained using a combination of task-specific losses, where the task-specific losses may include a plurality of first losses associated with the multi-task neural network framework and a plurality of second losses associated with a plurality of single-task neural network models.
[0006] In some embodiments, the combination of task-specific losses may be based on a plurality of task weights, where the plurality of task weights may correspond to respective task heads of the multi-task neural network framework, and a first task weight of the plurality of task weights may be based on a comparison of a first loss from a plurality of first losses to a first loss from a plurality of second losses.
[0007] In some embodiments, the combination of task-specific losses may be a linear combination of a plurality of first losses and a plurality of second losses.
[0008] In some embodiments, a multi-task neural network framework may include a shared Transformer backbone network and multiple task-specific heads.
[0009] In some embodiments, the multi-task neural network framework and multiple single-task neural network models may be trained simultaneously.
[0010] In some embodiments, the same loss function may be associated with each single-task neural network model of the multiple single-task neural network models and with a task head of the multi-task neural network framework.
[0011] In some embodiments, the image processing tasks may include tasks of semantic segmentation, depth estimation, surface normal estimation, image classification, or facial landmark localization.
[0012] In some embodiments, the image processing task may include semantic segmentation of the input image, and the method may further include generating, as an output of the image processing task, a number of class maps of the same size as the input image based on upsampling and reshaping an output of the multi-task neural network framework.
[0013] In some embodiments, the image processing task may include one of depth prediction or surface normal prediction, and the method may include generating, as an output of the image processing task, one or more reconstructed images of the same size as the input image based on upsampling and reshaping an output of the multi-tasking neural network framework.
[0014] According to one aspect of the present disclosure, an apparatus for image processing using a multi-tasking neural network framework may be provided. The apparatus may include at least one memory configured to store a program code, and at least one processor configured to read the program code and operate as instructed by the program code. The program code may include a receiving code configured to cause the at least one processor to receive an input image, an executing code configured to cause the at least one processor to perform an image processing task based on the input image using the multi-tasking neural network framework, and a generating code configured to cause the at least one processor to generate an output of the image processing task based on upsampling of an output of the multi-tasking neural network framework, where the multi-tasking neural network framework is trained using a combination of task-specific losses, and the task-specific losses may include a plurality of first losses associated with a plurality of task heads of the multi-tasking neural network framework and a plurality of second losses associated with a plurality of single-tasking neural network models.
[0015] According to one aspect of the present disclosure, a non-transitory computer-readable medium may be provided that stores instructions for image processing using a multi-tasking neural network framework, which may include one or more instructions that, when executed by one or more processors, may cause the one or more processors to receive an input image, perform an image processing task based on the input image using a multi-tasking neural network framework, and generate an output of the image processing task based on upsampling an output of the multi-tasking neural network framework, where the multi-tasking neural network framework is trained using a combination of task-specific losses, where the task-specific losses may include a plurality of first losses associated with a plurality of task heads of the multi-tasking neural network framework and a plurality of second losses associated with a plurality of single-tasking neural network models.
[0016] According to one aspect of the disclosure, a non-transitory computer-readable medium storing instructions for training a multi-tasking neural network framework for image processing, the instructions including one or more instructions that, when executed by one or more processors, cause the one or more processors to train the multi-tasking neural network framework using a plurality of single-tasking neural network models, the training may include determining a plurality of first losses associated with a plurality of task heads of the multi-tasking neural network framework, determining a plurality of second losses associated with the plurality of single-tasking neural network models, and training the multi-tasking neural network framework based on a combination of the plurality of first losses and the plurality of second losses. In some embodiments, the combination of the plurality of first losses and the plurality of second losses may be based on a plurality of task weights, the plurality of task weights corresponding to respective task heads of the multi-tasking neural network framework, and a first task weight of the plurality of task weights based on a comparison of a first loss from the plurality of first losses and a first loss from the plurality of second losses.
[0017] Features, advantages, and significance of exemplary embodiments of the present disclosure will now be described with reference to the accompanying drawings, in which like reference numerals refer to like elements, and in which: [Brief description of the drawings]
[0018] [Figure 1] FIG. 1 is an exemplary diagram of a neural network framework for image processing in which systems and / or methods described in this disclosure may be implemented. [Diagram 2] 1 is an exemplary flowchart illustrating an exemplary process of image processing using a multi-task neural network framework, according to an embodiment of the present disclosure. [Diagram 3]1 is an exemplary flowchart illustrating an exemplary process of image processing using a multi-task neural network framework, according to an embodiment of the present disclosure. [Figure 4] FIG. 1 is an exemplary block diagram of an image processing system using a multi-task neural network framework, in accordance with an embodiment of the present disclosure; [Diagram 5] FIG. 1 is an exemplary block diagram of an image processing system using a multi-task neural network framework, in accordance with an embodiment of the present disclosure; [Figure 6] FIG. 2 is a diagram of an example environment in which the neural network framework of FIG. 1 may be implemented, according to one embodiment of the present disclosure. [Figure 7] FIG. 2 is a diagram of example components of one or more devices that may implement the neural network framework of FIG. 1, in accordance with one embodiment of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0019] The following detailed description of the example embodiments makes reference to the accompanying drawings, in which the same reference numbers in different drawings may identify the same or similar elements.
[0020] The foregoing disclosure provides illustration and description, and is not intended to be exhaustive or to limit the implementation to the precise form disclosed. Modifications and variations are possible in light of the above disclosure or may be acquired from practice of the implementations.
[0021] As mentioned above, although multi-task learning is an efficient architecture in terms of storage and speed, multi-task learning techniques perform worse than single-task models, especially in the fields of computer vision and image processing. Having multiple tasks trained using a shared framework that contains a large proportion of shared parameters can lead to improved performance in some tasks at the expense of degrading the performance of other tasks in the multi-task framework. The problem that improved performance in one task can lead to degraded performance in another task may be known as "negative transfer". Some of the techniques in the related art may include task weighting, feature fusion, feature selection, and knowledge distillation.
[0022] Vision Transformers (ViT) may be used for many image processing tasks, such as image classification, object detection, and pixel-wise prediction problems, such as depth estimation and semantic segmentation. According to an embodiment of the present disclosure, a ViT-based multi-task learning architecture with a shared backbone and task-specific heads may be used to learn multiple tasks simultaneously. In addition to using a ViT-based architecture, an embodiment of the present disclosure may use online distillation. Online distillation may include simultaneously training a multi-task neural network framework and a single-task neural network model, where the multi-task neural network framework learns or distills knowledge from each single-task neural network model. Online distillation may be used to train the multi-task models, leading to reduced inference time and memory requirements while achieving comparable performance to single-task neural network models.
[0023] According to an embodiment of the present disclosure, online distillation may include adaptive feature distillation and / or online task weighting. The online task weighting scheme may include simultaneously training a multi-task neural network framework and multiple single-task neural network models using a combination of task-specific losses from the multi-task neural network framework and multiple single-task neural network models, and distilling features from the multiple single-task neural network models into the multi-task neural network framework. In some embodiments, online training may include that the multi-task neural network framework and the single-task neural network may be trained simultaneously, and feature extraction may occur at every training iteration.
[0024] By simultaneously training the multitasking neural network framework and the single-tasking neural network model and using task-specific losses from both the multitasking neural network framework and the single-tasking neural network model, the performance of the task head from the multitasking neural network framework can be monitored along with the performance of each single-tasking neural network model. By combining and possibly monitoring the task heads from the multitasking neural network framework and each single-tasking neural network model in parallel, the difference in performance of the task head from the multitasking neural network framework can be understood compared to the performance of each single-tasking neural network model. The online task weighting technique described herein allows the multitasking neural network to be trained with similar computational and memory requirements as the single-tasking neural network models, improving the performance of the multitasking neural network framework while maintaining memory and storage efficiency.
[0025] In some embodiments of the present disclosure, online distillation may include adaptive feature distillation. Adaptive feature distillation may include selectively distilling feature knowledge (e.g., intermediate feature representations) from a single-task neural network model into a multi-task neural network framework during training of the multi-task neural network framework. Adaptive feature distillation may allow task heads from the multi-task neural network framework to use matched intermediate features of the single-task neural network model when the performance of the task heads from the multi-task neural network framework is lower than the performance of the respective single-task neural network models.
[0026] In some embodiments, during training of the multi-task neural network framework, training using adaptive feature distillation and / or an online weighting scheme may be performed to improve the performance of the multi-task neural network framework. By performing adaptive feature distillation during training of the multi-task neural network framework and / or training the multi-task neural network framework using an online weighting scheme, the storage reduction and speedup advantages of multi-task learning are preserved along with the performance improvement of the multi-task neural network framework.
[0027] According to one embodiment, the multi-task neural network framework may consist of a shared Vision Transformer (ViT) backbone and multiple separate heads for N image processing tasks. The architecture may also consist of a single-task neural network model with a single head and a ViT backbone. The ViT backbone may be specialized for one task. In one embodiment, online distillation is performed on N tThe method may include a training strategy for simultaneously training a single-task neural network model (STL) and a multi-task neural network framework (MTL) for the tasks. The single-task neural network model may guide the optimization of the multi-task network through the training process. The weights of the multi-task network may be linked to the single-task neural network model through a distillation loss on the intermediate features. The end-to-end model may minimize the following loss function:
number
[0028] In formula (1), L i STL denotes the task-specific loss of the i-th single-task neural network model, and L i MTL is the task-specific loss of the i-th head in the multitask neural network framework, and L AFD denotes the adaptive knowledge distillation loss between the features of the single-task network and the features of the multi-task network. The loss weight λ i (i=1,2...N t ) may be calculated for each training iteration of each task based on the loss values of the single-task neural network model and the losses of each head of the multi-task neural network framework.
[0029] In some embodiments, a pre-trained ViT model may be used as the backbone of all models. The multi-task neural network framework may consist of a shared backbone with N heads, and each single-task neural network model may have an independent backbone network and one head. In some embodiments, the input image may be divided into P patches of 16×16 pixels. Each patch may be mapped through a patch embedding network and passed to the ViT encoder. After dividing an image of size W×H into patches, the size of the patch grid is W / 16 to W. patch ×H / 16~H patch The patches can be fed into a linear embedding network, N patch =W patch ×H patch The embeddings may be input to the Transformer Encoder in both the single-task neural network model and the multi-task neural network framework.
[0030] As mentioned above, a known challenge in multi-task learning is "negative transfer". To mitigate this problem, online knowledge distillation may be used. The single-task neural network model and the multi-task neural network framework may be optimized during the training phase. At each iteration, knowledge of the features of the single-task Transformer encoder may be distilled into features of the multi-task model. In some embodiments, online distillation may include adaptive feature distillation (AFD) and / or online task weighting (OTW).
[0031] The adaptive feature distillation may include sharing intermediate features of the backbone model. The online weighted knowledge distillation on the intermediate features is from a shared backbone of the multitask neural network framework (MTL). Let L be the number of layers of the shared transformer encoder, w l iLet L be the learnable parameter of the ith task in the lth layer. AFD can be defined as follows:
number
[0032] In the formula, f MTL (l) can be the feature extracted from the lth layer of the shared MTL backbone, and f i STL (l) can be the l-th layer feature from the ith single-task neural network model. The degree of consistency of each task's STL features to the MTL features is determined by the parameter w l i The AFD function may ensure that the feature space of the MTL network is aligned with that of the STL network. Direct implementation of the above training scheme may negatively affect the performance of the STL network, since its parameters would be affected by those of the MTL network. To avoid such negative effects, gradients from the AFD function may be prohibited from backpropagating to the STL network. In one embodiment, while computing the AFD loss, a single task intermediate feature (e.g., tensor) f i STL (l) may be decoupled from the computational graph of each single-task neural network model.
[0033] The online task weighting may include using task-specific weights during simultaneous training of the single-task neural network model and the multi-task neural network framework. The multi-task neural network may be trained using a linear combination of task-specific losses, and the task-specific weights may be based on the performance of the multi-task model relative to the single-task neural network model.
number
[0034] Let the loss of the multitask model at any iteration t be L i MTL (t), the single-task loss of the i-th image processing task is L i STL Let (t) be the task-specific weight for the ith task at iteration t. The task-specific weight for the ith task at iteration t can be computed as a “temperature” scaled softmax function of the ratio of the multitasking loss to the single-tasking loss:
[0035] According to an embodiment, tasks for which the multitasking loss is larger than the corresponding single-tasking loss may be given a higher weight. τ may represent a temperature that controls the softness of the task weighting. Increasing τ may result in a more even distribution between the various tasks. The coefficient N t (Number of tasks) is
number
[0036] According to one embodiment, in case of simultaneous training, a task-specific loss function may be used for each image processing task. The image processing tasks may include semantic segmentation, depth prediction, and surface loss prediction, and the same loss function may be used for a particular task across both the single-task neural network for this particular task and the task head for that particular task in the multi-task neural network framework. Thus, in some embodiments, the same loss function may be used for each task in the multi-task neural network and its corresponding single-task neural network model.
[0037] As an example, in some embodiments, cross-entropy loss may be used for semantic segmentation, SILogloss may be used for depth estimation, and cosine similarity loss may be used for surface normal estimation. As an example, if a first task is semantic segmentation, a second task is depth prediction, and a third task is surface normal prediction, then the losses may be defined as follows, respectively:
number
[0038] In formulas (5) to (7), N p may be the number of pixels, and for pixel p,
number
[0039] As part of visual scene understanding, multiple classification and regression tasks may be considered. As an example, for classification tasks such as semantic segmentation, a mask transformer architecture may be used. Let E be the embedding size of the patches and tokens passed to the transformer layer. (N patch The patches extracted from the backbone of the ViT encoder (which has dimensions N × E) can be passed to the classification head of a multitask neural network framework. CLS ×E-dimensional class queries can be introduced with patch embedding and passed to a two-layer transformer encoder. CLS ) may be taken as the number of classes in the classification task. A scalar product of the class query and the patch embedding may be computed (with output dimension N patch ×N CLS ) The output may then be upsampled and reshaped to fit the image size. Also, N CLS A class map may be obtained. In some embodiments, the pixel labels areCLS It may be estimated as the argmax (maximum set of points) of the class map.
[0040] As another example, depth prediction and surface normal prediction can be formulated as regression tasks. reg (empirically set to 128) to the regression head of the multitask neural network framework, and patch Let be the number of query embeddings passed along with the embedding. The scalar product of the query and patch is computed (with output dimension N patch ×N reg ), may be passed to the MLP block and / or layer. In the MLP block, a series of linear layers may be used, with the output dimension of the last linear layer depending on the image processing task. Let the output dimension of the depth prediction be N patch × 1, and the output dimension of the surface normal prediction is N patch The output may then be upsampled and reshaped to the image size.
[0041] FIG. 1 is an exemplary schematic diagram of a neural network framework 100 for image processing in which systems and / or methods described in this disclosure may be implemented.
[0042] As seen in FIG. 1 , the framework 100 may include a multi-task neural network and multiple single-task neural networks. The multi-task neural network (also referred to as a multi-task neural network framework) may include a shared Transformer backbone network and multiple task-specific heads. As an example, the multi-task neural network of the framework 100 may include a shared backbone of a multi-task Transformer Encoder 120 and task-specific heads for multiple tasks (e.g., task 1 head 115-1, task 2 head 115-2, and task 3 head 115-2). The framework 100 may include multiple single-task neural network models. The multiple single-task neural network models may correspond to each task head of the multi-task neural network framework and may include single-task Transformer Encoders (e.g., task 1 single-task Transformer Encoder 105-1, task 2 single-task Transformer Encoder 105-2, and task 3 single-task Transformer Encoder 105-3). Additionally, the single-task neural network model may have respective task-specific heads (eg, task 1 head 110-1, task 2 head 110-2, and task 3 head 110-3).
[0043] The image processing tasks performed by the task heads of the multi-task neural network may correspond to the image processing tasks performed by the individual task heads of the single-task neural network model. Thus, task 1 head 115-1 and task 1 head 110-1 may perform the same image processing task. As an example, task 1 head 115-1 and task 1 head 110-1 may perform a first image processing task of semantic segmentation, task 2 head 115-2 and task 2 head 110-2 may perform a second image processing task of depth prediction, and task 3 head 115-3 and task 3 head 110-3 may perform a third image processing task of surface normal prediction.
[0044] The intermediate features 125 may be intermediate features of a Transformer encoder layer of the backbone of the multi-task Transformer encoder 120. The intermediate features 135-1, 135-2, and 135-3 may be intermediate features of the Transformer encoder layers of the single-task Transformer encoders 105-1, 105-2, and 105-3, respectively.
[0045] An adaptive feature distillation function (AFD) 101 may be used to train a multi-task neural network based on a combination of task-specific losses with online task weighting. The task-specific loss may be a loss function used to train a neural network for a particular task. As an example, for a first image processing task of semantic segmentation, a task-specific loss function may be used for semantic segmentation. In an embodiment, the same task-specific loss function may be used in training both the semantic segmentation task of the task head of the multi-task neural network and the semantic segmentation of the single-task neural network model. As another example, for a second image processing task of depth prediction, a task-specific loss function may be used for depth prediction in training both the depth prediction task of the task head of the multi-task neural network and the depth prediction of the single-task neural network model.
[0046] The combination of task-specific losses, also referred to as online task weighting or online task weighting scheme, may include a plurality of first losses associated with the multi-task neural network framework and a plurality of second losses associated with the plurality of single-task neural network models. The plurality of first losses may include a first loss corresponding to each task head in the multi-task neural network framework. As an example, the plurality of first losses may include a L-loss associated with a semantic segmentation task and task 1 head 115-1. 1MTL ,L related to depth prediction task and task 2 head 115-2 2 MTL , and L related to the surface normal prediction task and Task 3 Head 115-3 3 MTL The multiple second losses associated with the multiple single-task neural network models may include a loss corresponding to each single-task neural network model. As an example, the multiple second losses may include a loss associated with a semantic segmentation task and task 1 head 110-1, 1 STL , L related to the depth prediction task and task 2 head 110-2 2 STL , and L associated with the surface normal prediction task and task 3 head 110-3 3 STL may include:
[0047] In some embodiments, the combination of task-specific losses may be based on multiple task weights, which may correspond to respective task heads in the multi-task neural network framework. As an example, a task weight λ i is the i-th loss function L associated with the i-th task head in the multitask neural network framework. i MTL In some embodiments, the combination of task-specific losses may be a linear combination of a plurality of first losses and a plurality of second losses.
[0048] In an embodiment, the task weights may be based on a comparison of the first losses to the second losses. The i-th task weight may be the i-th first loss L associated with the i-th task head of the multitask neural network framework. i MTL and the i-th second loss L associated with the i-th single-task neural network framework. i MTLAs an example, a first task weight (e.g., associated with a semantic segmentation task) of the plurality of task weights may be based on a comparison of a first loss (associated with the semantic segmentation task head) from the plurality of first losses to a first loss (associated with the semantic segmentation task) from the plurality of second losses.
[0049] In some embodiments, the same loss function may be associated with the task heads of the multi-task neural network framework and each and / or corresponding single-task neural network of the multiple single-task neural network models. As an example, a first task-specific loss function may be used to train task 1 head 115-1 and task 1 head 110-1, a second task-specific loss function may be used to train task 2 head 115-2 and task 2 head 110-2, and a third task-specific loss function may be used to train task 3 head 115-3 and task 3 head 110-3.
[0050] Although the online task weighting using the adaptive distillation function 101 improves the performance of the multi-task neural network by comparing the performance of the multi-task neural network for a particular task with the single-task neural network model associated with that task, propagating the loss based on the task-specific combination loss to the single-task neural network may negatively affect the performance of the single-task neural network due to the parameters of the single-task neural network being affected by the parameters of the multi-task neural network. To avoid performance degradation of the single-task neural network, gradients from the loss based on the task-specific combination may be prohibited from being back-propagated to the single-task neural network. In one embodiment, while computing the adaptive feature distillation loss, the gradients may be prohibited from being back-propagated to the single-task neural network by decoupling the single-task intermediate feature representations (e.g., tensors) from the computation graph.
[0051] In some embodiments, a multi-task neural network framework may be trained using the adaptive feature distillation function 101. Training a multi-task neural network framework with the adaptive feature distillation function 101 is described in more detail in FIG.
[0052] FIG. 2 is an example flow chart illustrating an example process 200 for image processing using a multi-task neural network framework.
[0053] As seen in FIG. 2, process 200 may include operations 205-215. In operation 205, one or more input images may be received. The input images may be in any suitable format (e.g., JPEG, MPEG, etc.) and may be encoded using any suitable codec. In some embodiments, the input images may be of a predetermined size. In some embodiments, the input images may be pre-processed and one or more image patches may be generated based on the input images. In some embodiments, the one or more image patches may be of a predetermined size based on the input images.
[0054] In operation 210, image processing tasks may be performed based on the input image using the multi-task neural network framework. The image processing tasks may include any of semantic segmentation, depth estimation, surface normal estimation, image classification, or facial landmark localization. In some embodiments, a first image processing task performed by a first head of the multi-task neural network framework may include a semantic segmentation task. As an example, a second image processing task performed by a second head of the multi-task neural network framework may include a depth prediction task, and a third image processing task performed by a third head of the multi-task neural network framework may include a surface normal prediction task.
[0055] In some embodiments, a combination of task-specific losses may be used to train the multi-task neural network framework. In some embodiments, the task-specific losses may include a number of first losses associated with the multi-task neural network framework and a number of second losses associated with a number of single-task neural network models. As an example, the task-specific losses may include L losses associated with task heads task 1 head 115-1, task 2 head 115-2, and task 3 head 115-3 of the multi-task neural network framework, respectively. 1 MTL, L 2 MTL , and L 3 MTL In addition, the task-specific losses may include L 1 STL , L 2 STL , and L 3 STL may also include.
[0056] In some embodiments, the combination of task-specific losses may be a linear combination of the first losses and the second losses, and in some embodiments, the combination may be based on any suitable function.
[0057] According to one embodiment, the combination of task-specific losses may be based on multiple task weights, which correspond to respective task heads in the multi-task neural network framework. As an example, a task weight λ i is the i-th loss function L associated with the i-th task head in the multitask neural network framework. i MTL may be used.
[0058] In an embodiment, the task weights may be based on a comparison of the first losses to the second losses. The i-th task weight may be the i-th first loss L associated with the i-th task head of the multitask neural network framework. i MTL and the i-th second loss L associated with the i-th single-task neural network framework. i STLAs an example, a first task weight (e.g., associated with a semantic segmentation task) of the plurality of task weights may be based on a comparison of a first loss (associated with the semantic segmentation task head) from the plurality of first losses to a first loss (associated with the semantic segmentation task) from the plurality of second losses.
[0059] In some embodiments, a multi-task neural network may be trained using the online task weighting scheme described herein to improve the performance of the multi-task neural network framework. By performing adaptive feature distillation during training of the multi-task neural network framework and / or training the multi-task neural network framework using the online weighting scheme, the storage reduction and speedup advantages of multi-task learning are preserved along with the performance improvement of the multi-task neural network framework.
[0060] At operation 215, an output of the image processing task may be generated based on upsampling the output of the multi-tasking neural network framework. In some embodiments, the output of the multi-tasking neural network framework may be a scalar product, which may then be upsampled and processed to generate the output of the image processing task.
[0061] As an example, for a semantic segmentation image processing task, the class query and patch embeddings may be input to a multi-task neural network framework and / or a transformer encoder of the multi-task neural network framework. The output of the multi-task neural network framework and / or a classification head of the multi-task neural network framework may be a scalar product based on the class query and the patch embeddings. The scalar product may then be upsampled and reshaped to the image size to obtain class maps, each of which is the same size as the input image.
[0062] As another example, for a depth prediction task or a surface normal prediction task, the query embeddings and the patch embeddings may be input to a multi-task neural network framework. The output of the multi-task neural network framework and / or the regression head of the multi-task neural network framework may be a scalar product based on the query embedding and the patch embedding. The scalar product may then be passed through an MLP block and upsampled and / or resized. The MLP block may have an output dimension of the final linear layer based on the image processing task.
[0063] 3 is an example flow chart describing an example process 300 for training a multi-task neural network framework using online task weighting. According to an embodiment, the process 300 may be repeated for selective training iterations or for each training iteration.
[0064] In operation 305, a plurality of first losses associated with the multi-task neural network framework may be determined. The plurality of first losses may include a first loss corresponding to each task head in the multi-task neural network framework. As an example, the plurality of first losses may include a L loss associated with a semantic segmentation task and task 1 head 115-1. 1 MTL ,L related to depth prediction task and task 2 head 115-2 2 MTL , and L related to the surface normal prediction task and Task 3 Head 115-3 3 MTL may include:
[0065] In operation 310, a plurality of second losses associated with the multi-task neural network framework may be determined. The plurality of second losses associated with the plurality of single-task neural network models may include a loss corresponding to each single-task neural network model. As an example, the plurality of second losses may include a L associated with a semantic segmentation task and task 1 head 110-1. 1 STL , L related to the depth prediction task and task 2 head 110-2 2 STL , and L associated with the surface normal prediction task and task 3 head 110-3 3 STL may include:
[0066] In operation 315, a plurality of task weights may be determined based on a comparison of the plurality of first losses to the plurality of second losses. The i-th task weight may be determined based on the i-th first loss L associated with the i-th task head of the multitasking neural network framework. i MTL and the i-th second loss L associated with the i-th single-task neural network framework. i STLAs an example, a second task weight (e.g., related to a depth prediction task) of the plurality of task weights may be determined based on a comparison of a second loss (related to a depth prediction task head) from the plurality of first losses and a second loss (related to a depth prediction task) from the plurality of second losses.
[0067] At operation 320, a combination of task-specific losses may be determined based on the multiple task weights. In some embodiments, the combination of task-specific losses may be a linear combination of multiple first losses and multiple second losses.
[0068] Based on the combination of task-specific losses, a multi-task neural network framework may be trained. In some embodiments, directly implementing the above online task weighting scheme may negatively affect the performance of the single-task neural network because the parameters of the single-task neural network are affected by the parameters of the multi-task neural network. To avoid such negative effects, the gradient of the combination of task-specific losses may be prohibited from being backpropagated to the single-task neural network. In one embodiment, while computing the adaptive feature distillation loss, the single-task intermediate features (e.g., tensors) may be decoupled from the computation graph of each single-task neural network model.
[0069] In some embodiments, the single-task neural network model may be used only for training the multi-task neural network framework, and only the multi-task neural network framework may be used for inference. This allows the multi-task neural network framework to obtain similar computational and memory requirements during inference as the single-task neural network model. Thus, adaptive feature distillation improves the performance of the multi-task neural network framework while maintaining memory and storage efficiency.
[0070] FIG. 4 shows a block diagram illustrating an exemplary process of image processing using a classification head 400 in a multi-task neural network framework.
[0071] For classification tasks such as semantic segmentation of an input image, a suitable Transformer architecture may be used, e.g., ViT, ViT-tiny, or Mask architecture. Image patches and patch sizes may be input to the multi-task neural network. Patch embeddings 405 extracted from a Transformer Encoder backbone (e.g., multi-task Transformer Encoder 120) may be passed to the classification head Transformer layers 410-415 of the multi-task neural network framework. In some embodiments, the dimension of the patch embedding is N patch ×E. For classification tasks, (dimension N CLS The class query (of output dimension N patch ×N CLS The output may then be upsampled and reshaped (425) to the image size to generate a reconstructed image, and N CLS A class map may be obtained. In some embodiments, pixel labels are CLS It may be estimated as the argmax of the class map.
[0072] FIG. 5 is an example block diagram illustrating an example process for image processing using a regression head 500 in a multi-task neural network framework.
[0073] For regression tasks such as depth prediction and surface normal prediction of an input image, a suitable Transformer architecture may be used, e.g., ViT, ViT-tiny, or Mask architecture. Image patches and the size of the patches may be input to a multi-task neural network. Patch embeddings 505 extracted from a Transformer Encoder backbone (e.g., multi-task Transformer Encoder 120) may be passed to regression head Transformer layers 510-515 of the multi-task neural network framework. In some embodiments, the dimension of the patch embedding is N patch For regression tasks, multiple query embeddings (N reg ), together with the patch embedding, may be passed to the regression head transformer layers 510-515 of the multitask neural network framework. The scalar product 530 (output dimension, N patch ×N reg ) may be computed based on the query embedding and the patch embedding. The scalar product may be passed through an MLP block 525 and one or more upsampling and reshaping layers 535. In the MLP block 525, a series of linear layers may be used, and the output dimension of the final linear layer is based on the image processing task. As an example, the output dimension of depth prediction is N patch × 1, and the output dimension of the surface normal prediction is N patch × 3. The output may then be upsampled and reshaped to produce a reconstructed image of the same size as the input image.
[0074] FIG. 6 illustrates an example environment for implementing one or more of the devices, operations, neural networks, and / or frameworks of FIGS. 1-5.
[0075] As shown in Figure 6, environment 600 may include user device 110, platform 620, and network 630. The devices of environment 600 may be interconnected via wired connections, wireless connections, or a combination of wired and wireless connections. In an embodiment, any of the functions of the elements included in network infrastructure 100 may be performed by any combination of the elements shown in Figure 6. For example, in an embodiment, user device 110 may perform one or more functions associated with a personal computing device, and platform 620 may perform one or more functions associated with any of network elements 115.
[0076] User device 110 may include one or more devices capable of receiving, generating, storing, processing, and / or providing information related to platform 620. For example, user device 110 may include a computing device (e.g., a desktop computer, a laptop computer, a tablet computer, a handheld computer, a smart speaker, a server, etc.), a mobile phone (e.g., a smartphone, a wireless phone, etc.), a wearable device (e.g., smart glasses or a smart watch), or a similar device. In some embodiments, user device 110 may receive and / or transmit information to platform 620.
[0077] Platform 620 may include one or more devices capable of receiving, generating, storing, processing, and / or distributing information. In some embodiments, platform 620 may include a cloud server or a collection of cloud servers. In some implementations, platform 620 may be designed in a modular manner such that certain software components may be swapped out according to specific needs. Thus, platform 620 may be easily and / or quickly reconfigured for different applications.
[0078] In some implementations, as shown, platform 620 may be hosted in a cloud computing environment 622. It is worth noting that while implementations described herein describe platform 620 as being hosted in a cloud computing environment 622, in some implementations platform 620 may not be cloud-based (i.e., may be implemented outside of a cloud computing environment) or may be partially cloud-based.
[0079] Cloud computing environment 622 includes an environment that hosts platform 620. Cloud computing environment 622 may provide services, such as computing, software, data access, storage, etc., without requiring end-user (e.g., user device 110) knowledge of the physical location and configuration of the system(s) and / or device(s) that host platform 620. As shown, cloud computing environment 622 may include computing resources 624 (collectively referred to as “computing resources 624” and individually referred to as “computing resources 624”).
[0080] Computing resources 624 may include one or more personal computers, clusters of computing devices, workstation computers, server devices, or other types of computing and / or communications devices. In some implementations, computing resources 624 may host platform 620. Cloud resources may include compute instances running on computing resources 624, storage devices provided on computing resources 624, data transfer devices provided by computing resources 624, etc. In some embodiments, computing resources 624 may communicate with other computing resources 624 via wired connections, wireless connections, or a combination of wired and wireless connections.
[0081] As further shown in FIG. 6, computing resources 624 include cloud resources such as one or more applications (“APP”) 624-1, one or more virtual machines (“VM”) 624-2, virtualized storage (“VS”) 624-3, and one or more hypervisors (“HYP”) 624-4.
[0082] Applications 624-1 include one or more software applications that may be provided to or accessed by user device 110 or network element 115. Applications 624-1 may eliminate the need to install and run software applications on user device 110 or network element 115. For example, applications 624-1 may include software associated with platform 620 and / or any other software that may be provided via cloud computing environment 622. In some implementations, one application 624-1 may send / receive information to / from one or more other applications 624-1 via virtual machine 624-2.
[0083] The virtual machine 624-2 includes a software implementation of a machine (e.g., a computer) that executes programs like a physical machine. The virtual machine 624-2 may be either a system virtual machine or a process virtual machine, depending on the application and the degree to which the virtual machine 624-2 corresponds to any real machine. A system virtual machine can provide a complete system platform that supports the execution of a complete operating system ("OS"). A process virtual machine can execute a single program and support a single process. In some implementations, the virtual machine 624-2 may run on behalf of a user (e.g., the user device 110) and manage the infrastructure of the cloud computing environment 622, such as data management, synchronization, or long-term data transfer.
[0084] Virtualized storage 624-3 includes one or more storage systems and / or one or more devices that use virtualization techniques within the storage systems or devices of computing resources 624. In some implementations, in the context of storage systems, types of virtualization may include block virtualization and file virtualization. Block virtualization may refer to the abstraction (or separation) of logical storage from physical storage such that the storage system may be accessed without regard to the physical storage or heterogeneous structure. This separation allows storage system administrators flexibility in how they manage storage for end users. File virtualization may remove the dependency of data accessed at the file level on where the file is physically stored. This may enable optimization of storage usage, server consolidation, and / or performance of non-disruptive file migration.
[0085] The hypervisor 624-4 may provide hardware virtualization technology that allows multiple operating systems (e.g., "guest operating systems") to run simultaneously on a host computer, such as computing resource 624. The hypervisor 624-4 may provide a virtual operating platform for the guest operating systems and may manage the execution of the guest operating systems. Multiple instances of different operating systems may share virtualized hardware resources.
[0086] Network 630 may include one or more wired and / or wireless networks. For example, network 630 may include a cellular network (e.g., a fifth generation (5G) network, a long term evolution (LTE) network, a third generation (3G) network, a code division multiple access (CDMA) network, etc.), a public land mobile network (PLMN), a local area network (LAN), a wide area network (WAN), a metropolitan area network (MAN), a telephone network (e.g., a public switched telephone network (PSTN)), a private network, an ad-hoc network, an intranet, the Internet, a fiber optic based network, etc., and / or combinations of these or other types of networks.
[0087] The number and arrangement of devices and networks shown in Figure 6 are provided as an example. In practice, there may be more, fewer, different, or differently arranged devices and / or networks than those shown in Figure 6. Furthermore, two or more of the devices shown in Figure 6 may be implemented within a single device, or a single device shown in Figure 6 may be implemented as multiple distributed devices. Additionally or alternatively, a set of devices (e.g., one or more devices) of environment 600 may perform one or more functions described as being performed by another set of devices of environment 600.
[0088] FIG. 7 is a diagram of example components of one or more devices of FIG. 6 that implement one or more of the devices, operations, neural networks, and / or frameworks of FIGS. 1-5.
[0089] 7 is a diagram of example components of a user device 110. The user device 110 may correspond to a device associated with an authorized user, a cell operator, or an RF engineer. The user device 110 may be used to communicate with a cloud platform 620 via a network element 115. As shown in FIG. 7, the user device 110 may include a bus 710, a processor 720, a memory 730, a storage component 740, an input component 750, an output component 760, and a communication interface 770.
[0090] The bus 710 may include components that enable communication between components of the user device 110. The processor 720 may be implemented in hardware, firmware, or a combination of hardware and software. The processor 720 may be a central processing unit (CPU), a graphics processing unit (GPU), an accelerated processing unit (APU), a microprocessor, a microcontroller, a digital signal processor (DSP), a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), or another type of processing component. In some implementations, the processor 720 includes one or more processors that can be programmed to perform functions. The memory 730 includes random access memory (RAM), read only memory (ROM), and / or another type of dynamic or static storage device (e.g., flash memory, magnetic memory, and / or optical memory) that stores information and / or instructions for use by the processor 720.
[0091] The storage component 740 stores information and / or software related to the operation and use of the user device 110. For example, the storage component 740 may include a hard disk (e.g., a magnetic disk, an optical disk, a magneto-optical disk, and / or a solid-state disk), a compact disk (CD), a digital versatile disk (DVD), a floppy disk, a cartridge, a magnetic tape, and / or another type of non-transitory computer-readable medium along with a corresponding drive. The input component 750 includes components that enable the user device 110 to receive information, such as via a user input (e.g., a touch screen display, a keyboard, a keypad, a mouse, a button, a switch, and / or a microphone). Additionally or alternatively, the input component 750 may include sensors that detect information (e.g., a global positioning system (GPS) component, an accelerometer, a gyroscope, and / or an actuator). The output component 760 includes components that provide output information from the user device 110 (e.g., a display, a speaker, and / or one or more light emitting diodes (LEDs)).
[0092] The communications interface 770 includes transceiver-like components (e.g., a transceiver and / or separate receivers and transmitters) that enable the user device 110 to communicate with other devices, such as via a wired connection, a wireless connection, or a combination of wired and wireless connections. The communications interface 770 may enable the user device 110 to receive information from and / or provide information to other devices. For example, the communications interface 770 may include an Ethernet interface, an optical interface, a coaxial interface, an infrared interface, a radio frequency (RF) interface, a universal serial bus (USB) interface, a Wi-Fi interface, a cellular network interface, etc.
[0093] The user device 110 may perform one or more operations described herein. The user device 110 may perform these operations in response to the processor 720 executing software instructions stored by a non-transitory computer-readable medium, such as the memory 730 and / or the storage component 740. A computer-readable medium may be defined herein as a non-transitory memory device. A memory device includes memory space within a single physical storage device or memory space spanning multiple physical storage devices.
[0094] The software instructions may be loaded into memory 730 and / or storage component 740 from another device or from another computer readable medium via communications interface 770. The software instructions stored in memory 730 and / or storage component 740, when executed, may cause processor 720 to perform one or more operations described herein.
[0095] It will be apparent that the systems and / or methods described herein may be implemented in different forms of hardware, firmware, or a combination of hardware and software. The actual dedicated control hardware or software code used to implement these systems and / or methods is not intended to limit the implementation. Thus, the operation and behavior of the systems and / or methods are described herein without reference to any specific software code. It should be understood that software and hardware may be designed to implement the systems and / or methods based on the description herein.
[0096] As is customary in the art, the embodiments may be described and illustrated in terms of blocks performing one or more described functions. These blocks, which may be referred to herein as units, modules, or the like, may be physically implemented by analog or digital circuits, such as logic gates, integrated circuits, microprocessors, microcontrollers, memory circuits, passive electronic components, active electronic components, optical components, hardwired circuits, and may be driven by firmware and software. The circuits may be embodied, for example, on one or more semiconductor chips, or on a substrate support, such as a printed circuit board. The circuits included in the blocks may be implemented by dedicated hardware, or by a processor (e.g., one or more programmed microprocessors and associated circuits), or by a combination of dedicated hardware performing some functions of the block and a processor performing other functions of the block. Each block of the embodiments may be physically separated into two or more interacting discrete blocks. Similarly, the blocks of the embodiments may be physically combined into more complex blocks.
[0097] Although particular combinations of features are recited in the claims and / or disclosed herein, these combinations are not intended to limit the disclosure of contemplated implementations. Indeed, many of these features may be combined in ways not specifically recited in the claims and / or disclosed herein. Although each dependent claim listed below may depend directly on only one claim, the disclosure of contemplated implementations includes each dependent claim in combination with every other claim in the set of claims.
[0098] No element, act, or instruction used herein should be construed as critical or essential unless expressly stated to be so. Also, as used herein, the articles "a" and "an" are intended to include one or more items and may be used interchangeably with "one or more." When only one item is intended, "one" or similar words are used. Furthermore, as used herein, terms such as "has," "have," "having," "include," "including," and the like are intended to be open-ended terms. Also, the phrase "based on" is intended to mean "based at least in part on," unless expressly stated otherwise.
Claims
1. 1. A method of image processing using a multitasking neural network framework, said method being executed by one or more processors, comprising: Receiving an input image; performing image processing tasks based on the input image using the multi-task neural network framework; and generating an output of the image processing task based on upsampling an output of the multi-task neural network framework; Including, each of a plurality of task heads in the multitasking neural network framework performs an image processing task; an image processing task executed by each of the plurality of task heads corresponds to an image processing task executed by any one of the task heads of a plurality of single-task neural network models; the multi-task neural network framework is trained using a combination of task-specific losses, the task-specific losses including a plurality of first losses associated with the multi-task neural network framework and a plurality of second losses associated with the plurality of single-task neural network models; method.
2. 2. The method of claim 1 , wherein the combination of task-specific losses is based on a plurality of task weights, the plurality of task weights corresponding to respective task heads of the multi-task neural network framework, and a first task weight of the plurality of task weights is based on a comparison of a first loss from the plurality of first losses and a first loss from the plurality of second losses.
3. The method of claim 1 , wherein the combination of task-specific losses is a linear combination of the plurality of first losses and the plurality of second losses.
4. The method of claim 1 , wherein the multi-task neural network framework includes a shared Transformer backbone network and multiple task-specific heads.
5. The method of claim 1 , wherein the multi-task neural network framework and the multiple single-task neural network models are trained simultaneously.
6. The method of claim 1 , wherein a same loss function is associated with each single-task neural network model of the plurality of single-task neural network models and with a task head of the multi-task neural network framework.
7. The method of claim 1 , wherein the image processing task comprises one of semantic segmentation, depth estimation, surface normal estimation, image classification, or facial landmark localization.
8. The image processing task comprises semantic segmentation of the input image, and the method further comprises:
2. The method of claim 1, further comprising: generating a plurality of class maps of the same size as the input image as the output of the image processing task based on upsampling and reshaping the output of the multi-task neural network framework.
9. The image processing task includes one of depth prediction or surface normal prediction, and the method further comprises: generating, as the output of the image processing task, one or more reconstructed images of the same size as the input image based on upsampling and reshaping the output of the multi-task neural network framework; The method of claim 1 further comprising:
10. 1. An apparatus for image processing using a multitasking neural network framework, the apparatus comprising: at least one memory configured to store program code; at least one processor configured to read the program code and to act as instructed by the program code; Equipped with The program code comprises: receiving code configured to cause the at least one processor to receive an input image; execution code configured to cause the at least one processor to perform image processing tasks based on the input image using the multitasking neural network framework; generation code configured to cause the at least one processor to generate an output of the image processing task based on upsampling an output of the multitasking neural network framework; and Including, each of a plurality of task heads in the multitasking neural network framework performs an image processing task; an image processing task executed by each of the plurality of task heads corresponds to an image processing task executed by any one of the task heads of a plurality of single-task neural network models; the multi-task neural network framework is trained using a combination of task-specific losses, the task-specific losses including a plurality of first losses associated with a plurality of task heads of the multi-task neural network framework and a plurality of second losses associated with the plurality of single-task neural network models; Device.
11. 11. The apparatus of claim 10, wherein the combination of task-specific losses is based on a plurality of task weights corresponding to respective task heads of the multi-task neural network framework, and a first task weight of the plurality of task weights is based on a comparison of a first loss from the plurality of first losses and a first loss from the plurality of second losses.
12. The apparatus of claim 10 , wherein the combination of task-specific losses is a linear combination of the plurality of first losses and the plurality of second losses.
13. The apparatus of claim 10 , wherein the multi-task neural network framework and the multiple single-task neural network models are trained simultaneously.
14. 11. The apparatus of claim 10, wherein a same loss function is associated with each single-task neural network model of the plurality of single-task neural network models and with a task head of the multi-task neural network framework.
15. The image processing task includes semantic segmentation of the input image, and the program code further comprises: an output generation code configured to cause the at least one processor to generate, as the output of the image processing task, a plurality of class maps, the same size as the input image, based on upsampling and reshaping the output of the multi-tasking neural network framework; The apparatus of claim 10 further comprising:
16. The image processing task includes one of depth prediction or surface normal prediction, and the program code further comprises:
11. The apparatus of claim 10, further comprising output generation code configured to cause the at least one processor to generate, as the output of the image processing task, one or more reconstructed images of the same size as the input image based on upsampling and reshaping the output of the multi-tasking neural network framework.
17. 1. A non-transitory computer readable medium storing instructions for training a multi-tasking neural network framework for image processing, the instructions including one or more instructions that, when executed by one or more processors, cause the one or more processors to: training the multi-task neural network framework using a plurality of single-task neural network models; each of a plurality of task heads in the multitasking neural network framework performs an image processing task; an image processing task executed by each of the plurality of task heads corresponds to an image processing task executed by any one of the task heads of the plurality of single-task neural network models; The training comprises: determining a plurality of first losses associated with the plurality of task heads of the multi-task neural network framework; determining a plurality of second losses associated with the plurality of single-task neural network models; training the multi-task neural network framework based on a combination of the plurality of first losses and the plurality of second losses; A non-transitory computer readable medium comprising:
18. 20. The non-transitory computer-readable medium of claim 17, wherein the combination of the plurality of first losses and the plurality of second losses is based on a plurality of task weights, the plurality of task weights corresponding to respective task heads of the multi-tasking neural network framework, and a first task weight of the plurality of task weights is based on a comparison of a first loss from the plurality of first losses and a first loss from the plurality of second losses.
19. 20. The non-transitory computer-readable medium of claim 17, wherein the combination of the plurality of first losses and the plurality of second losses is a linear combination of the plurality of first losses and the plurality of second losses.
20. 20. The non-transitory computer-readable medium of claim 17, wherein a same loss function is associated with each single-task neural network model of the plurality of single-task neural network models and a task head of the multi-task neural network framework.
Citation Information
Patent Citations
Information processing device and information processing method
JP2017211799A
Gradient regularization system and method for adaptive loss balancing in deep multitask networks
JP2021501391A
Object prediction method and device, electronic device, and storage medium
JP2021512407A
