Allow image-dir as --input-video
This commit is contained in:
parent
e9fa1e8014
commit
abf8085ab7
1 changed files with 7 additions and 2 deletions
7
demo.py
7
demo.py
|
@ -49,9 +49,14 @@ def track(opt):
|
||||||
n_frame = 0
|
n_frame = 0
|
||||||
|
|
||||||
logger.info('Starting tracking...')
|
logger.info('Starting tracking...')
|
||||||
|
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)
|
dataloader = datasets.LoadVideo(opt.input_video, opt.img_size)
|
||||||
result_filename = os.path.join(result_root, 'results.txt')
|
|
||||||
frame_rate = dataloader.frame_rate
|
frame_rate = dataloader.frame_rate
|
||||||
|
result_filename = os.path.join(result_root, 'results.txt')
|
||||||
|
|
||||||
frame_dir = None if opt.output_format=='text' else osp.join(result_root, 'frame')
|
frame_dir = None if opt.output_format=='text' else osp.join(result_root, 'frame')
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue