How to determine the encoder architecture for a neural network?

The method addresses the challenge of determining a shared encoder architecture for convolutional neural networks by calculating characteristic measures and evaluating candidates, resulting in a resource-efficient solution for multiple image processing tasks, especially in limited hardware scenarios.

JP7554364B2Active Publication Date: 2024-09-19コンチネンタル·オートナマス·モビリティ·ジャーマニー·ゲゼルシャフト·ミト·ベシュレンクテル·ハフツング
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2023537026
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2021-01-26
Filing Date
2022-01-24
Publication Date
2024-09-19
Estimated Expiration
2042-01-24

AI Technical Summary

Technical Problem

Determining an encoder architecture for a shared convolutional neural network that can efficiently handle multiple image processing tasks is challenging due to high computational complexity.

Method used

A method is proposed to determine the architecture of a shared encoder by calculating characteristic measure distributions, generating multiple encoder architecture candidates, and evaluating their match with specific image processing tasks using evaluation measures, allowing for resource-efficient deployment with reduced computational complexity.

Benefits of technology

The method enables a shared encoder to handle multiple image processing tasks with reduced computational complexity, particularly suitable for limited hardware environments, saving time and resources compared to existing architecture search methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007554364000006
    Figure 0007554364000006
  • Figure 0007554364000012
    Figure 0007554364000012
  • Figure 0007554364000005
    Figure 0007554364000005
Patent Text Reader

Abstract

The present invention relates to a method for determining the architecture of an encoder (2) of a convolutional neural network (1), the neural network (1) being configured to process a number of different image processing tasks (t1, t2, t3), comprising the steps of: - for each image processing task (t1, t2, t3), a step (S10) of calculating a characteristic measure distribution based on the training data; - a step (S11) of generating a plurality of candidate encoder architectures, each candidate encoder architecture comprising at least one shared encoder layer (SL) providing computational operations related to a plurality of image processing tasks, and a plurality of branches (b1, b2, b3) providing at least partially distinct computational operations related to the image processing tasks, the plurality of branches (b1, b2, b3) spanning one or more encoder layers, each branch (b1, b2, b3) correlated with a particular image processing task (t1, t2, t3); - calculating a received field size for an encoder layer of a multiple encoder architecture (S12); - a step (S13) of calculating a plurality of evaluation measures, each of which applies to a combination of a specific encoder architecture of the plurality of encoder architectures and a specific image processing task (t1, t2, t3), and each of which includes information about the matching quality between the characteristic measure distribution of the image processing task (t1, t2, t3) correlated with the evaluation measure and the received field size of the encoder layer of the encoder architecture correlated with the evaluation measure; - a step (S14) of comparing the calculated evaluation measures and establishing a comparison result; - selecting an encoder architecture based on the comparison result (S15).
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates generally to the field of convolutional neural networks, and more particularly to a method for determining the architecture of a shared encoder for a convolutional neural network configured to handle a number of different image processing tasks. [Background technology]

[0002] Convolutional neural networks are very powerful in solving tasks based on pattern recognition (e.g., pedestrian detection, lane detection, sign recognition, etc.). Instead of implementing a separate network for each task, using a shared network, in particular a shared encoder, for multiple tasks has several advantages in terms of performance, computation and / or memory.

[0003] However, determining an encoder architecture for a shared encoder that can efficiently handle multiple tasks is not a trivial task. Summary of the Invention [Problem to be solved by the invention]

[0004] It is an object of an embodiment of the present invention to provide a method for determining the architecture or structure of a shared encoder of a convolutional neural network arranged to process a number of different image processing tasks, which results in an encoder structure with reduced computational complexity, and which encoder architecture is resource-efficient and provides high computational efficiency. [Means for solving the problem]

[0005] This problem is solved by the features of the independent claims. Preferred embodiments are given in the dependent claims. Unless expressly indicated otherwise, the embodiments of the invention can be freely combined with one another.

[0006] According to one aspect, the invention applies to a method for determining an architecture of an encoder of a convolutional neural network, in particular a shared encoder, where the neural network is configured to process a number of different image processing tasks. More specifically, the neural network may be an artificial neural network with a shared encoder, where the encoder architecture is configured to process a number of different image processing tasks. After determining the encoder architecture, the neural network is trained to enable it to process the image processing tasks. The method may be at least partially a computer-implemented method. The method comprises the following steps:

[0007] First, for each image processing task, we compute a feature measure distribution based on the training data, which indicates the size of the sub-images that should be fed to the task-specific decoder to enable the task-specific decoder to provide task-specific information.

[0008] Also, a plurality of candidate encoder architectures are generated, each of the candidate encoder architectures (also referred to as encoder structures) comprising at least one shared encoder layer that provides computational operations related to a plurality of image processing tasks. Also, each encoder architecture comprises a plurality of branches spanning across one or more encoder layers, each branch correlating with a particular image processing task and providing at least partially task-specific computational operations related to the image processing task. More specifically, a task-specific decoder providing computations configured for each image processing task receives feature maps of one or more encoder layers of the branches correlating with each image processing task.

[0009] Also, calculate the receive field size of the encoder layers of these multiple encoder architectures. The receive field size associated with a particular encoder layer indicates the sub-images that affect the output of this encoder layer. The receive field size may be calculated by examining the features of the feature map and therefore the size of the sub-images of the input image that affect the output of the particular encoder layer. The receive field size of the encoder layer may be calculated, for example, based on the properties of the convolution, e.g., kernel size, stride width, etc.

