Mercurial > hg > nsaunier > traffic-intelligence
comparison scripts/classify-objects.py @ 536:95276d310972
renamed TrackingParameters to ProcessParameters
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Wed, 02 Jul 2014 11:35:05 -0400 |
| parents | f527159815ab |
| children | da1352b89d02 |
comparison
equal
deleted
inserted
replaced
| 535:5ad2f51ae42f | 536:95276d310972 |
|---|---|
| 5 from cv2 import SVM_RBF, SVM_C_SVC | 5 from cv2 import SVM_RBF, SVM_C_SVC |
| 6 | 6 |
| 7 import cvutils, moving, ml | 7 import cvutils, moving, ml |
| 8 | 8 |
| 9 parser = argparse.ArgumentParser(description='The program processes indicators for all pairs of road users in the scene') | 9 parser = argparse.ArgumentParser(description='The program processes indicators for all pairs of road users in the scene') |
| 10 parser.add_argument('--cfg', dest = 'configFilename', help = 'name of the configuration file', required = True) | |
| 10 parser.add_argument('-d', dest = 'directoryName', help = 'name of the parent directory containing the videos and extracted trajectories to process', required = True) | 11 parser.add_argument('-d', dest = 'directoryName', help = 'name of the parent directory containing the videos and extracted trajectories to process', required = True) |
| 11 parser.add_argument('-o', dest = 'homographyFilename', help = 'name of the image to world homography file') | 12 # parser.add_argument('-o', dest = 'homographyFilename', help = 'name of the image to world homography file') |
| 12 # need a classification config file for speed distribution parameters, svm models, frequency parameters, area parameters etc | 13 # need a classification config file for speed distribution parameters, svm models, frequency parameters, area parameters etc |
| 13 #parser.add_argument('--cfg', dest = 'svmType', help = 'SVM type', default = SVM_C_SVC, type = long) | 14 #parser.add_argument('--cfg', dest = 'svmType', help = 'SVM type', default = SVM_C_SVC, type = long) |
| 14 | 15 |
| 15 | 16 |
| 16 #parser.add_argument('-s', dest = 'rescaleSize', help = 'rescale size of image samples', default = 64, type = int) | 17 #parser.add_argument('-s', dest = 'rescaleSize', help = 'rescale size of image samples', default = 64, type = int) |
| 17 #parser.add_argument('-o', dest = 'nOrientations', help = 'number of orientations in HoG', default = 9, type = int) | 18 #parser.add_argument('-o', dest = 'nOrientations', help = 'number of orientations in HoG', default = 9, type = int) |
| 18 #parser.add_argument('-p', dest = 'nPixelsPerCell', help = 'number of pixels per cell', default = 8, type = int) | 19 #parser.add_argument('-p', dest = 'nPixelsPerCell', help = 'number of pixels per cell', default = 8, type = int) |
| 19 #parser.add_argument('-c', dest = 'nCellsPerBlock', help = 'number of cells per block', default = 2, type = int) | 20 #parser.add_argument('-c', dest = 'nCellsPerBlock', help = 'number of cells per block', default = 2, type = int) |
| 21 | |
| 20 args = parser.parse_args() | 22 args = parser.parse_args() |
| 21 | 23 params = storage.ProcessParameters(args.configFilename) |
| 22 print('TODO') # add all parameters for classification (distribution parameters) |
