Parameters of opencv_traincascade
I've been using the old implementation of OpenCV's haartraining for quite some time. Now, after finally moving to OpenCV 2.3, I'm wondering how to set parameters like I did with the old implementation. As far as I know, there is no d开发者_如何学JAVAocumentation for opencv_traincascade yet.
I'm missing the "-nonsym" switch and the "-nsplits". Now, there is only a "maxDepth" parameter which has as description "max_depth_of_weak_tree". Is a weak three a stump? Are all haar features now assumed to be nonsym?
Thanks a lot!
@Alex: Here's a good description about all parameters given by opencv 2.3.2 documentation, I'm working on a python script working with opencv for lying human detection and tracking. If you plan to use the python functions beginning with the new wrapper cv2.() don't forget to set the right PATH or its pain in the ass...
http://opencv.itseez.com/trunk/doc/user_guide/ug_traincascade.html
I dont know if this will help as I have not tried and it seems to be very similar to the older haarcascade.exe
opencv_traincascade.exe
Usage:
opencv_traincascade.exe
-data <cascade_dir_name>
-vec <vec_file_name>
-bg <background_file_name>
[-numPos <number_of_positive_samples = 2000>]
[-numNeg <number_of_negative_samples = 1000>]
[-numStages <number_of_stages = 20>]
[-precalcValBufSize <precalculated_vals_buffer_size_in_Mb = 256>]
[-precalcIdxBufSize <precalculated_idxs_buffer_size_in_Mb = 256>]
[-baseFormatSave]
—cascadeParams—
[-stageType <BOOST(default)>]
[-featureType <{HAAR(default), LBP}>]
[-w <sampleWidth = 24>]
[-h <sampleHeight = 24>]
—boostParams—
[-bt <{DAB, RAB, LB, GAB(default)}>]
[-minHitRate <min_hit_rate> = 0.995>]
[-maxFalseAlarmRate <max_false_alarm_rate = 0.5>]
[-weightTrimRate <weight_trim_rate = 0.95>]
[-maxDepth <max_depth_of_weak_tree = 1>]
[-maxWeakCount <max_weak_tree_count = 100>]
—haarFeatureParams—
[-mode <BASIC(default) | CORE | ALL
—lbpFeatureParams—
In the new implemented traincascade application, it doesn't use the symmetric property to speedup. So there is no option for specifying nonsym/sys. For maxDepth option, you can understand it as the depth of binary decision tree. The default depth is 1, so you have 2 split. For a general depth of k, you have $2^k$ splits.
精彩评论