Ask Your Question
0

Improve training cascade speed

asked 2015-07-18 14:32:15 -0600

Zubastic gravatar image

updated 2015-07-19 14:53:03 -0600

Hello. I compilied Open CV with TBB (at wiki some errors about using sources of TBB (you must use binary files and import folder, also add path of TBB to windows path)). I think that I could use all cores for loading negatives, but only one core used for that....So I have 2 questions: 1) How improve training cascade speed? Now I use this: opencv_traincascade.exe -data haarcascade -vec samples.vec -bg BadN.dat -numStages 16 -minhitrate 0.999 -maxFalseAlarmRate 0.4 -numPos 67 -numNeg 570 -w 40 -h 20 -mode ALL -precalcValBufSize 2048 -precalcIdxBufSize 2048 My image is static (It is logo), for example - logo of HP. 2) How use all cores of server for loading negatives? (I have xeon server for that)

Thanks!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2015-07-19 12:04:44 -0600

I think that I could use all cores for loading negatives, but only one core used for that....

This is not correct. The process of grabbing negatives is predetermined by the window size and completely sequential. So it will only use a single core. The preprocessing of samples however has been improved by using multiple cores.

If you want it, then you will need to crack up sourcecode.

How improve training cascade speed?

Please add your output ... it can have so many reasons ...

edit flag offensive delete link more

Comments

Zubastic gravatar imageZubastic ( 2015-07-19 13:04:21 -0600 )edit

I am sorry but I am not downloading stuff from russian data servers. Could you just put your output here?

StevenPuttemans gravatar imageStevenPuttemans ( 2015-07-20 02:19:46 -0600 )edit

What output you need? I could not attach any files. Here link to mega: https://mega.co.nz/#!FFl3UR7Z!Izgy779...

Zubastic gravatar imageZubastic ( 2015-07-20 04:42:09 -0600 )edit

And what difference between basic core and all mode? In what context we could use core mode? For example: I have static picture (logo of Microsoft) and want to detect it. I must use basic core or all mode for that? As I know, basic only for pictures without any degree rotated pictures, or I am wrong?

Zubastic gravatar imageZubastic ( 2015-07-20 05:05:32 -0600 )edit
1

CORE or ALL is not about multicore but about the type of features used when training your detector. If you want to detect a logo, then this is overkill. I would go for template matching then.

StevenPuttemans gravatar imageStevenPuttemans ( 2015-07-20 07:32:31 -0600 )edit

Could you give more info about template matching? And what problems to do multicore grabbing negatives? I think that if this was easy, it would be done already isn't it?

Zubastic gravatar imageZubastic ( 2015-07-20 17:12:28 -0600 )edit

I think that you should take a look at google and start reading. OpenCV + template matching` yields TONS of interesting hits. As to the multicore problem, it is actually not that difficult. Instead of grabbing them sequentially you should do it simoultaneously on different threads. The problem lies in the fact that you cannot check if adding an extra sample in thread 1 does not influence the accurcary in thread 2 ... thats the difficult part.

StevenPuttemans gravatar imageStevenPuttemans ( 2015-07-22 03:54:48 -0600 )edit

Well. I already saw that, and use, but accuracy of detecting was too bad. For example: another color of image and matching template failed, returing nothing. 1-2 pixels are another and again - no detect....

Zubastic gravatar imageZubastic ( 2015-07-23 06:57:50 -0600 )edit

template matching in color images? Start by making both template and image grayscale and apply histogram equilization...

StevenPuttemans gravatar imageStevenPuttemans ( 2015-07-23 06:58:45 -0600 )edit

Yes. I done them grayscale images and then use _EqualizeHist(), but there are too high false results....

Zubastic gravatar imageZubastic ( 2015-07-24 09:52:53 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-07-18 14:32:15 -0600

Seen: 531 times

Last updated: Jul 19 '15