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
{{ message }}
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.
to maintain the ratio as my positive images were of size - 2448 x 3264 pixels.
Samples were created successfully.
On running the script python ./tools/mergevec.py -v samples/ -o samples.vec , I got the error as defined in the README - struct.error: unpack requires a string argument of length 12
All but 2 of the files in the samples directory were of size 0 bytes so I deleted them and re-ran the script. It worked fine.
I then ran the script mentioned - opencv_traincascade -data classifier -vec samples.vec -bg negatives.txt -numStages 20 -minHitRate 0.999 -maxFalseAlarmRate 0.5 -numPos 1000 -numNeg 600 -w 60 -h 80 -mode ALL -precalcValBufSize 1024 -precalcIdxBufSize 1024
Modifying the height and width parameters again.
This time I get the error -
===== TRAINING 0-stage =====
<BEGIN
OpenCV Error: Bad argument (Can not get new positive sample. Seems that vec-file has incorrect structure.
) in get, file /build/opencv-00QkEr/opencv-2.4.9.1+dfsg1/apps/traincascade/imagestorage.cpp, line 165
terminate called after throwing an instance of 'cv::Exception'
what(): /build/opencv-00QkEr/opencv-2.4.9.1+dfsg1/apps/traincascade/imagestorage.cpp:165: error: (-5) Can not get new positive sample. Seems that vec-file has incorrect structure.
in function get
Abortedrent samples: 1
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I had 76 positive images and 3019 negative images.
I modified the script on step 5 as -
to maintain the ratio as my positive images were of size - 2448 x 3264 pixels.
Samples were created successfully.
On running the script
python ./tools/mergevec.py -v samples/ -o samples.vec
, I got the error as defined in the README - struct.error: unpack requires a string argument of length 12All but 2 of the files in the samples directory were of size 0 bytes so I deleted them and re-ran the script. It worked fine.
I then ran the script mentioned -
opencv_traincascade -data classifier -vec samples.vec -bg negatives.txt -numStages 20 -minHitRate 0.999 -maxFalseAlarmRate 0.5 -numPos 1000 -numNeg 600 -w 60 -h 80 -mode ALL -precalcValBufSize 1024 -precalcIdxBufSize 1024
Modifying the height and width parameters again.
This time I get the error -
The text was updated successfully, but these errors were encountered: