| In recent years,the number of motor vehicles has increased rapidly,and the demand for parking has also increased.It is necessary to establish a more perfect intelligent parking lot to improve the efficiency of vehicle management.At present,the parking lot completes parking billing and release control through manual or license plate recognition systems.In the charging process,there will be recognition failures,charging errors,and illegal operations of charging personnel.No more vehicle information is recorded when the vehicle passes by,and verification cannot be performed.In order to improve the management level of the intelligent parking lot and improve the vehicle access data,it is necessary to identify more vehicle information and add it to the database.Therefore,based on the existing parking management system,a camera is installed on the side of the parking lot gate to quickly detect and identify the vehicle and save the image certificate.Based on the above background,the video-based vehicle detection and attribute recognition algorithms are researched as follows:First,a rough motion detection algorithm based on the combination of background difference and optical flow method is designed.Use the moving target detection algorithm to quickly detect the motion phenomenon in the video to get a rough vehicle foreground.Aiming at the phenomenon of vehicle stalls in the video,a foreground detection algorithm based on background difference is designed,and the average value is calculated for multi-frame images to obtain the background,and the difference from the current image to obtain the foreground.Then design a motion detection algorithm based on the optical flow method,track the foreground feature points,use motion distance to distinguish motion and lighting phenomena and control background update.Finally,the algorithm reached a real-time speed of 31.37 FPS.Secondly,a vehicle detection algorithm based on scaling factor pruning is proposed.When there are moving objects in the video,use the convolutional vehicle detector to accurately detect the vehicle target.Aiming at the problem of convolutional network structure redundancy and large amount of calculation,a vehicle detector based on scaling factor pruning is proposed.First,sparsely train the network structure,set a threshold for automatic pruning,and then transfer the pruning bias to the next layer.After pruning,the vehicle detection network has no drop in accuracy,and the amount of parameters drops by 73.44%,reaching a speed of 23.56 FPS and an accuracy of 99.46.Thirdly,a vehicle tracking algorithm based on improved kernel correlation filtering is designed,which combines the detection and tracking algorithm to identify the direction of vehicle entry and exit.Aiming at the shortcomings of single detection scale of kernel correlation filtering algorithm,an improved scheme for pyramid multi-scale detection is designed.Aiming at the shortcomings of speed instability,an optimized scheme for stabilizing speed of fixed window is designed.For the phenomenon that the vehicle has a fast moving speed,the Taylor expansion term is used to predict the location of the vehicle in advance.After the improvement,the accuracy of the vehicle tracking algorithm is increased by 43.91%,and the real-time speed of 28 FPS is reached.On this basis,the direction of the vehicle in and out of the video is identified,and the accuracy is 100%.Fourth,a vehicle color recognition and vehicle type recognition algorithm based on attention model is proposed.Resnet and other mainstream classification networks have a huge structure,and the speed of the network is improved by reducing the number of layers and the number of convolution kernels.In view of the phenomenon that the region of interest in the network is the background rather than the body,the attention model is used to improve the network.Aiming at the problem of similar vehicle types,a training method of comparative representation is designed.The vehicle color recognition and vehicle model recognition network are both equivalent to Resnet accuracy,but the parameter amount is only 10.19%,reaching the real-time speed of 55.68 frames per second.Fifth,a vehicle detection and attribute recognition system based on QT is designed.Use QT Designer to develop the system interface,use the Mysql database to store the result data,and combine the above algorithm to automatically identify the vehicle video.After testing,the system occupies less computer resources,and the recognition accuracy of the video data in this article is high.The research results of this paper have good real-time performance and high application value,and can be used in intelligent parking system to realize automatic vehicle detection and identification,reduce labor costs,and improve management efficiency. |