changeset 1235:855abc69fa99

forgot to use detector and tracker filename
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Fri, 15 Sep 2023 11:56:16 -0400
parents dd969637381e
children 100fe098abe9
files scripts/dltrack.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/dltrack.py	Thu Sep 14 16:18:36 2023 -0400
+++ b/scripts/dltrack.py	Fri Sep 15 11:56:16 2023 -0400
@@ -61,7 +61,7 @@
 # check if one can go to specific frame https://docs.ultralytics.com/modes/track/#persisting-tracks-loop
 
 # Load a model
-model = YOLO('/home/nicolas/Research/Data/classification-models/yolov8x.pt', ) # seg yolov8x-seg.pt
+model = YOLO(args.detectorFilename, ) # seg yolov8x-seg.pt
 # seg could be used on cropped image... if can be loaded and kept in memory
 # model = YOLO('/home/nicolas/Research/Data/classification-models/yolo_nas_l.pt ') # AttributeError: 'YoloNAS_L' object has no attribute 'get'
 
@@ -82,7 +82,7 @@
 lastFrameNum = args.lastFrameNum
 
 success, frame = capture.read()
-results = model.track(frame, tracker="/home/nicolas/Research/Data/classification-models/bytetrack.yaml", classes=list(moving.cocoTypeNames.keys()), persist=True)
+results = model.track(frame, tracker=args.trackerFilename, classes=list(moving.cocoTypeNames.keys()), persist=True)
 # create object with user type and list of 3 features (bottom ones and middle) + projection
 while capture.isOpened() and success and frameNum <= lastFrameNum:
 #for frameNum, result in enumerate(results):