Commit 9c7f44a56ef2a203d1b9cf3295b1630d97730dcd
1 parent
b0ac5801
Add show/eval command to script
Showing
1 changed file
with
21 additions
and
7 deletions
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 |
| @@ -15,8 +21,11 @@ ALG="Open+Cvt(Gray)+BuildScales(Blur(2)+LBP(1,2)+SlidingWindow(Hist(59)+Cat+LDA( | @@ -15,8 +21,11 @@ ALG="Open+Cvt(Gray)+BuildScales(Blur(2)+LBP(1,2)+SlidingWindow(Hist(59)+Cat+LDA( | ||
| 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 | ||
| 18 | -#TEST=testSmall.xml | ||
| 19 | -TEST=test.xml | 24 | +if [ $1 = 'eval' ]; then |
| 25 | + TEST=test.xml | ||
| 26 | +else | ||
| 27 | + TEST=testSmall.xml | ||
| 28 | +fi | ||
| 20 | 29 | ||
| 21 | br -useGui 0 \ | 30 | br -useGui 0 \ |
| 22 | -algorithm "${ALG}" \ | 31 | -algorithm "${ALG}" \ |
| @@ -24,7 +33,12 @@ br -useGui 0 \ | @@ -24,7 +33,12 @@ br -useGui 0 \ | ||
| 24 | -train $INRIA_PATH/sigset/train.xml pedModel \ | 33 | -train $INRIA_PATH/sigset/train.xml pedModel \ |
| 25 | -enroll $INRIA_PATH/sigset/$TEST pedResults.xml | 34 | -enroll $INRIA_PATH/sigset/$TEST pedResults.xml |
| 26 | 35 | ||
| 27 | -br -evalDetection pedResults.xml $INRIA_PATH/sigset/$TEST pedEvalResults.csv \ | ||
| 28 | - -plotDetection pedEvalResults.csv pedPlots.pdf | 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 | ||
| 29 | 44 | ||
| 30 | -#br -parallelism 0 -algorithm Open+Draw+Show -path $INRIA_PATH/img -enroll pedResults.xml |