You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Based on a discussion on the forum, opencv_traincascade often fails because you have to guess the number of samples and pass numPos about 90% of the sample for it to work.
The error is pretty cryptic like "Can not get new positive sample. The most possible
reason is insufficient count of samples in given vec-file."
Just creating this issue for others and maybe a PR will eventually come.
The text was updated successfully, but these errors were encountered:
Silex
changed the title
train_cascade "Can not get new positive sample" -> figure num samples automagically
opencv_traincascade "Can not get new positive sample" -> figure num samples automagically
Mar 20, 2014
Command didn't work at last step train.
./prep.py train
TRAIN
Traceback (most recent call last):
File "./prep.py", line 170, in
num_neg_samples = file_len(NEGATIVE_INFO_FILE)
File "./prep.py", line 54, in file_len
return i + 1
UnboundLocalError: local variable 'i' referenced before assignment
Hello,
Based on a discussion on the forum,
opencv_traincascade
often fails because you have to guess the number of samples and passnumPos
about 90% of the sample for it to work.The error is pretty cryptic like "Can not get new positive sample. The most possible
reason is insufficient count of samples in given vec-file."
Here are links about how to tackle this:
http://stackoverflow.com/questions/10863560/haar-training-opencv-assertion-failed
http://code.opencv.org/issues/1834
Just creating this issue for others and maybe a PR will eventually come.
The text was updated successfully, but these errors were encountered: