opencv_train级联崩溃,没有解释(opencv_traincascade crash without explanation)

I try to use opencv_traincascade.exe but it crashes few seconds after I launch it. Here is how I proceeded:

I first create the positive sample using:

opencv_createsamples -info info.txt -vec vecFile.vec -bg neg.txt -num 100 -w 100 -h 100
info.txt has 116 lines which are all like:

imagepath 1 0 0 100 100

just the name of the file change in the different lines but all the images are of size 100100 (I am working on high resolution picture on stem cells, therefore in a 2525 image, I think I would not have enough information to detect what I am looking for)

neg.txt contains 715 lines with just file paths

which successfully created 100 samples

and then I launch the training with:

opencv_traincascade -data Cascade -vec vecFile.vec -bg neg.txt -numPos 10 -numNeg 20 -numStages 2 -featureType HAAR -w 100 -h 100
And then I got the following error message:

opencv_traincascade.exe has stopped working
And nothing else.

Any idea what is going on ?

Thanks

解决方案
This is happening because of the window size you chose. The memory traincascade.exe uses for training a classifier grows exponentially with window size, and there are few home computers that would handle a 100x100 window size in traincascade…

Do this exercise: open your task manager and monitorize the memory usage growing when you start training, you’ll notice that the program crashes when it can’t allocate more memory. To fix this you’ll really have to choose a smaller window size.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值