CN113963350A - Vehicle identification detection method, system, computer equipment, storage medium and terminal - Google Patents

Vehicle identification detection method, system, computer equipment, storage medium and terminal Download PDF

Info

Publication number
CN113963350A
CN113963350A CN202111316525.2A CN202111316525A CN113963350A CN 113963350 A CN113963350 A CN 113963350A CN 202111316525 A CN202111316525 A CN 202111316525A CN 113963350 A CN113963350 A CN 113963350A
Authority
CN
China
Prior art keywords
ghost
module
ghostnet
layer
network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111316525.2A
Other languages
Chinese (zh)
Inventor
李磊
宋柏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
XI'AN LIANKE INFORMATION Tech CO Ltd
Original Assignee
XI'AN LIANKE INFORMATION Tech CO Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by XI'AN LIANKE INFORMATION Tech CO Ltd filed Critical XI'AN LIANKE INFORMATION Tech CO Ltd
Priority to CN202111316525.2A priority Critical patent/CN113963350A/en
Publication of CN113963350A publication Critical patent/CN113963350A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Computing Systems (AREA)
  • Molecular Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)

Abstract

The invention belongs to the technical field of vehicle information detection, and discloses a vehicle identification detection method, a system, computer equipment, a storage medium and a terminal, wherein the vehicle identification detection method comprises the following steps: collecting sample data in an actual traffic environment; preprocessing a training set sample image; constructing a basic module of GhostNet, GhostModule; constructing a basic structure of GhostNet, GhostBottleneck; constructing a GhostNet network overall architecture for vehicle identification; training a GhostNet network structure; carrying the trained network in a vehicle-mounted system; and classifying and identifying the vehicle input by the camera. The invention trains a neural network capable of effectively identifying the vehicle target by using a method of occupying vehicle-mounted computing resources as little as possible and shortening the training time as much as possible, thereby effectively saving the computing resources of a vehicle-mounted system and improving the robustness of a vehicle identification network.

Description

