cascade training best practices for lit sign
Was hoping to get some guidance on a few issues...
Here is the sign I would like to be able to recognize at night: http://67.media.tumblr.com/035fa2a4d9...
Here are my questions/issues:
To generate the images to be used for training I have used ffmpeg to create images from a video that I recorded. It created roughly 500 images, all from the left hand side of the street. I painstakingly annotated all 500 images only to have the training cease at stage 3. Should i not be using ffmpeg? As an alternative I could use the burst capability on the iphone, which will take a bunch of pictures. Should I be getting images from all angles? Should blurry images be omitted?
The negative images I used were also taken from a video using ffmpeg. The video is of the surrounding area, minus the sign of course.
I have been able to train a model successfully on a soda can (la croix) but for whatever reason I cannot get through the training for this type of object. Any help would be greatly appreciated
Here are my commands and their corresponding output:
opencv_createsamples -info annotations.txt -bg negatives.txt -vec VeniceLeft.vec -w 73 -h 10
Info file name: annotations.txt
Img file name: (NULL)
Vec file name: VeniceLeft.vec
BG file name: negatives.txt
Num: 1000
BG color: 0
BG threshold: 80
Invert: FALSE
Max intensity deviation: 40
Max x angle: 1.1
Max y angle: 1.1
Max z angle: 0.5
Show samples: FALSE
Original image will be scaled to:
Width: $backgroundWidth / 73
Height: $backgroundHeight / 10
Create training samples from images collection...
annotations.txt(553) : parse errorDone. Created 552 samples
opencv_traincascade -data cascade/ -vec VeniceLeft.vec -bg negatives.txt -numNeg 1000 -numPos 500 -minHitrate 0.995 -maxFalseAlarmRate 0.5 -mode ALL -precalcValBufSize 1024 -precalcIdxBufSize 1024 -w 73 -h 10
PARAMETERS:
cascadeDirName: cascade/
vecFileName: VeniceLeft.vec
bgFileName: negatives.txt
numPos: 500
numNeg: 1000
numStages: 20
precalcValBufSize[Mb] : 1024
precalcIdxBufSize[Mb] : 1024
acceptanceRatioBreakValue : -1
stageType: BOOST
featureType: HAAR
sampleWidth: 73
sampleHeight: 10
boostType: GAB
minHitRate: 0.995
maxFalseAlarmRate: 0.5
weightTrimRate: 0.95
maxDepth: 1
maxWeakCount: 100
mode: ALL
Number of unique features given windowSize [73,10] : 356522
===== TRAINING 0-stage =====
<BEGIN
POS count : consumed 500 : 500
NEG count : acceptanceRatio 1000 : 1
Precalculation time: 25
+----+---------+---------+
| N | HR | FA |
+----+---------+---------+
| 1| 0.998| 0.001|
+----+---------+---------+
END>
Training until now has taken 0 days 0 hours 1 minutes 38 seconds.
===== TRAINING 1-stage =====
<BEGIN
POS count : consumed 500 : 501
NEG count : acceptanceRatio 1000 : 0.00319338
Precalculation time: 22
+----+---------+---------+
| N | HR | FA |
+----+---------+---------+
| 1| 0.998| 0.007|
+----+---------+---------+
END>
Training until now has taken 0 days 0 hours 3 minutes 12 seconds.
===== TRAINING 2-stage =====
<BEGIN
POS count : consumed 500 : 502
NEG count : acceptanceRatio 1000 : 2.51281e-05
Precalculation time: 23
+----+---------+---------+
| N | HR | FA |
+----+---------+---------+
| 1| 1| 1|
+----+---------+---------+
| 2| 1| 0.019|
+----+---------+---------+
END>
Training until now has taken 0 days 0 hours 10 minutes 3 seconds.
===== TRAINING 3-stage =====
<BEGIN
POS count : consumed 500 : 502
Train dataset for temp ...