#!/bin/bash #**************************************************************************************************** #Type --help for detail on shortcuts #Have Makefile have some useful 'quick commands' #if [ $# != 1 ] ; then # echo "Usage: ./EndToEndSystem task" 1>&2 # exit 1 #fi #Using scripts that have different amount of arguments type=$1 #**************************************************************************************************** #Test/Dev Scripts #**************************************************************************************************** #**************************************************************************************************** #Utility Scripts #**************************************************************************************************** if [ $type == "page_num_test" ] ; then page_num=5 if [ $page_num != 1 ] ; then let a=$page_num/2 new_page_num=$a else new_page_num=$page_num fi echo $new_page_num exit 1 fi #**************************************************************************************************** #Classifier Scripts [HIGHRES BY DEFUALT] #**************************************************************************************************** if [ $type == "cluster" ] ; then if [ $# != 2 ] ; then echo "Usage:./EndToEndSystem cluster " exit 1 fi location=$2 #Compile echo "Compiling java programs..." cd image-identification-terminal javac javaAccuracyCalculator.java javac -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar javaClassifierComparison.java; #Classifiers echo "Successfuly Compiled, running classifer now..." #./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/MU cluster log-EndToEnd/$location/log-cluster-MU.txt -allNew #./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/BK cluster log-EndToEnd/$location/log-cluster-BK.txt -allNew #./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/MP cluster log-EndToEnd/$location/log-cluster-MP.txt -allNew #./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/SE cluster log-EndToEnd/$location/log-cluster-SE.txt -allNew #Results echo "Successfuly Classified, writing results now..." mkdir log-EndToEnd/$location/ echo $'\n***********************************************\n' >> log-EndToEnd/$location/results.txt date >> log-EndToEnd/$location/results.txt echo >> log-EndToEnd/$location/results.txt #echo "" >> log-EndToEnd/$location/results.txt cat configClassifierComparison.properties >> log-EndToEnd/$location/results.txt #java javaAccuracyCalculator log-EndToEnd/$location/log-cluster-MU.txt cluster-MU log-EndToEnd/$location/results.txt #java javaAccuracyCalculator log-EndToEnd/$location/log-cluster-BK.txt cluster-BK log-EndToEnd/$location/results.txt #java javaAccuracyCalculator log-EndToEnd/$location/log-cluster-MP.txt cluster-MP log-EndToEnd/$location/results.txt #java javaAccuracyCalculator log-EndToEnd/$location/log-cluster-SE.txt cluster-SE log-EndToEnd/$location/results.txt .././calculateCorpusAccuracy.sh less log-EndToEnd/$location/results.txt exit 1 fi #**************************************************************************************************** #Downloader Scripts #**************************************************************************************************** #**************************************************************************************************** #End of the line echo "unknown command, please try again, or type './EndToEndSystem --help'" exit 1