[0010] Then, a number of evaluation measures are calculated. The evaluation measures may indicate a matching quality between the candidate encoder architecture and a particular image processing task. More specifically, the evaluation measures may indicate a matching between a receiving field size of an encoder layer of the candidate encoder architecture and a characteristic measure distribution of a particular image processing task. Each evaluation measure applies to a combination of a particular encoder architecture and a particular image processing task of the plurality of encoder architectures. Each evaluation measure comprises information about a matching quality between a characteristic measure distribution of the image processing task correlated with the evaluation measure and a receiving field size of an encoder layer of the encoder architecture correlated with the evaluation measure. Thus, in other words, the evaluation measure provides information about how well the receiving field size of the encoder layer of the branch correlated with the image processing task matches the determined characteristic measure distribution of this image processing task.

[0011] As an example, an evaluation measure that correlates to a combination of encoder architecture and image processing task may be calculated by taking the sum of the squares of the differences between the received field size of the encoder layer and the percentiles of the feature measure distribution required by the task-specific decoder.

[0012] After determining the evaluation measures, the calculated evaluation measures are compared to establish a comparison result, which in particular results in an encoder architecture having a receiving field size of the encoder layer that best matches the characteristic scale curve of a particular image processing task.

[0013] Finally, an encoder architecture is selected based on the comparison result.

[0014] The method is advantageous because it allows a shared encoder that provides encoding operations for multiple image processing tasks to be deployed in a resource-efficient manner, particularly in limited hardware environments, while reducing computational complexity.

[0015] The present disclosure is useful in proposing improved multitask neural architectures for each given set of image processing tasks, task-specific decoders, by considering optimal receiving fields based on task-specific properties. In contrast to other architecture search methods that either require the entire set of possible architectures to be kept in memory and trained in parallel, or all architectures to be trained to some extent, the proposed method provides architectures that are based on static properties and can be computed without neural network training. Since the number of possible architectures grows exponentially with the number of tasks that need to be solved by a multitask network, the proposed architecture search method saves a huge amount of time, making architecture design based on embedded hardware feasible.

[0016] The proposed method may be preferably used to determine an encoder architecture for image processing tasks of images provided by a vehicle's front camera. In automotive applications, multiple tasks need to be solved simultaneously. Thus, the present disclosure may be applied to 2D convolutional neural networks.

[0017] In addition to the most common deep learning tasks, e.g., object detection, lane detection, semantic segmentation, etc., the proposed method can be extended to other 2D image processing tasks, e.g., depth estimation using a monocular camera, surface normal estimation, keypoint detection for e.g., human pose estimation, etc.

[0018] In addition to further 2D image processing tasks, the present invention can be extended to both 1D, 3D or higher dimensional convolutional neural networks: -3D convolutional networks have applications in radar or lidar point cloud processing, or can be applied to video feeds from cameras; -1D convolutional networks are useful for time series processing, for example to process other sensor measurements, e.g. temperature, acceleration, etc. - 4D convolutional networks can be applied to process point cloud sequences from radar or lidar sensors.

[0019] According to an example embodiment, the image processing tasks include one or more of the following list of tasks: object detection, lane detection, semantic segmentation.

[0020] According to an exemplary embodiment, the convolutional neural network, in particular the encoder, is configured and / or specifically adapted to be processed on embedded hardware, in particular an embedded computer module or a system on chip (SoC) mounted on a vehicle. Such embedded hardware generally has limited computational resources. Thus, the convolutional neural network, in particular the encoder, needs to be designed with such limited computational resources in order to provide image processing results within a given runtime limit in real time or pseudo real time, respectively. The runtime limit may be in the range of 10-50 ms, in particular 10 ms, 15 ms, 20 ms, 25 ms, 30 ms, 35 ms, 40 ms, 45 ms or 50 ms.

[0021] According to an embodiment, for each image processing task, one or more percentiles are determined, and the value of the one or more percentiles depends on the interface of the task-specific decoder. For example, the interface of the task-specific decoder may comprise one or more input connections. Depending on the interface of the task-specific decoder, the value of the one or more percentiles is selected so that the decoder can receive information required for the task-specific decoding operation (e.g., information of a particular partial image size).

[0022] According to an embodiment, the number of determined percentiles is selected according to the number of input connections required by the task-specific decoder. For example, if the task-specific decoder has only one input connection, the maximum percentile value may be selected as, for example, the 99th percentile. If the task-specific decoder has multiple input connections (e.g., two, three, four or more), multiple different percentile values ​​(e.g., two, three, four or more) may be selected to provide different partial image size information to the decoder.

[0023] According to an embodiment, the percentile values ​​are distributed over a percentile range defined by a minimum and a maximum percentile value. For example, the maximum percentile value may be the 99th percentile and the minimum value may be less than or equal to the 50th percentile. If the decoder has only two input connections, the minimum percentile value (e.g., the 50th percentile) and the maximum percentile value (e.g., the 99th percentile) may be selected. If the decoder has three input connections, the minimum percentile value (e.g., the 50th percentile), the average percentile value (e.g., the 75th percentile) and the maximum percentile value (e.g., the 99th percentile) may be selected. If the decoder has four input connections, the minimum percentile value (e.g., the 50th percentile), two average percentile values ​​(e.g., the 66th and 82nd percentiles) and the maximum percentile value (e.g., the 99th percentile) may be selected. This allows different partial image sizes to be provided to task-specific decoders depending on the decoder input interface.

[0024] According to an embodiment, the percentile values ​​are evenly distributed over a percentile range defined by a minimum and a maximum percentile value, allowing stagger information for different sub-image sizes to be provided to a task-specific decoder.

[0025] According to an embodiment, at least some of the encoder layers of the task-specific branches of the encoder are provided with feature maps having a resolution that matches the feature resolution of the input connections of the task-specific decoder, so that the output provided by a particular encoder layer can be concatenated with input connections of the appropriate resolution of the task-specific decoder.

[0026] According to an embodiment, the step of determining a plurality of encoder architecture candidates comprises selecting a specific building block to be configured for the encoder of the neural network from a set of building blocks, and connecting the selected building blocks to obtain the encoder architecture. The set of building blocks may be predetermined according to the specific computational hardware on which the neural network should run. In particular, the set of building blocks may be predetermined taking into account the computational resources provided by the embedded computational hardware. For some embedded hardware, these building blocks are quite simple, including only simple convolutional layers, pooling operations and activations. For other embedded hardware, these building blocks may even be ResNet or DarkNet blocks or cells of architecture search methods, such as DARTS. By stacking these blocks, a deeper encoder can be created, each block having a specific block width (or number of channels), and based on the block width, the width of the network can be tuned.

[0027] According to an embodiment, the candidate encoder architectures are generated (e.g., automatically or semi-automatically) by defining a runtime limit, and the encoder architecture is created such that, for a given hardware, the encoder architecture provides a computation result within a runtime range of 90%-100% of the runtime limit. For example, depending on the number of encoder layers (i.e., convolutional layers), the layer width (i.e., number of channels) may be selected such that the given runtime limit is exhausted.

[0028] According to an embodiment, the step of calculating a plurality of evaluation measures comprises comparing a received field size of an encoder layer that matches the resolution of the task-specific decoder with the determined percentile value and determining a distance between the received field size and the percentile value. Thus, if the received field size has a value of X and the percentile value is Y, the calculation of the evaluation measure comprises calculating the difference between X and Y.

[0029] According to an embodiment, particularly when the task-specific decoder comprises multiple input connections, the step of calculating the multiple evaluation measures comprises comparing multiple receive field sizes of an encoder layer that matches the resolution of the task-specific decoder with the multiple determined percentile values ​​and determining a sum of distances between these receive field sizes and these percentile values, such that a general distance between multiple receive field size / percentile value pairs can be taken into account for evaluating the encoder architecture.

[0030] According to an embodiment, the step of calculating the plurality of evaluation measures uses a loss function that uses a least absolute deviation distance measure, i.e., an L1 distance measure or a cosine distance measure.

[0031] According to an embodiment, the step of calculating the plurality of evaluation measures uses a loss function having a penalty term, the penalty term being configured to increase the evaluation measure as the number of layers shared among the plurality of image processing tasks of the encoder architecture decreases, such that an encoder architecture with a larger number of shared layers has an advantage over an encoder architecture with a smaller number of shared layers because a larger number of shared layers increases computational efficiency.

[0032] According to an embodiment, the step of comparing the calculated evaluation measures and establishing the comparison result comprises determining an encoder architecture for each image processing task that has the smallest evaluation measure, whereby an improved encoder architecture for processing multiple image processing tasks can be determined based on image processing task properties and encoder / decoder properties of the neural network architecture that are available without training a neural network architecture, whereby an improved encoder architecture can be found with reduced computational effort.

[0033] According to an embodiment, the step of selecting an encoder architecture based on the comparison results comprises selecting an encoder architecture having a smallest evaluation measure for each image processing task, For example, the selected encoder architectures are combined by sharing encoder layers having the same property, e.g., the same encoder layer width, and by branching the encoder into different encoder branches if the encoder layers have different encoder layer properties.

[0034] According to a further aspect, the invention relates to a computer program product for determining an encoder architecture, the computer program product comprising a computer readable storage medium having program instructions implemented therewith, the program instructions being executable by a processor to cause the processor to perform a method according to any one of claims 1 to 14.

[0035] The term "vehicle" as used in this disclosure may refer to a car, truck, bus, train, or any other watercraft or aircraft.

[0036] The term "quality measure" as used in this disclosure may refer to a number of pixels or sub-images that are to be received by a task-specific decoder in order to recognize task-specific details in an image. Thus, the quality measure is highly dependent on the specific image processing task.

[0037] The term "received field" as used in this disclosure may refer to the set of pixels of an image that is fed to the input of an encoder and that influences particular neurons (also called features) in a feature map of this encoder layer. Thus, in other words, the received field refers to the sub-image that influences the features of the feature map and thus the output of a particular encoder layer.

[0038] The term "receive field size" as used in this disclosure may refer to the number of pixels or the size of a sub-image received by a particular encoder layer. The receive field may be a rectangle, and the length and height of the rectangle is the receive field size. Due to the cascading of encoder layers, the receive field size of the first encoder layer is smaller than the receive field size of the hidden encoder layer.

[0039] The term "task-specific decoder" as used in this disclosure may refer to a decoder that is configured to provide decoding operations for a single image processing task, i.e., each image processing task has its own task-specific decoder.

[0040] The term "feature map" as used in this disclosure may refer to a set of features provided by a particular encoder layer that may be conveyed to a task-specific decoder. The feature map may have a particular resolution. The resolution of the feature map needs to be adapted to the resolution required by the task-specific decoder to enable the task-specific decoder to process the feature map.

[0041] The term "percentile" as used in this disclosure may refer to a score that a certain percent of the scores fall equal to or below in its frequency distribution.

[0042] The term "image processing task" may refer to any task applied to images or video provided by a camera. The term "image processing task" may also refer to tasks applied to information provided by other sensors, e.g., radar, lidar, etc.

[0043] The term "substantially" or "about" as used herein means a deviation of + / - 10% from the exact value, preferably a deviation of + / - 5% and / or deviation in the form of changes that are not significant for function and / or traffic law.

