Changeset 33415


Ignore:
Timestamp:
2019-08-14T11:42:20+12:00 (5 years ago)
Author:
cpb16
Message:

updated, after unable to commit due to setup.bash being out of date. Added mainMorph for morphological development

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  
    44
    55
    6 single:
     6download-single:
    77    ./COMPX520-RUN-PNG.sh coo1.ark:/13960/t2t448j81 1
    88
     
    1111#HI-RES
    1212#**********
     13
    1314hi-res-download-all:
    14     ./COMPX520-DOWNLOADER-PNG-10PAGES-hi-res.sh java-gen-corpus/gen-50-MU-hathiValidIDList.txt MU
    15     ./COMPX520-DOWNLOADER-PNG-10PAGES-hi-res.sh java-gen-corpus/gen-50-BK-hathiValidIDList.txt BK
    16     ./COMPX520-DOWNLOADER-PNG-10PAGES-hi-res.sh java-gen-corpus/gen-50-SE-hathiValidIDList.txt SE
    17     ./COMPX520-DOWNLOADER-PNG-10PAGES-hi-res.sh java-gen-corpus/gen-50-MP-hathiValidIDList.txt MP
    18 
    19 hi-res-download-reconstructed:
    2015    ./COMPX520-DOWNLOADER-PNG-10PAGES-hi-res.sh java-gen-corpus/MU-500-reconstructed.txt MU
    2116    ./COMPX520-DOWNLOADER-PNG-10PAGES-hi-res.sh java-gen-corpus/BK-500-reconstructed.txt BK
     
    2722#Prior to running the scripts below
    2823######################################
    29 #Run all DOWNLOAD
    30 #NNEEDDD TOO FIIX
    31 gen-500-all:
    32     make gen-500-MU
    33     make gen-500-BK
    34     make gen-500-SE
    35     make gen-500-MP
    36     make gen-500-MX
    37 
    3824#MUSIC, Including Sheet music
    3925gen-500-MU:
     
    7561    ./COMPX520-DOWNLOADER-PNG-10PAGES.sh java-gen-corpus/gen-500-MX-hathiValidIDList.txt
    7662
    77 
    7863#***********
    7964#CLASSIFIERS
    8065#***********
    81 
    82 #HoughLinesP
    83 run-classifier-houghlinesP-test:
    84         #Compile
     66run-cluster-single-test:
     67    cd image-identification-terminal; make testrun-classifier-single-cluster
     68   
     69run-count-single-test:
     70    cd image-identification-terminal; make testrun-classifier-single-count
     71   
     72run-cluster-corpus-hires:
     73    #Compile
    8574    cd image-identification-terminal; javac javaAccuracyCalculator.java
    8675    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 classfier
    89     @date
    90     cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/download-images/MU houghlinesP log-houghlinesP-test.txt -test
    91     @echo finished classifier
    92     @date
    93         #Calculate the Accuracy of the classifier
    94     cd image-identification-terminal; java javaAccuracyCalculator log-houghlinesP-test.txt houghlinesP results.txt
    95         #Display output of javaImageClassifier
    96     cd image-identification-terminal; less log-houghlinesP-test.txt
    97         #Display output of javaAccuracyCalculator
    98     cd image-identification-terminal; less results.txt
    99 
    100 run-classifier-houghlinesP-all:
    101         #Compile
     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   
     89run-count-corpus-hires:
     90    #Compile
    10291    cd image-identification-terminal; javac javaAccuracyCalculator.java
    10392    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   
    116107
    117 #HoughLinesP_refined
    118 run-classifier-houghlinesP-refined-test:
    119     #cd image-identification-terminal; rm log-houghlinesP-refined-test.txt
    120         #Compile
    121     cd image-identification-terminal; javac javaAccuracyCalculator.java
    122     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 TestImages
    124     @echo starting classfier
    125     @date
    126     cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/download-images/MU houghlinesP-refined log-houghlinesP-refined-test.txt -test
    127     @echo finished classifier
    128     @date
    129         #Calculate the Accuracy of the classifier
    130     cd image-identification-terminal; java javaAccuracyCalculator log-houghlinesP-refined-test.txt houghlinesP-refined-test results.txt
    131         #Display output of javaImageClassifier
    132     cd image-identification-terminal; less log-houghlinesP-refined-test.txt
    133         #Display output of javaAccuracyCalculator output
    134     cd image-identification-terminal; less results.txt
    135108
    136 run-classifier-houghlinesP-refined-all:
    137     cd image-identification-terminal; rm log-houghlinesP-refined-MU.txt
    138         #Compile
    139     cd image-identification-terminal; javac javaAccuracyCalculator.java
    140     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 MU
    142     @echo starting classfier
    143     @date
    144     cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/download-images/MU houghlinesP-refined log-houghlinesP-refined-MU.txt -all
    145     @echo finished classifier
    146     @date
    147         #Calculate the Accuracy of the classifier
    148     cd image-identification-terminal; java javaAccuracyCalculator log-houghlinesP-refined-MU.txt houghlinesP-refined-all results.txt
    149         #Display output of javaImageClassifier
    150     cd image-identification-terminal; less log-houghlinesP-refined-MU.txt
    151         #Display output of javaAccuracyCalculator
    152     cd image-identification-terminal; less results.txt
    153109
    154 run-both-MU:
    155         #Compile
    156     cd image-identification-terminal; javac javaAccuracyCalculator.java
    157     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 MU
    159     @echo starting houghlinesP classfier
    160     @date
    161     cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/download-images/MU houghlinesP log-houghlinesP-MU.txt -all
    162     @echo finished houghlinesP classifier
    163     @date
    164     @echo starting houghlinesP-refined classfier
    165     cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/download-images/MU houghlinesP-refined log-houghlinesP-refined-MU.txt -all
    166     @echo finished houghlinesP-refined classifier
    167     @date
    168         #Calculate the Accuracy of the classifier
    169     cd image-identification-terminal; java javaAccuracyCalculator log-houghlinesP-MU.txt houghlinesP results.txt
    170     cd image-identification-terminal; java javaAccuracyCalculator log-houghlinesP-refined-MU.txt houghlinesP-refined results.txt
    171         #Display the results
    172     cd image-identification-terminal; less results.txt
    173     cd image-identification-terminal; less log-houghlinesP-MU.txt
    174     cd image-identification-terminal; less log-houghlinesP-refined-MU.txt
    175110
     111
     112
     113
     114
     115
     116
     117
     118
     119
     120
     121
     122
     123#***********
     124#OLDCLASSIFIERS
     125#***********
    176126run-houghlinesP-refined-corpus:
    177127    #cd image-identification-terminal; cd log-all; rm *.txt
     
    194144run-houghlinesP-refined-corpus-hi-res:
    195145    cd image-identification-terminal; cd log-all-hires; rm *.txt
    196         #Compile
     146    #Compile
    197147    cd image-identification-terminal; javac javaAccuracyCalculator.java
    198148    cd image-identification-terminal; javac -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar javaImageClassifier.java;
     
    208158    cd image-identification-terminal; java javaAccuracyCalculator log-all-hires/log-houghlinesP-refined-SE.txt houghlinesP-refined-SE log-all-hires/results.txt
    209159        #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  
    3939# 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
    4040
    41 
  • other-projects/is-sheet-music-encore/trunk/image-identification-terminal/Makefile

    r33340 r33415  
    1818    rm results.txt
    1919
    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
     20testrun-classifier-single-cluster:
     21    ./runClassifer.sh TestImages/test-coo.31924062612282-9.png cluster logSingle.txt -singleNew
    2322    echo "Displaying javaImageClassifier output"
    24         #Display output of javaImageClassifier
    25     less log.txt
    2623        #Calculate the Accuracy of the classifier
    27     java javaAccuracyCalculator log.txt houghlinesP results.txt
     24    java javaAccuracyCalculator logSingle.txt houghlinesP resultSingle.txt
    2825        #Display output
    29     less results.txt
    30     rm log.txt
    31     rm results.txt
     26    less resultSingle.txt
     27    less logSingle.txt
    3228
     29testrun-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  
    263263 //******************
    264264
    265     private static  BufferedImage toBufferedImage(Mat mat){
     265    private static BufferedImage toBufferedImage(Mat mat){
    266266        //MOSTLY COPY PASTE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    267267        //MOSTLY COPY PASTE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  • other-projects/is-sheet-music-encore/trunk/image-identification-terminal/runClassifer.sh

    r33340 r33415  
    22
    33if [ $# != 4 ] ; then
    4   echo "Usage: ./testClassifier.sh folder/file_name classifier_type output_filename type(-a:all -test:100 -single:1)" 1>&2
     4  echo "Usage: ./testClassifier.sh folder/file_name classifier_type output_filename  type(-a:all -test:100 -single:1)" 1>&2
    55  exit 1
    66fi
     
    2222            i=$[$i+1]
    2323        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        ;;
    2536       
    2637    -test)
     
    5061        #Runs javaImagesClassifier on ONE image
    5162        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;
    5272        echo $file_name
    5373        echo $output
    5474        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
    5776           
    5877esac       
Note: See TracChangeset for help on using the changeset viewer.