change HOG cell size in trainCasca​deObjectDe​tector

3 Ansichten (letzte 30 Tage)
Alan
Alan am 27 Jun. 2014
Kommentiert: Alan am 30 Jun. 2014
I am using trainCascadeObjectDetector to train a detector for small objects so the default HOG features with 8x8 cell size is too big, is there any way to use 4x4 or 2x2 cell size for underlying HOG feature? thanks,

Antworten (1)

Dima Lisin
Dima Lisin am 29 Jun. 2014
Bearbeitet: Dima Lisin am 29 Jun. 2014
Unfortunately, there is currently no way to do this. Is there any possibility for you to get higher resolution images? Or will there be enough detail if you up-sample the images?
Another possible alternative is to use the extractHOGFeatures function to compute the HOG features yourself. Then you could train a classifier (e. g. SVM) using the Statistics Toolbox. Take a look at this example of digit classification using HOG and SVM.
Another thought: a 2x2 cell seems really small for computing a 9-bin histogram. Training a HOG-SVM classifier for your objects might tell you whether it is feasible to detect them at all.
  1 Kommentar
Alan
Alan am 30 Jun. 2014
Hi, Dima: thanks answering my question. I think your suggestion of using extractHOGFeatures to compute finer HOG feature with finer cells and train it with SVM classifier is good to try. I will let you know how it goes. As far as the granularity of cell size, my understanding is the finer the cell gets, the longer the feature vector will be and therefore, the dimension gets higher. The training of the classifier might be harder in general, therefore, the corresponding historgram bin number might also need to be tuned accordingly.

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by