diff scripts/extract-appearance-images.py @ 901:753a081989e2

factorized some argument handling code
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Thu, 22 Jun 2017 12:02:34 -0400
parents 85b81c46c526
children c69a8defe5c3
line wrap: on
line diff
--- a/scripts/extract-appearance-images.py	Wed Jun 21 17:49:58 2017 -0400
+++ b/scripts/extract-appearance-images.py	Thu Jun 22 12:02:34 2017 -0400
@@ -8,10 +8,17 @@
 import cvutils, moving, ml, storage
 
 parser = argparse.ArgumentParser(description='The program extracts labeled image patches to train the HoG-SVM classifier, and optionnally speed information')
-parser.add_argument('-d', dest = 'directoryName', help = 'parent directory name for the directories containing the samples for the different road users', required = True)
+parser.add_argument('--cfg', dest = 'configFilename', help = 'name of the configuration file', required = True)
+
+#parser.add_argument('-d', dest = 'directoryName', help = 'parent directory name for the directories containing the samples for the different road users', required = True)
+
+args = parser.parse_args()
+params = storage.ProcessParameters(args.configFilename)
+classifierParams = storage.ClassifierParameters(params.classifierFilename)
 
 # need all info as for classification (image info)
 
 # todo speed info: distributions AND min speed equiprobable
 
 # provide csv delimiter for the classification file as arg
+