0

I am wanting to count the number of cars in aerial images of parking lots. After some research I believe that Haar Cascade Classifiers might be an option for this. An example of an image I will be using would be something similar to a zoomed in image of a parking lot from Google Maps.

My current plan to accomplish this is to train a custom Haar Classifier using cars that I crop out of images in only one orientation (up and down), and then attempt recognition multiple times while rotating the image in 15 degree increments. My specific questions are:

  1. Is using a Haar Classifier a good approach here or is there something better?
  2. Assuming this is a good approach, when cropping cars from larger images for training data would it be better to crop a larger area that could possibly contain small portions of cars in adjacent parking spaces (although some training images would obviously include solo cars, cars with only one car next to them, etc.) or would it be best to crop the cars as close to their outline as possible?
  3. Again assuming I am taking this approach, how could I avoid double counting cars? If a car was recognized in one orientation, I don't want it to be counted again. Is there some way that I could mark a car as counted and have it ignored?

1 Answers1

0

I think in your case I would not go for Haar features, you should search for something that is rotation invariant.

I would recommend to approach this task in the following order: Create a solid training / testing data set and have a good look into papers about getting good negative samples. In my experience good negative samples have a great deal of influence on the resulting quality of your classifier. It makes your life a lot easier if all your samples are of the same image size. Add different types of negative samples, half cars, just pavement, grass, trees, people etc...

Before starting your search for a classifier make sure that you have your evaluation pipeline in order, do a 10 fold cross evaluation with the simplest Haar classifier possible. Now you have a baseline. Try to keep the software for all features you tested working in caseou find out that your data set needs adjustment. Ideally you can just execute a script and rerun your whole evaluation on the new data set automatically.

The problem of counting cars multiple times will not be of such importance when you can find a feature that is rotation invariant. Still non maximum suppression will be in order becaus you might not get a good recognition with simple thresholding.

As a tip, you might consider HOG features, I did have some good results on cars with them.

Kratz
  • 320
  • 2
  • 5
  • @Kartz, did you compare HOG implementation with Cascadeclassifier implementation? Which data set did you use to train your SVM classifier for detecting HOG features of cars from images/videos – Tariq Jul 14 '14 at 16:12
  • I did not do the comparison myself, I joined the group working on this later. HOG was mostly preferred because it performed well on tilted images. The test data is unfortunately not publicly available. You probably want to create your own set (I know its a PITA to annotate...) – Kratz Jul 16 '14 at 07:47
  • Thanks for response. How did you train the classifier? – Tariq Jul 16 '14 at 11:47