Commit 071aad01fc2344387edd066504c9b48f350b5e4a

Authored by Scott Klum
2 parents e2b9148e d21c50c1

Merge branch 'master' of https://github.com/biometrics/openbr

openbr/plugins/slidingwindow.cpp
@@ -110,6 +110,7 @@ protected: @@ -110,6 +110,7 @@ protected:
110 if (conf > threshold) { 110 if (conf > threshold) {
111 detect.file.set("Detection", QRectF(x*scale, y*scale, windowWidth*scale, windowHeight*scale)); 111 detect.file.set("Detection", QRectF(x*scale, y*scale, windowWidth*scale, windowHeight*scale));
112 detect.file.set("Confidence", conf); 112 detect.file.set("Confidence", conf);
  113 + detect.file.clearRects();
113 dst.append(detect); 114 dst.append(detect);
114 if (takeFirst) 115 if (takeFirst)
115 return; 116 return;
scripts/pedestrianBaselineLBP.sh
1 #!/bin/bash 1 #!/bin/bash
2 2
3 -# Right now this is just a simple proof of concept. No quantitative eval is performed  
4 -# but instead the qualitative results are displayed. 3 +# Right now this is just a simple proof of concept.
  4 +
  5 +if [ $# -lt 1 ]; then
  6 + echo 'Usage:'
  7 + echo " $0 show: show the results qualitatively on a small subset."
  8 + echo " $0 eval: evaluate the results on the full test subset."
  9 + exit 1
  10 +fi
5 11
6 # Make sure you set your data path. This will likely by your openbr/data directory. 12 # Make sure you set your data path. This will likely by your openbr/data directory.
7 if [ -z "$DATA" ]; then 13 if [ -z "$DATA" ]; then
@@ -10,18 +16,29 @@ else @@ -10,18 +16,29 @@ else
10 INRIA_PATH=$DATA/INRIAPerson 16 INRIA_PATH=$DATA/INRIAPerson
11 fi 17 fi
12 18
13 -ALG="Open+Cvt(Gray)+Rename(neg,0)+BuildScales(Blur(2)+LBP(1,2)+SlidingWindow(Hist(59)+Cat+LDA(isBinary=true),windowWidth=10,takeLargestScale=false,threshold=2),windowWidth=10,takeLargestScale=false,minScale=4)+ConsolidateDetections+Discard" 19 +ALG="Open+Cvt(Gray)+BuildScales(Blur(2)+LBP(1,2)+SlidingWindow(Hist(59)+Cat+LDA(isBinary=true),windowWidth=10,takeLargestScale=false,threshold=2),windowWidth=10,takeLargestScale=false,minScale=4)+ConsolidateDetections+Discard"
14 20
15 # Josh's new algorithm (in progress) 21 # Josh's new algorithm (in progress)
16 # ALG="Open+Cvt(Gray)+Detector(Gradient+Bin(0,360,9,true)+Merge+Integral+IntegralSlidingWindow(RecursiveIntegralSampler(2,2,0,PCA(0.95))+Cat+LDA(0.95,isBinary=true)))" 22 # ALG="Open+Cvt(Gray)+Detector(Gradient+Bin(0,360,9,true)+Merge+Integral+IntegralSlidingWindow(RecursiveIntegralSampler(2,2,0,PCA(0.95))+Cat+LDA(0.95,isBinary=true)))"
17 23
  24 +if [ $1 = 'eval' ]; then
  25 + TEST=test.xml
  26 +else
  27 + TEST=testSmall.xml
  28 +fi
  29 +
18 br -useGui 0 \ 30 br -useGui 0 \
19 -algorithm "${ALG}" \ 31 -algorithm "${ALG}" \
20 -path $INRIA_PATH/img \ 32 -path $INRIA_PATH/img \
21 - -train $INRIA_PATH/sigset/train.xml pedModel 33 + -train $INRIA_PATH/sigset/train.xml pedModel \
  34 + -enroll $INRIA_PATH/sigset/$TEST pedResults.xml
22 35
23 -br -algorithm pedModel \  
24 - -path $INRIA_PATH/img \  
25 - -enroll $INRIA_PATH/sigset/testSmall.xml pedResults.xml 36 +if [ $1 = 'show' ]; then
  37 + br -parallelism 0 -algorithm Open+Draw+Show -path $INRIA_PATH/img -enroll pedResults.xml
  38 +elif [ $1 = 'eval' ]; then
  39 + br -evalDetection pedResults.xml $INRIA_PATH/sigset/$TEST pedEvalResults.csv \
  40 + -plotDetection pedEvalResults.csv pedPlots.pdf
  41 +else
  42 + echo "$1 is not a valid command. Choose show or eval."
  43 +fi
26 44
27 -br -parallelism 0 -algorithm Open+Draw+Show -path $INRIA_PATH/img -enroll pedResults.xml