Can we do model ensemble on several cascade classifiers ?

asked 2018-08-02 09:57:12 -0600

Zizhao gravatar image

Hello,

I want to know if we could do model ensemble on several cascade classifiers because the object that I want to detect has different aspect ratios and I couldn' t detect it with one cascade classifier.

Thanks,

Zizhao

edit retag flag offensive close merge delete

Comments

because the object that I want to detect has different aspect ratios

can you explain that a bit better, please ?

berak gravatar imageberak ( 2018-08-02 11:40:01 -0600 )edit

For example, I have an object in which the aspect ratio could be 1:2, 2:1, 1:1, 3:1, etc. I would like to detect as many as possible this object. My actual solution is to train separately 4 models with the aspect ratio I mentioned above, then merge the result of detection. What I would like to know is that could I train 4 models but using some technologies like "model ensemble" or "voting" to give me one model which could detect the four aspect ratios at same time?

Zizhao gravatar imageZizhao ( 2018-08-02 16:23:31 -0600 )edit
1

Probably you should look at deep learning stuff for object detection. There are many tutorials on how to train on custom data with Tensorflow. Have a look at these documentations.

You can then look at this page in OpenCV: TensorFlow Object Detection API.

Eduardo gravatar imageEduardo ( 2018-08-03 04:28:38 -0600 )edit

Thanks for your reply. I have thought about deep learning before using cascade classifier.

The reason that I didn't use deep learning is that I have a problem which is not relevant to any public dataset. I need to train my model from scratch and maybe modify the architecture to adapt to my problem. What I need now is using some "safe" methods to get not bad results in a short period.

And I have many objects in an image which means I have few images to pass into the NN so I can't train my NN from scratch (I know cut and merge will work but this will cause me more works to do).

Maybe I will try it later.

Zizhao gravatar imageZizhao ( 2018-08-07 11:37:17 -0600 )edit

This is my limited experience with deep learning:

  • I don't train a network from scratch but rather do a fine tuning training from a checkpoint. This means that you reuse weights from a well-known network (MobileNet-SSD, FasterRCNN, ...) and fine tune it for your data
  • I did it successfully to detect one class
  • Have a look at the TensorFlow object detection doc
  • I have also put some useful information in another answer
Eduardo gravatar imageEduardo ( 2018-08-11 07:23:27 -0600 )edit

Main advantages against a cascade of classifiers:

  • no issue with the aspect ratio
  • fast training if you have a GPU and you can easily check the validity of the training with Tensorboard (loss curves, detection performed on the evaluation set)
  • even with no experience, you should be able to do a first training that will successfully detect your class
  • the hard part is to setup your environment but it was the same with cascade of classifiers training
Eduardo gravatar imageEduardo ( 2018-08-11 07:30:22 -0600 )edit