rachana219 commited on
Commit
6154a02
·
1 Parent(s): 2189169

Update track.py

Browse files
Files changed (1) hide show
  1. track.py +3 -1
track.py CHANGED
@@ -110,11 +110,13 @@ def run(
110
 
111
  if str(yolo_weights).find('yolov8m') != -1:
112
  model = AutoBackend(yolo_weights, device=device, dnn=dnn, fp16=half) #load yolov8
 
113
  else:
114
  model = attempt_load(yolo_weights, map_location=device) #load other yolo versions
 
115
 
116
  #model = AutoBackend(yolo_weights, device=device, dnn=dnn, fp16=half)
117
- stride, names, pt = model.stride, model.names, model.pt
118
  imgsz = check_imgsz(imgsz, stride=stride) # check image size
119
 
120
  # Dataloader
 
110
 
111
  if str(yolo_weights).find('yolov8m') != -1:
112
  model = AutoBackend(yolo_weights, device=device, dnn=dnn, fp16=half) #load yolov8
113
+ stride, names, pt = model.stride, model.names, model.pt
114
  else:
115
  model = attempt_load(yolo_weights, map_location=device) #load other yolo versions
116
+ stride, names, pt = model.stride, model.names, True
117
 
118
  #model = AutoBackend(yolo_weights, device=device, dnn=dnn, fp16=half)
119
+ #stride, names, pt = model.stride, model.names, model.pt
120
  imgsz = check_imgsz(imgsz, stride=stride) # check image size
121
 
122
  # Dataloader