Vehicle tracking Algorithm Big Pk:svm+hogvs.yolo

Source: Internet
Author: User

Introduced

For the automotive Inspection and tracking project of Udacity (city of Dakota) auto-driving nano degree, if using traditional computer visualization technology would be a challenge, like a directional gradient histogram (histogram of oriented gradients, HOG) and other features combined to track cars in the video, the ideal solution should be running in real time, like >30fps, I used linear SVM to process video, and the results on a i7 CPU computer were only poor 3FPS. Finally I used YOLO to process the video finally through the Udacity project, YOLO is an ultra-fast convolutional neural Network for object detection, if your GPU is fast enough (I was using GTX 1080), the video processing speed can reach 65FPS, than I used svm+ The Hog method is 20 times times faster.

Data set

I used the Kitti and GTI datasets, as well as some other data from the project training warehouse, with only two types of data: The GTI data is obtained from the video stream with the car and without the car, so all the images are completely random and then divided into training and test datasets to establish a correlation between the training and the test data set, I use each data source 30% dataset as a validation and test dataset, and all the images are reset to the size of the 64x64 pixels to facilitate the extraction of features.

Feature Extraction

The eigenvectors I use are as follows:

Spatial features: There is nothing but a spot (16x16 pixel) for self-test.

Color histogram feature: captures the statistical color information of each spot, and the car color captured by this eigenvector is usually very saturated.

Directional gradient histogram (HOG) feature: captures the gradient structure of each image channel, which behaves well under different light conditions.

In this blog, there is a detailed description of the features of the hog, the idea is always, in a histogram, a gradient on an image, so that the eigenvector in different viewing angles and light conditions become more stable. The following is a visual representation of the hog feature applied to images with and without cars.

The last feature vector contains the features extracted from the previous 3 different methods, so it is necessary to measure each feature to prevent a particular feature from being dominated by different range of values. I used the Standard.scaler function in the Scikit learning package to standardize features by moving the average and scaling to the unit variance.

Train a linear support vector machine

Unlike other classification and detection problems, the detection of automobiles requires strong real-time, so to strike a balance between high accuracy and speed, the two most important parameters affecting performance are the length of eigenvectors and the vehicle detection algorithm, and linear SVM provides the best compromise between speed and accuracy. is much better than random forest (fast but not accurate) and nonlinear SVM (RBF kernel, very slow) performance. The final test uses a feature vector of 6,156 features, with accuracy exceeding 98.5%, but still has nearly 1.5% spots of dazzling, especially lane lines, accident faults and railings.

Sliding window

Usually, car detection and camera using sliding window scanning image frame A frame record similar, for each window, by computing the eigenvector and input into the classifier, the car at different distances appear, it is necessary to search multiple scales, usually more than 100 eigenvectors need to be extracted, and then entered into the classifier, Each frame of the image is processed. The following is an example of a positive detection of about 150 windows, but there are still some mistakes.

In order to filter out the false results, I followed the detection window until the last 30 frames, only to consider the image accurately identified, and finally more than 15 tests were recorded, I use the heat map to show the final result, you can see the noise is greatly reduced,

The minimum rectangular bounding box of a heat map containing all non-0 values can be determined by the heat map threshold.

Full text click: http://click.aliyun.com/m/12645/

Vehicle tracking Algorithm Big Pk:svm+hogvs.yolo

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.