rachana219 commited on
Commit
3440345
·
1 Parent(s): 5707cd3

Update track.py

Browse files
Files changed (1) hide show
  1. track.py +3 -3
track.py CHANGED
@@ -108,10 +108,10 @@ def run(
108
  device = select_device(device)
109
  is_seg = '-seg' in str(yolo_weights)
110
 
111
- if 'yolov8m' in yolo_weights:
112
- model = AutoBackend(yolo_weights, device=device, dnn=dnn, fp16=half)
113
  else:
114
- model = attempt_load(yolo_weights, map_location=device)
115
 
116
  #model = AutoBackend(yolo_weights, device=device, dnn=dnn, fp16=half)
117
  stride, names, pt = model.stride, model.names, model.pt
 
108
  device = select_device(device)
109
  is_seg = '-seg' in str(yolo_weights)
110
 
111
+ if 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