1 | #**********
|
---|
2 | #Utilities/Test
|
---|
3 | #**********
|
---|
4 |
|
---|
5 | compile:
|
---|
6 | cd java-gen-corpus; javac *.java;
|
---|
7 |
|
---|
8 | download-single:
|
---|
9 | ./COMPX520-RUN-PNG-hi-res.sh coo1.ark:/13960/t2t448j81 1 /..
|
---|
10 |
|
---|
11 | test-get-page-numbers-map:
|
---|
12 | cd java-gen-corpus; javac javaGenMapPageCountChecker.java
|
---|
13 | cd java-gen-corpus; java javaGenMapPageCountChecker gen-500-MP-hathiFullIDList.txt 234 MapListNumPages.txt
|
---|
14 |
|
---|
15 |
|
---|
16 | test-gen-new-5000-map:
|
---|
17 | #MAKE SURE TO RUN source SETUP.bash prior to this cmd
|
---|
18 | cd java-gen-corpus; javac javaGenMap5000ValidIDList.java
|
---|
19 | cd java-gen-corpus; java javaGenMap5000ValidIDList gen-500-MP-hathiFullIDList.txt gen-5000-MapList02.txt
|
---|
20 |
|
---|
21 | test-gen-new-5000-local-map:
|
---|
22 | #MAKE SURE TO RUN source SETUP.bash prior to this cmd
|
---|
23 | cd java-gen-corpus; javac javaGenMapLocal5000ValidIDList.java
|
---|
24 | cd java-gen-corpus; java javaGenMapLocal5000ValidIDList MapListNumPages.txt gen-5000-Local-MapList.txt
|
---|
25 |
|
---|
26 |
|
---|
27 | run-morphology-100-test:
|
---|
28 | cd image-identification-terminal/log-all-hires-new; rm log-morphology-MU-test.txt
|
---|
29 | cd image-identification-terminal; javac javaAccuracyCalculator.java
|
---|
30 | cd image-identification-terminal; javac -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar javaClassifierComparison.java;
|
---|
31 | cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/MU morphology log-all-hires-new/log-morphology-MU-test.txt -testNew
|
---|
32 | cd image-identification-terminal; java javaAccuracyCalculator log-all-hires-new/log-morphology-MU-test.txt morphology-MU log-all-hires-new/results.txt
|
---|
33 | cd image-identification-terminal; less log-all-hires-new/results.txt
|
---|
34 | cd image-identification-terminal; less log-all-hires-new/log-morphology-MU-test.txt
|
---|
35 |
|
---|
36 | run-morph-single:
|
---|
37 | cd image-identification-terminal; make testrun-classifier-single-morph
|
---|
38 | #**********
|
---|
39 | #HI-RES
|
---|
40 | #**********
|
---|
41 |
|
---|
42 | hi-res-download-all:
|
---|
43 | ./COMPX520-DOWNLOADER-PNG-10PAGES-hi-res.sh java-gen-corpus/MU-500-reconstructed.txt MU
|
---|
44 | ./COMPX520-DOWNLOADER-PNG-10PAGES-hi-res.sh java-gen-corpus/BK-500-reconstructed.txt BK
|
---|
45 | ./COMPX520-DOWNLOADER-PNG-10PAGES-hi-res.sh java-gen-corpus/SE-500-reconstructed.txt SE
|
---|
46 | make hi-res-download-map
|
---|
47 | hi-res-download-map:
|
---|
48 | ./FirstAndLastTest-DOWNLOADER-PNG.sh java-gen-corpus/gen-5000-Local-MapList.txt MP
|
---|
49 |
|
---|
50 | ######################################
|
---|
51 | #CAUTION: run must: source SETUP.bash
|
---|
52 | #Prior to running the gen-* scripts
|
---|
53 | ######################################
|
---|
54 | gen-10000-MU:
|
---|
55 | cd java-gen-corpus; javac *.java
|
---|
56 | cd java-gen-corpus; java javaGenFullIDList hathiFull.txt gen-10000-MU-hathiFullIDList.txt MU
|
---|
57 | cd java-gen-corpus; java javaGenFirstAndLastTenIDList gen-10000-MU-hathiFullIDList.txt 10000 gen-10000-MU-hathiValidIDList.txt
|
---|
58 | #./FirstAndLastTest-DOWNLOADER-PNG.sh java-gen-corpus/gen-10000-MU-hathiValidIDList.txt MU
|
---|
59 |
|
---|
60 |
|
---|
61 | #***********
|
---|
62 | #CLASSIFIERS
|
---|
63 | #***********
|
---|
64 | run-cluster-single-test:
|
---|
65 | cd image-identification-terminal; make testrun-classifier-single-cluster
|
---|
66 |
|
---|
67 | run-count-single-test:
|
---|
68 | cd image-identification-terminal; make testrun-classifier-single-count
|
---|
69 |
|
---|
70 | run-cluster-corpus-hires:
|
---|
71 | #Compile
|
---|
72 | cd image-identification-terminal; javac javaAccuracyCalculator.java
|
---|
73 | cd image-identification-terminal; javac -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar javaClassifierComparison.java;
|
---|
74 | #Run classifier
|
---|
75 | cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/MU cluster log-all-hires-new/log-cluster-MU.txt -allNew
|
---|
76 | cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/BK cluster log-all-hires-new/log-cluster-BK.txt -allNew
|
---|
77 | cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/MP cluster log-all-hires-new/log-cluster-MP.txt -allNew
|
---|
78 | cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/SE cluster log-all-hires-new/log-cluster-SE.txt -allNew
|
---|
79 | #Calculate accuracy
|
---|
80 | cd image-identification-terminal; java javaAccuracyCalculator log-all-hires-new/log-cluster-MU.txt cluster-MU log-all-hires-new/results.txt
|
---|
81 | cd image-identification-terminal; java javaAccuracyCalculator log-all-hires-new/log-cluster-BK.txt cluster-BK log-all-hires-new/results.txt
|
---|
82 | cd image-identification-terminal; java javaAccuracyCalculator log-all-hires-new/log-cluster-MP.txt cluster-MP log-all-hires-new/results.txt
|
---|
83 | cd image-identification-terminal; java javaAccuracyCalculator log-all-hires-new/log-cluster-SE.txt cluster-SE log-all-hires-new/results.txt
|
---|
84 | #Display the results
|
---|
85 | cd image-identification-terminal; less log-all-hires-new/results.txt
|
---|
86 |
|
---|
87 | run-count-corpus-hires:
|
---|
88 | #Compile
|
---|
89 | cd image-identification-terminal; javac javaAccuracyCalculator.java
|
---|
90 | cd image-identification-terminal; javac -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar javaClassifierComparison.java;
|
---|
91 | #Run classifier
|
---|
92 | cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/MU count log-all-hires-new/log-count-MU.txt -allNew
|
---|
93 | cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/BK count log-all-hires-new/log-count-BK.txt -allNew
|
---|
94 | cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/MP count log-all-hires-new/log-count-MP.txt -allNew
|
---|
95 | cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/SE count log-all-hires-new/log-count-SE.txt -allNew
|
---|
96 | #Calculate accuracy
|
---|
97 | cd image-identification-terminal; java javaAccuracyCalculator log-all-hires-new/log-count-MU.txt count-MU log-all-hires-new/results.txt
|
---|
98 | cd image-identification-terminal; java javaAccuracyCalculator log-all-hires-new/log-count-BK.txt count-BK log-all-hires-new/results.txt
|
---|
99 | cd image-identification-terminal; java javaAccuracyCalculator log-all-hires-new/log-count-MP.txt count-MP log-all-hires-new/results.txt
|
---|
100 | cd image-identification-terminal; java javaAccuracyCalculator log-all-hires-new/log-count-SE.txt count-SE log-all-hires-new/results.txt
|
---|
101 | #Display the results
|
---|
102 | cd image-identification-terminal; less log-all-hires-new/results.txt
|
---|
103 |
|
---|
104 | #Cluster and Count
|
---|
105 | run-combo-corpus-hires:
|
---|
106 | #Compile
|
---|
107 | cd image-identification-terminal; javac javaAccuracyCalculator.java
|
---|
108 | cd image-identification-terminal; javac -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar javaClassifierComparison.java;
|
---|
109 | #Run classifier
|
---|
110 | cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/MU combo log-all-hires-new/log-combo-MU.txt -allNew
|
---|
111 | cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/BK combo log-all-hires-new/log-combo-BK.txt -allNew
|
---|
112 | #cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/MP combo log-all-hires-new/log-combo-MP.txt -allNew
|
---|
113 | cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/SE combo log-all-hires-new/log-combo-SE.txt -allNew
|
---|
114 | #Calculate accuracy
|
---|
115 | cd image-identification-terminal; java javaAccuracyCalculator log-all-hires-new/log-combo-MU.txt combo-MU log-all-hires-new/results.txt
|
---|
116 | cd image-identification-terminal; java javaAccuracyCalculator log-all-hires-new/log-combo-BK.txt combo-BK log-all-hires-new/results.txt
|
---|
117 | #cd image-identification-terminal; java javaAccuracyCalculator log-all-hires-new/log-combo-MP.txt combo-MP log-all-hires-new/results.txt
|
---|
118 | cd image-identification-terminal; java javaAccuracyCalculator log-all-hires-new/log-combo-SE.txt combo-SE log-all-hires-new/results.txt
|
---|
119 | #Display the results
|
---|
120 | cd image-identification-terminal; less log-all-hires-new/results.txt
|
---|
121 |
|
---|
122 |
|
---|
123 |
|
---|
124 |
|
---|
125 |
|
---|
126 |
|
---|
127 |
|
---|
128 |
|
---|
129 |
|
---|
130 |
|
---|
131 |
|
---|
132 |
|
---|
133 |
|
---|
134 |
|
---|
135 | #**************
|
---|
136 | #OLD SCRIPTS
|
---|
137 | #**************
|
---|
138 | #OLDCLASSIFIERS
|
---|
139 | #**************
|
---|
140 | run-houghlinesP-refined-corpus:
|
---|
141 | #cd image-identification-terminal; cd log-all; rm *.txt
|
---|
142 | #Compile
|
---|
143 | cd image-identification-terminal; javac javaAccuracyCalculator.java
|
---|
144 | cd image-identification-terminal; javac -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar javaImageClassifier.java;
|
---|
145 | #Run javaImageClassifier on all images in Corpus
|
---|
146 | cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/download-images/MU houghlinesP-refined log-all/log-houghlinesP-refined-MU.txt -all
|
---|
147 | cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/download-images/BK houghlinesP-refined log-all/log-houghlinesP-refined-BK.txt -all
|
---|
148 | cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/download-images/MP houghlinesP-refined log-all/log-houghlinesP-refined-MP.txt -all
|
---|
149 | cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/download-images/SE houghlinesP-refined log-all/log-houghlinesP-refined-SE.txt -all
|
---|
150 | #Calculate the Accuracy of the classifier
|
---|
151 | cd image-identification-terminal; java javaAccuracyCalculator log-all/log-houghlinesP-refined-MU.txt houghlinesP-refined-MU log-all/results.txt
|
---|
152 | cd image-identification-terminal; java javaAccuracyCalculator log-all/log-houghlinesP-refined-BK.txt houghlinesP-refined-BK log-all/results.txt
|
---|
153 | cd image-identification-terminal; java javaAccuracyCalculator log-all/log-houghlinesP-refined-MP.txt houghlinesP-refined-MP log-all/results.txt
|
---|
154 | cd image-identification-terminal; java javaAccuracyCalculator log-all/log-houghlinesP-refined-SE.txt houghlinesP-refined-SE log-all/results.txt
|
---|
155 | #Display the results
|
---|
156 | cd image-identification-terminal; less log-all/results.txt
|
---|
157 |
|
---|
158 | run-houghlinesP-refined-corpus-hi-res:
|
---|
159 | cd image-identification-terminal; cd log-all-hires; rm *.txt
|
---|
160 | #Compile
|
---|
161 | cd image-identification-terminal; javac javaAccuracyCalculator.java
|
---|
162 | cd image-identification-terminal; javac -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar javaImageClassifier.java;
|
---|
163 | #Run javaImageClassifier on all images in Corpus
|
---|
164 | cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/MU houghlinesP-refined log-all-hires/log-houghlinesP-refined-MU.txt -all
|
---|
165 | cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/BK houghlinesP-refined log-all-hires/log-houghlinesP-refined-BK.txt -all
|
---|
166 | cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/MP houghlinesP-refined log-all-hires/log-houghlinesP-refined-MP.txt -all
|
---|
167 | cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/SE houghlinesP-refined log-all-hires/log-houghlinesP-refined-SE.txt -all
|
---|
168 | #Calculate the Accuracy of the classifier
|
---|
169 | cd image-identification-terminal; java javaAccuracyCalculator log-all-hires/log-houghlinesP-refined-MU.txt houghlinesP-refined-MU log-all-hires/results.txt
|
---|
170 | cd image-identification-terminal; java javaAccuracyCalculator log-all-hires/log-houghlinesP-refined-BK.txt houghlinesP-refined-BK log-all-hires/results.txt
|
---|
171 | cd image-identification-terminal; java javaAccuracyCalculator log-all-hires/log-houghlinesP-refined-MP.txt houghlinesP-refined-MP log-all-hires/results.txt
|
---|
172 | cd image-identification-terminal; java javaAccuracyCalculator log-all-hires/log-houghlinesP-refined-SE.txt houghlinesP-refined-SE log-all-hires/results.txt
|
---|
173 | #Display the results
|
---|
174 | cd image-identification-terminal; less log-all-hires/results.txt
|
---|
175 |
|
---|
176 | #***********
|
---|
177 | #OLDGEN
|
---|
178 | #***********
|
---|
179 | #MUSIC, Including Sheet music
|
---|
180 | gen-500-MU:
|
---|
181 | cd java-gen-corpus; javac *.java
|
---|
182 | cd java-gen-corpus; java javaGenFullIDList hathiFull.txt gen-500-MU-hathiFullIDList.txt MU
|
---|
183 | cd java-gen-corpus; java javaGenValidIDList gen-500-MU-hathiFullIDList.txt 500 gen-500-MU-hathiValidIDList.txt
|
---|
184 | ./COMPX520-DOWNLOADER-PNG-10PAGES.sh java-gen-corpus/gen-500-MU-hathiValidIDList.txt
|
---|
185 |
|
---|
186 |
|
---|
187 | #BOOKS, Monograhpical
|
---|
188 | gen-500-BK:
|
---|
189 | cd java-gen-corpus; javac *.java
|
---|
190 | cd java-gen-corpus; java javaGenFullIDList hathiFull.txt gen-500-BK-hathiFullIDList.txt BK
|
---|
191 | cd java-gen-corpus; java javaGenValidIDList gen-500-BK-hathiFullIDList.txt 500 gen-500-BK-hathiValidIDList.txt
|
---|
192 | ./COMPX520-DOWNLOADER-PNG-10PAGES.sh java-gen-corpus/gen-500-BK-hathiValidIDList.txt
|
---|
193 |
|
---|
194 |
|
---|
195 | #SERIAL (journals, newspapers,etc)
|
---|
196 | gen-500-SE:
|
---|
197 | cd java-gen-corpus; javac *.java
|
---|
198 | cd java-gen-corpus; java javaGenFullIDList hathiFull.txt gen-500-SE-hathiFullIDList.txt SE
|
---|
199 | cd java-gen-corpus; java javaGenValidIDList gen-500-SE-hathiFullIDList.txt 500 gen-500-SE-hathiValidIDList.txt
|
---|
200 | ./COMPX520-DOWNLOADER-PNG-10PAGES.sh java-gen-corpus/gen-500-SE-hathiValidIDList.txt
|
---|
201 |
|
---|
202 |
|
---|
203 | #MAPS, Including atlas and sheet maps
|
---|
204 | gen-500-MP:
|
---|
205 | cd java-gen-corpus; javac *.java
|
---|
206 | cd java-gen-corpus; java javaGenFullIDList hathiFull.txt gen-500-MP-hathiFullIDList.txt MP
|
---|
207 | cd java-gen-corpus; java javaGenValidIDList gen-500-MP-hathiFullIDList.txt 500 gen-500-MP-hathiValidIDList.txt
|
---|
208 | ./COMPX520-DOWNLOADER-PNG-10PAGES.sh java-gen-corpus/gen-500-MP-hathiValidIDList.txt
|
---|
209 |
|
---|
210 |
|
---|
211 | #MIXED MATERIAL (This may not be required)
|
---|
212 | gen-500-MX:
|
---|
213 | cd java-gen-corpus; javac *.java
|
---|
214 | cd java-gen-corpus; java javaGenFullIDList hathiFull.txt gen-500-MX-hathiFullIDList.txt MX
|
---|
215 | cd java-gen-corpus; java javaGenValidIDList gen-500-MX-hathiFullIDList.txt 500 gen-500-MX-hathiValidIDList.txt
|
---|
216 | ./COMPX520-DOWNLOADER-PNG-10PAGES.sh java-gen-corpus/gen-500-MX-hathiValidIDList.txt
|
---|
217 |
|
---|