Mercurial Hosting > traffic-intelligence
view scripts/classify-objects.py @ 626:35155ac2a294
corrected bugs, in particular to MovingObject.play
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Sat, 14 Feb 2015 19:18:14 -0500 |
parents | 95276d310972 |
children | da1352b89d02 |
line wrap: on
line source
#! /usr/bin/env python import numpy as np import sys, argparse from cv2 import SVM_RBF, SVM_C_SVC import cvutils, moving, ml parser = argparse.ArgumentParser(description='The program processes indicators for all pairs of road users in the scene') parser.add_argument('--cfg', dest = 'configFilename', help = 'name of the configuration file', required = True) parser.add_argument('-d', dest = 'directoryName', help = 'name of the parent directory containing the videos and extracted trajectories to process', required = True) # parser.add_argument('-o', dest = 'homographyFilename', help = 'name of the image to world homography file') # need a classification config file for speed distribution parameters, svm models, frequency parameters, area parameters etc #parser.add_argument('--cfg', dest = 'svmType', help = 'SVM type', default = SVM_C_SVC, type = long) #parser.add_argument('-s', dest = 'rescaleSize', help = 'rescale size of image samples', default = 64, type = int) #parser.add_argument('-o', dest = 'nOrientations', help = 'number of orientations in HoG', default = 9, type = int) #parser.add_argument('-p', dest = 'nPixelsPerCell', help = 'number of pixels per cell', default = 8, type = int) #parser.add_argument('-c', dest = 'nCellsPerBlock', help = 'number of cells per block', default = 2, type = int) args = parser.parse_args() params = storage.ProcessParameters(args.configFilename)