我之前做了分类器,而opencv_traincascade没有任何问题。我将numstage设置为10,并且应该期望训练9阶段。但是,它超过了10并在16阶段训练中被杀死。
我查看了我的参数,发现numstage是20而不是10 ...如下所示。
有人可以解释,我在做什么错?为什么我只想要10时参数说numstage 20?
library(data.table)
players = DF[, c("id", "endowment")]
prefs = melt(data.table(DF), id = "id", measure.vars = patterns("^WT"), na.rm = TRUE)
# translate
prefs[variable == "WTA", `:=`(quantity = -1L, valuation = -value)]
prefs[variable %like% "WTP", `:=`(quantity = 1:.N, valuation = cumsum(value)), by=id]
# clean up
prefs[, c("variable", "value") := NULL]
Training parameters are pre-loaded from the parameter file in data folder!
Please empty this folder if you want to use a NEW set of training parameters.
答案 0 :(得分:0)
您在numstage之前错过了“-”(可能不确定大写字母),因此应用程序使用默认值20
请尝试
opencv_traincascade -data data -vec p.vec -bg bg2.txt -numPos 250 -numNeg 800 -numStages 10 -w 50 -h 150