# HG changeset patch # User Nicolas Saunier # Date 1707422696 18000 # Node ID 00b71da2baaccd30c424c9f30b3aae009777016e # Parent 88eedf79f16a19cd7889e57615a1616e81f6ac90 corrected bug diff -r 88eedf79f16a -r 00b71da2baac scripts/classify-objects.py --- 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)