fix ignored input video argument (#57)
This commit is contained in:
parent
941c24fd40
commit
9921cf0895
@ -4,6 +4,7 @@
|
|||||||
# This source code is licensed under the license found in the
|
# This source code is licensed under the license found in the
|
||||||
# LICENSE file in the root directory of this source tree.
|
# LICENSE file in the root directory of this source tree.
|
||||||
|
|
||||||
|
import os
|
||||||
import torch
|
import torch
|
||||||
import argparse
|
import argparse
|
||||||
import imageio.v3 as iio
|
import imageio.v3 as iio
|
||||||
@ -44,6 +45,9 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
args = parser.parse_args()
|
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:
|
if args.checkpoint is not None:
|
||||||
model = CoTrackerOnlinePredictor(checkpoint=args.checkpoint)
|
model = CoTrackerOnlinePredictor(checkpoint=args.checkpoint)
|
||||||
else:
|
else:
|
||||||
@ -69,7 +73,7 @@ if __name__ == "__main__":
|
|||||||
is_first_step = True
|
is_first_step = True
|
||||||
for i, frame in enumerate(
|
for i, frame in enumerate(
|
||||||
iio.imiter(
|
iio.imiter(
|
||||||
"./assets/apple.mp4",
|
args.video_path,
|
||||||
plugin="FFMPEG",
|
plugin="FFMPEG",
|
||||||
)
|
)
|
||||||
):
|
):
|
||||||
|
Loading…
Reference in New Issue
Block a user