Mercurial Hosting > traffic-intelligence
diff scripts/classify-objects.py @ 1244:00b71da2baac
corrected bug
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Thu, 08 Feb 2024 15:04:56 -0500 |
parents | 88eedf79f16a |
children | 2397de73770d |
line wrap: on
line diff
--- a/scripts/classify-objects.py Wed Feb 07 11:53:00 2024 -0500 +++ b/scripts/classify-objects.py Thu Feb 08 15:04:56 2024 -0500 @@ -11,7 +11,7 @@ from ultralytics import YOLO ultralyticsAvailable = True except ImportError: - #print('OpenCV library could not be loaded (video replay functions will not be available)') # TODO change to logging module + print('Ultralytics library could not be loaded') # TODO change to logging module ultralyticsAvailable = False @@ -24,7 +24,6 @@ parser.add_argument('-d', dest = 'databaseFilename', help = 'name of the Sqlite database file (overrides the configuration file)') parser.add_argument('-i', dest = 'videoFilename', help = 'name of the video file (overrides the configuration file)') parser.add_argument('-n', dest = 'nObjects', help = 'number of objects to classify', type = int, default = None) -parser.add_argument('--start-frame0', dest = 'startFrame0', help = 'starts with first frame for videos with index problem where frames cannot be reached', action = 'store_true') parser.add_argument('--plot-speed-distributions', dest = 'plotSpeedDistribution', help = 'simply plots the distributions used for each user type', action = 'store_true') parser.add_argument('--max-speed-distribution-plot', dest = 'maxSpeedDistributionPlot', help = 'if plotting the user distributions, the maximum speed to display (km/h)', type = float, default = 50.) parser.add_argument('--verbose', dest = 'verbose', help = 'verbose information', action = 'store_true') @@ -43,7 +42,7 @@ bikeCarSVM = None yolo = YOLO(classifierParams.dlFilename, task='detect') useYolo = True - print('Using Yolov8 model +'classifierParams.dlFilename) + print('Using Yolov8 model '+classifierParams.dlFilename) else: useYolo = False pedBikeCarSVM = ml.SVM_load(classifierParams.pedBikeCarSVMFilename)