提交 a8ae92aa 编写于 作者: K Kaipeng Deng 提交者: GitHub

refine assert info in roidb_source.py (#3536)

* refine assert info in roidb_source.py

* refine image_dir assert
上级 9a17d02c
......@@ -59,13 +59,13 @@ class RoiDbSource(Dataset):
"""
super(RoiDbSource, self).__init__()
self._epoch = -1
assert os.path.isfile(anno_file) or os.path.isdir(
anno_file), 'invalid file[%s] for RoiDbSource' % (anno_file)
assert os.path.isfile(anno_file) or os.path.isdir(anno_file), \
'anno_file {} is not a file or a directory'.format(anno_file)
self._fname = anno_file
self._image_dir = image_dir
if image_dir is not None:
assert os.path.isdir(image_dir), 'invalid image directory[%s]' % (
image_dir)
assert os.path.isdir(image_dir), \
'image_dir {} is not a directory'.format(image_dir)
self._roidb = None
self._pos = -1
self._drained = False
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册