[0044] Various aspects of the present invention, including specific features and advantages thereof, will be readily understood from the following detailed description and the accompanying drawings. [Brief description of the drawings]

[0045] [Figure 1] FIG. 1 shows a schematic diagram of a neural network with a shared encoder and multiple task-specific decoders. [Diagram 2] FIG. 2 illustrates a schematic of an example structure of a shared encoder with a shared layer and multiple branches for performing task-specific computational operations. [Diagram 3] FIG. 3 shows a schematic of the feature measure distributions for the first and second tasks and their respective 50th and 90th percentiles. [Figure 4] FIG. 4 shows a schematic of the feature measure distributions for the first and third tasks and their respective 50th and 90th percentiles. [Diagram 5] Figure 5 shows a table of the 50th, 60th, 80th and 99th percentile values ​​of the trait measure distributions for the first and second tasks. [Figure 6] FIG. 6 shows several encoder architectures with different lengths, widths of the encoder layers and receiving fields of the encoder layers. [Figure 7] FIG. 7 illustrates the computation of an evaluation measure indicative of the matching quality of architecture A of FIG. 6 for image processing task t1 of FIG. [Figure 8]FIG. 8 illustrates the computation of an evaluation measure indicative of the matching quality of architecture A of FIG. 6 for image processing task t2 of FIG. [Figure 9] FIG. 9 illustrates the computation of an evaluation measure indicative of the matching quality of architecture C of FIG. 6 for image processing task t1 of FIG. [Figure 10] FIG. 10 illustrates the computation of an evaluation measure indicative of the matching quality of architecture C of FIG. 6 for image processing task t2 of FIG. [Figure 11] FIG. 11 shows the encoder structure obtained from the example of FIGS. [Figure 12] FIG. 12 shows a schematic block diagram illustrating the steps of a method for determining the architecture of a shared encoder of a convolutional neural network. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0046] The present invention will now be described more fully with reference to the accompanying drawings in which exemplary embodiments are shown. The embodiments in the figures may relate to preferred embodiments, while all elements and features described in connection with the embodiments may be used in combination with any other embodiments and features described in this disclosure, as appropriate, particularly with respect to any other embodiments and features described above. However, the present invention should not be construed as being limited to the embodiments described in this disclosure. Throughout the following description, where applicable, similar reference numerals are used to denote similar elements, components, items or features.

[0047] The features of the invention disclosed in the specification, the claims, the exemplary embodiments and / or the drawings may, both individually and in any combination thereof, be material for implementing the invention in diverse forms thereof.

[0048] Figure 1 shows a schematic block diagram of a neural network 1. The neural network 1 comprises an encoder 2. The encoder 2 is arranged to process a number of image processing tasks, in the illustrated embodiment image processing tasks t1, t2, t3. The encoder 2 supplies information to a number of task specific decoders 3.1, 3.2, 3.3. Each task specific decoder 3.1, 3.2, 3.3 provides output information correlating with a particular image processing task t1, t2, t3.

[0049] Fig. 2 shows a schematic block diagram of an exemplary encoder architecture of the encoder 2. The encoder 2 comprises a number of layers L1 to L5. In the illustrated embodiment, the layer L1 is a shared layer that provides computation operations for all image processing tasks t1, t2, t3. Starting from the shared layer L1, the encoder 2 comprises a number of branches b1, b2, b3. Each branch b1, b2, b3 correlates with a particular image processing task t1, t2, t3. More precisely, the encoder architecture provides in each branch a functional block that is specifically configured for the respective image processing task t1, t2, t3. The further layers L2 to L5 thus provide at least partially distinct computation operations for the image processing tasks t1, t2, t3 in order to obtain task-specific computation results.

[0050] As shown in Figure 2, function blocks in one layer may be shared between subgroups of tasks. For example, in layer L2, branches b1 and b2 use the same function blocks, while branch b3 uses a different function block in layer L2.

[0051] Also, the branches may have different lengths, that is, they may span different numbers of layers.

[0052] In the following, an exemplary embodiment of a method for determining an encoder architecture with optimized branching to provide improved computational resources for processing multiple image processing tasks t1, t2, t3 is presented.

[0053] Figure 3 shows the feature scale distributions for two different tasks t1 and t2. The feature scale distributions indicate the size distributions of objects to be detected in a particular image processing task t1 or t2. Thus, even when considering the same input image information, the feature scale distributions of the tasks can be significantly different.

[0054] The feature measure distributions of tasks t1 and t2 have significant overlap, i.e., the object sizes required by the image processing tasks t1 and t2 and, therefore, the task-specific decoders, are similar, i.e., the encoders of tasks t1 and t2 can share multiple layers.

[0055] In contrast, the feature measure distributions of tasks t1, t3 shown in Fig. 4 have less overlap, i.e., the object sizes required by the image processing tasks t1, t3, and therefore the task-specific decoders, are significantly different. Thus, the encoders of tasks t1, t3 can share fewer layers, i.e., they need to branch earlier, compared to the example in Fig. 3.

[0056] To determine an improved encoder architecture, each image processing task is analyzed separately and a characteristic measure distribution for each image processing task is determined.

[0057] In the following, we describe various algorithms for determining the feature measure distributions for some image processing tasks that are common in driver assistance systems.

[0058] The first image processing task may be object detection. Object detection is a very important deep learning task for assistance functions, e.g. emergency braking assistance (traffic participant detection), sign recognition, traffic light recognition, etc. An object detection decoder typically receives input from several different encoder layers, which increase the received field size.

