diff --git a/test.py b/test.py index 0fe85e11..4d0e2d0e 100644 --- a/test.py +++ b/test.py @@ -141,7 +141,7 @@ def main(cfg, gpu): "--imgs", required=True, type=str, - help="an image paths, or a directory name" + help="an image path, or a directory name" ) parser.add_argument( "--cfg", @@ -185,8 +185,8 @@ def main(cfg, gpu): os.path.exists(cfg.MODEL.weights_decoder), "checkpoint does not exitst!" # generate testing image list - if os.path.isdir(args.imgs[0]): - imgs = find_recursive(args.imgs[0]) + if os.path.isdir(args.imgs): + imgs = find_recursive(args.imgs) else: imgs = [args.imgs] assert len(imgs), "imgs should be a path to image (.jpg) or directory."