Vehicle detection method based on feature extraction and multi-scale target detection

By combining feature extraction and multi-scale target detection methods with multi-scale convolution and loss function optimization, the accuracy and efficiency issues of vehicle detection in complex environments are solved, achieving efficient vehicle detection and pose estimation, and improving the model's adaptability and detection accuracy.

CN120997795APending Publication Date: 2025-11-21ANHUI HUICAI TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510998662.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-21
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

Existing deep learning-based vehicle detection methods face problems of insufficient detection accuracy and false negative rate in urban environments, especially in complex environments where they struggle to meet the requirements for rapid response and high precision.

Method used

We employ a feature extraction and multi-scale object detection approach, including the MSCDSC feature extraction module, the MSDH multi-task detection module, and ARDIoU loss function optimization. Through multi-scale convolution, depthwise separable convolution, gate mechanism, normalization and activation functions, DenseConnection and other techniques, combined with feature pyramid network and adaptive aspect ratio penalty term, we improve the model's feature extraction and prediction accuracy.

Benefits of technology

It significantly improves the accuracy and efficiency of vehicle detection, enhances the model's adaptability and computational efficiency in complex environments, achieves efficient target detection and attitude estimation, and improves the accuracy and robustness of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120997795A_ABST
    Figure CN120997795A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of vehicle target detection, and discloses a vehicle detection method based on feature extraction and multi-scale target detection, and the method comprises the steps: building a model, and carrying out the data preprocessing. According to the vehicle detection method based on feature extraction and multi-scale target detection, through the MSCDSC feature extraction module, the problems of multi-scale fusion, calculation efficiency, feature weight adjustment, non-linear representation and the like in feature extraction are effectively solved, the performance of a model on complex tasks is improved, the comprehensiveness, adaptability and calculation efficiency of feature extraction are enhanced, and the vehicle detection accuracy is improved. The method is suitable for wide image processing and other deep learning tasks; through the MSDH multi-task detection module, multi-scale processing characteristics of a feature pyramid network are fused, the method is suitable for diversified multi-task learning scenes such as target detection and attitude estimation, through feature sharing and bifurcation design, integrated processing of classification, regression and key point prediction is achieved, the efficiency of the model is ensured, and the prediction accuracy is also ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of vehicle target detection technology, specifically a vehicle detection method based on feature extraction and multi-scale target detection. Background Technology

[0002] With the rapid development of intelligent transportation, autonomous driving, and intelligent monitoring technologies, vehicle detection technology has become crucial in practical applications. This technology can quickly and accurately locate and classify vehicles in images and videos, thus supporting various intelligent scenarios such as traffic flow management, road anomaly detection, and parking management. The robustness and accuracy of the algorithm are particularly important when dealing with complex environments such as occlusion, lighting changes, and traffic congestion. With the advancements in deep learning and computer vision, urban vehicle detection has gradually become a research hotspot, placing higher demands on detection accuracy and false negative rates.

[0003] Currently, deep learning-based object detection methods are mainly divided into two-stage methods (such as the R-CNN series) and single-stage methods (such as the SSD and YOLO series). Two-stage methods have higher accuracy but slower processing speed, making them unsuitable for the fast-response urban vehicle detection needs; while single-stage methods have faster processing speed, but their accuracy may decrease slightly.

[0004] While these technologies have improved the overall performance of vehicle detection, accuracy and false negative rates remain significant challenges in the face of complex vehicle conditions in urban environments. Therefore, there is an urgent need to develop more efficient methods and further optimize models while ensuring accuracy to meet the high standards required for practical applications.

[0005] Therefore, a vehicle detection method based on feature extraction and multi-scale target detection is proposed. Summary of the Invention

[0006] To address the shortcomings of existing technologies, this invention provides a vehicle detection method based on feature extraction and multi-scale object detection. It features a complete workflow design that integrates feature extraction optimization, multi-scale object detection and pose estimation, and loss function improvement, thereby enhancing the accuracy and efficiency of vehicle detection in complex environments. Specifically, it includes four core steps: data preprocessing → feature extraction and multi-task detection module construction → loss function optimization → model training and testing evaluation, thus solving the aforementioned problems. Technical solution

[0007] To achieve the above objectives, the present invention provides the following technical solution: a vehicle detection method based on feature extraction and multi-scale target detection, comprising the following steps: Step 1: Build the model and perform data preprocessing: The original image dataset was divided into training, validation, and test sets in a 7:2:1 ratio. Image augmentation was performed on the training set to increase data diversity and thus improve the robustness of the model. Step 2: Construct the feature extraction and multi-task detection module for the model: This includes the construction of the MSCDSC feature extraction module and the MSDH multi-task detection module; Step 3: Optimize the ARDIoU loss function of the model; Step 4: Train and test the model.

[0008] Preferably, the main purpose of the training set in step one is to enable the model to grasp the core features and patterns of the data; the validation set helps us fine-tune the model parameters and select the optimal model architecture during the training process, while monitoring whether the model is overfitting or underfitting; the test set is used to finally evaluate the model's generalization ability and measure its performance on unseen data, which provides a fair benchmark for evaluating the effectiveness of the model in practical applications.

[0009] Preferably, the MSCDSC feature extraction module in step two includes: Multi-scale convolution module: The input feature map is convolved at multiple scales using 3x3, 1x1, and 5x5 convolution kernels. These kernels extract information at different scales to capture different receptive fields. The outputs of these three convolution operations are concatenated to form a feature map that integrates multi-scale information. Depthwise Separable Convolution and Residual Connections: The concatenated multi-scale feature maps are input into the Depthwise Separable Convolution module to further extract spatial features and effectively reduce computation. At the same time, the input feature maps before concatenation are skipped and directly connected to the output of the Depthwise Separable Convolution. Gate mechanism (hybrid): The output of the depthwise separable convolution is subjected to 1x1 convolution and Swish activation, and a Gate vector is generated by Sigmoid to control the weighting of features; the Gate vector and the feature map are multiplied by the element, that is, the weighted feature map is multiplied element-wise with the original feature map to form a new feature representation; Channel-wise normalization (LN) and activation: Layer Normalization (LN) is applied to the feature map after the Gate mechanism to normalize it channel by channel, making the feature distribution more stable and improving the generalization ability of the model. Then, the Swish activation function is used to introduce non-linear features into the model and enhance the feature representation ability. DenseConnection: DenseConnection preserves hierarchical information and connects features at different levels step by step to capture deeper features.

[0010] Preferably, the MSDH multi-task detection module in step two includes: Input feature maps (P3, P4, P5); P3, P4, and P5 are multi-scale feature maps extracted from the feature pyramid network. These feature maps have different resolutions and semantic information. Among them, P3 has the highest resolution but weaker semantics, while P5 has the lowest resolution but the strongest semantics. Feature fusion and sharing: Each input feature map first passes through a 1×1 convolution (Conv_GN1x1) to unify the number of channels, and then enters two 3×3 convolutional layers (Conv_GN3x3). An attention module (SE) is added to dynamically enhance the features of important channels. The convolutional module includes GN (Group Normalization) to maintain numerical stability during feature extraction and reduce the impact of batch size on model performance. The structure is divided into three main branches, each handling a different task: 1) Regression task (Conv_Reg branch): Used to regress the offset of the target box or other continuous values ​​(such as the position of key points); 2) Classification task (Conv_Cls branch): Used to classify the category of the target and output the confidence score of the category corresponding to each pixel; 3) Pose estimation / key point prediction task (Conv_Pose): After combining 1×1 and 3×3 convolutions, it generates features related to the position or pose estimation of key points; this output can be directly used to detect key feature points of human pose or objects.

[0011] Preferably, the optimized formula for the ARDIoU loss function in step three is: ; IoU refers to the ratio of the intersection to the union of the predicted bounding box and the ground truth bounding box; ρ 2 (b,b gt ) represents the square of the Euclidean distance between the center point of the predicted bounding box and the center point of the ground truth bounding box; c represents the diagonal length of the smallest rectangle that can simultaneously contain both the predicted and ground truth boxes. α is an adaptive factor used to control the weight of the aspect ratio penalty term, defined as α = IoU. w and h are the width and height of the predicted bounding box, respectively. gt and h gt These are the corresponding width and height of the actual frame.

[0012] Preferably, in step four, the model training first sets the network training hyperparameters: the SGD optimizer is used to optimize the model, the initial learning rate is 0.01, the final learning rate is 0.0001, the momentum is 0.937, the batch normalization size is 16, and the number of iterations is 150.

[0013] Preferably, in step four, model training specifically involves iteratively training the model using the training set, and only saving the weight information of the optimal model and the model in the last round during the training process.

[0014] Preferably, the test evaluation in step four is as follows: the performance of the improved model and the original YOLOv8n model on the evaluation metrics is used as the evaluation result. The evaluation metrics include accuracy, recall, average precision at an IOU threshold of 0.5 to measure detection accuracy, and computational cost and number of parameters to evaluate the complexity of the model.

[0015] Compared with existing technologies, this invention provides a vehicle detection method based on feature extraction and multi-scale target detection, which has the following advantages: 1. This vehicle detection method based on feature extraction and multi-scale object detection, through the MSCDSC feature extraction module, employs techniques including multi-scale convolution, depthwise separable convolution, gate mechanism, normalization and activation functions, and DenseConnection. This effectively addresses challenges in feature extraction such as multi-scale fusion, computational efficiency, feature weight adjustment, and nonlinear representation, significantly improving the model's performance on complex tasks. It also enhances the comprehensiveness, adaptability, and computational efficiency of feature extraction, making it suitable for a wide range of image processing and other deep learning tasks. Through the MSDH multi-task detection module, it integrates the multi-scale processing characteristics of feature pyramid networks, making it suitable for diverse multi-task learning scenarios such as object detection and pose estimation. Furthermore, through shared features and bifurcation design, it achieves integrated processing of classification, regression, and keypoint prediction, ensuring both model efficiency and prediction accuracy.

[0016] 2. This vehicle detection method based on feature extraction and multi-scale object detection improves the loss function by optimizing the target box regression loss function and refining the DIoU loss function by introducing an adaptive aspect ratio penalty term. This effectively adjusts the aspect ratio deviation between the predicted box and the ground truth box, thereby significantly improving the accuracy of the predicted box. This novel loss function not only enhances the sensitivity of DIoU to the aspect ratio of the target box but also simplifies the calculation process, achieving fast and accurate convergence, which greatly promotes the efficiency and accuracy of object detection model training. Attached Figure Description

[0017] Figure 1This is a schematic diagram of the structure and connection of the MSCDSC feature extraction module of the present invention; Figure 2 This is a schematic diagram of the structure and connection of the MSDH multi-task detection module of the present invention. Detailed Implementation

[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0019] Please see Figures 1-2 ; Example

[0020] A vehicle detection method based on feature extraction and multi-scale target detection includes the following steps: Step 1: Build the model and perform data preprocessing: The original image dataset was divided into training, validation, and test sets in a 7:2:1 ratio. Image augmentation was performed on the training set to increase data diversity and thus improve the robustness of the model. The main purpose of the training set is to enable the model to grasp the core features and patterns of the data; the validation set helps us fine-tune the model parameters and select the optimal model architecture during training, while monitoring whether the model is overfitting or underfitting; the test set is used to finally evaluate the model's generalization ability and measure its performance on unseen data, which provides a fair benchmark for evaluating the effectiveness of the model in practical applications. Step 2: Construct the feature extraction and multi-task detection module for the model: This includes the construction of the MSCDSC feature extraction module and the MSDH multi-task detection module; The MSCDSC feature extraction module includes: Multi-scale convolution module: The input feature map is convolved at multiple scales using 3x3, 1x1, and 5x5 convolution kernels. These kernels extract information at different scales to capture different receptive fields. The outputs of these three convolution operations are concatenated to form a feature map that integrates multi-scale information. Depthwise Separable Convolution and Residual Connections: The concatenated multi-scale feature maps are input into the Depthwise Separable Convolution module to further extract spatial features and effectively reduce computation. At the same time, the input feature maps before concatenation are skipped and directly connected to the output of the Depthwise Separable Convolution. Gate mechanism (hybrid): The output of the depthwise separable convolution is subjected to 1x1 convolution and Swish activation, and a Gate vector is generated by Sigmoid to control the weighting of features; the Gate vector and the feature map are multiplied by the element, that is, the weighted feature map is multiplied element-wise with the original feature map to form a new feature representation; Channel-wise normalization (LN) and activation: Layer Normalization (LN) is applied to the feature map after the Gate mechanism to normalize it channel by channel, making the feature distribution more stable and improving the generalization ability of the model. Then, the Swish activation function is used to introduce non-linear features into the model and enhance the feature representation ability. DenseConnection: DenseConnection preserves hierarchical information and connects features at different levels step by step in order to capture deeper features. The MSDH multi-task detection module includes: Input feature maps (P3, P4, P5); P3, P4, and P5 are multi-scale feature maps extracted from the feature pyramid network. These feature maps have different resolutions and semantic information. Among them, P3 has the highest resolution but weaker semantics, while P5 has the lowest resolution but the strongest semantics. Feature fusion and sharing: Each input feature map first passes through a 1×1 convolution (Conv_GN1x1) to unify the number of channels, and then enters two 3×3 convolutional layers (Conv_GN3x3). An attention module (SE) is added to dynamically enhance the features of important channels. The convolutional module includes GN (Group Normalization) to maintain numerical stability during feature extraction and reduce the impact of batch size on model performance. The structure is divided into three main branches, each handling a different task: 1) Regression task (Conv_Reg branch): Used to regress the offset of the target box or other continuous values ​​(such as the position of key points); 2) Classification task (Conv_Cls branch): Used to classify the category of the target and output the confidence score of the category corresponding to each pixel; 3) Pose estimation / key point prediction task (Conv_Pose): After combining 1×1 and 3×3 convolutions, it generates features related to the position or pose estimation of key points; this output can be directly used to detect key feature points of human pose or objects. Step 3: Optimize the ARDIoU loss function of the model; The optimized formula for the ARDIoU loss function is: ; IoU refers to the ratio of the intersection to the union of the predicted bounding box and the ground truth bounding box; ρ 2 (b,b gt ) represents the square of the Euclidean distance between the center point of the predicted bounding box and the center point of the ground truth bounding box; c represents the diagonal length of the smallest rectangle that can simultaneously contain both the predicted and ground truth boxes. α is an adaptive factor used to control the weight of the aspect ratio penalty term, defined as α = IoU. w and h are the width and height of the predicted bounding box, respectively. gt and h gt These are the corresponding width and height of the actual frame; Step 4: Train and evaluate the model; First, set the network training hyperparameters: use the SGD optimizer to optimize the model, with an initial learning rate of 0.01, a final learning rate of 0.0001, a momentum of 0.937, a batch normalization size of 16, and 150 iterations; Model training specifically involves iteratively training the model using the training set, saving only the weight information of the optimal model and the model from the last round during the training process; The evaluation was conducted by comparing the performance of the improved model with the original YOLOv8n model on the evaluation metrics. The evaluation metrics included accuracy, recall, average precision at an IOU threshold of 0.5 to measure detection accuracy, and computational cost and number of parameters to evaluate model complexity. The beneficial effects of this invention are as follows: Compared with previous vehicle detection methods, this proposal adopts the MSCDSC feature extraction module structure in the feature fusion network part of the model, replacing the original C2f module. This change aims to enhance the comprehensiveness, adaptability, and computational efficiency of feature extraction. We also propose an MSDH multi-task detection module, which inherits the advantages of Feature Pyramid Network (FPN) in multi-scale processing and can flexibly cope with different multi-task learning needs such as object detection and pose estimation. Through feature sharing and a branching network design, it can simultaneously and efficiently complete object classification, localization regression, and keypoint prediction tasks, achieving the goal of maintaining model efficiency without sacrificing prediction accuracy. In addition, the DIoU loss function has been finely optimized to further improve detection accuracy without increasing additional computational burden.

[0021] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to the embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A vehicle detection method based on feature extraction and multi-scale target detection, characterized in that, Includes the following steps: Step 1: Build the model and perform data preprocessing: The original image dataset was divided into training, validation, and test sets in a 7:2:1 ratio. Image augmentation was performed on the training set to increase data diversity and thus improve the robustness of the model. Step 2: Construct the feature extraction and multi-task detection modules for the model: This includes the construction of the MSCDSC feature extraction module and the MSDH multi-task detection module; Step 3: Optimize the ARDIoU loss function of the model; Step 4: Train and evaluate the model.

2. The vehicle detection method based on feature extraction and multi-scale target detection according to claim 1, characterized in that, The main purpose of the training set in step one is to enable the model to grasp the core features and patterns of the data; the validation set helps to fine-tune the model parameters and select the optimal model architecture during the training process, while monitoring whether the model is overfitting or underfitting; the test set is used to finally evaluate the model's generalization ability.