[0059] To determine the feature measure distribution for a given object detection task, determine a distribution of box sizes in the training data that cover each object. Preferably, the receiving field of the encoder should be adapted to the box size distribution such that the receiving field size covers the median of the feature measure distribution and a reasonable maximum size, such as the 99th percentile of the feature measure distribution. The training data for object detection purposes may be selected such that items relevant to object detection are included in a variety of sizes and / or from a variety of perspectives such that a realistic automobile detection scenario is simulated.

[0060] It is worth mentioning that the distribution of box sizes for different driving features is significantly different: for example, the vehicle and pedestrian box sizes for a particular camera are generally larger than the traffic sign or traffic light boxes, and therefore the median and 99th percentile of their distributions are significantly different.

[0061] The second image processing task may be lane detection. Lane and road edge detection is very important for lane departure warning and lane keeping assistance systems. Task-specific decoders configured to process lane detection tasks have two broad categories: point-based solutions and line / anchor-based solutions. The feature measure distributions of these two categories differ significantly.

[0062] For point-based methods, the feature measure may be determined by the distance between two keypoints, and the distribution of this distance may be calculated based on the training dataset. For line or anchor-based solutions, the feature measure should be determined based on the entire lane length, and the distribution may again be determined based on the training dataset. For task-specific decoders connected to only one encoder layer, the receive field size should match the 99th percentile of the feature measure distribution. For task-specific decoders connected to multiple encoder layers, the receive field size of the encoder layer should match the median of the feature measure distribution and a reasonable maximum size, such as the 99th percentile of the feature measure distribution.

[0063] Training data for lane detection purposes may be selected such that lanes and / or road boundaries (lane markings, curbs, road edges, etc.) are included in various sizes and / or from various perspectives to stimulate realistic automobile detection scenarios.

[0064] The third image processing task may be a semantic segmentation task. Semantic segmentation is used, for example, for free space estimation and low speed motion functions, such as parking assistance functions. In semantic segmentation, each pixel of an image is classified into a class, such as road, vehicle, pedestrian, plant, etc. To determine the characteristic measure of the semantic segmentation, a distribution of sizes of object or background masks may be determined based on the training data. Since the semantic segmentation includes large classes, such as "road", "building", "sky", etc., the maximum receiving field size may cover the entire image. Training data for semantic segmentation purposes may be selected such that items relevant to semantic segmentation are included in a variety of sizes and / or from a variety of perspectives, as described above, so as to stimulate realistic automobile detection scenarios.

[0065] After determining the feature scale distribution of the image processing task, the relevant percentile needs to be determined based on the interface of the task-specific decoder 3.1, 3.2, 3.3. For example, if the task-specific decoder is connected to the encoder 2 in one layer with a particular feature map resolution, the maximum object size should be considered as, for example, the 99th percentile. If the task-specific decoder is receiving inputs from two, three or four layers, the relevant percentile may be selected, for example, between the median (50th percentile) and the 99th percentile. For example, if the task-specific decoder is connected to the encoder 2 in two different layers, the 50th and 99th percentiles may be selected. If the task-specific decoder is connected to the encoder 2 in three different layers, the 50th, 75th and 99th percentiles may be selected. If the task-specific decoder is connected to the encoder 2 in four different layers, the 50th, 66th, 82nd and 99th percentiles may be selected, etc.

[0066] If more than four input layers are defined or smaller objects need to be detected, percentiles below the 50th percentile may also be considered.

[0067] After computing the feature measure distributions and associated percentiles for all tasks, the next step is to determine potential encoder architectures and corresponding received field sizes for the encoder layers.

[0068] Especially in automotive applications, computational resources are very limited, so a technically feasible encoder architecture highly depends on the specific computational hardware and its constraints.

[0069] The most common constraint is that any feasible encoder architecture must meet a certain runtime budget, i.e., there is a very strict upper limit on the runtime. In general, as the complexity and / or runtime of a neural network decreases, its performance also decreases. Thus, when determining a set of possible encoder architectures, the objective is to find multiple or all feasible encoder structures that use 90%-100% of the given runtime limit. In other words, the feasible encoder architecture candidates should maximally exhaust the given runtime limit in order to obtain high performance of the neural network.

[0070] A feasible encoder architecture candidate is constructed automatically or semi-automatically by considering certain runtime limits using multiple building blocks. A further constraint of computing hardware, especially embedded hardware, is the availability of specific neural network layers. Many systems on a chip (SoC) only support a small subset of layers, and the list of available layers varies greatly depending on the specific hardware. Therefore, depending on the specific hardware, a set of building blocks of the encoder is predefined. Depending on the hardware, these building blocks may be very simple (e.g., including only simple convolutional layers, pooling operations and activations), or they may be more complex, such as ResNet or DarkNet blocks or even cells of architecture search methods, such as DARTS.

[0071] After determining the building blocks for a given hardware, these building blocks may be stacked to create a deeper encoder. Each block has a specific block width (also called number of channels). Based on the block width, the width of the network can be tuned. The runtime of each building block depends on its width and its input size. In this way, the block-specific runtime on the target hardware can be calculated. This allows for automatic or semi-automatic determination of a set of architectures that fit within a narrow range of acceptable runtime limits after defining the building blocks of the encoder.

[0072] It is worth mentioning that the number of convolutional layers that maintains the resolution can be adapted to fine-tune the received field size. If the number of convolutional layers is increased because the encoder is configured to run on limited computing hardware, especially embedded hardware, the number of channels, also called the width of the encoder layers, should be decreased to meet the above runtime budget. Also, the branching of the multitask encoder is selected such that the branching points for the two tasks are set to the latest layer, since the most resource-efficient encoder solution keeps as many layers shared as possible.