Vehicle identification detection method, system, computer equipment, storage medium and terminal
Technical Field
The invention belongs to the technical field of vehicle information detection, and particularly relates to a vehicle identification detection method, a vehicle identification detection system, computer equipment, a storage medium and a terminal.
Background
At present, with the development of economy and technology, the quality of life of people is gradually improved, and the number of private cars is more and more. However, traffic violation, violation and the like on roads are more and more, and the incidents of counterfeit license plates, hit-and-run, vehicle violation, vehicle theft, and the like which occur every year are more and more. In order to meet the requirement of modern intelligent traffic construction in China, the concept of safe driving of people is strengthened by standardizing vehicles running on roads, and therefore, the research on vehicle identification technology is very important.
An author of Ningjun et al puts forward a vehicle identification algorithm based on improved Faster R-CNN (region-volume neural networks) in a published paper "vehicle type identification algorithm based on improved Faster R-CNN" for processing the identification problems of different types of vehicles. However, the method does not consider the calculation complexity in the improved range while improving the accuracy of vehicle target identification, but greatly increases the calculation complexity of target identification by the Faster R-CNN method in order to improve the accuracy of vehicle identification, and occupies more vehicle-mounted calculation resources.
The authors of ohonge et al, in a paper, "vehicle identification technology research based on convolutional neural network" published by the authors of ohonge et al, propose a technology for identifying vehicles by using convolutional neural network, construct a vehicle identification model multilayer structure of convolutional neural network by setting hyper-parameters of the model, and after inputting original image data, extract vehicle characteristic information by classifying vehicle information data, thereby completing vehicle identification. The method uses five convolutional layer modules when designing a network structure, and a plurality of full-connection layers are arranged behind the convolutional layers, so that the number of layers of the network is increased, and the recognition accuracy is improved. Therefore, a new vehicle identification and detection method and system are needed to overcome the defects of the existing vehicle identification technology.
Through the above analysis, the problems and defects of the prior art are as follows:
(1) the existing vehicle identification technology does not consider the calculation complexity in an improved range while improving the vehicle target identification accuracy, but greatly increases the calculation complexity of target identification by an Faster R-CNN method in order to improve the vehicle identification accuracy, and occupies more vehicle-mounted calculation resources.
(2) The existing vehicle recognition technology consumes very large computing resources to train a neural network, and the time required for training is very much.
The difficulty in solving the above problems and defects is: the problems that the number of parameters of a module related to neural network target recognition in a vehicle recognition system is large and calculation is complex basically exist, and the problems that feature mining is difficult and feature use is insufficient exist in high-latitude abstract features of a YOLO series algorithm adopted in the existing engineering practice. Many methods can improve the calculation complexity in the process of improving the identification accuracy, and improve the energy consumption of the system.
The significance of solving the problems and the defects is as follows: the target detection extraction module aiming at the neural network in the vehicle identification system is a core algorithm. If a rapid identification method with accuracy not reduced can be provided, the deployment and use cost of the whole system can be greatly reduced, and the vehicle identification system is further promoted.
Disclosure of Invention
The invention provides a vehicle identification detection method, a system, computer equipment, a storage medium and a terminal, and aims to solve the problem that the existing vehicle identification detection system utilizes vehicle-mounted computing resources.
The invention is realized in such a way that a vehicle identification detection method comprises the following steps:
step one, collecting sample data under an actual traffic environment, and calculating the sample data by using a formula of 7:3, dividing the ratio into sample images of a training set and a test set;
the step is used as a preparation step of a system algorithm, and a picture data set with strong universality and wide range needs to be acquired. The picture data set is used for training the neural network, and the quality of the training set determines the recognition rate of the designed neural network.
Secondly, preprocessing the sample images of the training set, namely enhancing data, wherein the preprocessing comprises the steps of randomly scaling the sample images and adjusting exposure and saturation, and the processed images are used as input of a training model;
the step is used as a supplementary step of the step one, and because the manually collected picture data set is limited, the invariance of translation, rotation and scaling in the network identification process is ensured in order to further increase the identification accuracy of the network.
Step three, constructing a basic module GhostModule of the GhostNet;
the GhostNet is used as a core neural network for vehicle identification and scoring, and consists of GhostModule which generates a characteristic diagram Ghostfeature Maps through linear operation, so that plug and play of the module can be ensured, and the module can be seamlessly connected into various mainstream neural network frameworks.
Step four, constructing a basic structure Ghost Bottleneck of the GhostNet as a basic unit of the vehicle identification network;
the Ghost Bottleneck is a minimum GhostNet unit constructed by GhostNet, and has a structure similar to that of RetNet, but does not need to pass through a ReLU activation function when being output.
Constructing a GhostNet network overall architecture for vehicle identification;
in the step, an integral GhostNet network architecture needs to be designed, and frames such as YOLO, mobilenet-V2 and the like can be adopted.
Step six, training a GhostNet network structure: training the network structure designed in the fifth step by using the data obtained in the second step;
the neural network needs to be trained fully and needs to be trained in a proper period, so that the neural network is ensured not to be over-fitted or under-fitted.
And step seven, the trained GhostNet is used as a backbone network of the vehicle-mounted recognition system, the picture captured by the camera is input into the GhostNet, and the obtained output result is the recognized classification result of the vehicle.
Further, in the first step, the collecting sample data in the actual traffic environment includes:
(1) the method comprises the steps of shooting vehicle information under a real-time road traffic environment, framing and extracting a shot video into an image format, wherein the vehicle types of the shot vehicle images comprise a mini car, a small car, a medium car, a large car, an SUV, an MPV, a minibus, a bus, a trailer truck, an oil tank truck, a sprinkler and a crane;
(2) meanwhile, non-vehicle factor images in a real traffic environment are prepared, wherein the non-vehicle factor images comprise pedestrian images, bicycles, electric vehicles, tricycles, trolleys and wheelbarrow images of different ages and sexes.
Further, in step three, the building of the basic module GhostModule of GhostNet includes:
(1) obtaining an intrinsic feature map Y by conventional convolutionw'*h'*m'The calculated quantity of the part is equal to h x w x m x w 'h', the output is:
Y'=X*f';
(2) by obtaining the eigen-feature map Y' of each channel, using phii,jOperation generates the Ghost profile yij:
Figure BDA0003343834190000041
Wherein phii,jThe operations are all Depthwise convolutions.
(3) And (3) splicing the intrinsic characteristic diagram obtained in the step (1) and the Ghost characteristic diagram obtained in the step (2) to obtain the Ghost module.
Further, in step four, the constructing of the basic structure ghostbottleeck of GhostNet includes:
(1) constructing a GhostBottleneck with stride of 1, wherein the structure is formed by connecting two GhostModules in series, the first GhostModule is used for expanding the number of channels, the second GhostModule is used for reducing the number of the channels to be consistent with the number of input channels, and simultaneously supplementing a jump link from input to output;
(2) the method comprises the steps of constructing a GhostBottleneck with stride of 2, wherein the structure is formed by connecting three modules of GhostModule, Deepwise convolution and GhostModule in series, and supplementing a jump link from input to output.
Further, in the fifth step, the network layer parameters set by the GhostNet network are as follows:
(1) the first layer is a common convolution layer, the input parameter dimension is 224 multiplied by 3, the step length is 2, the number of output channels is 16, and the size of a convolution kernel is 3 multiplied by 3;
(2) the second layer is a GhostBottleneck layer with stride of 1, the input parameter dimension is 112 multiplied by 16, the number of output channels of the first GhostModule is 16, and the number of output channels of the second GhostModule is 16;
(3) the third layer is a Ghost Bottleneck layer with stride of 2, the input parameter dimension is 112 multiplied by 16, the number of output channels of the first Ghost Module is 48, and the number of output channels of the second Ghost Module is 24;
(4) the fourth layer is a Ghost Bottleneck layer with stride of 1, the input parameter dimension is 56 multiplied by 24, the number of output channels of the first Ghost Module is 72, and the number of output channels of the second Ghost Module is 24;
(5) the fifth layer is a Ghost Bottleneck layer with stride of 2, the input parameter dimension is 56 multiplied by 24, the number of output channels of the first Ghost Module is 72, and the number of output channels of the second Ghost Module is 40;
(6) the sixth layer is a Ghost Bottleneck layer with stride of 1, the input parameter dimension is 28 multiplied by 40, the number of output channels of the first Ghost Module is 120, and the number of output channels of the second Ghost Module is 40;
(7) the seventh layer is a Ghost Bottleneck layer with stride of 2, the input parameter dimension is 28 multiplied by 40, the number of output channels of the first Ghost Module is 240, and the number of output channels of the second Ghost Module is 80;
(8) the eighth layer is a Ghost bolt layer with stride of 1, the input parameter dimension is 14 multiplied by 80, the number of output channels of the first Ghost Module is 200, and the number of output channels of the second Ghost Module is 80;
(9) the ninth layer is a Ghost Bottleneck layer with stride of 1, the input parameter dimension is 14 multiplied by 80, the number of output channels of the first Ghost Module is 184, and the number of output channels of the second Ghost Module is 80;
(10) the tenth layer is a Ghost Bottleneck layer with stride of 1, the input parameter dimension is 14 multiplied by 80, the number of output channels of the first Ghost Module is 184, and the number of output channels of the second Ghost Module is 80;
(11) the eleventh layer is a Ghost bolt layer with stride of 1, the input parameter dimension is 14 multiplied by 80, the number of output channels of the first Ghost Module is 480, and the number of output channels of the second Ghost Module is 112;
(12) the twelfth layer is a Ghost bolt layer with stride of 1, the input parameter dimension is 14 multiplied by 112, the number of output channels of the first Ghost Module is 672, and the number of output channels of the second Ghost Module is 112;
(13) the thirteenth layer is a Ghost bolt layer with stride of 2, the input parameter dimension is 14 × 14 × 112, the number of output channels of the first Ghost Module is 672, and the number of output channels of the second Ghost Module is 160;
(14) the fourteenth, fifteenth, sixteenth and seventeenth layers are Ghost bottleeck layers with stride of 1, the input parameter dimension is 7 × 7 × 160, the number of output channels of the first Ghost Module is 960, and the number of output channels of the second Ghost Module is 160;
(15) the eighteenth layer is a common convolutional neural network, and the number of output channels is 960;
(16) the nineteenth layer is a global average pooling layer;
(17) the twentieth layer is a point-by-point convolutional layer with an output dimension of 1280.
Further, in step six, the training of the GhostNet network structure includes:
respectively inputting each picture in the training set into the network, outputting the classification of the pictures, and calculating the loss value of each prediction result and each real result by using a cross entropy function; and (4) minimizing the total loss value of the corresponding labels in all the picture sets by adopting a random gradient descent algorithm to obtain the trained neural network.
Another object of the present invention is to provide a vehicle identification detection system applying the vehicle identification detection method, the vehicle identification detection system comprising:
the sample data acquisition module is used for acquiring sample data under the actual traffic environment, and the sample data is divided into 7 parts: 3, dividing the ratio into sample images of a training set and a test set;
the data preprocessing module is used for preprocessing the training set sample image, namely enhancing the data;
the basic Module building Module is used for building a basic Module Ghost Module of the GhostNet;
the basic structure building module is used for building a basic structure Ghost Bottleneck of the GhostNet as a basic unit of the vehicle identification network;
the GhostNet network construction module is used for constructing a GhostNet network overall framework for vehicle identification;
the network training module is used for training the GhostNet network structure designed by the GhostNet network construction module by using the data obtained by the data preprocessing module;
and the vehicle identification module is used for taking the trained GhostNet as a backbone network of the vehicle-mounted identification system, inputting the pictures captured by the camera into the GhostNet, and obtaining an output result as a classification result of the identified vehicle.
It is a further object of the invention to provide a computer device comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to perform the steps of:
collecting sample data under an actual traffic environment, and calculating the ratio of the sample data in 7:3, dividing the ratio into sample images of a training set and a test set; preprocessing a training set sample image, wherein the preprocessing is data enhancement; constructing a basic Module Ghost Module of GhostNet; constructing a basic structure Ghost Bottleneck of GhostNet as a basic unit of a vehicle identification network;
constructing a GhostNet network overall architecture for vehicle identification; training a GhostNet network structure: training the designed network structure by using the obtained data; and (3) taking the trained GhostNet as a backbone network of the vehicle-mounted recognition system, inputting the picture captured by the camera into the GhostNet, and obtaining an output result as a recognized vehicle classification result.
It is another object of the present invention to provide a computer-readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of:
collecting sample data under an actual traffic environment, and calculating the ratio of the sample data in 7:3, dividing the ratio into sample images of a training set and a test set; preprocessing a training set sample image, wherein the preprocessing is data enhancement; constructing a basic Module Ghost Module of GhostNet; constructing a basic structure Ghost Bottleneck of GhostNet as a basic unit of a vehicle identification network;
constructing a GhostNet network overall architecture for vehicle identification; training a GhostNet network structure: training the designed network structure by using the obtained data; and (3) taking the trained GhostNet as a backbone network of the vehicle-mounted recognition system, inputting the picture captured by the camera into the GhostNet, and obtaining an output result as a recognized vehicle classification result.
Another object of the present invention is to provide an information data processing terminal for implementing the vehicle identification detection system.
By combining all the technical schemes, the invention has the advantages and positive effects that: the invention provides a vehicle identification detection method, in particular to a detection method of a target vehicle in a driving process in a vehicle classification identification direction.
Compared with the existing fatigue driving detection method, the method provided by the invention also has the following characteristics:
(1) in the network structure design aiming at vehicle identification, a Ghost Module is firstly designed, then a Ghost Bottleneck structure with stride 1 and stride 2 is designed, and finally a complete Ghost Net structure is built according to a certain input and output channel conversion quantity. Compared with the common convolutional neural network, the Ghost Module effectively reduces the parameter calculation amount of the convolutional network, avoids the calculation of the redundant feature map, avoids the problem of excessive parameters of a full connection layer because the full connection layer is not adopted in the classification network, and saves the calculation resources of a vehicle-mounted system.
(2) In the invention, in the acquisition of the data set, more types of automobiles are acquired during initialization, more objects possibly encountered in the actual traffic condition are acquired, and then various photos are subjected to image enhancement processing. Compared with other methods, the method improves the richness of the pictures, can increase the robustness of the network while training the classification network, and improves the universality of the network designed by the scheme.
The method can realize low-cost feature extraction by using GhostNet, and experiments prove that the convolution result of GhostBottleneck has the characteristics of high quality and high efficiency. The module can directly replace the vehicle identification system commonly used in VGG-16 at present, can carry out faster detection and higher-accuracy vehicle identification.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments of the present invention will be briefly described below, and it is obvious that the drawings described below are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a vehicle identification and detection method according to an embodiment of the present invention.
Fig. 2 is a schematic diagram of a vehicle identification and detection method according to an embodiment of the present invention.
FIG. 3 is a block diagram of a vehicle identification and detection system according to an embodiment of the present invention;
in the figure: 1. a sample data acquisition module; 2. a data preprocessing module; 3. a basic module construction module; 4. a basic structure building module; 5. a GhostNet network construction module; 6. a network training module; 7. a vehicle identification module.
Fig. 4 is a structural diagram of Ghost bottleeck provided in the embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail with reference to the following embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In view of the problems in the prior art, the present invention provides a vehicle identification and detection method, system, computer device, storage medium and terminal, which are described in detail below with reference to the accompanying drawings.
As shown in fig. 1, a vehicle identification and detection method provided by the embodiment of the present invention includes the following steps:
s101, collecting sample data under the actual traffic environment, and calculating the sample data by the following steps of: 3, dividing the ratio into sample images of a training set and a test set;
s102, preprocessing a sample image of the training set, wherein the preprocessing comprises the steps of randomly scaling the sample image and adjusting exposure and saturation, and the processed image is used as the input of a training model;
s103, constructing a basic Module Ghost Module of the GhostNet;
s104, constructing a basic structure Ghost Bottleneck of the GhostNet as a basic unit of the vehicle identification network;
s105, constructing a GhostNet network overall framework for vehicle identification;
s106, training a GhostNet network structure: training the designed network structure of S105 by using the data obtained in S102;
and S107, taking the trained GhostNet as a backbone network of the vehicle-mounted recognition system, inputting the pictures captured by the camera into the GhostNet, and obtaining an output result as a recognized vehicle classification result.
A schematic diagram of a vehicle identification and detection method provided by the embodiment of the invention is shown in fig. 2.
As shown in fig. 3, a vehicle identification detection system according to an embodiment of the present invention includes:
the sample data acquisition module 1 is used for acquiring sample data under an actual traffic environment, and the sample data is calculated according to the following formula that 7:3, dividing the ratio into sample images of a training set and a test set;
the data preprocessing module 2 is used for preprocessing the training set sample image, namely enhancing the data;
the basic Module building Module 3 is used for building a basic Module Ghost Module of the GhostNet;
the basic structure building module 4 is used for building a basic structure Ghost Bottleneck of the GhostNet as a basic unit of the vehicle identification network;
the GhostNet network construction module 5 is used for constructing a GhostNet network overall framework for vehicle identification;
the network training module 6 is used for training the GhostNet network structure designed by the GhostNet network construction module by using the data obtained by the data preprocessing module;
and the vehicle identification module 7 is used for taking the trained GhostNet as a backbone network of the vehicle-mounted identification system, inputting the pictures captured by the camera into the GhostNet, and obtaining an output result as a classification result of the identified vehicle.
The technical solution of the present invention is further described below with reference to specific examples.
With reference to fig. 1 to 4, a vehicle identification and detection method provided by the embodiment of the invention comprises the following specific steps:
step 1, collecting sample data under an actual traffic environment, and calculating the sample data by a formula of 7:3, dividing the ratio into sample images of a training set and a test set;
in the embodiment, the photo of each model of vehicle is taken in different open parking lots in 7: 00-8: 00,11: 30-13: 00,17: 30-19: 00,21: 00-22: 00 of a day.
(1a) Shooting vehicle information under a real-time road traffic environment, framing and extracting a shot video into an image format, wherein the shot vehicle image comprises a plurality of vehicle types as much as possible, such as a mini car, a medium car, a large car, an SUV, an MPV, a minibus, a bus, a trailer truck, an oil tank truck, a sprinkler, a crane and the like;
(1b) meanwhile, non-vehicle factor images in a real traffic environment are prepared, wherein the non-vehicle factor images comprise images of pedestrians of different ages and sexes, and pictures of bicycles, electric vehicles, tricycles, trolleys, wheelbarrows and the like.
Step 2, preprocessing the sample images of the training set, namely enhancing data, wherein the preprocessing comprises the steps of randomly scaling the sample images and adjusting exposure and saturation, and the processed images are used as the input of a training model;
in this embodiment, the data collected in step one is used as original data, and an SMOTE method is used in combination with a color transformation library such as imgauge to enhance the training set sample.
Step 3, constructing a basic module of GhostNet, namely GhostModule;
(3a) obtaining an intrinsic feature map Y by conventional convolutionw'*h'*m'The computation of this part is approximately equal to h x w x m x w 'h', and the output is:
Y'=X*f',
(3b) by obtaining the eigen-feature map Y' of each channel, using phii,jOperation generates the Ghost profile yij:
Figure BDA0003343834190000111
Wherein phii,jThe operations are all Depthwise convolutions.
(3c) And finally, splicing the intrinsic characteristic diagram obtained in the first step and the Ghost characteristic diagram obtained in the second step to obtain the Ghost Module.
Step 4, constructing a basic structure of the GhostNet, wherein the GhostBottleneeck is used as a basic unit of the vehicle identification network;
the GhostNet in the embodiment uses a Python language-based Pythich machine learning framework library, and builds a network structure by referring to a huawei-hoah/CV-backsbones library.
(4a) And constructing a Ghost Bottleneck with stride of 1, wherein the structure is formed by connecting two Ghost modules in series, the first Ghost Module is used for expanding the number of channels, the second Ghost Module is used for reducing the number of the channels to be consistent with the number of input channels, and simultaneously supplementing a jump link from input to output.
(4b) The method comprises the steps of constructing a Ghost Bottleneck with stride of 2, wherein the structure is formed by connecting a Ghost Module, a Deepwise convolution and a Ghost Module in series, and simultaneously supplementing a jump link from input to output.
And 5, constructing a GhostNet network overall architecture for vehicle identification, wherein the set parameters of each layer of the network are as follows:
(5a) the first layer is a common convolution layer, the input parameter dimension is 224 multiplied by 3, the step length is 2, the number of output channels is 16, and the size of a convolution kernel is 3 multiplied by 3;
(5b) the second layer is a Ghost Bottleneck layer with stride of 1, the input parameter dimension is 112 multiplied by 16, the number of output channels of the first Ghost Module is 16, and the number of output channels of the second Ghost Module is 16;
(5c) the third layer is a Ghost Bottleneck layer with stride of 2, the input parameter dimension is 112 multiplied by 16, the number of output channels of the first Ghost Module is 48, and the number of output channels of the second Ghost Module is 24;
(5d) the fourth layer is a GhostBottleneck layer with stride of 1, the input parameter dimension is 56 multiplied by 24, the number of output channels of the first GhostModule is 72, and the number of output channels of the second GhostModule is 24;
(5e) the fifth layer is a Ghost Bottleneck layer with stride of 2, the input parameter dimension is 56 multiplied by 24, the number of output channels of the first Ghost Module is 72, and the number of output channels of the second Ghost Module is 40;
(5f) the sixth layer is a GhostBottleneck layer with stride of 1, the input parameter dimension is 28 multiplied by 40, the number of output channels of the first Ghost Module is 120, and the number of output channels of the second Ghost Module is 40;
(5g) the seventh layer is a Ghost Bottleneck layer with stride of 2, the input parameter dimension is 28 multiplied by 40, the number of output channels of the first Ghost Module is 240, and the number of output channels of the second Ghost Module is 80;
(5h) the eighth layer is a Ghost bolt layer with stride of 1, the input parameter dimension is 14 multiplied by 80, the number of output channels of the first Ghost Module is 200, and the number of output channels of the second Ghost Module is 80;
(5i) the ninth layer is a Ghost bolt layer with stride of 1, the input parameter dimension is 14 multiplied by 80, the number of output channels of the first Ghost Module is 184, and the number of output channels of the second Ghost Module is 80;
(5j) the tenth layer is a GhostBottleneck layer with stride of 1, the input parameter dimension is 14 multiplied by 80, the number of output channels of the first Ghost Module is 184, and the number of output channels of the second Ghost Module is 80;
(5k) the eleventh layer is a Ghost bolt layer with stride of 1, the input parameter dimension is 14 multiplied by 80, the number of output channels of the first Ghost Module is 480, and the number of output channels of the second Ghost Module is 112;
(5l) the twelfth layer is a Ghost Bottleneck layer with stride of 1, the input parameter dimension is 14 × 14 × 112, the number of output channels of the first Ghost Module is 672, and the number of output channels of the second Ghost Module is 112;
(5m) the thirteenth layer is a Ghost Bottleneck layer with stride of 2, the input parameter dimension is 14 × 14 × 112, the number of output channels of the first Ghost Module is 672, and the number of output channels of the second Ghost Module is 160;
(5n) the fourteenth, fifteenth, sixteenth and seventeenth layers are GhostBottleneck layers with stride of 1, the dimension of input parameters is 7 × 7 × 160, the number of output channels of the first GhostModule is 960, and the number of output channels of the second GhostModule is 160;
(5o) the eighteenth layer is a common convolutional neural network, and the number of output channels is 960;
(5p) the nineteenth layer is a global average pooling layer;
(5q) the twentieth layer is a point-by-point convolutional layer, with an output dimension of 1280.
The overall architecture of the GhostNet network is shown in table 1.
TABLE 1 GhostNet network architecture as a whole
Figure BDA0003343834190000141
Step 6, training the network structure designed in the step 5 by using the data obtained in the step 2;
and respectively inputting each picture in the training set into the network, outputting the classification of the pictures, calculating the loss value of each prediction result and each real result by using a cross entropy function, and minimizing the total loss value of the corresponding labels in all the picture sets by using a random gradient descent algorithm to obtain the trained neural network.
In the embodiment, a training period is set to be 200, a data set of each training is 100 pictures, an Adam gradient descent algorithm is utilized, and a network required by a vehicle identification algorithm is obtained through training by utilizing a mean square error as a loss function.
And 7, taking the trained GhostNet as a backbone network of the vehicle-mounted recognition system, inputting the picture captured by the camera into the GhostNet, and obtaining an output result as a recognized vehicle classification result.
The technical effects of the present invention will be described in detail with reference to the experiments.
The algorithm uses a CPU (central processing unit) of Intel (R) Xeon (R) E5-2680@2.70GHz, a memory of Kinston 32GB and a display card of NViDIA GeForce RTX 2060 for test.
Comparing the network with common VGG-16 and Restnet-56, the Weight used by Restnet-56 is 0.85M, the Weight optimized by Ghostnet is 0.44M, the Weight of VGG-16 is 14.7M, and the Weight optimized by Ghostnet is 7.4M. It can be seen that the network weight after Ghostnet optimization is almost half of the previous one.
Through calculation of the test set, the network accuracy of VGG-16 and Restnet-56 is basically kept at about 93.6%, and the accuracy after Ghost optimization is kept at about 93%.
Therefore, through experiments, the speed and the complexity of the vehicle identification detection algorithm based on the GhostNet are better than those of networks such as VGG-16 and RestNet-56, and a higher accuracy rate can be maintained.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When used in whole or in part, can be implemented in a computer program product that includes one or more computer instructions. When loaded or executed on a computer, cause the flow or functions according to embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website site, computer, server, or data center to another website site, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL), or wireless (e.g., infrared, wireless, microwave, etc.)). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that includes one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
The above description is only for the purpose of illustrating the present invention and the appended claims are not to be construed as limiting the scope of the invention, which is intended to cover all modifications, equivalents and improvements that are within the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A vehicle identification detection method is characterized by comprising the following steps:
step one, collecting sample data under an actual traffic environment, and calculating the sample data by using a formula of 7:3, dividing the ratio into sample images of a training set and a test set;
secondly, preprocessing the sample images of the training set, namely enhancing data, wherein the preprocessing comprises the steps of randomly scaling the sample images and adjusting exposure and saturation, and the processed images are used as input of a training model;
step three, constructing a basic Module Ghost Module of the GhostNet;
step four, constructing a basic structure Ghost Bottleneck of the GhostNet as a basic unit of the vehicle identification network;
constructing a GhostNet network overall architecture for vehicle identification;
step six, training a GhostNet network structure: training the network structure designed in the fifth step by using the data obtained in the second step;
and step seven, the trained GhostNet is used as a backbone network of the vehicle-mounted recognition system, the picture captured by the camera is input into the GhostNet, and the obtained output result is the recognized classification result of the vehicle.
2. The vehicle identification detection method according to claim 1, wherein in step one, the collecting sample data in an actual traffic environment comprises:
(1) the method comprises the steps of shooting vehicle information under a real-time road traffic environment, framing and extracting a shot video into an image format, wherein the vehicle types of the shot vehicle images comprise a mini car, a small car, a medium car, a large car, an SUV, an MPV, a minibus, a bus, a trailer truck, an oil tank truck, a sprinkler and a crane;
(2) meanwhile, non-vehicle factor images in a real traffic environment are prepared, wherein the non-vehicle factor images comprise pedestrian images, bicycles, electric vehicles, tricycles, trolleys and wheelbarrow images of different ages and sexes.
3. The vehicle identification detection method according to claim 1, wherein in step three, the constructing a basic Module Ghost Module of Ghost net comprises:
(1) obtaining an intrinsic feature map Y by conventional convolutionw'*h'*m'The calculated quantity of the part is equal to h x w x m x w 'h', the output is:
Y'=X*f';
(2) by obtaining the eigen-feature map Y' of each channel, using phii,jOperation generates the Ghost profile yij:
Figure FDA0003343834180000021
Wherein phii,jThe operations are all Depthwise convolution;
(3) and (3) splicing the intrinsic characteristic diagram obtained in the step (1) and the Ghost characteristic diagram obtained in the step (2) to obtain a Ghost Module.
4. The vehicle identification detection method according to claim 1, wherein in step four, the constructing a basic structure Ghost bottleeck of Ghost net comprises:
(1) constructing a Ghost Bottleneck with stride of 1, wherein the structure is formed by connecting two Ghost modules in series, the first Ghost Module is used for expanding the number of channels, the second Ghost Module reduces the number of the channels to be consistent with the number of input channels, and simultaneously a jump link from input to output is supplemented;
(2) and constructing a Ghost Bottleneck with stride of 2, wherein the structure is formed by connecting a Ghost Module, a Deepwise convolution and a Ghost Module in series, and a jump link from input to output is supplemented.
5. The vehicle identification detection method according to claim 1, wherein in step five, the GhostNet network sets the network layer parameters as follows:
(1) the first layer is a common convolution layer, the input parameter dimension is 224 multiplied by 3, the step length is 2, the number of output channels is 16, and the size of a convolution kernel is 3 multiplied by 3;
(2) the second layer is a Ghost Bottleneck layer with stride of 1, the input parameter dimension is 112 multiplied by 16, the number of output channels of the first Ghost Module is 16, and the number of output channels of the second Ghost Module is 16;
(3) the third layer is a Ghost Bottleneck layer with stride of 2, the input parameter dimension is 112 multiplied by 16, the number of output channels of the first Ghost Module is 48, and the number of output channels of the second Ghost Module is 24;
(4) the fourth layer is a Ghost Bottleneck layer with stride of 1, the input parameter dimension is 56 multiplied by 24, the number of output channels of the first Ghost Module is 72, and the number of output channels of the second Ghost Module is 24;
(5) the fifth layer is a Ghost Bottleneck layer with stride of 2, the input parameter dimension is 56 multiplied by 24, the number of output channels of the first Ghost Module is 72, and the number of output channels of the second Ghost Module is 40;
(6) the sixth layer is a Ghost Bottleneck layer with stride of 1, the input parameter dimension is 28 multiplied by 40, the number of output channels of the first Ghost Module is 120, and the number of output channels of the second Ghost Module is 40;
(7) the seventh layer is a Ghost Bottleneck layer with stride of 2, the input parameter dimension is 28 multiplied by 40, the number of output channels of the first Ghost Module is 240, and the number of output channels of the second Ghost Module is 80;
(8) the eighth layer is a Ghost bolt layer with stride of 1, the input parameter dimension is 14 multiplied by 80, the number of output channels of the first Ghost Module is 200, and the number of output channels of the second Ghost Module is 80;
(9) the ninth layer is a Ghost Bottleneck layer with stride of 1, the input parameter dimension is 14 multiplied by 80, the number of output channels of the first Ghost Module is 184, and the number of output channels of the second Ghost Module is 80;
(10) the tenth layer is a Ghost Bottleneck layer with stride of 1, the input parameter dimension is 14 multiplied by 80, the number of output channels of the first Ghost Module is 184, and the number of output channels of the second Ghost Module is 80;
(11) the eleventh layer is a Ghost bolt layer with stride of 1, the input parameter dimension is 14 multiplied by 80, the number of output channels of the first Ghost Module is 480, and the number of output channels of the second Ghost Module is 112;
(12) the twelfth layer is a Ghost bolt layer with stride of 1, the input parameter dimension is 14 multiplied by 112, the number of output channels of the first Ghost Module is 672, and the number of output channels of the second Ghost Module is 112;
(13) the thirteenth layer is a Ghost bolt layer with stride of 2, the input parameter dimension is 14 × 14 × 112, the number of output channels of the first Ghost Module is 672, and the number of output channels of the second Ghost Module is 160;
(14) the fourteenth, fifteenth, sixteenth and seventeenth layers are Ghost bottleeck layers with stride of 1, the input parameter dimension is 7 × 7 × 160, the number of output channels of the first Ghost Module is 960, and the number of output channels of the second Ghost Module is 160;
(15) the eighteenth layer is a common convolutional neural network, and the number of output channels is 960;
(16) the nineteenth layer is a global average pooling layer;
(17) the twentieth layer is a point-by-point convolutional layer with an output dimension of 1280.
6. The vehicle identification detection method according to claim 1, wherein in step six, the training of the GhostNet network structure comprises: respectively inputting each picture in the training set into the network, outputting the classification of the pictures, and calculating the loss value of each prediction result and each real result by using a cross entropy function; and (4) minimizing the total loss value of the corresponding labels in all the picture sets by adopting a random gradient descent algorithm to obtain the trained neural network.
7. A vehicle identification detection system for implementing the vehicle identification detection method according to any one of claims 1 to 6, characterized by comprising:
the sample data acquisition module is used for acquiring sample data under the actual traffic environment, and the sample data is divided into 7 parts: 3, dividing the ratio into sample images of a training set and a test set;
the data preprocessing module is used for preprocessing the training set sample image, namely enhancing the data;
the basic Module building Module is used for building a basic Module Ghost Module of the GhostNet;
the basic structure building module is used for building a basic structure Ghost Bottleneck of the GhostNet as a basic unit of the vehicle identification network;
the GhostNet network construction module is used for constructing a GhostNet network overall framework for vehicle identification;
the network training module is used for training the GhostNet network structure designed by the GhostNet network construction module by using the data obtained by the data preprocessing module;
and the vehicle identification module is used for taking the trained GhostNet as a backbone network of the vehicle-mounted identification system, inputting the pictures captured by the camera into the GhostNet, and obtaining an output result as a classification result of the identified vehicle.
8. A computer device, characterized in that the computer device comprises a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to carry out the steps of:
collecting sample data under an actual traffic environment, and calculating the ratio of the sample data in 7:3, dividing the ratio into sample images of a training set and a test set; preprocessing a training set sample image, wherein the preprocessing is data enhancement; constructing a basic Module Ghost Module of GhostNet; constructing a basic structure Ghost Bottleneck of GhostNet as a basic unit of a vehicle identification network;
constructing a GhostNet network overall architecture for vehicle identification; training a GhostNet network structure: training the designed network structure by using the obtained data; and (3) taking the trained GhostNet as a backbone network of the vehicle-mounted recognition system, inputting the picture captured by the camera into the GhostNet, and obtaining an output result as a recognized vehicle classification result.
9. A computer-readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of:
collecting sample data under an actual traffic environment, and calculating the ratio of the sample data in 7:3, dividing the ratio into sample images of a training set and a test set; preprocessing a training set sample image, wherein the preprocessing is data enhancement; constructing a basic Module Ghost Module of GhostNet; constructing a basic structure Ghost Bottleneck of GhostNet as a basic unit of a vehicle identification network;
constructing a GhostNet network overall architecture for vehicle identification; training a GhostNet network structure: training the designed network structure by using the obtained data; and (3) taking the trained GhostNet as a backbone network of the vehicle-mounted recognition system, inputting the picture captured by the camera into the GhostNet, and obtaining an output result as a recognized vehicle classification result.
10. An information data processing terminal characterized by being used to implement the vehicle identification detection system according to claim 7.
CN202111316525.2A 2021-11-08 2021-11-08 Vehicle identification detection method, system, computer equipment, storage medium and terminal Pending CN113963350A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111316525.2A CN113963350A (en) 2021-11-08 2021-11-08 Vehicle identification detection method, system, computer equipment, storage medium and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111316525.2A CN113963350A (en) 2021-11-08 2021-11-08 Vehicle identification detection method, system, computer equipment, storage medium and terminal

