Allow image-dir as --input-video
This commit is contained in:
parent
e9fa1e8014
commit
abf8085ab7
1 changed files with 7 additions and 2 deletions
9
demo.py
9
demo.py
|
@ -49,9 +49,14 @@ def track(opt):
|
|||
n_frame = 0
|
||||
|
||||
logger.info('Starting tracking...')
|
||||
dataloader = datasets.LoadVideo(opt.input_video, opt.img_size)
|
||||
if os.path.isdir(opt.input_video):
|
||||
print('Use image sequence')
|
||||
dataloader = datasets.LoadImages(opt.input_video, opt.img_size)
|
||||
frame_rate = 30 # hack for now; see https://motchallenge.net/data/MOT16/
|
||||
else:
|
||||
dataloader = datasets.LoadVideo(opt.input_video, opt.img_size)
|
||||
frame_rate = dataloader.frame_rate
|
||||
result_filename = os.path.join(result_root, 'results.txt')
|
||||
frame_rate = dataloader.frame_rate
|
||||
|
||||
frame_dir = None if opt.output_format=='text' else osp.join(result_root, 'frame')
|
||||
try:
|
||||
|
|
Loading…
Reference in a new issue