Lightweight multi-task network model for vehicle multi-attribute identification based on roadside perception image
By constructing a lightweight multi-task network model and utilizing a task-driven adaptive multi-task network and a progressive cyclic pruning framework, the problems of computational redundancy and resource constraints in vehicle multi-attribute recognition are solved, enabling efficient vehicle brand, type, and color recognition in roadside edge devices.
Patent Information
- Application Number
- CN202511125027.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-12
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2045-08-12
AI Technical Summary
Existing technologies suffer from computational redundancy, resource constraints, and insufficient accuracy in vehicle multi-attribute recognition. In particular, when deployed as roadside edge devices, they cannot effectively utilize the correlation between attributes, resulting in low recognition efficiency.
A lightweight multi-task vehicle multi-attribute recognition model is constructed using a task-driven adaptive multi-task network (TamNet) and progressive cyclic pruning (PCP) framework. Through adaptive feature sharing and progressive pruning optimization, the model achieves efficient joint recognition of vehicle brand, type and color.
It achieves a significant reduction in parameters and computational load while maintaining accuracy, adapts to the edge deployment of roadside CSIV, and provides an efficient solution for multi-attribute vehicle recognition.
Smart Images

Figure CN120976679A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of intelligent transportation system (ITS), and particularly relates to a vehicle multi-attribute recognition method based on roadside perception images in a road system (CVIS), which is particularly suitable for resource-limited roadside edge device deployment. BACKGROUND
[0002] Vehicle multi-attribute recognition (including brand, type and color) is the core basis of intelligent transportation system, and is widely used in vehicle re-identification, law enforcement tracking and traffic analysis. Traditional methods rely on multiple independent networks for single attribute recognition, resulting in computational redundancy and low efficiency. Specific problems include: repeated feature extraction: multiple models are deployed in parallel, which requires repeated extraction of low-level features, cannot utilize the correlation between attributes, and increases the computational overhead. Deployment bottleneck: the roadside CVIS unit is limited by the computing resources and power consumption of the edge device, and the existing multi-task learning framework has not optimized the model compression. Insufficient accuracy: single-task models ignore the coupling relationship between attributes, reducing the recognition robustness. Therefore, a lightweight multi-task network is needed to reduce the number of parameters and computational complexity while ensuring accuracy, and to adapt to the edge deployment of road-side CSIV. SUMMARY
[0003] The purpose of the present application is to overcome the deficiencies in the prior art and provide a lightweight multi-task vehicle attribute recognition method based on roadside perception images. Through a task-driven adaptive multi-task network (TamNet) and a progressive cyclic pruning (PCP) framework, efficient joint recognition of vehicle brand, type and color is achieved, and edge deployment is optimized, providing a basis for subsequent implementation of precise vehicle recognition in highway scenarios.
[0004] Technical solution: To achieve the above purpose, the present application provides a lightweight multi-task network model for vehicle multi-attribute recognition based on roadside perception images, comprising the following steps:
[0005] S1: Construct a vehicle multi-attribute recognition dataset in a highway scenario;
[0006] S2: For the diversified needs of road-side applications, based on an adaptive feature sharing mechanism, a multi-task vehicle multi-attribute recognition model (Task-Driven Adaptive Multi-Task Network, TamNet) for roadside perception images is constructed;
[0007] S3: For the lightweight needs of road-side applications, the network is further integrated with a progressive multi-task cyclic pruning (Progressive Cyclic Pruning, PCP) to realize model lightweight, and a lightweight multi-task vehicle multi-attribute recognition model TamNet-PCP for roadside perception images is constructed.
[0008] Further, the specific method of constructing the vehicle multi-attribute recognition dataset under the highway scene in step S1 is as follows:
[0009] S1-1: 19,826 real highway scene vehicle face images are obtained from single-lane original data obtained by traffic monitoring cameras to construct the Southeast University vehicle multi-attribute recognition dataset (The multi-task dataset for vehicle recognition of Southeast University, SEU-MultiVR);
[0010] S1-2: brand (131 types), type (3 types: car, truck, bus), and color (8 types: white, black, gray, red, blue, yellow, green, night) are labeled, and the dataset covers illumination changes, motion blur, and weather factors (rainy day, foggy day, etc.);
[0011] S1-3: The data is divided into training set and test set, the ratio is 7:3, a total of 13,878 training images and 5,947 test images.
[0012] Further, the specific steps of constructing the multi-task vehicle multi-attribute recognition model TamNet in step S2 are as follows:
[0013] S2-1: After the input image is uniformly scaled to 224x224 resolution, it is first processed by a 7x7 convolutional layer to extract spatial features and generate a basic feature map.
[0014] S2-2: The basic feature map is then input into a series of cascaded residual blocks for deep feature learning. The residual block includes a shared block and a task-specific block: for each specific task, the feature map only flows through the residual block related to it (i.e., the shared block and the specific block corresponding to the task), and for unrelated task blocks (i.e., the specific blocks of other tasks), the shortcut connection inherent in the residual structure is used to skip the block to avoid unnecessary calculations;
[0015] S2-3: After the feature learning stage, the model uses independent fully connected layer classifiers for multi-task recognition. The specific feature maps learned by each task are input into the corresponding classifier: FC1 (brand, 131 types), FC2 (type, 3 types), and FC3 (color, 8 types). The model training is completely driven by the multi-task loss function;
[0016] S2-4: The strategy variable dynamically determines whether to select or skip each residual block for each task. To achieve adaptive feature sharing, the model automatically trains the strategy variable during the training process, and its value is supervised and optimized by the overall loss function during the training process;
[0017] S2-5: The strategy variable directly determines the selection path of the network. If a residual block is selected by multiple tasks for calculation, it is defined as a shared block. A phased optimization method is used in the training process to improve training stability.
[0018] Further, the specific content of the step S2-2 of using the shortcut connection inherent in the residual structure to skip the block is: introducing a binary decision variable strategy. The model makes a decision for each task during the training process Introducing a binary selection strategy u l,k ∈{0,1} in each layer l, where u l,k =1 indicates that the l-th layer participates in the forward calculation of the task , and u l,k =0 indicates that the l-th layer does not participate in the forward calculation of the task . Specifically, the activation output calculation of the l-th layer for task k is as formula (1), where is the residual block transformation function.
[0019]
[0020] Further, the specific content of the step S2-3 that the model training is completely driven by the multi-task loss function is: the total loss function is only defined as formula (2), where is the cross-entropy loss of task , and λ k is the weight coefficient of task .
[0021]
[0022] Further, the specific content of the automatic training strategy variable in step S2-4 is: using Gumbel-Softmax reparameterization technology to realize differentiable sampling: defining the strategy parameter using [α l,k ,1-α l,k ] instead of binary variable u l,k , and then relaxing through formula (3) to obtain continuous decision variable, where G is Gumbel noise and τ is annealing temperature coefficient. The gradient is propagated through the continuous variable v l,k during the training phase, and finally discretized into the final strategy u l,k through the argmax operation.
[0023]
[0024] Further, the specific content of the step S2-5 of the phased optimization method is: fixing all residual blocks as fully shared (u l,k =1, k), after the network establishes a robust general feature representation to adapt to the feature coupling requirements of strongly related tasks, it enters joint optimization and updates the strategy parameters {α l,k} and network model parameters W using an alternating update mechanism.
[0025] Further, the specific steps of the lightweight multi-task vehicle multi-attribute identification model TamNet-PCP in step S3 are as follows:
[0026] S3-1: Perform iterative channel pruning in ascending order of task complexity, and prune the kth task Perform structured pruning with channel importance I(·) as an indicator;
[0027] S3-2: For the kth pruning, perform local retraining after pruning to update the current task Relevant parameters are restored to restore accuracy;
[0028] S3-3: After the kth task completes pruning and retraining, the model enters the incremental learning stage of the k+1th task, and restarts the network in the pruned part of the previous task to learn the new task;
[0029] S3-4: After completing all task pruning, fix the shared feature extraction network model parameters and only fine-tune the fully connected layers to compensate for the representation shift caused by structural changes to achieve global accuracy balance.
[0030] Further, the specific content of the structured pruning in step S3-1 is to perform structured pruning with a fixed proportion according to formula (4), where is the loss function, and g(W, d, j, k) is defined by four parameters: network model parameters W, d∈{0,1} represents the size to be compressed, j represents the index of the jth row or column in W, and the task number k.
[0031]
[0032] Further, the specific content of the structured pruning in step S3-2 is to update the current task The specific content of the relevant parameters is to define the reserved channel set as Get the current network model parameter matrix And generate a binary mask matrix Where d l is the number of channels in the lth layer. After pruning, update the current task based on formula (5) The relevant parameters are restored to restore accuracy, where W out represents the fully connected layer weight, and a dynamic constraint formula (6) is introduced in the gradient update, i.e., the weights of the first K-1 tasks are fixed during the retraining process.
[0033]
[0034] Further, the specific content of restarting the network to learn the new task in step S3-3 is: loading the frozen parameters of the first K tasks from the global model with the historical mask The initial parameters of the new task k+1 can be represented as formula (7), wherein is the non-updatable parameter, is the updatable parameter.
[0035]
[0036] Further, the specific content of achieving global precision balance in step S3-4 is: introducing a knowledge distillation regularization term optimization target according to formula (8) to achieve global precision rebalancing, wherein, is the cross-entropy loss of task , and alpha controls the representation alignment strength of the teacher model and the new task.
[0037]
[0038] Beneficial effects: Compared with the prior art, the present application realizes lightweight and efficient joint identification of vehicle brand, type and color based on multi-task learning and progressive network pruning, and can provide technical support for vehicle information perception in highway scenes. BRIEF DESCRIPTION OF DRAWINGS
[0039] Figure 1 is a part of the SEU-MultiVR dataset sample graph (brand, model, color).
[0040] Figure 2 is the model framework diagram of TamNet-PCP.
[0041] Figure 3 is the detailed flowchart of progressive cyclic pruning (PCP).
[0042] Figure 4 is the visual effect analysis diagram on the SEU-MultiVR dataset. The first row is the output result of vehicle brand identification, the second row is the output result of vehicle type identification, and the third row is the output result of vehicle color identification. Among them: (a) single task model (b) multi-task model (TamNet) (c) sparse model (TamNet-PCP). DETAILED DESCRIPTION
[0043] The present application will be further illustrated below in combination with the drawings and specific embodiments.
[0044] The application provides a lightweight multi-task network model for vehicle multi-attribute recognition based on roadside perception images, and comprises the following steps:
[0045] S1: constructing a vehicle multi-attribute recognition dataset in a highway scene, specifically:
[0046] S1-1: using single-lane original data obtained by a traffic monitoring camera to obtain 19,826 face images of vehicles in real highway scenes to construct a multi-task dataset for vehicle recognition of Southeast University (SEU-MultiVR);
[0047] S1-2: labeling brands (131 types), types (3 types: cars, trucks, and buses), and colors (8 types: white, black, gray, red, blue, yellow, green, and night), and the dataset covers illumination changes, motion blur, and weather factors (rainy days, foggy days, etc.);
[0048] S1-3: dividing the data into a training set and a test set, with a ratio of 7:3, a total of 13,878 training images and 5,947 test images.
[0049] S2: for the diversified needs of roadside applications, a multi-task vehicle multi-attribute recognition model (Task-Driven Adaptive Multi-Task Network, TamNet) for roadside perception images is constructed based on an adaptive feature sharing mechanism, as shown in the structure Figure 2 , and specifically:
[0050] S2-1: after the input image is uniformly scaled to a resolution of 224x224, the spatial features are first extracted by a 7x7 convolutional layer to generate a basic feature map.
[0051] S2-2: the basic feature map is then input into a series of cascaded residual blocks for deep representation learning, and the residual blocks include shared blocks and task-specific blocks: for each specific task, the feature map only flows through the residual blocks related to it (i.e., the shared blocks and the specific blocks corresponding to the task), and for irrelevant task blocks (i.e., the specific blocks of other tasks), the skip connection inherent in the residual structure is used to skip the blocks to avoid unnecessary calculations. A binary decision variable strategy is introduced, and the model uses a binary decision variable strategy during the training process for each task A binary selection strategy u l,k ∈{0,1} is introduced at each layer l, where u l,k =1 indicates that the lth layer participates in the forward calculation of the task , and u l,k =0 indicates that the lth layer does not participate in the task The forward computation, specifically, the l-th layer for the task The activation output is calculated as shown in formula (1), where This is the residual block transformation function.
[0052]
[0053] S2-3: After the feature learning stage, the model uses independent fully connected layer classifiers for multi-task recognition. The specific feature maps learned by each task are input into their corresponding classifiers: FC1 (make, 131 classes), FC2 (type, 3 classes), and FC3 (color, 8 classes). Model training is entirely driven by the multi-task loss function. The total loss function is defined only by formula (2), where For the k-th task Cross-entropy loss, λ k For the task The weighting coefficients.
[0054]
[0055] S2-4: The policy variable dynamically determines whether to select or skip each residual block for each task. To achieve adaptive feature sharing, the model automatically trains the policy variable during training, and its values are supervised and optimized by the overall loss function. Differentiable sampling is achieved using the Gumbel-Softmax reparameterization technique: defining policy parameters... Use [α] l,k ,1-α l,k Replace the binary variable u l,k Then, the continuous decision variables are obtained through relaxation processing using formula (3), where G is Gumbel noise and τ is the annealing temperature coefficient. During the training phase, the continuous variable v... l,k Gradient propagation is performed, and finally, the gradient is discretized into the final policy u through the argmax operation. l,k .
[0056] v l,k =softmax((log[α]) l,k ,1-α l,k ]+G) / τ) (3) S2-5: Policy variables directly determine the network's path selection. If a residual block is selected for computation by multiple tasks, it is defined as a shared block. A phased optimization method is used in the training process to improve training stability. During the warm-up period, all residual blocks are fixed in a fully shared state (u l,k =1, k), after the network establishes robust general feature representation to adapt the feature coupling requirements of strongly related tasks, it enters joint optimization and updates policy parameters {a l,k} and network model parameters W using an alternating update mechanism.
[0057] S3: To meet the lightweight requirements of road-side applications, the network further integrates Progressive Cyclic Pruning (PCP) to achieve model lightweight, and constructs a lightweight multi-task vehicle multi-attribute recognition model TamNet-PCP for road-side perception images, as shown in the flowchart Figure 3 , which is specifically:
[0058] S3-1: Iterative channel pruning is performed in ascending order of task complexity, and the kth task Channel importance I(·) is used as an indicator, and a fixed proportion of structured pruning is performed according to formula (4), where is the loss function, and g(W, d, j, k) is defined by four parameters: network model parameters W, d∈{0,1} represents the size to be compressed, j represents the index of the jth row or column in W, and task number k.
[0059]
[0060] S3-2: For the kth pruning, define the reserved channel set as Get the current network model parameter matrix and generate a binary mask matrix where d l is the number of channels in the lth layer. After pruning, update the current task based on formula (5) related parameters to restore accuracy, where W out represents the weights of the fully connected layer, which is listed separately here to facilitate subsequent differentiation. At the same time, introduce a dynamic constraint formula (6) in the gradient update, that is, fix the weights of the first K-1 tasks during the retraining process.
[0061]
[0062] S3-3: After the kth task completes pruning and retraining, the model enters the incremental learning stage of the k+1th task, and restarts the network in the pruned part of the previous task to learn the new task. Load the frozen parameters of the first K tasks from the global model and the historical mask The initial parameters of the new task k+1 can be represented by formula (7), where is the non-updatable parameter, is the updatable parameter.
[0063]
[0064] S3-4: After completing all task pruning, fix the shared feature extraction network model parameter matrix Only the full connection layer W out is fine-tuned to compensate for the representation shift caused by structural changes, and the knowledge distillation regularization term is introduced into the optimization objective according to formula (8) to achieve global accuracy rebalancing, where, is the cross-entropy loss of task , and α controls the representation alignment strength of the teacher model to the new task.
[0065]
[0066] To verify the rationality of selecting multi-attribute vehicle information when constructing an adaptive multi-task model, Table 1 shows the training results of different task combinations. The performance changes between multi-task and single-task models show asymmetric characteristics. In the task 1+task 2 combination, the accuracy of the two tasks is improved by 0.88% and 0.10%, respectively, and the training efficiency is improved, indicating that there is positive knowledge transfer between these tasks. On the contrary, the task 1+task 3 combination leads to a decrease in the accuracy of the two tasks by 0.45% and 0.27%, respectively, indicating that there is competitive interference in the feature space. The task 2+task 3 combination maintains the high accuracy of task 2 (99.55%) while improving the performance of task 3 by 1.11%. The joint training of vehicle brand, model, and color recognition tasks achieves comprehensive optimization: task 1 accuracy is improved by 1.53% (from 93.96% to 95.49%), task 3 is improved by 1.09% (93.76% to 94.85%), and task 2 maintains the baseline advantage (99.60% to 99.70%). The overall improvement of 0.91% significantly exceeds the maximum gain of 0.53% of the double-task combination.
[0067] Table 1 Test performance of different multi-task learning combinations on the SEU-MultiVR dataset
[0068]
[0069] To verify the proposed PCP framework exhibits comprehensive performance advantages in multi-task scenarios, as shown in Table 2, its core value lies in balancing the trade-off between model efficiency and task performance. First, the multi-task model achieves significant optimization compared to the single-task model: the average accuracy is improved from 95.77% to 96.68%, while the computational cost is reduced from 5.46 to 1.82, and the parameter amount is compressed from 33.6G to 11.25G, fundamentally reducing the computational and storage costs while slightly improving accuracy. Second, if the progressive pruning strategy is not used, there will be a serious trade-off problem: to achieve a high pruning rate similar to progressive pruning (90%), the parameter amount is reduced to 9.62G, which causes the model accuracy to drop to 94.30%; while maintaining the accuracy of task 1 at 95.46% (the same as the proposed method), only weak pruning can be achieved, with the parameter amount reduced from 11.25G to 10.62G. Third, the pruning order has a key impact: compared to the task difficulty order proposed in this study (task 2-3-1), the random order has an accuracy of only 95.86% at a pruning rate of 0.90, while the reverse order (task 1-3-2) has an average accuracy of 95.83% under the same conditions, although the accuracy of the simpler task 2 has improved slightly, but the accuracy of the high-difficulty task 1 has dropped significantly from 95.49% to 93.56%, which verifies the rationality of the proposed method of prioritizing high-difficulty tasks. Finally, in the progressive pruning method based on task difficulty, the accuracy is 96.65% (only a 0.03% decrease) when maintaining a pruning rate of 0.90, while increasing the pruning ratio to 0.85 will cause the average accuracy to drop significantly to 96.00%, so 90% pruning ratio is the optimal solution, successfully balancing model efficiency and task performance. In summary, this fully demonstrates the advantages of multi-task model, progressive pruning framework, task difficulty order, and 90% pruning ratio in improving model efficiency while minimizing accuracy loss.
[0070] Table 2 Test performance of different pruning methods on SEU-MultiVR dataset
[0071]
[0072] To verify the effectiveness of TamNet-PCP, we use the gradient-weighted class activation mapping visualization technique to compare the feature attention areas of the standard single-task model ( Figure 4 (a)), task-adaptive multi-task model ( Figure 4 (b)), and progressive pruning multi-task recurrent model ( Figure 4 (c)). The heat map generated by stacking the channel dimensions of the feature map shows significant differences: in the multi-task architecture, for the vehicle brand identification task (first row), Figure 4 (b) the attention area is from Figure 4(a) extends the single car logo positioning to the overall air intake grille structure, demonstrating a global feature perception capability that can mitigate misjudgments caused by similar car logos or blurred imaging; for relatively simple vehicle model recognition tasks (Bank of China), Figure 4 (b) By creating a high-density response band in the headlight and grille area instead of extracting complete front-face features, task-related local feature extraction is enhanced; in the color recognition task (last row), Figure 4 (b) It exhibits unique structural perception transfer characteristics, shifting attention from key components ( Figure 4 (a) Steering areas such as the hood panel and bumper where color is stable. It's worth noting that the progressive pruning model ( Figure 4 (c) Demonstrates the advantages of refined features: While maintaining the ability to capture features for multiple tasks, its brand recognition region is more compact and has higher weight, which confirms the effectiveness of our pruning strategy in reducing feature redundancy and enhancing core features.
[0073] The technical means disclosed in this invention are not limited to those disclosed in the above embodiments, but also include technical solutions composed of any combination of the above technical features. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this invention, and these improvements and modifications are also considered within the scope of protection of this invention.
Claims
1. A lightweight multi-task network model for vehicle multi-attribute recognition based on roadside perception images, characterized in that: Includes the following steps: S1: Construct a multi-attribute vehicle recognition dataset for highway scenarios; S2: To address the diverse needs of roadside applications, TamNet, a multi-task vehicle multi-attribute recognition model for roadside perception images, is constructed based on an adaptive feature sharing mechanism. S3: To address the lightweight requirements of roadside applications, the network further integrates Progressive Multi-Task Cyclic Pruning (PCP) to achieve model lightweighting, constructing a lightweight multi-task vehicle multi-attribute recognition model, TamNet-PCP, for roadside perception images.
2. The lightweight multi-task network model for vehicle multi-attribute recognition based on roadside perception images according to claim 1, characterized in that: The specific method for constructing the vehicle multi-attribute recognition dataset in the highway scenario in step S1 is as follows: S1-1: Using raw single-lane data obtained from traffic monitoring cameras, construct a vehicle multi-attribute recognition dataset by acquiring vehicle face images in real highway scenarios; S1-2: Label the brand, type and color. The dataset covers lighting changes, motion blur and weather factors. S1-3: The data is divided into training and test sets in a ratio of 7:
3.
3. The lightweight multi-task network model for vehicle multi-attribute recognition based on roadside perception images according to claim 1, characterized in that: The specific steps for constructing the multi-task vehicle multi-attribute recognition model TamNet in step S2 are as follows: S2-1: After the input image is uniformly scaled to a resolution of 224×224, it first performs spatial feature extraction through a 7×7 convolutional layer to generate a basic feature map; S2-2: The basic feature map is then fed into a series of cascaded residual blocks for deep representation learning. The residual blocks contain shared blocks and task-specific blocks: For each specific task, the feature map only flows through the residual blocks associated with it, i.e., the shared blocks and the task-specific blocks. For blocks of irrelevant tasks, i.e., the task-specific blocks of other tasks, the inherent shortcut connections of the residual structure are used to skip the blocks and avoid performing unnecessary calculations. S2-3: After the feature learning stage, the model uses independent fully connected layer classifiers for multi-task recognition. The specific feature maps learned by each task are input into their corresponding classifiers: FC1, FC2 and FC3, which correspond to brand, type and color respectively. The model training is driven entirely by the multi-task loss function. S2-4: The policy variable dynamically determines whether to select or skip each residual block for each task. In order to achieve adaptive feature sharing, the model automatically trains the policy variable during training, and its value is supervised and optimized by the overall loss function during training. S2-5: Policy variables directly determine the network's path selection. If a residual block is selected for computation by multiple tasks, it is defined as a shared block. A phased optimization method is used in the training process to improve training stability.
4. The lightweight multi-task network model for vehicle multi-attribute recognition based on roadside perception images according to claim 3, characterized in that: The specific content of skipping blocks using the inherent shortcut connection of the residual structure in step S2-2 is as follows: A binary decision variable strategy is introduced, and the model skips blocks for each task during training. A binary selection strategy is introduced in each layer l. l,k ∈{0,1}, where u l,k =1 indicates that the l-th layer participates in the task. Forward computation, u l,k =0 indicates that the l-th layer does not participate in the task. The forward computation, specifically, the l-th layer for the task The activation output is calculated as shown in formula (1): in This is the residual block transformation function.
5. The lightweight multi-task network model for vehicle multi-attribute recognition based on roadside perception images according to claim 3, characterized in that: The specific content of model training in step S2-3, which is entirely driven by the multi-task loss function, is as follows: The total loss function is defined only by formula (2): in For the task Cross-entropy loss, λ k For the task The weighting coefficients.
6. The lightweight multi-task network model for vehicle multi-attribute recognition based on roadside perception images according to claim 3, characterized in that: The specific content of the automatic training policy variables in step S2-4 is as follows: Differentiable sampling is achieved using the Gumbel-Softmax reparameterization technique; policy parameters are defined. Use [α] l,k ,1-α l,k Replace the binary variable u l,k Then, the continuous decision variables are obtained by relaxation treatment using formula (3): v l,k =softmax((log[α l,k ,1-a l,k ]+G) / τ) (3) Where G is Gumbel noise, τ is the annealing temperature coefficient, and during the training phase, it is represented by the continuous variable v. l,k Gradient propagation is performed, and finally, the gradient is discretized into the final policy u through the argmax operation. l,k .
7. The lightweight multi-task network model for vehicle multi-attribute recognition based on roadside perception images according to claim 3, characterized in that: The specific content of the phased optimization method in steps S2-5 is as follows: During the preheating period, all residual blocks are fixed in a fully shared state, that is... After establishing robust, general feature representations to accommodate the feature coupling requirements of strongly correlated tasks, the network then proceeds to joint optimization, employing an alternating update mechanism to update the strategy parameters {α}. l,k } and network model parameters W.
8. The lightweight multi-task network model for vehicle multi-attribute recognition based on roadside perception images according to claim 1, characterized in that: The specific steps of the lightweight multi-task vehicle multi-attribute recognition model TamNet-PCP in step S3 are as follows: S3-1: Perform iterative channel pruning in ascending order of task complexity for the k-th task. Structured pruning is performed using channel importance I(·) as the indicator; S3-2: For the k-th pruning iteration, perform local retraining after pruning to update the current task. Relevant parameters were used to restore accuracy; S3-3: After the pruning and retraining of the k-th task is completed, the model enters the incremental learning phase of the k+1-th task, restarting the network in the pruned part of the previous task to learn the new task. S3-4: After completing all task pruning, fix the parameters of the shared feature extraction network model, and only fine-tune the fully connected layers to compensate for the representation shift caused by structural changes, so as to achieve global accuracy balance.
9. The lightweight multi-task network model for vehicle multi-attribute recognition based on roadside perception images according to claim 8, characterized in that: The specific content of the structured pruning in step S3-1 is as follows: perform structured pruning with a fixed ratio according to formula (4): in The loss function, g(W,d,j,k), is defined by four parameters: network model parameters, d∈{0,1} representing the size to be compressed, j representing the index of the j-th row or column in W, and task number k; In step S3-2, the current task is updated. The specific details of the relevant parameters are as follows: Define the set of reserved channels as... Obtain the current network model parameter matrix And generate a binary mask matrix Where d l The number of channels in layer l; after pruning, local retraining is performed based on formula (5) to update the current task. The relevant parameters are used to restore accuracy, and dynamic constraint formula (6) is introduced in the gradient update, that is, the weights of the first K-1 tasks are fixed during the retraining process. Among them W out Indicates the weights of the fully connected layer; The specific content of restarting the network to learn the new task in step S3-3 is as follows: loading the frozen parameters of the previous K tasks from the global model. With historical mask The initial parameters of the new task k+1 are expressed as formula (7): in This is a non-updateable parameter. For updatable parameters; The specific content of achieving global accuracy balance in step S3-4 is as follows: Based on formula (8), a knowledge distillation regularization term is introduced to optimize the objective, thereby achieving global accuracy rebalancing. Among them, For the task Cross-entropy loss, α-controlled teacher model Alignment strength with the representation of the new task.
Citation Information
Patent Citations
Depth learning based vehicle multi-attribute federation analysis method
CN105740906A
Vehicle attribute multi-task collaborative identification method based on self-attention
CN114155496A
Multi-task attention learning method for fine-grained automobile recognition
CN116912612A
SAR ship target detection method based on multi-task reinforcement learning automatic pruning method
CN118941973A