Multi-task processing method, computer readable storage medium and intelligent equipment

Through iterative training and weight adjustment, combined with backbone network feature fusion, the problem of poor multi-task network model training results is solved, and the accuracy of multi-task processing and the effect of high-resolution tasks are improved.

CN118690820APending Publication Date: 2024-09-24安徽蔚来智驾科技有限公司

Patent Information

Application Number
CN202410382522.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-29
Publication Date
2024-09-24

AI Technical Summary

Technical Problem

Existing multi-task network models cannot guarantee that the performance of multiple tasks is better than that of separate training during training, and they fail to meet the requirements for feature resolution of different tasks, resulting in poor processing results.

Method used

By iteratively training the multi-task network model, multiple task training is performed alternately, and task weight parameters are adjusted according to the gradient tensor norm to ensure a balanced number of training times for each task; at the same time, the output features of different layers of the backbone network are used for fusion to meet the high resolution task requirements.

Benefits of technology

It achieves a balance between the performance of each task, improves the accuracy of multi-task processing results, and improves the processing effect of high-resolution tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118690820A
    Figure CN118690820A
Patent Text Reader

Abstract

The invention relates to the technical field of artificial intelligence, particularly provides a multi-task processing method, a computer readable storage medium and intelligent equipment, and aims to solve the problem that the accuracy of a processing result is affected due to the fact that the training effect of multiple tasks cannot be guaranteed during training of an existing multi-task network model. In order to achieve the purpose, the method comprises the steps that multi-task processing is carried out through a trained multi-task network model, the multi-task network model is obtained through iterative training based on a plurality of training sample subsets, and during each round of training, a plurality of training tasks are alternately carried out at least based on the current training sample subset; when any training task is carried out, calculating a gradient tensor norm of the current training task to the public parameters in the backbone network; and calculating a weight parameter of each training task in the current round of training based on the gradient tensor norms of the plurality of training tasks obtained in the previous round of training so as to alternately carry out the plurality of training tasks. The performance of a multi-task network model can be improved, and the accuracy of multi-task processing is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and specifically provides a multi-tasking method, a computer-readable storage medium, and an intelligent device. Background Art

[0002] With the development of artificial intelligence technology, more and more application scenarios can use neural network models to perform tasks. Among them, in some application scenarios, multiple tasks need to be integrated into a multi-task network model. For example, in the scenario of autonomous driving, in order to improve the accuracy and operation efficiency of the deployment end, it is necessary to integrate the point cloud detection task and the point cloud segmentation task into a multi-task network model to perform multi-task processing based on the multi-task network model.

[0003] The performance of the multi-task network model will affect the accuracy of the multi-task processing results. In the related art, when training a multi-task network model, multiple tasks usually share the backbone network in the multi-task network model, and the features extracted from the backbone network are combined with the weights of each task set in advance based on experience, or the weights of each task are dynamically set according to the uncertainty of each task, so as to perform balanced training on the multiple task networks. However, this training method has the problem that multiple tasks affect each other, and it cannot guarantee that the performance of multiple tasks is better than when the corresponding tasks are trained separately. In addition, multiple tasks share the features extracted from the backbone network, and the requirements of different tasks for feature resolution are not considered, which easily leads to poor processing effects on tasks with higher resolution requirements. Summary of the invention

[0004] The present application aims to solve the above technical problem, that is, to solve the problem that the existing multi-task network model cannot guarantee the training effect of multiple tasks during training, which affects the accuracy of multi-task processing results.

[0005] In a first aspect, the present application provides a multi-tasking method, which comprises:

[0006] Acquire perception data of a target scene, wherein the perception data includes point cloud data and / or an image;

[0007] The perception data is input into a trained multi-task network model to obtain a multi-task processing result; wherein the multi-task network model includes a backbone network and multiple task networks, and the multiple task networks at least use the output of the backbone network as input; the multi-task network model is trained by the following steps:

[0008] Acquire a training sample set, where the training sample set includes multiple training sample subsets;

[0009] Iteratively training the multi-task network model to be trained based on the multiple training sample subsets until a trained multi-task network model is obtained;

[0010] Wherein, when performing each round of training, multiple training tasks are alternately performed based on at least the current training sample subset; and when performing any training task, the gradient tensor norm of the current training task to the common parameters in the backbone network is calculated; the multiple training tasks share the backbone network and the training tasks correspond to the task network one by one;

[0011] When performing any other round of training except the first round of training, the weight parameters of each training task in the current round of training are calculated based on the gradient tensor norm of the multiple training tasks obtained in the previous round of training; the alternating multiple training tasks based on at least the current training sample subset includes alternating multiple training tasks based on at least the current training sample subset and the weight parameters of each training task.

[0012] In some embodiments, before iteratively training the multi-task network model to be trained based on the multiple training sample subsets, the method further includes:

[0013] Obtaining the number of training samples corresponding to each of the plurality of training tasks in the training sample set;

[0014] Based on the number of training samples corresponding to each of the multiple training tasks, the ratio of the number of training times for the multiple training tasks in each round of training is determined, and based on the ratio of the number of training times, the number of training times corresponding to each of the multiple training tasks in each round of training is set so that the total number of training times for each training task is the same.

[0015] In some embodiments, each training sample subset includes multiple batches of training samples, and each batch of training samples corresponds to a different training task;

[0016] Alternating multiple training tasks based at least on the current training sample subset and weight parameters of each training task includes:

[0017] For each training task, inputting the batch training samples corresponding to the current training task into the backbone network;

[0018] Determine the input of the current task network at least based on the output of the backbone network, and obtain the output result of the current task network;

[0019] Obtaining a weight loss based on an output result of the current task network and a weight parameter corresponding to the current training task;

[0020] The backbone network and the current task network are trained based on the weight loss.

[0021] In some embodiments, the backbone network includes a voxelized network, a sparse network, and a bird's-eye view network arranged in cascade; the sparse network includes a plurality of sparse sub-networks arranged in cascade;

[0022] The step of determining the input of the current task network at least based on the output of the backbone network and obtaining the output result of the current task network comprises:

[0023] Obtaining first feature data output by some sparse subnetworks among the multiple sparse subnetworks and second feature data output by the bird's-eye view network; wherein the step length corresponding to the first feature data is smaller than the step length corresponding to the second feature data;

[0024] Fusing the first feature data and the second feature data to obtain a first fused feature;

[0025] The first fusion feature is input into the current task network to obtain an output result of the current task network.

[0026] In some embodiments, the batch training samples include a plurality of training samples; the backbone network includes a voxelized network, a sparse network, and a bird's-eye view network arranged in cascade; the sparse network includes a plurality of sparse sub-networks arranged in cascade;

[0027] The step of determining the input of the current task network at least based on the output of the backbone network and obtaining the output result of the current task network comprises:

[0028] Obtaining first feature data output by some sparse subnetworks among the multiple sparse subnetworks and second feature data output by the bird's-eye view network;

[0029] Mapping the training samples to the first feature data and the second feature data respectively to obtain a plurality of mapped feature data;

[0030] fusing the plurality of mapping feature data to obtain a second fused feature;

[0031] The second fusion feature is input into the current task network to obtain an output result of the current task network.

[0032] In some embodiments, the multi-task network model includes two task networks, and two training tasks are performed alternately in each round of training;

[0033] The step of calculating the weight parameters of each training task in the current round of training based on the gradient tensor norms of the multiple training tasks obtained in the previous round of training includes:

[0034] For each training task, the ratio of the gradient tensor norm of another training task obtained in the previous round of training to the gradient tensor norm of the current training task is used as the weight parameter of the current training task in the current round of training.

[0035] In some embodiments, the multi-task network model includes two task networks, and two training tasks are performed alternately in each round of training;

[0036] The determining, based on the number of training samples corresponding to each of the multiple training tasks, the ratio of the number of training times of the multiple training tasks in each round of training includes:

[0037] The inverse of the ratio of the number of training samples corresponding to the two training tasks is calculated to obtain the ratio of the number of training times of the two training tasks.

[0038] In some embodiments, performing multiple training tasks alternately based on at least the current training sample subset includes:

[0039] The detection task and the segmentation task are performed alternately based on at least the current training sample subset.

[0040] In a second aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the multi-tasking processing method according to any one of the above claims is implemented.

[0041] In a third aspect, the present application provides a smart device, comprising:

[0042] at least one processor;

[0043] a memory communicatively coupled to the at least one processor;

[0044] The memory stores a computer program, and when the computer program is executed by the at least one processor, any of the multi-tasking processing methods described above is implemented.

[0045] In the case of adopting the above technical solution, the present application can provide a multi-task processing method, which obtains a multi-task processing result through a trained multi-task network model, wherein the multi-task network model is obtained by iteratively training the multi-task network model to be trained based on multiple training sample subsets, and when performing each round of training, multiple training tasks are alternately performed based on at least the current training sample subset; and when performing any training task, the gradient tensor norm of the current training task to the common parameters in the backbone network is calculated; when performing any other round of training except the first round of training, the weight parameters of each training task in the current round of training are calculated based on the gradient tensor norm of the multiple training tasks obtained in the previous round of training, and multiple training tasks are alternately performed based on at least the current training sample subset and the weight parameters of each training task. By alternating multiple training tasks in each round of training, and calculating the weight parameters of each training task in the current round of training based on the gradient tensor norm obtained in the previous round of training, it is beneficial to make different training tasks not affect each other, ensure the performance of each task, and balance the training effects of multiple tasks, thereby improving the performance of the multi-task network model and the accuracy of the multi-task processing results.