[0073] After determining a number of feasible encoder architectures, each having a particular receive field at each encoder layer and a branch-specific receive field at each encoder layer, the matching quality of the receive fields of the encoder layers of each encoder architecture to the determined percentiles of each task-specific decoder is evaluated.

[0074] The matching of the feature measure distributions with the potential receive fields can be evaluated by searching for an encoder architecture that provides the smallest deviation between the determined percentiles of the task-specific feature measure distributions and the receive field size of the encoder layer. The encoder architecture with the smallest deviation can be determined by searching for an encoder architecture with a minimum value of a loss function. One example of such a loss function is a simple mean squared error between the associated percentiles determined by the task-specific feature measure distributions and the receive field size of each candidate architecture.

[0075] The loss function can be implemented using different distance measures, for example L1 (least absolute deviation) or cosine distance can be used as the distance measure.

[0076] The loss function may optionally include a penalty term that increases the loss value as the number of shared layers in the encoder architecture decreases, thereby enhancing resource conservation by sharing encoder layers among multiple image processing tasks.

[0077] Hereinafter, a method for determining the architecture of an encoder of the disclosed convolutional neural network will be described based on an example with reference to FIGS.

[0078] Figure 5 shows several feature measure values ​​correlated with two different image processing tasks, task t1 and task t2, which exhibit different feature measure distributions. Thus, the pixel sizes correlated with the 50th, 60th, 80th and 99th percentiles of each feature measure distribution are different for each task t1 and t2.

[0079] The task-specific decoders configured to process tasks t1 and t2, respectively, may require four input connections, i.e., each task-specific decoder connects to four different encoder layers of the encoder. These four input connections of each task-specific decoder have different resolutions, which are indicated by different shading of the cells and columns of the table. Thus, each task-specific decoder needs to be connected to an encoder layer that provides the required resolution.

[0080] An example result of the encoder architecture search is shown in Figure 6. As mentioned above, the architecture search is based on the key objective that any feasible encoder architecture candidate must meet a runtime bound requirement, e.g., 90% or more of the upper runtime limit for the given hardware, in order to obtain high performance of the neural network.

[0081] Each circle in each encoder architecture represents an encoder layer, and the first left-most circle may represent one or more layers, but comparing the shading of the table cells in Figure 5 with the circles in Figure 6, the first left-most encoder layer or layers are not required because the resolution of the encoder layer does not match the required resolution of the task-specific decoder.

[0082] The number in the circle representing the encoder layer indicates the width of the encoder layer. It is worth mentioning that as the length of the encoder increases (i.e., as the number of encoder layers increases), the width of the encoder layer must decrease in order to meet the runtime limit requirements.

[0083] Each encoder layer has a particular receive field, which is indicated by a number below the circle representing the respective encoder layer. The receive field of an encoder layer increases with encoder depth, i.e., an encoder layer located at a greater depth has a larger receive field than an encoder layer located at a lesser depth.

[0084] Based on the tables of figures 7 to 10, method steps for calculating an evaluation measure for evaluating the matching quality of an encoder architecture for processing a particular task are described. In particular, it is investigated whether encoder architecture A or C shown in figure 6 is better suited for task t1, task t2, respectively, of figure 5. For each task, a comparison of the feature measure distributions is made, in particular a comparison of the determined percentiles of the feature measure distribution with the received field values ​​of the encoder layer that match the required decoder resolution.

[0085] For example, in Figure 5, the first input connection of the task-specific decoder has a pixel size of a characteristic measure of 110. The pixel size of the received field of the encoder layer that matches the resolution of the first input connection of the task-specific decoder has a value of 122. Thus, the difference is 12.

[0086] To determine the match between the encoder architecture A and the image processing task t1, in this example the mean squared error between the pixel size of the characteristic measure of each input connection of the task-specific decoder and the pixel size of the corresponding received field of the encoder layer is calculated.

[0087] As shown in Figure 7, the sum of the differences between the pixel sizes of the quality measures of each input connection of the task-specific decoder and the pixel sizes of the corresponding received fields of the encoder layer is 182. This value represents an evaluation measure (called the sum of losses in this embodiment) that can be used to evaluate which encoder architecture is best suited for each task and therefore should be used at least as a task-specific branch in the encoder.

[0088] Fig. 9 shows an evaluation of the matching between the encoder architecture C in Fig. 6 and the image processing task t1 in Fig. 5. Comparing the evaluation measures and the total loss, we can conclude that the encoder architecture A matches the image processing task t1 better than the encoder architecture C because the evaluation measures and the total loss are smaller.

[0089] Figures 8 and 10 show similar evaluations of matching the encoder architectures A and C in Figure 6 with the image processing task t2 in Figure 5. Comparing the evaluation measures and the total loss, respectively, we can conclude that the encoder architecture C is a better match with the image processing task t2 than the encoder architecture A because the evaluation measures and the total loss are smaller, respectively.

[0090] As shown in Figures 9 and 10, if there are multiple encoder layers providing the same resolution required by the task-specific decoder, it can be determined which encoder layer should be connected to the task-specific decoder by comparing the received field of each encoder layer with the determined percentile of the characteristic measure for each task, and the encoder layer providing the received field that is closest to the determined percentile can be selected.

[0091] FIG. 11 shows the architecture of a shared encoder configured to process image processing tasks t1, t2, obtained according to the result of the matching evaluation, and the coupling of the shared encoder with a task-specific decoder. The encoder comprises one or more shared encoder layers that provide computation operations for both image processing tasks t1, t2, and two branches, each branch providing task-specific computation operations for a particular task. In FIG. 11, the left branch is correlated with task t1, i.e., one or more encoder layers of this left branch provide information to a task-specific decoder configured for image processing task t1. Similarly, the right branch is correlated with task t2, i.e., one or more encoder layers of this right branch provide information to a task-specific decoder configured for image processing task t2.

