Spaces:
Runtime error
Runtime error
Commit
·
ad1a4bb
1
Parent(s):
269a011
updated MOT function to take parameters source and tracking method
Browse files
track.py
CHANGED
@@ -370,13 +370,14 @@ def main(opt):
|
|
370 |
# opt = parse_opt()
|
371 |
# main(opt)
|
372 |
|
373 |
-
def MOT():
|
374 |
opt = parse_opt()
|
|
|
|
|
|
|
375 |
main(opt)
|
376 |
save_dir = increment_path('runs/track/exp', exist_ok=False)
|
377 |
input = os.path.join(save_dir,'out.mp4')
|
378 |
-
tracking_method='strongsort'
|
379 |
-
#outpath = 'output/' + tracking_method + '_output.mp4'
|
380 |
outpath = 'output/'+ 'output.mp4'
|
381 |
command = f"ffmpeg -i {input} -vf fps=30 -vcodec libx264 {outpath}"
|
382 |
print(command)
|
|
|
370 |
# opt = parse_opt()
|
371 |
# main(opt)
|
372 |
|
373 |
+
def MOT(yoloweights, trackingmethod, sourceVideo):
|
374 |
opt = parse_opt()
|
375 |
+
opt.yolo-weights = yoloweights
|
376 |
+
opt.tracking-method = trackingmethod
|
377 |
+
opt.source = sourceVideo
|
378 |
main(opt)
|
379 |
save_dir = increment_path('runs/track/exp', exist_ok=False)
|
380 |
input = os.path.join(save_dir,'out.mp4')
|
|
|
|
|
381 |
outpath = 'output/'+ 'output.mp4'
|
382 |
command = f"ffmpeg -i {input} -vf fps=30 -vcodec libx264 {outpath}"
|
383 |
print(command)
|