Browse Source

update readme

Jozef Mlich 2 years ago
parent
commit
5366c2a000
4 changed files with 23 additions and 3 deletions
  1. 20 0
      README.md
  2. 1 1
      hogsvm.py
  3. BIN
      sample_output.jpg
  4. 2 2
      test_hogsvm.sh

+ 20 - 0
README.md

@@ -0,0 +1,20 @@
+
+opencv based classifier of pictures. 
+
+- extracts feature vector from image (see feature_vector function)
+-- "simple" hog
+-- hog_cv
+-- color histogram
+- svm model is trained and evaluated
+-- size of the training is 80% of data set
+- list of true/false positive/negative of testing set is printed in html to stdout
+
+The input is defined as set of pictures with same resolution (e.g. 48x48) and class name
+
+annotation file looks like this:
+```
+/var/www/html/fire/sun-dataset/SUNOUT/a/art_school/sun_aprywzqxjcezkbch.jpg,non-fire
+/var/www/html/fire/labelme_samples-80/000093_65.jpg,fire
+```
+![Sample Output](https://git.fit.vutbr.cz/imlich/opencv-hog/raw/master/sample_output.jpg)
+

+ 1 - 1
hogsvm.py

@@ -61,7 +61,7 @@ def feature_vector(img):
 if __name__ == '__main__':
 
     if len(sys.argv) != 2:
-        print ("usage: {0} anot.csv ptc".format(sys.argv[0]))
+        print ("usage: {0} anot.csv".format(sys.argv[0]))
         print ("  anot.csv consits of \"filename,class\\n\"");
         sys.exit(1)
 

BIN
sample_output.jpg


+ 2 - 2
test_hogsvm.sh

@@ -1,9 +1,9 @@
 #!/bin/bash
 
-#DATASET_SIZE=125
+DATASET_SIZE=125
 #DATASET_SIZE=500
 #DATASET_SIZE=1000
-DATASET_SIZE=5000
+#DATASET_SIZE=5000
 #DATASET_SIZE=25446
 #DATASET_SIZE=125240
 #DATASET_SIZE=150686