ntsc207 commited on
Commit
0343baa
1 Parent(s): b28d005

Update detect_strongsort.py

Browse files
Files changed (1) hide show
  1. detect_strongsort.py +2 -2
detect_strongsort.py CHANGED
@@ -44,7 +44,7 @@ VID_FORMATS = 'asf', 'avi', 'gif', 'm4v', 'mkv', 'mov', 'mp4', 'mpeg', 'mpg', 't
44
  def plot_one_box(x, img, color=None, label=None, line_thickness=3):
45
  # Plots one bounding box on image img
46
  tl = line_thickness or round(0.002 * (img.shape[0] + img.shape[1]) / 2) + 1 # line/font thickness
47
- color = color or [random.randint(0, 255) for _ in range(3)]
48
  c1, c2 = (int(x[0]), int(x[1])), (int(x[2]), int(x[3]))
49
  cv2.rectangle(img, c1, c2, color, thickness=tl, lineType=cv2.LINE_AA)
50
  if label:
@@ -157,7 +157,7 @@ def run_strongsort(
157
  strongsort_list[i].model.warmup()
158
  outputs = [None] * bs
159
 
160
- colors = [[random.randint(0, 255) for _ in range(3)] for _ in names]
161
 
162
  # Run tracking
163
  model.warmup(imgsz=(1 if pt or model.triton else bs, 3, *imgsz)) # warmup
 
44
  def plot_one_box(x, img, color=None, label=None, line_thickness=3):
45
  # Plots one bounding box on image img
46
  tl = line_thickness or round(0.002 * (img.shape[0] + img.shape[1]) / 2) + 1 # line/font thickness
47
+ #color = color or [random.randint(0, 255) for _ in range(3)]
48
  c1, c2 = (int(x[0]), int(x[1])), (int(x[2]), int(x[3]))
49
  cv2.rectangle(img, c1, c2, color, thickness=tl, lineType=cv2.LINE_AA)
50
  if label:
 
157
  strongsort_list[i].model.warmup()
158
  outputs = [None] * bs
159
 
160
+ colors = [[0, 0, 255], [0,148,255], [0, 255, 10], [250, 247, 0], [235,0,255]]
161
 
162
  # Run tracking
163
  model.warmup(imgsz=(1 if pt or model.triton else bs, 3, *imgsz)) # warmup