[0092] FIG. 12 shows a flow diagram illustrating steps of a method for determining the architecture of an encoder of a convolutional neural network.

[0093] First, for each image processing task, we calculate a feature measure distribution based on the training data (S10).

[0094] Also, a number of candidate encoder architectures are determined (S11), where each of the candidate encoder architectures comprises at least one shared encoder layer providing computational operations related to a number of image processing tasks, and a number of branches spanning across one or more encoder layers, where the branches provide at least partially distinct computational operations related to the image processing tasks, where each branch correlates with a particular image processing task.

[0095] After determining the feasible encoder architecture candidates, the received field sizes of the encoder layers of these encoder architectures are calculated (S12).

[0096] Also, a plurality of evaluation measures are calculated (S13), each of which applies to a combination of a particular encoder architecture and a particular image processing task of the plurality of encoder architectures, each of which includes information regarding the quality of matching between a characteristic measure distribution of the image processing task that correlates with the evaluation measure and a received field size of an encoder layer of the encoder architecture that correlates with the evaluation measure.

[0097] In the next step, the calculated evaluation measures are compared and a comparison result is established (S14).

[0098] Finally, an encoder architecture is selected based on the comparison result (S15).

[0099] It should be pointed out that the specification and drawings are merely illustrative of the principles of the proposed invention, and that those skilled in the art will be able to implement various configurations that embody the principles of the invention even if not explicitly described or shown in this disclosure. This application relates to the invention described in the claims, but also includes the following as other aspects. 1. A method for determining an architecture for an encoder (2) of a convolutional neural network (1), the neural network (1) being configured to process a number of different image processing tasks (t1, t2, t3), comprising the steps of: - calculating a feature measure distribution based on training data for each of the image processing tasks (t1, t2, t3), the feature measure distribution indicating a size distribution of objects to be detected by each of the image processing tasks (S10); - generating a plurality of encoder architecture candidates, each of the encoder architecture candidates comprising at least one shared encoder layer (SL) providing computational operations related to a plurality of image processing tasks, and a plurality of branches (b1, b2, b3) providing at least partially distinct computational operations related to the image processing tasks, the plurality of branches (b1, b2, b3) spanning one or more encoder layers, each of the branches (b1, b2, b3) correlating with a particular image processing task (t1, t2, t3); - calculating (S12) a received field size for the encoder layer of the plurality of encoder architectures; - calculating a plurality of evaluation measures, each of which applies to a combination of a particular encoder architecture of the plurality of encoder architectures and a particular image processing task (t1, t2, t3), and each of which includes information about a matching quality between a characteristic measure distribution of the image processing task (t1, t2, t3) that correlates with the evaluation measure and the receiving field size of the encoder layer of the encoder architecture that correlates with the evaluation measure (S13); - comparing the calculated evaluation measures and establishing a comparison result (S14); - selecting (S15) an encoder architecture based on the comparison result. 2. 2. The method according to claim 1, wherein one or more percentiles are determined for the feature measure distribution for each of the image processing tasks (t1, t2, t3), the value of the one or more percentiles depending on an interface of a task-specific decoder (3.1, 3.2, 3.3). 3. 3. The method according to claim 2, wherein the number of determined percentiles is selected according to the number of input connections required by the task-specific decoder (3.1, 3.2, 3.3). 4. 4. The method according to claim 2 or 3, wherein the percentile values ​​are distributed across a percentile range defined by a minimum percentile value and a maximum percentile value. 5. 5. The method of claim 4, wherein the percentile values ​​are evenly distributed across the percentile range. 6. 6. The method according to any one of 1 to 5, wherein at least some of the encoder layers of the task-specific branches (b1, b2, b3) of the encoder (2) are provided with feature maps having a resolution matching the feature resolution of the input connections of the task-specific decoders (3.1, 3.2, 3.3). 7. 7. A method according to any one of claims 1 to 6, wherein the step of generating a plurality of candidate encoder architectures comprises selecting specific building blocks from a set of building blocks to be configured for an encoder (2) of the neural network (1), and connecting the selected building blocks to obtain an encoder architecture. 8. 8. A method according to any one of claims 1 to 7, wherein the encoder architecture of the candidate encoder architectures is determined by defining a runtime limit value, and the encoder architecture is created such that, on a given hardware, the encoder architecture provides computational results within a runtime range of 90% to 100% of the runtime limit value. 9. 9. A method according to any one of claims 1 to 8, wherein the step of calculating a plurality of evaluation measures comprises comparing a received field size of an encoder layer that matches the resolution of a task-specific decoder (3.1, 3.2, 3.3) with the determined percentile value and determining a distance between the received field size and the percentile value. 10. 9. A method according to any one of claims 1 to 8, wherein the step of calculating a plurality of evaluation measures comprises comparing a plurality of received field sizes of an encoder layer that matches the resolution of the task-specific decoder (3.1, 3.2, 3.3) with a plurality of determined percentile values, and determining a sum of the distances between the received field sizes and the percentile values. 11. 11. The method according to any one of 1 to 10 above, wherein the step of calculating a plurality of evaluation measures uses a loss function that uses a least absolute deviation distance measure, i.e., an L1 distance measure or a cosine distance measure. 12. 12. The method according to any one of claims 1 to 11, wherein the step of calculating a plurality of evaluation measures uses a loss function having a penalty term, the penalty term being configured to increase the evaluation measure when the number of layers shared between the plurality of image processing tasks (t1, t2, t3) of the encoder architecture decreases. 13. 13. A method according to any one of claims 1 to 12, wherein the step of comparing the calculated evaluation measures and establishing a comparison result comprises determining an encoder architecture for each image processing task (t1, t2, t3) that has the smallest evaluation measure. 14. 14. A method according to any one of claims 1 to 13, wherein the step of selecting an encoder architecture based on the comparison results comprises selecting the encoder architecture having the smallest evaluation measure for each image processing task (t1, t2, t3). 15. 15. A computer program product for determining an encoder architecture for a convolutional neural network, comprising a computer readable storage medium having program instructions therewith implemented, the program instructions being executable by a processor to cause the processor to perform any one of the methods described in 1 to 14 above. [Explanation of symbols]