[0046] On the other hand, the multi-task network model provided by the present application may include a backbone network and multiple task networks. Each task network in the multiple task networks can use the output of the backbone network as input or fuse the input perception data, the feature data output by some intermediate layers of the backbone network, and the feature data finally output by the backbone network as the input of the corresponding task network to meet the requirements of task networks with higher resolution and improve the processing effect of the corresponding task network. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] The preferred embodiments of the present application are described below in conjunction with the accompanying drawings, in which:

[0048] Figure 1 It is a flowchart of a multi-task processing method provided by an embodiment of the present application;

[0049] Figure 2 It is a schematic diagram of a multi-task network model structure provided in an embodiment of the present application;

[0050] Figure 3 It is a schematic diagram of a multi-task network model structure provided by a specific example of this application;

[0051] Figure 4 It is a flowchart of a training method for a multi-task network model provided in an embodiment of the present application;

[0052] Figure 5 is a schematic diagram of the method flow of step S42 provided in an embodiment of the present application;

[0053] Figure 6is a schematic diagram of the network structure corresponding to the point cloud detection task provided by the specific example of this application;

[0054] Figure 7 It is a schematic diagram of the network structure corresponding to the point cloud segmentation task provided by the specific example of this application;

[0055] Figure 8 is a schematic diagram of a multi-task network model structure provided by another embodiment of the present application;

[0056] Fig. 9 is another schematic diagram of a network structure corresponding to the point cloud segmentation task provided by the specific example of this application;

[0057] Fig.10 is another schematic diagram of a model structure corresponding to the point cloud detection task provided by the specific example of this application;

[0058] Fig.11 It is a schematic diagram of the structure of the smart device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0059] Some embodiments of the present application are described below with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are only used to explain the technical principles of the present application and are not intended to limit the protection scope of the present application.

[0060] Based on the background technology, it can be seen that in the related art, when training a multi-task network model, multiple tasks affect each other, and it is impossible to ensure that the performance of multiple tasks is better than the effect of the corresponding tasks when they are trained separately, thereby affecting the performance of the multi-task network model and the accuracy of the multi-task processing results. In view of this, the present application provides a multi-task processing method.

[0061] See also Figure 1 As shown, Figure 1 : is a flowchart of a multi-task processing method provided by an embodiment of the present application, which may include:

[0062] Step S11: Acquire perception data of the target scene, where the perception data includes point cloud data and / or images;

[0063] Step S12: Input the perception data into the trained multi-task network model to obtain the multi-task processing result.

[0064] In some embodiments, the multi-tasking method of the present application can be applied to an autonomous driving scenario, and the target scene can be an environmental scene during driving.

[0065] In some embodiments, step S11 may specifically be directly acquiring point cloud data and / or images of the target scene; in other embodiments, step S11 may specifically be acquiring point cloud data of the target scene using a laser radar, and / or acquiring an image of the target scene through an image acquisition device. The following description will be made taking the perception data as point cloud data as an example.

[0066] In some embodiments, see Figure 2 As shown, the multi-task network model may include a backbone network and multiple task networks, the multiple task networks share the backbone network, and each task network uses at least the output of the backbone network as input.

[0067] Among them, the structures of the backbone network and multiple task networks can be set according to requirements.

[0068] In some embodiments, see Figure 3 As shown, Figure 3 It is a schematic diagram of a multi-task network model structure provided by a specific example of the present application, wherein the backbone network includes a voxelized network, a sparse network and a bird's-eye view (BEV) network arranged in cascade; and the multiple task networks may include a detection network and a segmentation network.

[0069] In some embodiments, the sparse network includes multiple sparse subnetworks arranged in cascade. For example, a sparse subnetwork of three stages may be included, wherein the first stage consists of two layers of three-dimensional sparse convolutional structures, and the step size of the last three-dimensional sparse convolutional structure is 2; the second stage has three layers of sparse convolutional structures, and the step size of the last sparse convolutional structure is 2; the third stage has four layers of sparse convolutional structures, and the step size of the last sparse convolutional structure is 2; the sparse subnetworks of the above three stages output sparse feature maps with step sizes of 2, 4, and 8, respectively.

[0070] In some embodiments, the bird's-eye view network may include a multi-layer two-dimensional convolutional structure. As an example, it may include 3-5 groups of convolutional structures, each of which may include a cascaded convolutional layer-batch normalization layer-activation layer.

[0071] In some embodiments, the sparse feature map with a step size of 8 output by the sparse network can be converted into a dense bird's-eye view feature map and sent to the bird's-eye view network for further feature extraction to obtain a final feature map with a step size of 8.

[0072] In some embodiments, the detection network may include a classification layer and a regression layer. Both the classification layer and the regression layer may adopt a set of conv3×3-conv1×1 structures, where conv represents a convolutional layer.