3. The vehicle detection method based on feature extraction and multi-scale target detection according to claim 1, characterized in that, The MSCDSC feature extraction module in step two includes: Multi-scale convolution module: The input feature map is convolved at multiple scales using 3x3, 1x1, and 5x5 convolution kernels. These kernels extract information at different scales to capture different receptive fields. The outputs of these three convolution operations are concatenated to form a feature map that integrates multi-scale information. Depthwise Separable Convolution and Residual Connections: The concatenated multi-scale feature maps are input into the Depthwise Separable Convolution module to further extract spatial features and effectively reduce computation. At the same time, the input feature maps before concatenation are skipped and directly connected to the output of the Depthwise Separable Convolution. Gate mechanism (hybrid): The output of the depthwise separable convolution is subjected to 1x1 convolution and Swish activation, and a Gate vector is generated by Sigmoid to control the weighting of features; the Gate vector and the feature map are multiplied by the element, that is, the weighted feature map is multiplied element-wise with the original feature map to form a new feature representation; Channel-wise normalization (LN) and activation: Layer Normalization (LN) is applied to the feature map after the Gate mechanism to normalize it channel by channel, making the feature distribution more stable and improving the generalization ability of the model. Then, the Swish activation function is used to introduce non-linear features into the model and enhance the feature representation ability. DenseConnection: DenseConnection preserves hierarchical information and connects features at different levels step by step to capture deeper features.

4. The vehicle detection method based on feature extraction and multi-scale target detection according to claim 1, characterized in that, The MSDH multi-task detection module in step two includes: Input feature maps (P3, P4, P5); P3, P4, and P5 are multi-scale feature maps extracted from the feature pyramid network. These feature maps have different resolutions and semantic information. Among them, P3 has the highest resolution but weaker semantics, while P5 has the lowest resolution but the strongest semantics. Feature fusion and sharing: Each input feature map first passes through a 1×1 convolution (Conv_GN1x1) to unify the number of channels, and then enters two 3×3 convolutional layers (Conv_GN3x3). An attention module (SE) is added to dynamically enhance the features of important channels. The convolutional module includes GN (Group Normalization) to maintain numerical stability during feature extraction and reduce the impact of batch size on model performance. The structure is divided into three main branches, each handling a different task: 1) Regression task (Conv_Reg branch): Used to regress the offset of the target box or other continuous values ​​(such as the position of key points); 2) Classification task (Conv_Cls branch): Used to classify the category of the target and output the confidence score of the category corresponding to each pixel; 3) Pose estimation / key point prediction task (Conv_Pose): After combining 1×1 and 3×3 convolutions, it generates features related to the position or pose estimation of key points; this output can be directly used to detect key feature points of human pose or objects.

5. The vehicle detection method based on feature extraction and multi-scale target detection according to claim 1, characterized in that, The optimized formula for the ARDIoU loss function in step three is: ; IoU refers to the ratio of the intersection to the union of the predicted bounding box and the ground truth bounding box; ρ 2 (b,b gt ) represents the square of the Euclidean distance between the center point of the predicted bounding box and the center point of the ground truth bounding box; c represents the diagonal length of the smallest rectangle that can simultaneously contain both the predicted and ground truth boxes. α is an adaptive factor used to control the weight of the aspect ratio penalty term, defined as α = IoU. w and h are the width and height of the predicted bounding box, respectively. gt and h gt These are the corresponding width and height of the actual frame.

6. The vehicle detection method based on feature extraction and multi-scale target detection according to claim 1, characterized in that, In step four, the model training first sets the network training hyperparameters: the SGD optimizer is used to optimize the model, the initial learning rate is 0.01, the final learning rate is 0.0001, the momentum is 0.937, the batch normalization size is 16, and the number of iterations is 150.

7. The vehicle detection method based on feature extraction and multi-scale target detection according to claim 1, characterized in that, In step four, model training specifically involves iteratively training the model using the training set, saving only the weight information of the optimal model and the model from the last round during the training process.

8. The vehicle detection method based on feature extraction and multi-scale target detection according to claim 1, characterized in that, The testing and evaluation in step four involves comparing the performance of the improved model and the original YOLOv8n model on evaluation metrics. Evaluation metrics include accuracy, recall, average precision at an IOU threshold of 0.5 to measure detection accuracy, and computational cost and number of parameters to evaluate model complexity.

Citation Information

Cited By

  • Lightweight vehicle target detection method and system based on RT-DETR

    CN121861623A