Ask Your Question
1

Best machine learning algorithm for detecting cars in aerial images?

asked 2014-10-20 04:59:29 -0600

ss3123 gravatar image

I am looking for a machine learning algorithm that will produce good results for detecting cars in aerial images. I'm currently looking at training my own Haar classifier, but if I am understanding correctly a Haar classifier will not take advantage of color. Since I am trying to detect the cars in a parking lot and all the images will be taken from the same altitude, it would make sense to exploit the fact that the cars will all be mostly certain colors and about the same size.

Has anyone done anything similar or know of something that would work well for this?

edit retag flag offensive close merge delete

Comments

furthermore, a haar classifier will be susceptible to rotation (it will only find cars in about the same orientation as it was trained on)

berak gravatar imageberak ( 2014-10-20 05:10:19 -0600 )edit

Whenever you have a collection of temporal images (multiple images covering the same or overlapping areas, taking at different times, which implies that the positions of cars would have changed), you can use various temporal image object detection techniques. There are many of them, even with sub-classifications.

rwong gravatar imagerwong ( 2014-10-20 05:57:09 -0600 )edit
2

@berak, that is quickly solved by performing it over multiple rotations. I did it with an LBP classifier and could do a rotation invariant car detection on a 4000x8000 window considering you know a scale range (height of the camera - plane in my case) in about 2 mins. If it can be one in postprocessing, then haar/lbp classifiers could find you the solution.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-10-20 07:24:38 -0600 )edit

And skip color info, to many variance over different car types. Also, in object models you are looking for general features, like windows, wheels, front back, ... that can only be retrieved if you remove car specific info like color and move to a histogram equalized grayscale image.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-10-20 07:26:12 -0600 )edit

@StevenPuttermans, follow up question - once a car was recognized, how did you "mark" it to denote it had already been detected? I would assume with the small rotations you would want to do to make sure no cars were missed that it would detect the same car in multiple orientations. If you don't mind sharing a little, could you maybe give some insight on how you accounted for that?

ss3123 gravatar imagess3123 ( 2014-10-20 14:05:27 -0600 )edit

1 answer

Sort by » oldest newest most voted
3

answered 2014-10-21 02:45:25 -0600

updated 2014-10-21 02:47:41 -0600

Let me add my remark and other answers as a possible solution.

Rotation invariance can be quickly solved by performing it over multiple rotations. I did it with an LBP classifier and could do a rotation invariant car detection on a 4000x8000 window considering you know a scale range (height of the camera - plane in my case) in about 2 mins. If it can be one in postprocessing, then haar/lbp classifiers could find you the solution. The trick lies in finding enough decent training data and enough negatives to train a robust classifier. Using the approach of bootstrapping can increase the performance of your classifier a lot.

And skip color info, to many variance over different car types. Also, in object models you are looking for general features, like windows, wheels, front back, ... that can only be retrieved if you remove car specific info like color and move to a histogram equalized grayscale image.

As to the other questions:

  • I experienced that LBP/HAAR models have about +- 10 degrees of freedom in still robustly detecting an object and still providing enough overlap with the following angle.
  • Therefore I seperated the 360 degrees into 20 degree bins.
  • Once an object is found over multiple angles I always choose the most centered angle, which had of course the best score on that object. You could filter out the average, but that gave worse results for me. Picking the median was the best approach.
  • So basically rotating 36 times, limiting your scale range and merging detections afterwards can get you pretty far.
edit flag offensive delete link more

Comments

1

Hi Steven,if I seperate the 360 degrees into 20 degree bins, after I got the xml files what is the command to detect the cars in the image or video?Do I need to repeat the command "CascadeClassifier detector(“n.xml”); detector.detectMultiScale(frame, objects, 1.1, 1)..." twenty times?It may cost lots of time.

Sheng Liu gravatar imageSheng Liu ( 2015-04-06 22:35:39 -0600 )edit

As it stands now, yes you need to! What you could do is crack open the algorithm, adapt the detector interface to receive a vector of model locations instead of a single model, then only run the pyramid rescaling once, depending on your largest model, apply all detectors right there. But it won't be a grab and get running thing!

StevenPuttemans gravatar imageStevenPuttemans ( 2015-04-07 01:58:42 -0600 )edit
1

Maybe I can use the GPU to increase speed of the method.

Sheng Liu gravatar imageSheng Liu ( 2015-04-07 12:52:41 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2014-10-20 04:59:29 -0600

Seen: 2,643 times

Last updated: Oct 21 '14