source: other-projects/is-sheet-music-encore/trunk/image-identification-terminal/runClassifer.sh@ 33243

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

Had break through with the refined houghlinesP algorithm overall accurarcy rate of 93%

  • Property svn:executable set to *
File size: 1.3 KB
Line 
1#!/bin/bash
2
3if [ $# != 4 ] ; then
4 echo "Usage: ./testClassifier.sh file_name classifier_type output_filename type(-a:all -test:100)" 1>&2
5 exit 1
6fi
7
8folder_name=$1
9classifier_type=$2
10output=$3
11i=0
12j=0
13case "$4" in
14 -all)
15 #Runs javaImageClassifier on ALL images
16 for file_name in $folder_name/*/*.png; do
17 echo $file_name
18 echo $output
19 echo $i
20 echo ""
21 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
22 i=$[$i+1]
23 done
24 ;;
25
26 -test)
27 #Runs javaImageClassifier on 100 images of each
28 for file_name in $folder_name/SheetMusic/*.png; do
29 if [ $i -lt 10 ] ; then
30 echo $file_name
31 echo $output
32 echo $i
33 echo ""
34 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
35 i=$[$i+1]
36 fi
37 done
38 for file_name in $folder_name/NotSheetMusic/*.png; do
39 if [ $j -lt 10 ] ; then
40 echo $file_name
41 echo $output
42 echo $j
43 echo ""
44 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
45 j=$[$j+1]
46 fi
47 done
48 ;;
49
50esac
Note: See TracBrowser for help on using the repository browser.