How to test result of all stages of TrainCascadeObjectDetector?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello, i want to evaluate the performance of my classifier which is generated by TrainCascadeObjectDetector function of matlab, so i succeed in finding TP,TN,FP,FN of last stage result, i filled bbox of image from positive samples of training with white and the rest with black then i did the same for a test image as you see:
this from positives training images:
this from result images:
i did a comparison between the binary images and now i have one value of true poitive rate and one of false positive rate. i want 2 values for each stage of the training to plot ROC curve, in the temporary file generated by TrainCascadeObjectDetector function each stage is saved in xml file but without features like the final xml (detector) to use them for testing, as you see:
stage0:
<?xml version="1.0"?>
<opencv_storage>
<stage0>
<maxWeakCount>1</maxWeakCount>
<stageThreshold>1.</stageThreshold>
<weakClassifiers>
<_>
<internalNodes>
0 -1 4454 7.1442634798586369e-03</internalNodes>
<leafValues>
1. -1.</leafValues></_></weakClassifiers></stage0>
</opencv_storage>
stage1:
<?xml version="1.0"?>
<opencv_storage>
<stage1>
<maxWeakCount>1</maxWeakCount>
<stageThreshold>9.1666668653488159e-01</stageThreshold>
<weakClassifiers>
<_>
<internalNodes>
0 -1 5920 6.3075786456465721e-03</internalNodes>
<leafValues>
9.1666668653488159e-01 -1.</leafValues></_></weakClassifiers></stage1>
</opencv_storage>
the final contain all stages and features:
<?xml version="1.0"?>
<opencv_storage>
<!-- Created using Computer Vision System Toolbox(tm) for MATLAB(R) -->
<!-- Version 8.6.0.267246 (R2015b) -->
<!-- Compatible with OpenCV 2.4 -->
<cascade>
<stageType>BOOST</stageType>
<featureType>HOG</featureType>
<height>32</height>
<width>88</width>
<stageParams>
<boostType>GAB</boostType>
<minHitRate>9.9500000476837158e-01</minHitRate>
<maxFalseAlarm>5.0000000000000000e-01</maxFalseAlarm>
<weightTrimRate>9.4999999999999996e-01</weightTrimRate>
<maxDepth>1</maxDepth>
<maxWeakCount>100</maxWeakCount></stageParams>
<featureParams>
<maxCatCount>0</maxCatCount>
<featSize>36</featSize></featureParams>
<stageNum>6</stageNum>
<stages>
<!-- stage 0 -->
<_>
<maxWeakCount>1</maxWeakCount>
<stageThreshold>1.</stageThreshold>
<weakClassifiers>
<_>
<internalNodes>
0 -1 5 7.1442634798586369e-03</internalNodes>
<leafValues>
1. -1.</leafValues></_></weakClassifiers></_>
<!-- stage 1 -->
<_>
<maxWeakCount>1</maxWeakCount>
<stageThreshold>9.1666668653488159e-01</stageThreshold>
<weakClassifiers>
<_>
<internalNodes>
0 -1 7 6.3075786456465721e-03</internalNodes>
<leafValues>
9.1666668653488159e-01 -1.</leafValues></_></weakClassifiers></_>
<!-- stage 2 -->
<_>
<maxWeakCount>2</maxWeakCount>
<stageThreshold>-1.5777166187763214e-01</stageThreshold>
<weakClassifiers>
<_>
<internalNodes>
0 -1 6 2.8749141842126846e-02</internalNodes>
<leafValues>
-9.5454543828964233e-01 7.5999999046325684e-01</leafValues></_>
<_>
<internalNodes>
0 -1 4 4.9157985486090183e-03</internalNodes>
<leafValues>
8.2374781370162964e-01 -9.1777163743972778e-01</leafValues></_></weakClassifiers></_>
<!-- stage 3 -->
<_>
<maxWeakCount>2</maxWeakCount>
<stageThreshold>-1.8826305866241455e-01</stageThreshold>
<weakClassifiers>
<_>
<internalNodes>
0 -1 8 1.1805452406406403e-01</internalNodes>
<leafValues>
-7.6470589637756348e-01 8.8888889551162720e-01</leafValues></_>
<_>
<internalNodes>
0 -1 1 1.7946368316188455e-03</internalNodes>
<leafValues>
5.7644283771514893e-01 -9.1381591558456421e-01</leafValues></_></weakClassifiers></_>
<!-- stage 4 -->
<_>
<maxWeakCount>2</maxWeakCount>
<stageThreshold>1.8796898424625397e-02</stageThreshold>
<weakClassifiers>
<_>
<internalNodes>
0 -1 3 2.0513199269771576e-02</internalNodes>
<leafValues>
-9.1666668653488159e-01 1.</leafValues></_>
<_>
<internalNodes>
0 -1 6 4.1686229407787323e-02</internalNodes>
<leafValues>
-9.2143100500106812e-01 9.3546354770660400e-01</leafValues></_></weakClassifiers></_>
<!-- stage 5 -->
<_>
<maxWeakCount>2</maxWeakCount>
<stageThreshold>-4.9190598726272583e-01</stageThreshold>
<weakClassifiers>
<_>
<internalNodes>
0 -1 2 5.7689640671014786e-02</internalNodes>
<leafValues>
4.4827586412429810e-01 -8.9999997615814209e-01</leafValues></_>
<_>
<internalNodes>
0 -1 0 1.7535550519824028e-02</internalNodes>
<leafValues>
-9.4018185138702393e-01 4.1826134920120239e-01</leafValues></_></weakClassifiers></_></stages>
<features>
<_>
<rect>
12 12 8 8 12</rect></_>
<_>
<rect>
16 16 8 8 27</rect></_>
<_>
<rect>
0 0 8 16 22</rect></_>
<_>
<rect>
0 0 16 8 25</rect></_>
<_>
<rect>
4 4 16 8 10</rect></_>
<_>
<rect>
4 16 16 8 26</rect></_>
<_>
<rect>
12 0 16 8 24</rect></_>
<_>
<rect>
40 0 16 8 16</rect></_>
<_>
<rect>
52 0 16 8 21</rect></_></features></cascade>
</opencv_storage>
How can i test each stage?
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Feature Detection and Extraction finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!