Vehicle tracking method based on lightweight DCDSNet
By improving the VGG19 model and adopting the lightweight DCDSNet method, the existing convolutional neural network has solved the problem of large amount of calculations and large number of parameters in vehicle tracking and detection, and achieved more efficient vehicle tracking and detection.
Patent Information
- Application Number
- CN202411544442.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-18
AI Technical Summary
The existing convolutional neural network has a large amount of calculations and a large number of parameters in vehicle tracking and detection, which makes it difficult to run on computers with limited storage capacity.
A vehicle tracking method based on lightweight DCDSNet is proposed. By improving the VGG19 model, the fully connected module is replaced with a convolutional layer, the depth separation convolution is adopted, and the lightweight dense connection and bottleneck structure is set up between the convolutional modules. to reduce the number of parameters and calculate the requirements.
It effectively reduces the size of network parameters, reduces the calculation needs, improves the accuracy of vehicle tracking, and avoids overfitting problems caused by excessive parameters.
Smart Images

Figure CN119477975A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of vehicle tracking, and in particular to a vehicle tracking method based on lightweight DCDSNet. Background Art
[0002] With the goal of building smart mines, the intelligentization of mineral resource transportation has become one of the important research topics. Intelligent transportation systems are an important part of smart mines, including real-time vehicle tracking and detection tasks. In the existing technology, real-time vehicle tracking and detection uses convolutional neural network recognition. The tracking performance of convolutional neural networks can be enhanced by deepening the network layer, adjusting the network width, and changing the resolution of the input image. However, these adjustments greatly increase the number of variables in the network and the computing requirements.
[0003] In current tracking algorithms implemented by convolutional neural networks, there are many parameters that need to be calculated and stored, which makes it difficult to run on computers with limited storage capacity. Summary of the invention
[0004] The purpose of the present invention is to provide a vehicle tracking method based on lightweight DCDSNet in order to reduce the amount of calculation.
[0005] The purpose of the present invention can be achieved by the following technical solutions:
[0006] A vehicle tracking method based on lightweight DCDSNet, the method comprising:
[0007] Acquire the image to be detected, input the image to be detected into the vehicle tracking model, and obtain the tracking result;
[0008] Among them, the vehicle tracking model is an improved VGG19 model, and the improved VGG19 model is a lightweight DCDSNet model. The improved VGG19 model is constructed based on the original VGG19 model, lightweight dense connection and deep separable convolutional network. On the basis of the original VGG19 model, the improved VGG19 model replaces the fully connected module of the original VGG19 model with a convolutional layer, replaces the convolution of the original VGG19 model with a deep separable convolution, and distributes lightweight dense connections in the third module, the fourth module and the fifth module of the original VGG19 model.
[0009] Furthermore, the original VGG19 model consists of five convolutional modules, the size and depth of the convolutional layer within each module remain consistent and are connected through a maximum pooling layer, and the third, fourth and fifth convolutional modules all include 4 consecutive convolutional layers.
[0010] Furthermore, in the improved VGG19 model, bottleneck modules are provided between the second convolution module and the third convolution module, the third convolution module and the fourth convolution module, and the fourth convolution module and the fifth convolution module. The bottleneck module between the i-th module and the i+1-th module belongs to the i+1-th module. The third, fourth and fifth modules in the VGG19 model include bottleneck modules arranged in sequence and 4 consecutive convolution layers.
[0011] Furthermore, the bottleneck module is a 1×1 point convolution.
[0012] Furthermore, the improved VGG19 model sets lightweight dense connections in the bottleneck modules of the third, fourth and fifth convolutional modules and 4 consecutive convolutional layers, and sets serial numbers for the bottleneck module and 4 consecutive convolutional layers of the same convolutional module, which are respectively from the 1st layer to the 5th layer. The output of the jth layer is used as the input of the i+1, i+2...5th layers, and the output of the previous layer is also used as the input of the next layer.
[0013] Furthermore, the convolutional layer of the fully connected module is replaced with 3 layers.
[0014] Furthermore, the convolutional layers of the fully connected module are replaced with one conv7×7 and two conv1×1 convolutional layers.
[0015] Furthermore, among the five convolution modules, the first convolution module and the second convolution module both contain two convolution layers.
[0016] Furthermore, the convolutional layers of the first convolutional module and the second convolutional module in the improved VGG19 model are replaced with depthwise separable convolutions.
[0017] Furthermore, the calculation process of the depth-wise separable convolution is:
[0018] Num parameters =W F ×H F ×D in +D in ×N
[0019] Among them, the dimension of the input feature map is W F ×H F ×D in , the convolutional layer contains a certain number N of convolution kernels of a specific size.
[0020] Compared with the prior art, the present invention has the following beneficial effects:
[0021] The present invention converts full connection into convolution, greatly reducing the size of parameters, and introduces depthwise separable convolution to further reduce the number of parameters. At the same time, a bottleneck structure is added between the convolution modules of the present application, aiming to reduce the dimension of the feature map and having the effect of reducing the number of parameters. The model is optimized by combining dense connection to improve the accuracy of tracking while preventing excessive parameters. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a model structure diagram of the present invention;
[0023] Figure 2 is the original VGG19 network;
[0024] Figure 3 is the receptive field when three convolution kernels are stacked, where Figure 3 (a), (b) and (c) are the receptive fields of conv3×3 stacking, conv5×5 stacking and conv7×7 stacking respectively;
[0025] Figure 4 Convolution replaces full connection comparison structure diagram;
[0026] Figure 5 This is the Block-DSConv structure diagram;
[0027] Figure 6 There are two convolution calculation processes: Figure 6 a is the traditional convolution calculation process, Figure 6 b is the depth-separable convolution calculation process;
[0028] Figure 7 This is a schematic diagram of the densely connected convolution module structure of Block-DCConv1;
[0029] Figure 8 Divide the data set into training and test sets;
[0030] Fig. 9 The curves of Acc and Loss of the DCDSNet test model as the number of training times increases. Fig. 9 Figures a, b, and c show that the Accuracy curves of the three experiments gradually converge to about 0.95 as the number of training times increases. Fig. 9 Figures d, e, and f respectively show that the Loss change curves of the three experiments gradually converge to about 0.02 as the number of training times increases. DETAILED DESCRIPTION
[0031] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.
[0032] The present invention proposes a vehicle tracking method based on lightweight DCDSNet, the method comprising:
[0033] Acquire the image to be detected, input the image to be detected into the vehicle tracking model, and obtain the tracking result;
[0034] Among them, the vehicle tracking model is an improved VGG19 model, and the improved VGG19 model is a lightweight DCDSNet model. The improved VGG19 model is constructed based on the original VGG19 model, lightweight dense connection and deep separable convolutional network. On the basis of the original VGG19 model, the improved VGG19 model replaces the fully connected module of the original VGG19 model with a convolutional layer, replaces the convolution of the original VGG19 model with a deep separable convolution, and distributes lightweight dense connections in the third module, the fourth module and the fifth module of the original VGG19 model.
[0035] The model structure diagram of the present invention is as follows Figure 1 As shown. The structure of the VGG19 network model is as follows Figure 2 As shown. VGG19 has 16 convolutional layers, which are composed of five convolutional modules. The size and depth of the convolutional layers in each module are consistent and connected through the maximum pooling layer. The first module contains two convolutional layers, each using 64 3×3 convolution kernels; the output of this module is connected to a maximum pooling layer, using a 2×2 sliding window and a step size of 2. The maximum pooling layer of the entire network uses this configuration; the second module also includes two convolutional layers using 128 3×3 convolution kernels; the third module consists of four convolutional layers using 256 3×3 convolution kernels; the fourth and fifth modules both contain four convolutional layers using 512 3×3 convolution kernels, and the fifth module is followed by a maximum pooling layer and three fully connected layers. The input image is a 3-channel image of size 224×224. Although the VGG19 model has excellent recognition performance, its number of parameters is very large. The three fully connected layers of this network have a total of 102765544 parameters, accounting for 71% of the total number of parameters in VGG19. Too many parameters can lead to overfitting and reduce computational speed.
[0036] According to the propagation process of the feature map in the VGG19 model, the length and width of the feature map are halved each time it passes through a maximum pooling layer, and the depth of the feature map increases each time it passes through a convolutional layer. With the increase of the layers in the model, the focus on the local information of the original image is gradually reduced, and the image features are redistributed in different depth levels, and finally these feature maps are passed to the fully connected layer. Although the compression function of the fully connected layer has advantages and disadvantages to the model as a whole, it compresses the feature map into a feature vector. Although such compression is helpful for data processing, the disadvantage is that it may cause the loss of local information. Further, the classification layer is insufficient in feature extraction, affecting the classification accuracy. The DCDSNet network proposed in the present invention is based on the VGG19 network framework.
[0037] The DCDSNet algorithm uses the VGG19 framework as its backbone network. By replacing the last three fully connected layers with 1×1 convolutional layers, the network parameters are greatly reduced. Depth-wise separable convolution is introduced to replace the original convolution to solve the hardware limitations on memory access speed and throughput. The number of channels in the convolution space is adjusted by increasing or decreasing the expansion factor. In fact, the expansion factor is the convolution kernel. Each convolution kernel corresponds to an output channel. The so-called channel is a feature map. The model is optimized using dense connection technology, such as Figure 1 Cross-layer connections are used at each stage, and shallow features are input into the subsequent deep network modules, so that the DCDSNet model can extract feature information more comprehensively. The following is an analysis of the advantages of DCDNet using smaller convolution kernels, as well as a specific analysis of the DCDSNet network constructed by three technical convolutions replacing full connections, depthwise separable convolutions replacing original convolutions, and dense connections.
[0038] DCDSNet uses smaller convolution kernels because of the small amount of computation, the small number of parameters, and the receptive field of the multi-level accumulated small convolution kernels is equivalent to that of the large convolution kernels. Convolution involves not only the amount of computation, but also affects the receptive field. Small convolution kernels are easy to deploy on mobile devices, can meet real-time processing, and are easy to train. The size of the convolution kernel involves parameter updates, the size of the feature map, whether enough features are extracted, the complexity of the model, and the number of parameters.
[0039] In order to highlight the computational advantage of small convolution kernels, we take the same conv3×3, conv5×5, conv7×7, conv9×9 and conv11×11 and perform convolution on the 224×224×3 RGB image. The parameters of the convolution layer and the size of the feature map are shown in Table 1.
[0040] (1) From Table 1, we can see that the number of parameters of the feature map is not greatly affected by the size of the convolution kernel.
[0041] When observing the parameters of a single convolution kernel or feature map parameters, the total number of parameters for the two structures under different convolution kernel settings is about 300,000. However, this structure increases the computational complexity of the convolution operation, which is reflected in the calculation formula listed in the table. The last multiplication by two represents the multiplication and addition operation. For consistency, the step size is set to 4 here. From the data, we can see that the computational complexity of the five different convolution kernels reaches 16 million, 45 million, 140 million, and 200 million respectively, and the difference in computational complexity is very large. In terms of the number of parameters, the convolution kernel parameters are usually at the level of 100,000 and rarely exceed one million. Compared with the fully connected layer, this is because the number of parameters is the product of the number of neurons in the upper layer of the feature map and the number of fully connected kernels, which increases the computational complexity. In addition, the combined use of multiple small convolution kernels is also a factor. Compared with a single large convolution kernel, it can be less computationally intensive, which is an important proof that DCDSNet uses small convolution kernels. At the same time, the number of parameters is also reduced.
[0042] The receptive fields of different convolution kernels are as follows: Figure 3 As shown. When passing through three layers of conv3×3 convolution, the elements of the bottom input can be considered as the width or height of the feature map when the input neuron is convolved to obtain a neuron, which means that each element of the bottom input corresponds to a neuron in the feature map generated after the convolution operation. These three networks correspond to the convolution kernels conv3×3, conv5×5 and conv7×7 with a stride of 1 and padding of 0 at 3, 1 and 1 layers respectively. Assuming that the input of all three networks is 7, it can also be seen that the receptive field size obtained by stacking 2 layers of 3×3 convolution is equivalent to that of 1 layer of 5×5 convolution, and the receptive field obtained by stacking 3 layers of 3×3 convolution is equivalent to that of 7×7 convolution.
[0043] Table 1 Comparison of parameters and calculation amount under different convolution kernels
[0044]
[0045]
[0046] Or, in a three-layer conv3×3 network, a neuron in the last two outputs can see a receptive field equal to 3 in the previous layer, 5 in the layer above, and 7 in the layer above (i.e., the input). The concept of receptive field in a convolutional neural network (CNN) and how it expands as the number of layers in the network increases. Receptive field refers to the range of response of a particular neuron to a local area of the input image in a CNN. Figure 3 In (c), a three-layer convolutional network is described, where each layer uses a 3x3 convolution kernel.
[0047] In this network, assume that the present invention focuses on one neuron in the last two outputs. The receptive field of this neuron is described as being equivalent to 3 in the previous layer, 5 in the layer above, and 7 in the layer above. This means that in order to calculate the output of this neuron, it needs to "feel" the 3x3 local area in the previous layer, and each neuron in this local area also needs to feel the 5x5 local area above the previous layer, and the 7x7 local area in the layer above. In other words, the response of this neuron to the input image is transmitted layer by layer through convolution operations, and each layer expands the receptive field. This layer-by-layer transmission method enables the network to understand the global features of the input image at a higher level, thereby achieving more complex feature extraction and representation. A reasonable explanation for using 3×3 convolution instead of receptive field: the advantages of using small convolution kernels over large convolution kernels are more activation functions, richer features, and better discrimination. Using more convolution kernels makes the decision function more discriminative. As for the convolution itself, 3×3 is enough to capture more feature changes than 7×7: the nine units of 3×3, with the middle unit as the center of the receptive field, can capture the feature changes of the top, bottom, left, right and diagonal lines. The network goes two layers deep and has two additional nonlinear ReLU functions, which allows the network to have more capacity and stronger discrimination ability.
[0048] One of the more innovative features of the DCDSNet network model is the conversion of full connection to convolution. The structure comparison diagram of convolution replacing full connection is as follows: Figure 4As shown. During the test phase, the original three fully connected layers in the network were changed to one conv7×7 and two conv1×1 convolutional layers. This change caused the network to lose the fully connected layer. The feature maps in the middle of the network can be of different sizes, allowing the network to process inputs of any size. The upper half of the convolutional structure is the original VGG network. The last three layers are fully connected layers. Their outputs are 4096, 4096 and 1000 respectively. The lower half is the last three layers of the DCDSNet framework. The last three layers are changed to convolutional layers, and their outputs are 1×1×4096, 1×1×4096 and 1×1×1000 respectively. The fully connected layer FC6, with an output of 4096, receives a 8×8×512 feature map as input. In the fully connected layer, since there is no need to pay attention to the locality of the elements, the total of 32768 elements of 8×8×512 can be regarded as a whole. All of these input elements are connected to every element of the output layer, that is, each input will have 4096 outputs, and the size of the network is 8×8×512×4096. For FC7, which has 4096 inputs and outputs, since each input is connected to one output, that is, each output has 4096 connections, the 4096 inputs have a total of 4096×4096 connections, which gives FC8 a parameter size of 4096×1000. In the DCDSNet network, when switching to convolution, the first convolution is used to obtain 4096 outputs, so the width and height of the 8×8×512 feature map must be reduced, and the depth must be increased. In addition, the 8×8 convolution reduces the width and height to 1×1, and the depth level is increased to 4096, that is, a 1×1×4096 feature map is obtained. Because the second convolution input is also 1×1×4096, it still produces an output of 1×1×4096, and the width, height and depth of the three dimensions remain unchanged, so it can be calculated that the convolution kernel size of this layer is also 1×1, and the number of channels is also 4096. Then, the size of the convolution parameters considering all 4096 outputs is (1×1×4096)×4096. The third convolution is similarly calculated as (1×1×4096)×1000. It can handle convolution calculations of arbitrary resolution without resizing the original graph. The most obvious difference between convolution and full connection is local connection, but both use global information, but convolution uses it by stacking layers. Full connection directly uses all feature maps of the previous layer and has greater sparsity, while convolution obtains global information by increasing the depth of the network, layer by layer based on the input of the current layer.
[0049] The original VGG model has a large number of parameters and takes a long time to train. Therefore, the first two layers of convolution in the convolution block are replaced with depthwise separable convolution in the DCDSNet framework, and the improved module is named Block-DSConv. The structure of the model is as follows Figure 5 shown.
[0050] (1) Depthwise separable convolution vs. original convolution parameter comparison and calculation. Figure 5 As shown in , the resulting feature map has the same size as the feature map obtained by the original network. However, there is a big difference between the two in terms of the number of parameters. Suppose the dimension of the input feature map is given as W F ×H F ×D in , and the convolution layer contains a certain number of convolution kernels of a certain size, such as N. The calculation process of the standard convolution can be expressed by formula 5.1:
[0051] Num parameters =W F ×H F ×D in ×N; (5.1)
[0052] Num parameters =W F ×H F ×D in +D in ×N; (5.2)
[0053]
[0054] The calculation method of depth-wise separable convolution is shown in formula 5.2. Formula 5.3 gives the relationship between the number of depth-wise separable convolution parameters and the number of standard convolution parameters.
[0055] (2) Calculate the parameters of depthwise separable convolution and traditional convolution respectively. If the size of the input feature map is 224×224×3, the first convolution module of the VGG19 model contains two convolution layers, each containing 64 convolution kernels. Among them, the first layer has 3×3×3 convolution kernels, and the second layer has 3×3×64 convolution kernels. Each convolution layer is divided into channel-by-channel convolution and point-by-point convolution. For example, in the first layer, a 3×3×3 convolution kernel is split into three separate convolution kernels of size 3×3 and depth 1. In the second layer, a large convolution kernel is decomposed into 64 small convolution kernels. After using the depthwise separable convolution technique, the size of the input feature map remains 224×224×3. The size of the output feature map is 224×224×64. The number of parameters of the depthwise separable convolution is 3×3×3+3×64+3×3×64+64×64=4891, while the sum of the number of parameters of the two convolutional layers in the original network is 3×3×3×64+3×3×64×64=38592. The number of parameters has been reduced by 87.33%, but at the same number of iterations, the accuracy of the model is 90.35%, indicating that the reduction in parameters also reduces the performance of the model. In order to solve this phenomenon, dense connection technology is introduced in DCDSNet to further improve the accuracy of the network.
[0056] (3) Depthwise separable convolution is a convolution operation for extracting feature maps that combines depthwise convolution (DW) and pointwise convolution (PW) components. Depthwise separable convolution has a lower number of parameters and computational cost than traditional convolution operations. However, depthwise convolutions are relatively computationally inefficient because they require a large amount of data transfer relative to the number of floating-point operations performed, which means that memory access speed is a key factor. Although throughput may be limited on alternative hardware, the memory architecture in the processor provides high-bandwidth memory access, which can significantly improve the performance of such computationally inefficient operations. Experimental data shows that the MBConv block, which places the depthwise convolution between two pointwise "projection" convolutions, is the most efficient. These pointwise convolutions increase or decrease the dimensionality of the activations by adjusting the "expansion factor" or convolution kernel around the spatial depthwise convolution. Although this expansion can lead to good task performance, it also creates a very large activation tensor, which increases the dominant memory requirements and ultimately limits the maximum batch size (epoch) that can be used.
[0057] In depthwise convolution (DW), each channel is processed by a separate convolution kernel, ensuring that each channel is affected only by its corresponding convolution kernel. This method ensures that the number of feature maps output is exactly the same as the number of input channels. For example, when performing a deep convolution on a three-channel 5×5 pixel color input image, the convolution is performed entirely on a two-dimensional plane, and each channel is performed independently, resulting in three feature maps. The core of deep convolution is that the number of convolution kernels is the same as the number of input layer channels, each channel generates a feature map, and the number of feature maps is not increased. In addition, this operation processes each input channel independently, without integrating the information of different channels at the same position. Therefore, it is usually necessary to combine these independent feature maps through point convolution to create new feature maps.
[0058] The process of pointwise convolution (PW) is very similar to standard convolution. It uses a convolution kernel of size 1×1×M, where M represents the number of channels in the previous layer. The dimension of the convolution kernel is 1×1×number of input channels×number of output channels. The characteristic of using 1×1 convolution is that the number of related convolution parameters can be calculated, for example, N_pointwise is 1×1×3×4=12, and C_pointwise is 1×1×3×3×3×4=108. After pointwise convolution, the output is still 4 feature maps, whose size is the same as that generated by regular convolution.
[0059] Figure 6 Comparison between depthwise convolution and normal convolution.
[0060] In theory, increasing network parameters and depth can improve network performance. However, in practice, these factors may lead to problems such as gradient vanishing or gradient exploding, thereby limiting the depth and performance of the network. The DCDSNet model backbone network proposed in the present invention uses the VGG19 model, which is the deepest and has the most parameters in the VGG network. Although it does not perform particularly well in the current vehicle tracking network, in order to improve the tracking accuracy, dense connection technology is used to optimize the model. This improvement enables the DCDSNet model to extract feature information more effectively, thereby enhancing the tracking accuracy on the mine car dataset. The improved convolution block is named Block-DCConv, a densely connected convolution module. In a densely connected network, the dimension of the feature map of each layer of convolution in the same convolution module must remain consistent. DCDSNet contains five convolution modules with the same structure and feature map depth, which makes it particularly suitable for applying dense connection technology. The structure of Block-DCConv1 is as follows Figure 7 shown.
[0061] Block3_conv1 is a convolutional layer with 32 convolution kernels of size 3x 3, which reduces the number of convolution kernels compared to the 256 convolution kernels of the same size in the original convolution module. This adjustment is because the number of channels of the feature map expands rapidly after Block-DCConv. The following formula shows this change:
[0062] k 1 =k×(l-1)+k 0 ; (5.4)
[0063] where k 1 is the depth of the feature map of the input layer l, and the growth rate k here is defined as the number of convolution kernels of the previous Block-DCConv layer, which determines the depth of the input feature map. It can be clearly seen from the formula that with the application of multiple Block-DCConv layers, the depth of the feature map will increase rapidly. If the growth rate is set too high, it will lead to a large number of redundant parameters, which violates the original purpose of reducing parameters. To prevent this problem, the growth rate should be adjusted appropriately; for example, in VGG19, the growth rate is set to 32. Multiple rounds of experiments have shown that this setting can effectively improve the efficiency of feature extraction while avoiding the accumulation of redundant parameters.
[0064] A bottleneck structure is added to Block-DCConv. The bottleneck is a 1×1 point convolution, which is also designed to reduce the dimension of the feature map and has the effect of reducing the number of parameters. The feature map size of the input layer is 128×56×56. Without the bottleneck structure, the parameters are 3×3×32×128=36864, and after adding the bottleneck structure, the number of parameters is 3×3×32×64+1×1×64×128=26624, so each convolution layer reduces 10240 parameters.
[0065] In the experiment of the present invention, the present invention found that although the number of parameters of DCDSNet was reduced compared with VGG19, this resulted in higher memory usage. During the multiple fusion processes of feature maps, new space needs to be allocated in the graphics card memory to store the fused feature maps. The storage format of each convolution module is (3-i+1) and contains three Block-DCConv units. In fact, this design makes the memory consumption equivalent to the memory requirements of a six-layer traditional network.
[0066] Figure 8 Divide the dataset into training and test sets.
[0067] The proposed DCDSNet network is used to identify and track mine trucks. There are 12,211 data images, including 4,073 front images and 4,065 rear images, as well as 7,789 special vehicle images that the original system cannot track. This data set is named Truck-20000. The images are converted into video streams to complete the tracking, and the tracking accuracy is counted. The first step is to divide the data set using Python code, divide the data set into a training set and a test set, and save them in the target folder respectively. The ratio of the training set and the test set is set to 3:2 for training and testing respectively. The second step is to download the VGG19 model, adjust it, and construct the DCDSNet model algorithm proposed by the present invention according to the three technologies, train the divided data to obtain the training model, and then use the trained model to test the data to obtain the test results, thereby realizing the identification and tracking of mine trucks.
[0068] The experimental training environment is shown in Table 2.
[0069] Table 2 Development environment parameters
[0070]
[0071] Table 3 shows the parameter configuration used for network training in the experiment. In supervised learning and deep learning, the learning rate Ir0 is a hyperparameter that can affect whether the objective function can reach the local minimum and its convergence time. A higher learning rate can speed up the learning speed of the network in the early stage of training and help the model approach the optimal solution faster. However, this may lead to larger fluctuations in the later stage, and even cause the loss function value to fluctuate around the minimum value. The fluctuation is large and it is always difficult to reach the optimal value. Therefore, the scheme used in the present invention is to use small batch gradient descent, parameters: batch size is set to 256, momentum is set to 0.9, and momentum is a common technique for accelerating convergence in gradient descent. The initial learning rate is set to 0.01, and the attenuation coefficient of the weight is 5×10^-4. For the weight layer, random initialization is used, initialized to a normal distribution with a mean of 0 and a variance of 0.01. The width and height of the mine car image data are 1920 and 1080, respectively, which is not suitable for training, so the data needs to be preprocessed to a width and height of 224. The model name used is DCDSNet.
[0072] Table 3 Network training parameters
[0073]
[0074] In data preprocessing, the present invention adjusts the image size to 224×224, which meets the input requirements of the DCDSNet network, saves the sorted image set to the data file, passes the number of local data batches to be trained as parameters, sets the corresponding parameters mean=[0.5,0.5,0.5], variance std=[0.5,0.5,0.5], and then normalizes. In the experiment, the image is first read, and then the image is adjusted to the specified size. After preparing the data import process, the training set and the test set need to be split. The experiments involved in this paper split the mine car data set according to the ratio of 3:2. For the training set and the test set, first, the corresponding image data index needs to be made, that is, two files train.txt and test.txt, each txt contains the directory and corresponding category of each image. The weights and bias coefficients to be learned during the training process are stored by the defined training model train_model and the parameter best_model_wts, and the return value is received by the Variable data structure commonly used in neural networks.
[0075] The present invention will retain the best model and dynamically set the learning rate for import. First, the present invention generates a random image of size 224×224, and generates a normally distributed random number with a standard deviation of 0.1 through the tf.random_normal function. Next, create a placeholder for keep_prob, and call the inference_op function to build the network structure of DCDSNet, obtain predictions, softmax, fc8 and parameter list p, create a session, and initialize global parameters. The time consumption of DCDSNet in tensorflow is tested by executing the main function run_benchmark() of the evaluation. The results are retained, and images are generated to output Loss and Acc. For the accuracy of the experiment, the present invention adjusts the original ten cycles, including the accuracy of the training set and the test set. In experiment 1, batch_size is set to 32 and epochs is 20. In experiment 2, batch_size is set to 32 and epochs is 30. In experiment 3, batch_size is set to 32 and epochs is 100, and the output results are displayed in Fig. 9 middle. Fig. 9 Represents the different accuracy and loss changes of the DCDSNet model in three experiments. Experiment 1 iterates 20 times, Experiment 2 iterates 30 times, and Experiment 3 iterates 100 times. Figures a, b, and c respectively represent that the Accuracy change curves of the three experiments gradually converge to about 0.95 as the number of training times increases. Figures d, e, and f respectively represent that the Loss change curves of the three experiments gradually converge to about 0.02 as the number of training times increases. The return value is received, the value with the highest probability is taken, the gradient is set to zero, the loss is calculated after the loss is obtained to return, and then the parameters are updated. The obtained values are counted. The results are shown in Table 4. It can be clearly seen from the results that the improved network model has a significant improvement in accuracy compared with the unimproved VGG algorithm model, and the maximum value of Acc after training reaches 99.09%. In order to better analyze the value of the experimental results, the present invention counts the accuracy of the front-end vehicle recognition experiment and the average accuracy of the recall tracking in the three experiments, and the results are shown in Table 5.
[0076] Table 5 Comparison of accuracy and loss rate under different iteration numbers
[0077]
[0078] In Table 6, the accuracy Recall measures how many of the results predicted by the binary classifier as positive examples are correct, from the perspective of prediction. The recall Recall evaluates the proportion of actual positive examples in the test set that are correctly identified by the binary classifier from the perspective of real results. Specificity is the proportion of true negative examples that the model can detect. mAP represents the average accuracy of tracking, and the accuracy continues to improve with the increase in the number of iterations. In the experiment, with the superposition of training cycles, the accuracy of the system has been significantly improved.
[0079] Table 6 Recognition and tracking accuracy at different iteration times
[0080]
[0081] The traditional vehicle front and rear recognition system experiment based on deep convolutional neural network uses 16,000 pictures for training, and 4,000 vehicle fronts and rears are used for testing. The experimental results show that the training accuracy curve is basically converged. Then the present invention uses the vehicle front and rear recognition method based on the EfficientNet algorithm, shortens the high-dimensional channel by changing the residual edge of the inverse residual module, and introduces a deep separable convolutional neural network and proxy normalization activation. In the mobile flip convolution module, the non-standardized sources of the X-axis and Y-axis of different dimensions between each convolution layer are offset, and then the model detection rate is improved. The experimental results show that the network of the present invention maintains high accuracy while greatly reducing the Loss value, and the number of parameters is small. The specific network training parameters and result analysis are shown in Table 7.
[0082] Table 7 Comparison of experimental results under different algorithms
[0083]
[0084] It can be seen from Table 7 that for the reliability of the experiment, the present invention uses the same self-made training set and test set. Under the same experimental environment, the accuracy of DCDSNet is as high as 99.09%, and the tracking accuracy is 99.0%, which achieves relatively high recognition accuracy and tracking average accuracy compared with the mainstream model EfficientNet, and basically meets the basic requirements of mine car head and tail recognition and tracking in a mining environment.
[0085] In order to ensure the impact of different improvement methods on the VGG19 network model, the present invention decomposes it into multiple models and conducts experimental verification on each model so as to clarify the contribution of each module to the accuracy in subsequent research. The DSCVGG model is a model that only uses depthwise separable convolution to improve the first two convolution blocks of VGG19, the DCCVGG model is a model that only uses densely connected networks to improve the first two convolution blocks of VGG19, and the DCDSNet model combines all improvement methods. The basic experimental parameter settings and results are shown in Table 8.
[0086] Table 8 Recognition rate under different modules loaded in ablation experiment
[0087]
[0088] As can be seen from the table, compared with the original network, the accuracy of the DSCVGG model decreased by 4.33% at the same number of iterations, which shows that the performance of the model has decreased while using deep separable convolution to significantly reduce parameters. DCCVGG has improved its accuracy by 4.28% compared to the initial VGG19, which shows that dense connections help improve accuracy. DCDSNet combines two improved algorithms to reduce model parameters while ensuring the performance of the model, and the performance is improved by 4.41% compared to the original network. The average accuracy of tracking has also changed similarly.
[0089] A new network DCDSNet is proposed, which mainly solves the problem of vehicle tracking and identification in mining environments. The model combines densely connected networks, deep separable convolutions and convolutions instead of full connections to optimize the infrastructure, and verifies the effectiveness of the model in experiments. Through ablation experiments, it can be found that although deep separable convolutions can greatly reduce the number of parameters, they sacrifice the model accuracy, but combined with dense connections, the accuracy of the model will be greatly improved. Therefore, it is possible to try to use dense connection methods in more models to improve model performance. The algorithm was applied to track vehicles in the mining environment of mines and achieved better results than the early algorithms. According to feedback from the cooperating companies, the missed recognition rate has dropped by 30%. In addition, there are many factors that are not conducive to vehicle identification, detection and tracking in the mining environment, such as night, dust, car washing, bad weather and other factors mentioned in the introduction. The data set used by this algorithm contains pictures under these factors to achieve the current recognition rate, helping enterprises reduce the workload of manual supervision. Furthermore, with the emergence of newer technologies and algorithms, we strive to develop better detection, tracking, and identification algorithms, and strive to meet the requirements of unmanned mining vehicle intelligent monitoring systems in actual production scenarios.
[0090] The preferred specific embodiments of the present invention are described in detail above. It should be understood that a person skilled in the art can make many modifications and changes based on the concept of the present invention without creative work. Therefore, any technical solution that can be obtained by a person skilled in the art through logical analysis, reasoning or limited experiments based on the concept of the present invention on the basis of the prior art should be within the scope of protection determined by the claims.
Claims
1. A vehicle tracking method based on lightweight DCDSNet, characterized in that: Methods include: Acquire the image to be detected, input the image to be detected into the vehicle tracking model, and obtain the tracking result; Among them, the vehicle tracking model is an improved VGG19 model, and the improved VGG19 model is a lightweight DCDSNet model. The improved VGG19 model is constructed based on the original VGG19 model, lightweight dense connection and deep separable convolutional network. On the basis of the original VGG19 model, the improved VGG19 model replaces the fully connected module of the original VGG19 model with a convolutional layer, replaces the convolution of the original VGG19 model with a deep separable convolution, and distributes lightweight dense connections in the third module, the fourth module and the fifth module of the original VGG19 model.
2. A vehicle tracking method based on lightweight DCDSNet according to claim 1, characterized in that: The original VGG19 model consists of five convolutional modules. The size and depth of the convolutional layer in each module are consistent and connected through the maximum pooling layer. The third, fourth and fifth convolutional modules all include 4 consecutive convolutional layers.
3. A vehicle tracking method based on lightweight DCDSNet according to claim 2, characterized in that: In the improved VGG19 model, bottleneck modules are arranged between the second and third convolution modules, between the third and fourth convolution modules, and between the fourth and fifth convolution modules. The bottleneck module between the i-th module and the i+1-th module belongs to the i+1-th module. The third, fourth and fifth modules in the VGG19 model include bottleneck modules arranged in sequence and four consecutive convolution layers.
4. A vehicle tracking method based on lightweight DCDSNet according to claim 3, characterized in that: The bottleneck module is a 1×1 point convolution.
5. A vehicle tracking method based on lightweight DCDSNet according to claim 4, characterized in that: The improved VGG19 model sets lightweight dense connections in the bottleneck modules of the third, fourth and fifth convolution modules and four consecutive convolution layers, and sets serial numbers for the bottleneck module and four consecutive convolution layers of the same convolution module, which are respectively from the 1st layer to the 5th layer. The output of the jth layer is used as the input of the i+1, i+2...5th layers, and the output of the previous layer is also used as the input of the next layer.
6. A vehicle tracking method based on lightweight DCDSNet according to claim 1, characterized in that: Replace the convolutional layer of the fully connected module with 3 layers.
7. A vehicle tracking method based on lightweight DCDSNet according to claim 6, characterized in that: The convolutional layers of the fully connected module are replaced with one conv7×7 and two conv1×1 convolutional layers.
8. A vehicle tracking method based on lightweight DCDSNet according to claim 2, characterized in that: Among the five convolution modules, the first convolution module and the second convolution module both contain two convolution layers.
9. A vehicle tracking method based on lightweight DCDSNet according to claim 8, characterized in that: The convolutional layers of the first convolutional module and the second convolutional module in the improved VGG19 model are replaced with depthwise separable convolutions.
10. The vehicle tracking method based on lightweight DCDSNet according to claim 1, characterized in that: The calculation process of the depth-wise separable convolution is: Num parameters =W F ×H F ×D in +D in ×N Among them, the dimension of the input feature map is W F ×H F ×D in , the convolutional layer contains a certain number N of convolution kernels of a specific size.