Nesne algılaması için opencv_traincascade kullanıyorum. Fotoğrafta gözlük bulmaya çalışıyorum. Bunun için şu 830 tane fotoğrafı indirdim: http://pi1.lmcdn.ru/product/V/I/VI060DWIHZ27_1_v2.jpg1 günlük hesaplamadan sonra OpenCV istisnası
Daha sonra elbiselerle modelli birçok fotoğraf indirdim ya da sadece 1799 fotoğrafını çektim. Sonra
Ben ettik parametrelerle opencv_traincascade başlatın: opencv_traincascade yüzeyi kurulan Özellik/sınıflandırıcı -vec samples.vec -bg negatives.txt -numStages 10 -minHitRate 0.999 -maxFalseAlarmRate 0.5 -numPos 830 -numNeg 1799 -w 60 -h 90-mode ALL -precalcValBufSize 1024 -precalcIdxBufSize 1024
Ancak 4. adımdan sonra, bir mesajım var: Geçici sahne için tren veri kümesi doldurulamıyor. Şube eğitimi sonlandırıldı.
tam StackTrace geçerli:
➜ pictureFeature opencv_traincascade -data Feature/classifier -vec samples.vec -bg negatives.txt -numStages 10 -minHitRate 0.999 -maxFalseAlarmRate 0.5 -numPos 830 -numNeg 1799 -w 60 -h 90 -mode ALL -precalcValBufSize 1024 -precalcIdxBufSize 1024
PARAMETERS:
cascadeDirName: Feature/classifier
vecFileName: samples.vec
bgFileName: negatives.txt
numPos: 830
numNeg: 1799
numStages: 10
precalcValBufSize[Mb] : 1024
precalcIdxBufSize[Mb] : 1024
acceptanceRatioBreakValue : -1
stageType: BOOST
featureType: HAAR
sampleWidth: 60
sampleHeight: 90
boostType: GAB
minHitRate: 0.999
maxFalseAlarmRate: 0.5
weightTrimRate: 0.95
maxDepth: 1
maxWeakCount: 100
mode: ALL
===== TRAINING 0-stage =====
<BEGIN
POS count : consumed 830 : 830
NEG count : acceptanceRatio 1799 : 1
Precalculation time: 26
+----+---------+---------+
| N | HR | FA |
+----+---------+---------+
| 1| 1| 1|
+----+---------+---------+
| 2| 1| 1|
+----+---------+---------+
| 3| 1| 0.145636|
+----+---------+---------+
END>
Training until now has taken 0 days 5 hours 22 minutes 10 seconds.
===== TRAINING 1-stage =====
<BEGIN
POS count : consumed 830 : 830
NEG count : acceptanceRatio 1799 : 0.145715
Precalculation time: 24
+----+---------+---------+
| N | HR | FA |
+----+---------+---------+
| 1| 1| 1|
+----+---------+---------+
| 2| 1| 1|
+----+---------+---------+
| 3| 1| 1|
+----+---------+---------+
| 4| 1| 0.762646|
+----+---------+---------+
| 5| 1| 0.432462|
+----+---------+---------+
END>
Training until now has taken 0 days 14 hours 38 minutes 28 seconds.
===== TRAINING 2-stage =====
<BEGIN
POS count : consumed 830 : 830
NEG count : acceptanceRatio 1799 : 0.062696
Precalculation time: 28
+----+---------+---------+
| N | HR | FA |
+----+---------+---------+
| 1| 1| 1|
+----+---------+---------+
| 2| 1| 1|
+----+---------+---------+
| 3| 1| 1|
+----+---------+---------+
| 4| 1| 0.590328|
+----+---------+---------+
| 5| 1| 0.187326|
+----+---------+---------+
END>
Training until now has taken 0 days 23 hours 21 minutes 4 seconds.
===== TRAINING 3-stage =====
<BEGIN
POS count : consumed 830 : 830
NEG count : acceptanceRatio 1799 : 0.0117929
Precalculation time: 21
+----+---------+---------+
| N | HR | FA |
+----+---------+---------+
| 1| 1| 1|
+----+---------+---------+
| 2| 1| 1|
+----+---------+---------+
| 3| 1|0.0944969|
+----+---------+---------+
END>
Training until now has taken 1 days 3 hours 47 minutes 34 seconds.
===== TRAINING 4-stage =====
<BEGIN
POS count : consumed 830 : 830
NEG count : acceptanceRatio 1799 : 0.00112161
Precalculation time: 18
+----+---------+---------+
| N | HR | FA |
+----+---------+---------+
| 1| 1| 0|
+----+---------+---------+
END>
Training until now has taken 1 days 5 hours 4 minutes 35 seconds.
===== TRAINING 5-stage =====
<BEGIN
POS count : consumed 830 : 830
Train dataset for temp stage can not be filled. Branch training terminated.
Ben nesne arama için cascade.xml kullanmaya çalıştı ama sonuç tamamen başarısız oldu.
birileri sorunu yardımcı olabilir mi?
sınıflandırmak için: baş + güneş gözlüğü ve negatif: Eğer pozitif ve negatif antrenman görüntüleri (pozitif toplamak gerekir: img örneğinizde sadece görüntüde sadece güneş gözlüğü var –
bg.txt Windows'da oluşturuldu mu? –