diff --git a/scripts/pedestrianBaselineLBP.sh b/scripts/pedestrianBaselineLBP.sh index b3bf8cb..5f53781 100755 --- a/scripts/pedestrianBaselineLBP.sh +++ b/scripts/pedestrianBaselineLBP.sh @@ -1,7 +1,13 @@ #!/bin/bash -# Right now this is just a simple proof of concept. No quantitative eval is performed -# but instead the qualitative results are displayed. +# Right now this is just a simple proof of concept. + +if [ $# -lt 1 ]; then + echo 'Usage:' + echo " $0 show: show the results qualitatively on a small subset." + echo " $0 eval: evaluate the results on the full test subset." + exit 1 +fi # Make sure you set your data path. This will likely by your openbr/data directory. if [ -z "$DATA" ]; then @@ -15,8 +21,11 @@ ALG="Open+Cvt(Gray)+BuildScales(Blur(2)+LBP(1,2)+SlidingWindow(Hist(59)+Cat+LDA( # Josh's new algorithm (in progress) # 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)))" -#TEST=testSmall.xml -TEST=test.xml +if [ $1 = 'eval' ]; then + TEST=test.xml +else + TEST=testSmall.xml +fi br -useGui 0 \ -algorithm "${ALG}" \ @@ -24,7 +33,12 @@ br -useGui 0 \ -train $INRIA_PATH/sigset/train.xml pedModel \ -enroll $INRIA_PATH/sigset/$TEST pedResults.xml -br -evalDetection pedResults.xml $INRIA_PATH/sigset/$TEST pedEvalResults.csv \ - -plotDetection pedEvalResults.csv pedPlots.pdf +if [ $1 = 'show' ]; then + br -parallelism 0 -algorithm Open+Draw+Show -path $INRIA_PATH/img -enroll pedResults.xml +elif [ $1 = 'eval' ]; then + br -evalDetection pedResults.xml $INRIA_PATH/sigset/$TEST pedEvalResults.csv \ + -plotDetection pedEvalResults.csv pedPlots.pdf +else + echo "$1 is not a valid command. Choose show or eval." +fi -#br -parallelism 0 -algorithm Open+Draw+Show -path $INRIA_PATH/img -enroll pedResults.xml