Publications (1)

Publication Number Publication Date
CN113963350A true CN113963350A (en) 2022-01-21

Family

ID=79469585

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111316525.2A Pending CN113963350A (en) 2021-11-08 2021-11-08 Vehicle identification detection method, system, computer equipment, storage medium and terminal

Country Status (1)

Country Link
CN (1) CN113963350A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114155495A (en) * 2022-02-10 2022-03-08 西南交通大学 Safety monitoring method, device, equipment and medium for vehicle operation in sea-crossing bridge

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111738300A (en) * 2020-05-27 2020-10-02 复旦大学 Optimization algorithm for detecting and identifying traffic signs and signal lamps
CN112633156A (en) * 2020-12-22 2021-04-09 浙江大华技术股份有限公司 Vehicle detection method, image processing apparatus, and computer-readable storage medium
CN112818847A (en) * 2021-01-29 2021-05-18 上海眼控科技股份有限公司 Vehicle detection method, device, computer equipment and storage medium
CN113011365A (en) * 2021-03-31 2021-06-22 中国科学院光电技术研究所 Target detection method combined with lightweight network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111738300A (en) * 2020-05-27 2020-10-02 复旦大学 Optimization algorithm for detecting and identifying traffic signs and signal lamps
CN112633156A (en) * 2020-12-22 2021-04-09 浙江大华技术股份有限公司 Vehicle detection method, image processing apparatus, and computer-readable storage medium
CN112818847A (en) * 2021-01-29 2021-05-18 上海眼控科技股份有限公司 Vehicle detection method, device, computer equipment and storage medium
CN113011365A (en) * 2021-03-31 2021-06-22 中国科学院光电技术研究所 Target detection method combined with lightweight network

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
KAI HAN 等: "GhostNet: More Features from Cheap Operations", 《ARXIV》, 13 March 2020 (2020-03-13), pages 1 - 10 *
杨玉艳: "1.基于改进YOLOv3算法的车辆目标实时检测", 《中国优秀硕士学位论文全文数据库工程科技Ⅱ辑》, no. 09, 15 September 2021 (2021-09-15), pages 035 - 101 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114155495A (en) * 2022-02-10 2022-03-08 西南交通大学 Safety monitoring method, device, equipment and medium for vehicle operation in sea-crossing bridge
CN114155495B (en) * 2022-02-10 2022-05-06 西南交通大学 Safety monitoring method, device, equipment and medium for vehicle operation in sea-crossing bridge

