Skip to content

Commit 1a449e3

Browse files
authored
update track.py for yolo v7
1 parent 0073e08 commit 1a449e3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tracker/track.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ def main(opts):
7474
model = ckpt['ema' if ckpt.get('ema') else 'model'].float().fuse().eval() # for yolo v7
7575

7676
if opts.trace:
77+
print(opts.img_size)
7778
model = TracedModel(model, device, opts.img_size)
7879
else:
7980
model.to(device)
@@ -189,7 +190,7 @@ def main(opts):
189190
## finally, save videos
190191
if opts.save_images and opts.save_videos:
191192
save_videos(seq_names=seq)
192-
193+
193194
"""
194195
3. evaluate results
195196
"""
@@ -303,6 +304,7 @@ def get_color(idx):
303304
parser.add_argument('--tracker', type=str, default='bytetrack', help='sort, deepsort, etc')
304305

305306
parser.add_argument('--model_path', type=str, default=None, help='model path')
307+
parser.add_argument('--trace', type=bool, default=False, help='traced model of YOLO v7')
306308

307309
parser.add_argument('--img_size', nargs='+', type=int, default=[1280, 1280], help='[train, test] image sizes')
308310

0 commit comments

Comments
 (0)