CN-116030245-B - Vehicle detection method and device based on DSLNet network
Abstract
The invention discloses a vehicle detection method and device based on DSLNet network, which are used for preprocessing a pre-acquired original image of a traffic vehicle and dividing the pre-acquired original image into a training image and a test image, constructing DSLNet a vehicle target detection network, comprising a main network module, a UDM enhanced feature extraction module and a YoloHead target detection head module, wherein the main network module is used for extracting feature information of the vehicle, the UDM enhanced feature extraction module is used for further enhancing the feature extraction capability, the YoloHead target detection head module is used for detecting a target object, the pre-allocated training image is input into the DSLNet vehicle target detection network for training, and the test image is input into the trained DSLNet vehicle target detection network for evaluation. The DSLNet network provided by the invention has a simple structure, adopts a mode of combining large convolution and small convolution to extract the characteristics, adopts depth separable convolution to reduce the quantity of parameters, can realize the real-time accurate identification of the vehicle in the road image, and has higher identification accuracy.
Inventors
- GAO SHANGBING
- CHEN XIAOBING
- ZHANG QINTAO
- LIU YU
- ZHANG YINGYING
- ZHANG HAIYAN
- WANG YUANYUAN
- HU XUYANG
- LI JIE
- LI SHAOFAN
Assignees
- 淮阴工学院
Dates
- Publication Date
- 20260508
- Application Date
- 20230110
Claims (4)
- 1. A vehicle detection method based on DSLNet networks, comprising the steps of: (1) Preprocessing a pre-acquired original image of a traffic vehicle, and dividing the pre-acquired original image into a training image and a test image; (2) Constructing DSLNet a vehicle target detection network; the DSLNet vehicle target detection network comprises a backbone network module, a UDM enhanced feature extraction module and a YoloHead target detection head module; the main network module is used for extracting characteristic information of a vehicle, the UDM enhanced characteristic extraction module is used for further enhancing the characteristic extraction capability of the vehicle, the YoloHead target detection head module is used for detecting a target object, the UDM enhanced characteristic extraction module firstly carries out characteristic extraction on images with the characteristic information size of 4A multiplied by 4A, the channel number of C extracted by a second layer DLC module in the main network in a convolution and downsampling mode, adopts common convolution with the convolution kernel size of 1 multiplied by 1, the step size of 1, changes the channel number, enables the image size to be changed from original 4A multiplied by A, reduces the image size to be one fourth of the original 4A multiplied by A, obtains images with the channel number of 4C and the channel number of 4A multiplied by 4A, extracts characteristic images with the channel number of C by a third layer DLC module in the main network in a convolution kernel size of 2A multiplied by 1, then carries out convolution kernel size of the image with the final layer DLC extracted by the DLC module in the main network in the convolution kernel size of 1 multiplied by 1, extracts the channel number of 4A multiplied by 4A, the final layer of DLC is further fused with the characteristic image with the channel number of 4A multiplied by 4A, the channel number of 4A is obtained by the final layer, the final layer is fused with the characteristic image with the channel number of 4A multiplied by C, and the final layer is fused with the other channel number of the image is obtained after the final channel number of the final channel is mixed with the image, and the image is mixed with the characteristic image, and the characteristic image is obtained by the final image is obtained by the channel, and the image is obtained, finally distributing the detection target to a detection head for detecting the target; (3) Inputting the pre-allocated training images into DSLNet vehicle target detection network for training; (4) And inputting the test image into a trained DSLNet vehicle target detection network, and evaluating DSLNet the overall performance of the vehicle target detection network.
- 2. The vehicle detection method based on DSLNet network according to claim 1, wherein the backbone network module in step (2) comprises a Focus module, a CBG module and four DLC modules, wherein the Focus module selects a value for every pixel of each image to obtain four independent characteristic layers, stacks the characteristic layers to expand the number of channels from original 3 to 12, the CBG module comprises a common convolution layer, a Batch Normalization layer and a GELU activation layer, the DLC module divides a backbone into a branch a and a branch b, the branch a sequentially comprises convolution kernel size of 1×1, a step length of 1, the number of channels is C, the convolution layer with the unchanged number of input and output channels and the convolution kernel size of 3, the number of input channels is C, the number of output channels is 2C, the branch b sequentially comprises a convolution kernel size of 1×1, the step length of 1, the number of input and output channels is C, the common convolution of 7×7, the step length of 1×7, the step length of C is1, the convolution core of 1×2, the step length of C is1, the two channels are sequentially activated, the step length of C is1×2, the common channels are merged, the step length of C is1, the common channel is 2, the step length of C is 3, the common channel is 2, the common channel is activated, and the step length of C is 3, and the common channel is activated.
- 3. The DSLNet network-based vehicle detection method according to claim 1, wherein the step (3) includes the steps of: (31) Inputting the distributed training sample data into DSLNet vehicle target detection network to train from scratch; (32) Calculating DSLNet a loss function of the vehicle target detection network, and optimizing parameters in the network by taking the minimum loss function as a target: ; Wherein n represents the number of categories of data, t i represents the corresponding feature points of each real frame, and p i represents the category prediction result of the feature points; (33) And when the trained target loss value converges, saving network model parameters to obtain a final DSLNet vehicle target detection network.
- 4. A DSLNet network-based vehicle detection apparatus comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the computer program when loaded into the processor implements the steps of the DSLNet network-based vehicle detection method as claimed in any one of claims 1 to 3.
Description
Vehicle detection method and device based on DSLNet network Technical Field The invention belongs to the technical field of computer vision, and particularly relates to a vehicle detection method and device based on DSLNet networks. Background In recent years, along with the rapid development of artificial intelligence and the continuous acceleration of the urban process, intelligent traffic systems have become a development trend of society. The vehicle target detection is one of important components of the intelligent traffic management system, is widely applied to the field of intelligent monitoring systems, greatly relieves traffic pressure and traffic accident mortality, and improves traffic management efficiency. Therefore, optimizing the vehicle target detection problem has great significance and application value for enhancing the traffic management system. At present, vehicle target detection algorithms are classified into two main categories, namely a conventional target detection algorithm and a target detection algorithm based on deep learning. The traditional target detection algorithm is an algorithm combining a classifier based on machine learning and manually extracted local features, and mainly comprises two aspects of feature extraction and feature classification, wherein the extracted features are usually gradient direction histograms, and target detection is carried out by combining a support vector machine or AdaBoost and other methods. Information is easily lost to cause errors, and a scene with high accuracy and high detection speed cannot be satisfied. Compared with the traditional target detection algorithm, the target detection algorithm based on deep learning has higher accuracy, faster detection speed and stronger robustness. For example RCNN, fast RCNN, yolo, etc., but the detection of the intelligent traffic field for complex environments and small targets still shows the problems of long detection time, low accuracy, poor robustness, etc., and is difficult to meet the requirements in actual scenes. Disclosure of Invention Aiming at the problems of poor robustness, complex process, long detection time and high omission factor of the existing vehicle detection, the invention provides a vehicle detection method and device based on DSLNet network model. The invention provides a vehicle detection method based on DSLNet network model, which comprises the following steps: (1) Preprocessing a pre-acquired original image of a traffic vehicle, and dividing the pre-acquired original image into a training image and a test image; (2) The method comprises the steps of constructing DSLNet a vehicle target detection network, wherein the DSLNet vehicle target network comprises a main network module, a UDM reinforced feature extraction module and a YoloHead target detection head module, the main network module is used for extracting feature information of a vehicle, the UDM reinforced feature extraction module is used for further enhancing the feature extraction capability, and the YoloHead target detection head module is used for detecting a target object; (3) Inputting the pre-allocated training images into DSLNet vehicle target detection network for training; (4) And inputting the test image into a trained DSLNet vehicle target detection network, and evaluating DSLNet the overall performance of the vehicle target detection network. The main network module in the step (2) further comprises a Focus module, a CBG module and four DLC modules, wherein the Focus module selects a value for every other pixel of each image to obtain four independent characteristic layers, the four independent characteristic layers are stacked to expand the channel number from original 3 to 12, the CBG module comprises a common convolution layer, a Batch Normalization layer and an GELU activation layer, the DLC module divides a main body into an a branch and a b branch, the a branch sequentially comprises a convolution kernel with the size of 1 x 1, the step size is 1, the channel number is C, the convolution layer with the unchanged input and output channel number and the convolution kernel with the size of 3 are subjected to separable convolution, the input channel number is C, the output channel number is 2C, the b branch sequentially comprises a convolution kernel with the size of 1 x 1, the step size is 1, the input channel number is C, the convolution kernel with the input channel number is 2C, the convolution kernel with the size of 1 x 7, the input channel number is C, the convolution kernel with the input channel number is 2C, the convolution kernel with the size of 1 x 1, the input channel number is 2C, the convolution channel number is 2C and the common channel number is 1 x 1, the input channel number is activated, and the common channel number is activated through the common channel number and the common channel is 1 x 64, and the common channel is activated by the common channel, and the common channel i