cascade classifier takes hours in testing one image
I am trying to train a cascade classifier with matlab and c++. I am trying to detect optic disc in retinal fundus images. number for positive samples i have used are around 12000(after flipping) and negative samples are 10000. Max hit rate is 0.995 and false alarm rate is 0.1. I trained a classifier using matlab for 40 stages using haar and one with hog features. Testin for one image takes hours and returns very bad results. if anyone can tell me what i am doing wrong it would be very help full. Even if i reduce the number of stages to 20 it still takes hours to test.
PS:- Dimensions of positive and negative images is roughy around 800x1200. C++ classifier is not yet trained.Its been 15 days. May be i will get results from c++ when hell freezes over.
Thanks.
Hi Pulkit,
I am using cascade classifiers for the same application only difference being I am doing it in real time at 30fps in fundus and OCT both. i would suggest down-sampling the image. Optic Disc is a very prominent feature and there is no need to use such high resolution. Also train your classifier on floaters, glare, shadows from eye lashes, etc to improve accuracy. I would suggest you to time your stages of down-sampling, feature extraction and prediction individually. I assume feature extraction is taking most of the time in your case.
FYI: I am getting 5ms prediction time per image after optimizing all of my stages.