[0073] Sending the final feature map with a step size of 8 into the detection network can obtain the category and position of the target to be detected in the target scene, and sending the final feature map with a step size of 8 into the segmentation network can obtain the category.

[0074] In other embodiments, the structure of the multi-task network model may be set in other ways, and details may be found in the following description.

[0075] In some embodiments, see Figure 4 As shown, Figure 4 : is a flow chart of a training method for a multi-task network model provided in an embodiment of the present application, which may include:

[0076] Step S41: obtaining a training sample set, where the training sample set includes multiple training sample subsets;

[0077] Step S42: iteratively train the multi-task network model to be trained based on multiple training sample subsets until a trained multi-task network model is obtained.

[0078] In some embodiments, each training sample subset may include multiple batches of training samples, each batch of training samples corresponds to a different training task, and each batch of training samples may include multiple training samples. As an example, the training sample subset may include a first batch of training samples batch1 and a second batch of training samples batch2, the first batch of training samples batch1 may correspond to a point cloud detection task, and each training sample may be set with a target category and a location label, the second batch of training samples batch2 may correspond to a point cloud segmentation task, and each training sample may be set with a point cloud category label.

[0079] In each round of training, multiple training tasks are alternately performed based on at least the current training sample subset; and when performing any training task, the gradient tensor norm of the current training task to the common parameters in the backbone network is calculated; multiple training tasks share the backbone network and the training tasks correspond to the task networks one by one;

[0080] When performing any other round of training except the first round of training, weight parameters of each training task in the current round of training are calculated based on the gradient tensor norm of multiple training tasks obtained in the previous round of training; alternating multiple training tasks based on at least the current training sample subset includes alternating multiple training tasks based on at least the current training sample subset and the weight parameters of each training task.

[0081] In some embodiments, each training task can be based on Figure 2 or Figure 3 In some embodiments, see Figure 5 As shown, step S42 may be specifically as follows:

[0082] Performing a first round of training on the initial multi-task network model to be trained: performing multiple training tasks alternately based on at least a first training sample subset to obtain a multi-task network model after the first round of training; and calculating the first gradient tensor norm of each training task on the common parameters in the backbone network;

[0083] Perform a second round of training on the multi-task network model after the first round of training: calculate the first weight parameter of each training task in the current training based on the first gradient tensor norm of multiple training tasks obtained in the previous round of training; perform multiple training tasks alternately based on at least the second training sample subset and the first weight parameter of each training task to obtain the multi-task network model after the second round of training; and calculate the second gradient tensor norm of each training task for the common parameters in the backbone network;

[0084] The multi-task network model is iteratively trained by adaptively adjusting the training sample subset and performing steps similar to the second round of training in a loop;

[0085] Perform an n-th round of training on the multi-task network model after the n-1-th round of training: calculate the n-1-th weight parameter of each training task in the current training based on the n-1-th gradient tensor norm of multiple training tasks obtained in the previous round of training; perform multiple training tasks alternately based on at least the n-th training sample subset and the n-1-th weight parameter of each training task, and obtain the multi-task network model after the n-th round of training, that is, the trained multi-task network model.

[0086] The training purpose is to ensure that the training effects and performances of multiple training tasks are basically the same as those of individual training. The value of n is set, and the iterative training ends after the target training effect is achieved.

[0087] In some embodiments, alternating multiple training tasks based on at least the first training sample subset may include:

[0088] For each training task, the batch training samples corresponding to the current training task are input into the backbone network;

[0089] At least based on the output of the backbone network, the input of the current task network is determined, and the output result of the current task network is obtained;

[0090] Calculate the loss function based on the output of the current task network;

[0091] The backbone network and the current task network are trained based on the loss function.

[0092] As an example, see Figure 6 and Figure 7 As shown, Figure 6It is a schematic diagram of the network structure corresponding to the point cloud detection task provided in the specific example of this application, which can take the batch training samples corresponding to the point cloud detection task as input, such as batch1. After inputting batch1, the network structure performs forward propagation and backward propagation; during backward propagation, conventional methods in the field can be used to obtain the gradient vector of the common parameters in the backbone network and calculate the norm of the gradient vector. Figure 7 It is a schematic diagram of the network structure corresponding to the point cloud segmentation task provided in the specific example of the present application, which can take the batch training samples corresponding to the point cloud segmentation task as input, such as batch2. After batch2 is input, the network structure performs forward propagation and backward propagation; during backward propagation, the conventional method in the field can be used to obtain the gradient vector of the common parameters in the backbone network and calculate the norm of the gradient vector.

[0093] In some embodiments, when two task networks are provided and there are two corresponding training tasks, calculating the weight parameters of each training task in the current round of training based on the gradient tensor norms of multiple training tasks obtained in the previous round of training may include:

[0094] For each training task, the ratio of the gradient tensor norm of another training task obtained in the previous round of training to the gradient tensor norm of the current training task is used as the weight parameter of the current training task in the current round of training.

[0095] As an example, when there are point cloud detection tasks and point cloud segmentation tasks, the norm of the gradient tensor for the point cloud detection task obtained in the previous round of training is G 检测,n-1 , the gradient tensor norm of the point cloud segmentation task is G 分割,n-1 , the weight parameter of the point cloud detection task in the current round of training can be W 检测,n =G 分割,n-1 / G 检测,n-1 , the weight parameter of the point cloud segmentation task can be W 分割,n =G 检测,n-1 / G 分割,n-1 , to ensure balanced training for each task.

[0096] In some embodiments, performing multiple training tasks alternately based on at least the current training sample subset and weight parameters of each training task includes:

[0097] For each training task, the batch training samples corresponding to the current training task are input into the backbone network;

[0098] At least based on the output of the backbone network, the input of the current task network is determined, and the output result of the current task network is obtained;

[0099] Based on the output result of the current task network and the weight parameters corresponding to the current training task, the weight loss is obtained;

[0100] The backbone network and the current task network are trained based on the weight loss.

[0101] In some embodiments, based on the output result of the current task network and the weight parameter corresponding to the current training task, the weight loss can be obtained as follows: based on the output result of the current task network, the loss function L is obtained. i,n , based on the product of the loss function and the weight parameter L i,n *W i,n Get the weight loss. Among them, L i,n represents the loss function corresponding to the i-th task in the n-th round of training, W i,n The weight parameter corresponding to the i-th task in the n-th round of training, where n and i are positive integers.

[0102] In other embodiments, in order to meet the requirements of different tasks for feature resolution and avoid the problem of poor processing effect for tasks with relatively high resolution requirements, the feature data output by the middle layer of the backbone network and the feature data output by the backbone network can be fused according to the resolution requirements of different tasks and used as the input of the corresponding task network, or the feature data output by the middle layer of the backbone network and the feature data finally output by the backbone network can be fused based on the input perception data and used as the input of the corresponding task network to meet the requirements of the task network with higher resolution and improve the processing effect of the corresponding task network. For details, please refer to the description below.

[0103] See also Figure 8 As shown, Figure 8 : is a schematic diagram of a multi-task network model structure provided by another embodiment of the present application. The multi-task network model may include a backbone network and multiple task networks. The multiple task networks share the backbone network. The backbone network includes a cascaded voxel network, a sparse network, and a bird's-eye view network. The multiple task networks may include a detection network and a segmentation network. The structure of each network may be similar to Figure 3 Set up in the same way as the corresponding example.

[0104] Among them, the detection network can use the output of the backbone network as input. The model structure corresponding to the point cloud detection task is as follows: Figure 6 shown.

[0105] The segmentation network can determine the input based on the training samples at the input end, the feature data output by some layers in the sparse network, and the feature data output by the bird's-eye view network, and perform training for the point cloud segmentation task. The model structure corresponding to the point cloud segmentation task is as follows: Fig. 9 shown.

[0106] Accordingly, another embodiment of the present application provides a multi-tasking processing method that may include:

[0107] Obtain point cloud data of the target scene;

[0108] Input the point cloud data into the backbone network to obtain first feature data output by some of the sparse sub-networks in the plurality of sparse sub-networks and second feature data output by the bird's-eye view network;

[0109] The second feature data is used as the input of the detection network to obtain the detection result; and the fusion feature is obtained based on the perception data, the first feature data and the second feature data, and the fusion feature is used as the input of the segmentation network to obtain the segmentation result. Thus, the segmentation network with higher resolution requirements can perform the segmentation task more accurately and effectively, and improve the segmentation effect.

[0110] Accordingly, when training the multi-task network model, determining the input of the current task network based on at least the output of the backbone network, and obtaining the output result of the current task network may include:

[0111] Obtaining first feature data output by some sparse subnetworks among the plurality of sparse subnetworks and second feature data output by the bird's-eye view network;

[0112] Mapping the training samples to the first feature data and the second feature data respectively to obtain a plurality of mapped feature data;

[0113] Fusing the plurality of mapping feature data to obtain a second fused feature;

[0114] The second fusion feature is input into the current task network to obtain the output result of the current task network.

[0115] There may be multiple first feature data, and the multiple first feature data may be feature graphs with different step lengths.

[0116] As an example, the input of the segmentation network can be determined by the original point cloud data received at the input end, the first feature map with a step size of 2 and 4 output by the sparse network, and the second feature map with a step size of 8 output by the bird's-eye view network. By mapping the original point cloud to feature maps with step sizes of 2, 4, and 8, multiple mapping feature maps are obtained, and after splicing the multiple mapping features, the second fusion feature is obtained.

