Не знаю, поможет ли это, поскольку я не пробовал, и похоже, что оно очень похоже на более старый haarcascade.exe
opencv_traincascade.exe
Использование:
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—