Opencv_traincascade options

I have been using the old OpenCV haartraining implementation for quite some time. Now, after switching to OpenCV 2.3, I wonder how to set the parameters, as I did with the old implementation. As far as I know, there is no documentation for opencv_traincascade yet.

I miss the switch "-nonsym" and "-nsplits". Now there is only the parameter "maxDepth", which has a description of "max_depth_of_weak_tree". Is a weak three stump? Is it currently assumed that all haar functions are incompatible?

Thanks a lot!

+6
source share
3 answers

@Alex: Here is a good description about all the options provided by the opencv 2.3.2 documentation, I am working on a python script working with opencv to detect and track people. If you plan to use python functions starting with the new cv2. () Shell, remember to set the correct PATH or its pain in the ass ...

http://opencv.itseez.com/trunk/doc/user_guide/ug_traincascade.html

+5
source

I do not know if this will help, since I have not tried it, and it looks like it is very similar to the old haarcascade.exe

opencv_traincascade.exe 

Using:

 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 | ALLlbpFeatureParams 
+4
source

In a new tracing application, it does not use the symmetry property for acceleration. Thus, there is no option to specify nesov / sys. For the maxDepth parameter, you can understand it as the depth of the binary decision tree. The default depth is 1, so you have 2 splits. For the total depth k, you divide $ 2 ^ k $.

+1
source

Source: https://habr.com/ru/post/894800/


All Articles