[0117] In other embodiments, the detection network may determine input using feature data output by some layers in the sparse network and feature data output by the bird's-eye view network, such as Fig.10 As shown, Fig.10 It is another schematic diagram of the model structure corresponding to the point cloud detection task provided in the specific example of this application.

[0118] Accordingly, another embodiment of the present application provides a multi-tasking processing method that may include:

[0119] Obtain point cloud data of the target scene;

[0120] Input the point cloud data into the backbone network to obtain first feature data output by some of the sparse sub-networks in the plurality of sparse sub-networks and second feature data output by the bird's-eye view network;

[0121] Based on the first feature data and the second feature data, the fused feature is fused and used as the input of the detection network to obtain the detection result; and based on the perception data, the first feature data and the second feature data, a fused feature is obtained, and the fused feature is used as the input of the segmentation network to obtain the segmentation result. This improves the overall processing effect of multi-task processing.

[0122] Accordingly, in some embodiments, when training the multi-task network model, determining the input of the current task network based on at least the output of the backbone network and obtaining the output result of the current task network may include:

[0123] Obtaining first feature data output by some sparse subnetworks in the plurality of sparse subnetworks and second feature data output by the bird's-eye view network; wherein the step length corresponding to the first feature data is smaller than the step length corresponding to the second feature data;

[0124] Fusing the first feature data and the second feature data to obtain a first fused feature;

[0125] The first fusion feature is input into the current task network to obtain the output result of the current task network.

[0126] In other embodiments, in order to ensure that different training tasks have a consistent update intensity on the multi-task network model, the number of training times for each task in each round of training can also be determined in advance based on the number of training samples corresponding to each task, so that the total number of training times for each training task is the same. For details, please refer to the description of the following embodiments.

[0127] It should be noted that this embodiment can be implemented based on any of the above embodiments. The same parts will not be repeated below, and the parts different from the above embodiments will be mainly described.

[0128] In this embodiment, before step S42, the following steps may also be included:

[0129] Obtain the number of training samples corresponding to each of the multiple training tasks in the training sample set;

[0130] The ratio of the number of training times for the multiple training tasks in each round of training is determined based on the number of training samples corresponding to each of the multiple training tasks, so that the total number of training times for each training task is the same.

[0131] In some embodiments, the multi-task network model includes two task networks, and two training tasks are performed alternately in each round of training; determining the ratio of the number of training times of multiple training tasks in each round of training based on the number of training samples corresponding to each of the multiple training tasks may include: calculating the inverse of the ratio of the number of training samples corresponding to each of the two training tasks, and obtaining the ratio of the number of training times of the two training tasks.

[0132] As a specific example, a multi-task network model can be used Figure 3 The structure shown, the training process of the multi-task network model can include:

[0133] Obtain the number of training samples N1 corresponding to the point cloud detection task and the number of training samples N2 corresponding to the point cloud segmentation task.

[0134] In the first round of training, based on the number of training samples N1 corresponding to the point cloud detection task and the number of training samples N2 corresponding to the point cloud segmentation task, the ratio of the number of training times for the point cloud detection task and the point cloud segmentation task in each round of training is determined to be N2 / N1. The following description takes N2 / N1=1:1, and each training task is performed once and alternating training as an example.