Similar Documents

Publication Publication Date Title
CN111368687B (en) Sidewalk vehicle illegal parking detection method based on target detection and semantic segmentation
WO2022083784A1 (en) Road detection method based on internet of vehicles
CN111401148A (en) Road multi-target detection method based on improved multilevel YO L Ov3
CN109993138A (en) A kind of car plate detection and recognition methods and device
CN104463241A (en) Vehicle type recognition method in intelligent transportation monitoring system
CN112990065B (en) Vehicle classification detection method based on optimized YOLOv5 model
CN112289037B (en) Motor vehicle illegal parking detection method and system based on high visual angle under complex environment
CN109948643A (en) A kind of type of vehicle classification method based on deep layer network integration model
CN112016556A (en) Multi-type license plate recognition method
CN110516691A (en) A kind of Vehicular exhaust detection method and device
CN114782949B (en) Traffic scene semantic segmentation method for boundary guide context aggregation
CN113963350A (en) Vehicle identification detection method, system, computer equipment, storage medium and terminal
CN116824543A (en) Automatic driving target detection method based on OD-YOLO
CN112785610B (en) Lane line semantic segmentation method integrating low-level features
CN113505640A (en) Small-scale pedestrian detection method based on multi-scale feature fusion
CN114092902A (en) Method and device for detecting violation behaviors of electric bicycle
CN110555425A (en) Video stream real-time pedestrian detection method
CN116129293A (en) Vehicle real-time detection method based on unmanned aerial vehicle
CN112016534B (en) Neural network training method for vehicle parking violation detection, detection method and device
CN112446292B (en) 2D image salient object detection method and system
CN115171059A (en) Vehicle perception method based on improved YOLOv5 network model
Zhang et al. Chinese license plate recognition using machine and deep learning models
CN114627400A (en) Lane congestion detection method and device, electronic equipment and storage medium
Tan et al. UAV image object recognition method based on small sample learning
Hamzah et al. Parking Violation Detection on The Roadside of Toll Roads with Intelligent Transportation System Using Faster R-CNN Algorithm

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination