source: other-projects/is-sheet-music-encore/trunk/EndToEndSystem.sh@ 33449

Last change on this file since 33449 was 33439, checked in by cpb16, 5 years ago

Have created properties file and accessibility from javaClassifierComparision. Have created download middle page only variant of image-downloader system. Have created EndToEndSystem bash script that will be used as makefile, with makefile being used to execute preset useful commands to the EndToEndSystem. It needs to be fleshed out as only has one script, this script can run a classifier and place the results into a subdirectory defined by the user

  • Property svn:executable set to *
File size: 3.5 KB
Line 
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
11type=$1
12
13#****************************************************************************************************
14#Test/Dev Scripts
15#****************************************************************************************************
16
17
18
19
20#****************************************************************************************************
21#Utility Scripts
22#****************************************************************************************************
23if [ $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
33fi
34#****************************************************************************************************
35#Classifier Scripts [HIGHRES BY DEFUALT]
36#****************************************************************************************************
37if [ $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
70fi
71
72
73#****************************************************************************************************
74#Downloader Scripts
75#****************************************************************************************************
76
77#****************************************************************************************************
78#End of the line
79echo "unknown command, please try again, or type './EndToEndSystem --help'"
80exit 1
Note: See TracBrowser for help on using the repository browser.