[0135] Take batch1 as input and perform the point cloud detection task. After the data is input, the network performs forward propagation and back propagation. During back propagation, the gradient vectors of the common parameters in the backbone network (such as the sparse network and the bird's-eye view network) can be obtained, and the norm of the gradient tensor can be calculated. Take the calculation of the 2 norm as an example.

[0136] Assume that the backbone network has 3 common parameters and their corresponding gradient vectors: X, Y and Z.

[0137] ||X|| 2 =sqrt(x 1 2 +x 2 2 +...+x m 2 )

[0138] ||Y|| 2 =sqrt(y 1 2 +y 2 2 +...+y m 2 )

[0139] ||Z|| 2 =sqrt(z 1 2 +z 2 2 +...+z m 2)

[0140] Where m is a positive integer, G 检测,1 =sqrt(||X|| 2 2 +||Y|| 2 2 +||Z|| 2 2 ).

[0141] Take batch2 as input and perform the point cloud segmentation task. After the data is input, the network performs forward propagation and back propagation. During back propagation, the gradient vector of the common parameters in the backbone network (such as the sparse network and the bird's-eye view network) can be obtained, and the norm of the gradient tensor can be calculated. Taking the calculation of the 2 norm as an example, the same as obtaining G 检测,1 The same method is used to obtain G 分割,1 .

[0142] In the next round of training, according to the G obtained in the first round of training 分割,1 and G 检测,1 Get the weight parameter W of the point cloud detection task in this round of training 检测,2 =G 分割,1 / G 检测,1 . Take batch3 as input and perform the point cloud detection task. After the data is input, the network performs forward propagation and back propagation. The loss function is calculated based on the output result obtained by the forward propagation, and the weight loss is obtained based on the product of the weight parameter and the loss function. The parameters in the model are updated based on the weight loss, and the gradient vector of the common parameters in the backbone network (such as the sparse network and the bird's-eye view network) can be obtained during back propagation, and the norm of the gradient tensor is calculated. Taking the calculation of the 2 norm as an example, G is obtained. 检测,2 .

[0143] According to the G obtained in the first round of training 分割,1 and G 检测,1 Get the weight parameter W of the point cloud segmentation task in this round of training 分割,2 =G 检测,1 / G 分割,1 . Take batch4 as input and perform the point cloud segmentation task. After the data is input, the network performs forward propagation and back propagation. The loss function is calculated based on the output result obtained by forward propagation, and the weight loss is obtained based on the product of the weight parameter and the loss function. The parameters in the model are updated based on the weight loss, and the gradient vector of the common parameters in the backbone network (such as the sparse network and the bird's-eye view network) can be obtained during back propagation, and the norm of the gradient tensor is calculated. Taking the calculation of the 2 norm as an example, G is obtained. 分割,2 .

[0144] By analogy, the performance of the point cloud segmentation task and the point cloud detection task in the multi-task network model is basically the same as that in single-task training.

[0145] It is understood by those skilled in the art that all or part of the processes in the method for implementing the above-mentioned embodiments of the present application can also be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device, medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory, random access memory, electric carrier signal, telecommunication signal and software distribution medium, etc. that can carry the computer program code.

[0146] In another aspect of the present application, a computer-readable storage medium is provided, in which a computer program is stored, and when the computer program is executed by a processor, the multi-tasking method described in any of the above embodiments is implemented. The computer-readable storage medium may be a storage device formed by various electronic devices. Optionally, the computer-readable storage medium in the embodiment of the present application is a non-temporary computer-readable storage medium.

[0147] In another aspect of the present application, there is provided an intelligent device, which may include at least one processor; a memory communicatively connected to the at least one processor; wherein a computer program is stored in the memory, and when the computer program is executed by the at least one processor, the multi-tasking method described in any of the above embodiments is implemented.

[0148] In some embodiments, the smart device may include driving devices, smart cars, robots and other devices. In some embodiments of the present application, the smart device also includes at least one sensor, which is used to sense information. The sensor is communicatively connected to any type of processor mentioned in the present application. Optionally, the smart device also includes an autonomous driving system, which is used to guide the smart device to drive itself or assist in driving. The processor communicates with the sensor and / or the autonomous driving system to complete the method described in any of the above embodiments.

[0149] See also Fig.11 As shown, Fig.11 is a schematic diagram of the structure of the smart device provided in the embodiment of the present application, Fig.11 exemplarily shows a structure in which the memory 111 and the processor 112 are connected via a bus, and only one of the memory 111 and the processor 112 is provided.

[0150] In other embodiments, the smart device may include multiple memories 111 and multiple processors 112. The program for executing the multitasking method of any of the above embodiments may be divided into multiple subprograms, each of which may be loaded and run by the processor 112 to execute different steps of the multitasking method of the above method embodiment. Specifically, each subprogram may be stored in a different memory 111, and each processor 112 may be configured to execute the program in one or more memories 111 to jointly implement the multitasking method of the above method embodiment.

[0151] In addition, the relevant user personal information that may be involved in the various embodiments of the present application shall be strictly in accordance with the requirements of laws and regulations, follow the principles of legality, legitimacy and necessity, and based on the reasonable purposes of business scenarios, to process the personal information that users actively provide during the use of products / services or generated due to the use of products / services, as well as the personal information obtained with the user's authorization.

[0152] The user personal information processed by the applicant in this application will vary depending on the specific product / service scenario, and shall be based on the specific scenario in which the user uses the product / service, and may involve the user's account information, device information, driving information, vehicle information or other related information. The applicant in this application will treat the user's personal information and its processing with a high degree of diligence.

[0153] The applicant attaches great importance to the security of user personal information and has taken reasonable and feasible security measures that meet industry standards to protect user information and prevent personal information from being accessed, disclosed, used, modified, damaged or lost without authorization.

[0154] So far, the technical solutions of the present application have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present application is obviously not limited to these specific embodiments. Without departing from the principles of the present application, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present application.

Claims

1. A multitasking method, characterized in that: include: Acquire perception data of a target scene, wherein the perception data includes point cloud data and / or an image; The perception data is input into a trained multi-task network model to obtain a multi-task processing result; wherein the multi-task network model includes a backbone network and multiple task networks, and the multiple task networks at least use the output of the backbone network as input; the multi-task network model is trained by the following steps: Acquire a training sample set, where the training sample set includes multiple training sample subsets; Iteratively training the multi-task network model to be trained based on the multiple training sample subsets until a trained multi-task network model is obtained; Wherein, when performing each round of training, multiple training tasks are alternately performed based on at least the current training sample subset; and when performing any training task, the gradient tensor norm of the current training task to the common parameters in the backbone network is calculated; the multiple training tasks share the backbone network and the training tasks correspond to the task network one by one; When performing any other round of training except the first round of training, the weight parameters of each training task in the current round of training are calculated based on the gradient tensor norm of the multiple training tasks obtained in the previous round of training; the alternating multiple training tasks based on at least the current training sample subset includes alternating multiple training tasks based on at least the current training sample subset and the weight parameters of each training task.

2. The method according to claim 1, characterized in that Before iteratively training the multi-task network model to be trained based on the multiple training sample subsets, the method further includes: Obtaining the number of training samples corresponding to each of the plurality of training tasks in the training sample set; Based on the number of training samples corresponding to each of the multiple training tasks, the ratio of the number of training times for the multiple training tasks in each round of training is determined, and based on the ratio of the number of training times, the number of training times corresponding to each of the multiple training tasks in each round of training is set so that the total number of training times for each training task is the same.

3. The method according to claim 1 or 2, characterized in that: Each training sample subset includes multiple batches of training samples, and each batch of training samples corresponds to a different training task; Alternating multiple training tasks based at least on the current training sample subset and weight parameters of each training task includes: For each training task, inputting the batch training samples corresponding to the current training task into the backbone network; Determine the input of the current task network at least based on the output of the backbone network, and obtain the output result of the current task network; Obtaining a weight loss based on an output result of the current task network and a weight parameter corresponding to the current training task; The backbone network and the current task network are trained based on the weight loss.

4. The method according to claim 3, characterized in that The backbone network includes a voxelized network, a sparse network and a bird's-eye view network arranged in cascade; the sparse network includes a plurality of sparse sub-networks arranged in cascade; The step of determining the input of the current task network at least based on the output of the backbone network and obtaining the output result of the current task network comprises: Obtaining first feature data output by some sparse subnetworks among the multiple sparse subnetworks and second feature data output by the bird's-eye view network; wherein the step length corresponding to the first feature data is smaller than the step length corresponding to the second feature data; Fusing the first feature data and the second feature data to obtain a first fused feature; The first fusion feature is input into the current task network to obtain an output result of the current task network.

5. The method according to claim 3, characterized in that: The batch training samples include multiple training samples; the backbone network includes a voxelized network, a sparse network and a bird's-eye view network arranged in cascade; the sparse network includes multiple sparse sub-networks arranged in cascade; The step of determining the input of the current task network at least based on the output of the backbone network and obtaining the output result of the current task network comprises: Obtaining first feature data output by some sparse subnetworks among the multiple sparse subnetworks and second feature data output by the bird's-eye view network; Mapping the training samples to the first feature data and the second feature data respectively to obtain a plurality of mapped feature data; fusing the plurality of mapping feature data to obtain a second fused feature; The second fusion feature is input into the current task network to obtain an output result of the current task network.

6. The method according to claim 1, characterized in that The multi-task network model includes two task networks, and two training tasks are performed alternately in each round of training; The step of calculating the weight parameters of each training task in the current round of training based on the gradient tensor norms of the multiple training tasks obtained in the previous round of training includes: For each training task, the ratio of the gradient tensor norm of another training task obtained in the previous round of training to the gradient tensor norm of the current training task is used as the weight parameter of the current training task in the current round of training.

7. The method according to claim 2, characterized in that The multi-task network model includes two task networks, and two training tasks are performed alternately in each round of training; The determining, based on the number of training samples corresponding to each of the multiple training tasks, the ratio of the number of training times of the multiple training tasks in each round of training includes: The inverse of the ratio of the number of training samples corresponding to the two training tasks is calculated to obtain the ratio of the number of training times of the two training tasks.

8. The method according to claim 6 or 7, characterized in that: The alternately performing multiple training tasks based at least on the current training sample subset includes: The detection task and the segmentation task are performed alternately based on at least the current training sample subset.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the multi-task processing method according to any one of claims 1 to 8 is implemented.

10. A smart device, characterized in that: include: at least one processor; a memory communicatively coupled to the at least one processor; The memory stores a computer program, and when the computer program is executed by the at least one processor, the multi-tasking method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Gradient normalization systems and methods for adaptive loss balancing in deep multitask networks

    CN111373419A

  • Multi-task classification method and device and related equipment

    CN111881968A

  • Ground point cloud determination method and device, storage medium and electronic device

    CN114299029A

  • Food detection method and related equipment

    CN114743193A

  • Behavior information determination method and device, storage medium and electronic device

    CN115527087A

Cited By

  • Multi-task detection model training method and device, equipment and storage medium

    CN121010874A

  • Multi-task processing model training method and device, storage medium and electronic equipment

    CN121145951A

  • A training method and device of a multitask processing model, a storage medium and an electronic device

    CN121145951B