From 9921cf0895b5eccf57666f3652e298a04646bcd3 Mon Sep 17 00:00:00 2001 From: Patrick Pfreundschuh Date: Sun, 7 Jan 2024 16:14:28 +0100 Subject: [PATCH] fix ignored input video argument (#57) --- online_demo.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/online_demo.py b/online_demo.py index 8802849..7aad145 100644 --- a/online_demo.py +++ b/online_demo.py @@ -4,6 +4,7 @@ # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. +import os import torch import argparse import imageio.v3 as iio @@ -44,6 +45,9 @@ if __name__ == "__main__": args = parser.parse_args() + if not os.path.isfile(args.video_path): + raise ValueError("Video file does not exist") + if args.checkpoint is not None: model = CoTrackerOnlinePredictor(checkpoint=args.checkpoint) else: @@ -69,7 +73,7 @@ if __name__ == "__main__": is_first_step = True for i, frame in enumerate( iio.imiter( - "./assets/apple.mp4", + args.video_path, plugin="FFMPEG", ) ):