提交 657a8797 编写于 作者: J jerrywgz

sort image name when inferring dir

上级 9229209b
...@@ -87,7 +87,8 @@ def get_test_images(infer_dir, infer_img): ...@@ -87,7 +87,8 @@ def get_test_images(infer_dir, infer_img):
exts = ['jpg', 'jpeg', 'png', 'bmp'] exts = ['jpg', 'jpeg', 'png', 'bmp']
exts += [ext.upper() for ext in exts] exts += [ext.upper() for ext in exts]
for ext in exts: for ext in exts:
images.extend(glob.glob('{}/*.{}'.format(infer_dir, ext))) image_list = glob.glob('{}/*.{}'.format(infer_dir, ext))
images.extend(sorted(image_list))
assert len(images) > 0, "no image found in {}".format(infer_dir) assert len(images) > 0, "no image found in {}".format(infer_dir)
logger.info("Found {} inference images in total.".format(len(images))) logger.info("Found {} inference images in total.".format(len(images)))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册