Changeset 33415
- Timestamp:
- 2019-08-14T11:42:20+12:00 (4 years ago)
- Location:
- other-projects/is-sheet-music-encore/trunk
- Files:
-
- 125 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/is-sheet-music-encore/trunk/Makefile
r33384 r33415 4 4 5 5 6 single:6 download-single: 7 7 ./COMPX520-RUN-PNG.sh coo1.ark:/13960/t2t448j81 1 8 8 … … 11 11 #HI-RES 12 12 #********** 13 13 14 hi-res-download-all: 14 ./COMPX520-DOWNLOADER-PNG-10PAGES-hi-res.sh java-gen-corpus/gen-50-MU-hathiValidIDList.txt MU15 ./COMPX520-DOWNLOADER-PNG-10PAGES-hi-res.sh java-gen-corpus/gen-50-BK-hathiValidIDList.txt BK16 ./COMPX520-DOWNLOADER-PNG-10PAGES-hi-res.sh java-gen-corpus/gen-50-SE-hathiValidIDList.txt SE17 ./COMPX520-DOWNLOADER-PNG-10PAGES-hi-res.sh java-gen-corpus/gen-50-MP-hathiValidIDList.txt MP18 19 hi-res-download-reconstructed:20 15 ./COMPX520-DOWNLOADER-PNG-10PAGES-hi-res.sh java-gen-corpus/MU-500-reconstructed.txt MU 21 16 ./COMPX520-DOWNLOADER-PNG-10PAGES-hi-res.sh java-gen-corpus/BK-500-reconstructed.txt BK … … 27 22 #Prior to running the scripts below 28 23 ###################################### 29 #Run all DOWNLOAD30 #NNEEDDD TOO FIIX31 gen-500-all:32 make gen-500-MU33 make gen-500-BK34 make gen-500-SE35 make gen-500-MP36 make gen-500-MX37 38 24 #MUSIC, Including Sheet music 39 25 gen-500-MU: … … 75 61 ./COMPX520-DOWNLOADER-PNG-10PAGES.sh java-gen-corpus/gen-500-MX-hathiValidIDList.txt 76 62 77 78 63 #*********** 79 64 #CLASSIFIERS 80 65 #*********** 81 82 #HoughLinesP 83 run-classifier-houghlinesP-test: 84 #Compile 66 run-cluster-single-test: 67 cd image-identification-terminal; make testrun-classifier-single-cluster 68 69 run-count-single-test: 70 cd image-identification-terminal; make testrun-classifier-single-count 71 72 run-cluster-corpus-hires: 73 #Compile 85 74 cd image-identification-terminal; javac javaAccuracyCalculator.java 86 75 cd image-identification-terminal; javac -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar javaImageClassifier.java; 87 #Run javaImageClassifier on all images in TestImages 88 @echo starting classfier89 @date90 cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/download-images/MU houghlinesP log-houghlinesP-test.txt -test91 @echo finished classifier92 @date93 #Calculate the Accuracy of the classifier 94 cd image-identification-terminal; java javaAccuracyCalculator log- houghlinesP-test.txt houghlinesPresults.txt95 #Display output of javaImageClassifier 96 cd image-identification-terminal; less log-houghlinesP-test.txt97 #Display output of javaAccuracyCalculator98 cd image-identification-terminal; less results.txt99 100 run-c lassifier-houghlinesP-all:101 76 #Run classifier 77 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 78 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 79 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 80 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 81 #Calculate accuracy 82 cd image-identification-terminal; java javaAccuracyCalculator log-all-hires-new/log-cluster-MU.txt cluster-MU log-all-hires-new/results.txt 83 cd image-identification-terminal; java javaAccuracyCalculator log-all-hires-new/log-cluster-BK.txt cluster-BK log-all-hires-new/results.txt 84 cd image-identification-terminal; java javaAccuracyCalculator log-all-hires-new/log-cluster-MP.txt cluster-MP log-all-hires-new/results.txt 85 cd image-identification-terminal; java javaAccuracyCalculator log-all-hires-new/log-cluster-SE.txt cluster-SE log-all-hires-new/results.txt 86 #Display the results 87 cd image-identification-terminal; less log-all-hires-new/results.txt 88 89 run-count-corpus-hires: 90 #Compile 102 91 cd image-identification-terminal; javac javaAccuracyCalculator.java 103 92 cd image-identification-terminal; javac -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar javaImageClassifier.java; 104 #Run javaImageClassifier on all images in MU 105 @echo starting classfier 106 @date 107 cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/download-images/MU houghlinesP log-houghlinesP-MU.txt -all 108 @echo finished classifier 109 @date 110 #Calculate the Accuracy of the classifier 111 cd image-identification-terminal; java javaAccuracyCalculator log-houghlinesP-MU.txt houghlinesP results.txt 112 #Display output of javaImageClassifier 113 cd image-identification-terminal; less log-houghlinesP-MU.txt 114 #Display output of javaAccuracyCalculator 115 cd image-identification-terminal; less results.txt 93 #Run classifier 94 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 95 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 96 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 97 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 98 #Calculate accuracy 99 cd image-identification-terminal; java javaAccuracyCalculator log-all-hires-new/log-count-MU.txt count-MU log-all-hires-new/results.txt 100 cd image-identification-terminal; java javaAccuracyCalculator log-all-hires-new/log-count-BK.txt count-BK log-all-hires-new/results.txt 101 cd image-identification-terminal; java javaAccuracyCalculator log-all-hires-new/log-count-MP.txt count-MP log-all-hires-new/results.txt 102 cd image-identification-terminal; java javaAccuracyCalculator log-all-hires-new/log-count-SE.txt count-SE log-all-hires-new/results.txt 103 #Display the results 104 cd image-identification-terminal; less log-all-hires-new/results.txt 105 106 116 107 117 #HoughLinesP_refined118 run-classifier-houghlinesP-refined-test:119 #cd image-identification-terminal; rm log-houghlinesP-refined-test.txt120 #Compile121 cd image-identification-terminal; javac javaAccuracyCalculator.java122 cd image-identification-terminal; javac -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar javaImageClassifier.java;123 #Run javaImageClassifier on all images in TestImages124 @echo starting classfier125 @date126 cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/download-images/MU houghlinesP-refined log-houghlinesP-refined-test.txt -test127 @echo finished classifier128 @date129 #Calculate the Accuracy of the classifier130 cd image-identification-terminal; java javaAccuracyCalculator log-houghlinesP-refined-test.txt houghlinesP-refined-test results.txt131 #Display output of javaImageClassifier132 cd image-identification-terminal; less log-houghlinesP-refined-test.txt133 #Display output of javaAccuracyCalculator output134 cd image-identification-terminal; less results.txt135 108 136 run-classifier-houghlinesP-refined-all:137 cd image-identification-terminal; rm log-houghlinesP-refined-MU.txt138 #Compile139 cd image-identification-terminal; javac javaAccuracyCalculator.java140 cd image-identification-terminal; javac -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar javaImageClassifier.java;141 #Run javaImageClassifier on all images in MU142 @echo starting classfier143 @date144 cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/download-images/MU houghlinesP-refined log-houghlinesP-refined-MU.txt -all145 @echo finished classifier146 @date147 #Calculate the Accuracy of the classifier148 cd image-identification-terminal; java javaAccuracyCalculator log-houghlinesP-refined-MU.txt houghlinesP-refined-all results.txt149 #Display output of javaImageClassifier150 cd image-identification-terminal; less log-houghlinesP-refined-MU.txt151 #Display output of javaAccuracyCalculator152 cd image-identification-terminal; less results.txt153 109 154 run-both-MU:155 #Compile156 cd image-identification-terminal; javac javaAccuracyCalculator.java157 cd image-identification-terminal; javac -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar javaImageClassifier.java;158 #Run javaImageClassifier on all images in MU159 @echo starting houghlinesP classfier160 @date161 cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/download-images/MU houghlinesP log-houghlinesP-MU.txt -all162 @echo finished houghlinesP classifier163 @date164 @echo starting houghlinesP-refined classfier165 cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/download-images/MU houghlinesP-refined log-houghlinesP-refined-MU.txt -all166 @echo finished houghlinesP-refined classifier167 @date168 #Calculate the Accuracy of the classifier169 cd image-identification-terminal; java javaAccuracyCalculator log-houghlinesP-MU.txt houghlinesP results.txt170 cd image-identification-terminal; java javaAccuracyCalculator log-houghlinesP-refined-MU.txt houghlinesP-refined results.txt171 #Display the results172 cd image-identification-terminal; less results.txt173 cd image-identification-terminal; less log-houghlinesP-MU.txt174 cd image-identification-terminal; less log-houghlinesP-refined-MU.txt175 110 111 112 113 114 115 116 117 118 119 120 121 122 123 #*********** 124 #OLDCLASSIFIERS 125 #*********** 176 126 run-houghlinesP-refined-corpus: 177 127 #cd image-identification-terminal; cd log-all; rm *.txt … … 194 144 run-houghlinesP-refined-corpus-hi-res: 195 145 cd image-identification-terminal; cd log-all-hires; rm *.txt 196 146 #Compile 197 147 cd image-identification-terminal; javac javaAccuracyCalculator.java 198 148 cd image-identification-terminal; javac -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar javaImageClassifier.java; … … 208 158 cd image-identification-terminal; java javaAccuracyCalculator log-all-hires/log-houghlinesP-refined-SE.txt houghlinesP-refined-SE log-all-hires/results.txt 209 159 #Display the results 210 cd image-identification-terminal; less log-all-hires/results.txt 211 160 cd image-identification-terminal; less log-all-hires/results.txt -
other-projects/is-sheet-music-encore/trunk/SETUP.bash
r33136 r33415 39 39 # CONFIG_ARGS=$( cat <<_EOF_ | tr '\n' ' ' INC=-I/usr/local/opt/openssl/include LDDLFLAGS="-bundle -undefined dynamic_lookup -fstack-protector-strong -L/usr/local/opt/openssl/lib" LD="env MACOSX_DEPLOYMENT_TARGET=10.11 cc" LDFLAGS="-fstack-protector-strong -L/usr/local/opt/openssl/lib" _EOF_ ) cpanm Net::SSLeay --configure-args "$CONFIG_ARGS" --interactive --verbose 40 40 41 -
other-projects/is-sheet-music-encore/trunk/image-identification-terminal/Makefile
r33340 r33415 18 18 rm results.txt 19 19 20 testrun-classifier-cluster-single: 21 javac -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar javaImageClassifier.java; 22 ./runClassifier.sh TestImages/test-coo.31924062612282-9.png cluster test.png -single 20 testrun-classifier-single-cluster: 21 ./runClassifer.sh TestImages/test-coo.31924062612282-9.png cluster logSingle.txt -singleNew 23 22 echo "Displaying javaImageClassifier output" 24 #Display output of javaImageClassifier25 less log.txt26 23 #Calculate the Accuracy of the classifier 27 java javaAccuracyCalculator log .txt houghlinesP results.txt24 java javaAccuracyCalculator logSingle.txt houghlinesP resultSingle.txt 28 25 #Display output 29 less results.txt 30 rm log.txt 31 rm results.txt 26 less resultSingle.txt 27 less logSingle.txt 32 28 29 testrun-classifier-single-count: 30 ./runClassifer.sh TestImages/test-coo.31924062612282-9.png count logSingle.txt -singleNew 31 echo "Displaying javaImageClassifier output" 32 #Calculate the Accuracy of the classifier 33 java javaAccuracyCalculator logSingle.txt houghlinesP resultSingle.txt 34 #Display output 35 less logSingle.txt 36 37 -
other-projects/is-sheet-music-encore/trunk/image-identification-terminal/javaImageClassifier.java
r33340 r33415 263 263 //****************** 264 264 265 private static 265 private static BufferedImage toBufferedImage(Mat mat){ 266 266 //MOSTLY COPY PASTE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 267 267 //MOSTLY COPY PASTE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -
other-projects/is-sheet-music-encore/trunk/image-identification-terminal/runClassifer.sh
r33340 r33415 2 2 3 3 if [ $# != 4 ] ; then 4 echo "Usage: ./testClassifier.sh folder/file_name classifier_type output_filename type(-a:all -test:100 -single:1)" 1>&24 echo "Usage: ./testClassifier.sh folder/file_name classifier_type output_filename type(-a:all -test:100 -single:1)" 1>&2 5 5 exit 1 6 6 fi … … 22 22 i=$[$i+1] 23 23 done 24 ;; 24 ;; 25 26 -allNew) 27 for file_name in $folder_name/*/*.png; do 28 echo $file_name 29 echo $output 30 echo $i 31 echo "" 32 java -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar:. -Djava.library.path=/Scratch/cpb16/opencv-3.4.2/build/lib/ javaClassifierComparison $file_name $classifier_type $output 33 i=$[$i+1] 34 done 35 ;; 25 36 26 37 -test) … … 50 61 #Runs javaImagesClassifier on ONE image 51 62 javac -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar javaImageClassifier.java; 63 echo $folder_name 64 echo $output 65 echo $classifier_type 66 java -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar:. -Djava.library.path=/Scratch/cpb16/opencv-3.4.2/build/lib/ javaImageClassifier $folder_name $classifier_type $output 67 ;; 68 69 -singleNew) 70 #Runs javaImagesClassifier on ONE image 71 javac -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar -Xlint javaClassifierComparison.java; 52 72 echo $file_name 53 73 echo $output 54 74 echo $classifier_type 55 java -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar:. -Djava.library.path=/Scratch/cpb16/opencv-3.4.2/build/lib/ javaImageClassifier $file_name $classifier_type $output 56 75 java -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar:. -Djava.library.path=/Scratch/cpb16/opencv-3.4.2/build/lib/ javaClassifierComparison $folder_name $classifier_type $output 57 76 58 77 esac
Note:
See TracChangeset
for help on using the changeset viewer.