3

I am going to train my Haar classifier for flowers(which I am highly skeptical about). I have been following the CodingRobin Tut for everything.
http://coding-robin.de/2013/07/22/train-your-own-opencv-haar-classifier.html

Now, it has been emphasized that I use GPU support, multithreading etc. otherwise the training is gonna take days. I am going to use pre-built libraries and therefore the pre-built opencv_traincascade utility.

I want to ask beforehand, Will I be able to leverage GPU support if I use the pre-built libs, given that I install CUDA?
Where does TBB fit in the whole picture?
Do you recommend me building the whole library from scratch with TBB and CUDA support checked, or that would be a waste?

Note: I am using OpenCV 2.4.11. And I am a complete beginner to OpenCV.

talonmies
  • 70,661
  • 34
  • 192
  • 269
Manish Kumar Sharma
  • 12,982
  • 9
  • 58
  • 105
  • typically, opencv uses gpu only within the gpu module (and maybe in highgui for rendering)... BUT: ipp seems to use the gpu for many tasks, so if you have ipp support you might benefit from your gpu (but you have to compile opencv yourself). tbb might help you, not sure... – Micka Apr 23 '15 at 05:42
  • 1
    in typical prebuilt libraries, neither gpu module nor tbb are active! but even if you compile opencv with cuda I doubt traincascade to use the gpu module. – Micka Apr 23 '15 at 05:43
  • How do I use TBB. I downloaded it but thats it. How does the pre-built OpenCV libs know of its presence? And do I download IPP? And how do I activate or check if GPU support is there in pre-built libs? – Manish Kumar Sharma Apr 23 '15 at 05:46
  • 1
    the pre-build libs are bare-metal, no support for any hw-optimisation builtin. if you want tbb or cuda, you have to (re-)build them from src. – berak Apr 23 '15 at 05:59
  • also, rather try to train a lbp-cascade first, which will be done in a couple of minutes instead of hours. unless that works halfway decently, do not even bother heavyweight haarcascades – berak Apr 23 '15 at 06:00
  • @berak : LBP...yeah. I read about it at OpenCV tutorials. They said, LBP is really fast but its performance doesn't exceed that of Haar's, it only approaches Haar's if parameters are perfectly tuned. I am gonna give that a shot if you say so. And now I am thinking about rebuilding the Libs myself now. – Manish Kumar Sharma Apr 23 '15 at 06:03
  • the difference in accuracy is<5%. but if your lbp-cascade does not work *at all*, your haar cascade will neither. – berak Apr 23 '15 at 06:12
  • rebuilding is really easy with CMake. IPP is commercial and for intel CPUs. Some universities have scientific licenses for researchers and maybe students. – Micka Apr 23 '15 at 06:12
  • @berak : "if your lbp-cascade does not work at all, your haar cascade will neither" - Interesting!! I can test try now with LBP first at least. – Manish Kumar Sharma Apr 23 '15 at 06:18

0 Answers0