0

I am trying to detect a picture if it has a cat in image or not ,the size is just original picture size and when I do

opencv_haartraining.exe -data D:\meitu\res\data -vec D:\meitu\res\pos.vec -bg D:\meitu\recordfail\bg.txt -npos 110 -nneg 147 -nsplits 2 -mem 512 -nonsym -w 974 -h 1047 -minpos 100 -nstages 4

it just stays in stage 0 forever, I also tested opencv_traincascade however it just crash .

I wonder how do I solve this? I did some google saying opencv can't handle image over 100x100 , if this is the case, does it means I have to manually crop all image to just train the cat instead of the whole image?

original vec generation code

opencv_createsamples.exe -info D:\meitu\recordok\info.txt -vec D:\meitu\res\pos.vec -num 110 -w 974  -h 1047
RileyCodes
  • 11
  • 2
  • you want to train objects of minimum size 947x1047? can you add a training image to your posting please? Can you add your command to create the pos.vec please? – Micka Feb 22 '18 at 14:49
  • I think you need to understand what those values mean a little bit better. I would suggest reading my answers [here](https://stackoverflow.com/questions/16175765/cat-detection-using-haar-training/16176137#16176137) and [here](https://stackoverflow.com/questions/29022481/generating-good-training-data-for-haar-cascades/29028456#29028456) – GPPK Feb 22 '18 at 17:00

0 Answers0