[0100] 1. Neural Networks 2 Encoder 3.1, 3.2, 3.3 Task-specific decoders b1, b2, b3 branch L1~L5 Encoder Layer t1,t2,t3 Image processing tasks SL Shared Encoder Layer

Claims

1. A method for determining an architecture for an encoder (2) of a convolutional neural network (1), the neural network (1) being configured to process a number of different image processing tasks (t1, t2, t3), comprising the steps of: - calculating, for each of the image processing tasks (t1, t2, t3), a feature measure distribution based on training data, the feature measure distribution indicating a size distribution of objects to be detected by the respective image processing task (S10); - generating a plurality of encoder architecture candidates, each of said encoder architecture candidates comprising at least one shared encoder layer (SL) providing computational operations related to a plurality of image processing tasks, and a plurality of branches (b1, b2, b3) providing at least partially distinct computational operations related to said image processing tasks, said plurality of branches (b1, b2, b3) spanning one or more encoder layers, each said branch (b1, b2, b3) being correlated with a particular image processing task (t1, t2, t3); - calculating (S12) a received field size of the encoder layer of the plurality of encoder architectures; - calculating a plurality of evaluation measures (S13), each of which applies to a combination of a particular encoder architecture of the plurality of encoder architectures and a particular image processing task (t1, t2, t3), each of which contains information about the matching quality between a characteristic measure distribution of the image processing task (t1, t2, t3) that correlates with the evaluation measure and the receiving field size of the encoder layer of the encoder architecture that correlates with the evaluation measure; - a step (S14) of comparing said calculated evaluation measures and establishing a comparison result; - selecting (S15) an encoder architecture based on the comparison result.

2. 2. The method of claim 1, wherein for the feature measure distribution for each of the image processing tasks (t1, t2, t3), one or more percentiles are determined, the values ​​of the one or more percentiles depending on an interface of a task-specific decoder (3.1, 3.2, 3.3).

3. 3. The method of claim 2, wherein the number of determined percentiles is selected depending on the number of input connections required by the task-specific decoder (3.1, 3.2, 3.3).

4. The method of claim 2 or 3, wherein the percentile values ​​are distributed over a percentile range defined by a minimum percentile value and a maximum percentile value.

5. The method of claim 4 , wherein the percentile values ​​are evenly distributed across the percentile range.

6. The method according to any one of claims 1 to 5, wherein at least some of the encoder layers of the task-specific branches (b1, b2, b3) of the encoder (2) comprise feature maps having a resolution matching a feature resolution of input connections of a task-specific decoder (3.1, 3.2, 3.3).

7. 7. The method of claim 1, wherein the step of generating a plurality of candidate encoder architectures comprises selecting specific building blocks from a set of building blocks to be configured for an encoder (2) of the neural network (1) and connecting the selected building blocks to obtain an encoder architecture.

8. 8. The method of claim 1, wherein the encoder architectures of the candidate encoder architectures are determined by defining a runtime limit, and the encoder architectures are created such that, for a given hardware, the encoder architecture provides computational results within a runtime range of 90% to 100% of the runtime limit.

9. 9. The method according to claim 1, wherein the step of calculating a plurality of evaluation measures comprises: comparing a received field size of an encoder layer that matches a resolution of a task-specific decoder (3.1, 3.2, 3.3) with the determined percentile value; and determining a distance between said received field size and said percentile value.

10. 9. The method according to claim 1, wherein the step of calculating a plurality of evaluation measures comprises: comparing a plurality of received field sizes of an encoder layer that matches a resolution of a task-specific decoder (3.1, 3.2, 3.3) with a plurality of determined percentile values; and determining a sum of distances between the received field sizes and the percentile values.

11. The method according to any one of claims 1 to 10, wherein the step of calculating a plurality of evaluation measures uses a loss function using a least absolute deviation distance measure, i.e. an L1 distance measure or a cosine distance measure.

12. 12. The method according to claim 1, wherein the step of calculating a plurality of evaluation measures uses a loss function having a penalty term, the penalty term being configured to increase the evaluation measure when a number of layers shared between a plurality of image processing tasks (t1, t2, t3) of an encoder architecture decreases.

13. 13. The method of any one of claims 1 to 12, wherein the step of comparing the calculated evaluation measures and establishing a comparison result comprises determining an encoder architecture for each image processing task (t1, t2, t3) that has the smallest evaluation measure.

14. The method of any one of claims 1 to 13, wherein the step of selecting an encoder architecture based on the comparison results comprises selecting the encoder architecture having a smallest evaluation measure for each image processing task (t1, t2, t3).

15. A computer readable medium having program instructions for determining an architecture of a convolutional neural network encoder, the program instructions being executable by a processor to cause the processor to perform the method of any one of claims 1 to 14.

Citation Information

Patent Citations

  • Method and device for searching model structure, equipment and storage medium

    CN110705695A

  • Neural network architecture search system and method

    JP2021111388A