[33439] | 1 | #!/bin/bash
|
---|
| 2 | #****************************************************************************************************
|
---|
| 3 | #Type --help for detail on shortcuts
|
---|
| 4 | #Have Makefile have some useful 'quick commands'
|
---|
| 5 |
|
---|
| 6 | #if [ $# != 1 ] ; then
|
---|
| 7 | # echo "Usage: ./EndToEndSystem task" 1>&2
|
---|
| 8 | # exit 1
|
---|
| 9 | #fi
|
---|
| 10 | #Using scripts that have different amount of arguments
|
---|
| 11 | type=$1
|
---|
| 12 |
|
---|
| 13 | #****************************************************************************************************
|
---|
| 14 | #Test/Dev Scripts
|
---|
| 15 | #****************************************************************************************************
|
---|
| 16 |
|
---|
| 17 |
|
---|
| 18 |
|
---|
| 19 |
|
---|
| 20 | #****************************************************************************************************
|
---|
| 21 | #Utility Scripts
|
---|
| 22 | #****************************************************************************************************
|
---|
| 23 | if [ $type == "page_num_test" ] ; then
|
---|
| 24 | page_num=5
|
---|
| 25 | if [ $page_num != 1 ] ; then
|
---|
| 26 | let a=$page_num/2
|
---|
| 27 | new_page_num=$a
|
---|
| 28 | else
|
---|
| 29 | new_page_num=$page_num
|
---|
| 30 | fi
|
---|
| 31 | echo $new_page_num
|
---|
| 32 | exit 1
|
---|
| 33 | fi
|
---|
| 34 | #****************************************************************************************************
|
---|
| 35 | #Classifier Scripts [HIGHRES BY DEFUALT]
|
---|
| 36 | #****************************************************************************************************
|
---|
| 37 | if [ $type == "cluster" ] ; then
|
---|
| 38 |
|
---|
| 39 | if [ $# != 2 ] ; then
|
---|
| 40 | echo "Usage:./EndToEndSystem cluster <ResultSubDirectory>"
|
---|
| 41 | exit 1
|
---|
| 42 | fi
|
---|
| 43 | location=$2
|
---|
| 44 | #Compile
|
---|
| 45 | echo "Compiling java programs..."
|
---|
| 46 | cd image-identification-terminal
|
---|
| 47 | javac javaAccuracyCalculator.java
|
---|
| 48 | javac -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar javaClassifierComparison.java;
|
---|
| 49 | #Classifiers
|
---|
| 50 | echo "Successfuly Compiled, running classifer now..."
|
---|
| 51 | #./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/MU cluster log-EndToEnd/$location/log-cluster-MU.txt -allNew
|
---|
| 52 | #./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/BK cluster log-EndToEnd/$location/log-cluster-BK.txt -allNew
|
---|
| 53 | #./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/MP cluster log-EndToEnd/$location/log-cluster-MP.txt -allNew
|
---|
| 54 | #./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/SE cluster log-EndToEnd/$location/log-cluster-SE.txt -allNew
|
---|
| 55 | #Results
|
---|
| 56 | echo "Successfuly Classified, writing results now..."
|
---|
| 57 | mkdir log-EndToEnd/$location/
|
---|
| 58 | echo $'\n***********************************************\n' >> log-EndToEnd/$location/results.txt
|
---|
| 59 | date >> log-EndToEnd/$location/results.txt
|
---|
| 60 | echo >> log-EndToEnd/$location/results.txt
|
---|
| 61 | #echo "" >> log-EndToEnd/$location/results.txt
|
---|
| 62 | cat configClassifierComparison.properties >> log-EndToEnd/$location/results.txt
|
---|
| 63 | #java javaAccuracyCalculator log-EndToEnd/$location/log-cluster-MU.txt cluster-MU log-EndToEnd/$location/results.txt
|
---|
| 64 | #java javaAccuracyCalculator log-EndToEnd/$location/log-cluster-BK.txt cluster-BK log-EndToEnd/$location/results.txt
|
---|
| 65 | #java javaAccuracyCalculator log-EndToEnd/$location/log-cluster-MP.txt cluster-MP log-EndToEnd/$location/results.txt
|
---|
| 66 | #java javaAccuracyCalculator log-EndToEnd/$location/log-cluster-SE.txt cluster-SE log-EndToEnd/$location/results.txt
|
---|
| 67 | .././calculateCorpusAccuracy.sh
|
---|
| 68 | less log-EndToEnd/$location/results.txt
|
---|
| 69 | exit 1
|
---|
| 70 | fi
|
---|
| 71 |
|
---|
| 72 |
|
---|
| 73 | #****************************************************************************************************
|
---|
| 74 | #Downloader Scripts
|
---|
| 75 | #****************************************************************************************************
|
---|
| 76 |
|
---|
| 77 | #****************************************************************************************************
|
---|
| 78 | #End of the line
|
---|
| 79 | echo "unknown command, please try again, or type './EndToEndSystem --help'"
|
---|
| 80 | exit 1
|
---|