6917d8a3dbf6617f02b1247fd50fbc20d3cb6fd4,codes/data/util.py,,get_image_paths,#,21
Before Change
images = []
for dirpath, _, fnames in sorted(os.walk(path)):
for fname in sorted(fnames):
if is_image_file(fname):
img_path = os.path.join(dirpath, fname)
images.append(img_path)
assert images, "%s has no valid image file" % path
return images
After Change
def get_image_paths(data_type, dataroot):
env, paths = None, None
if dataroot is not None:
if data_type == "lmdb":
env, paths = _get_paths_from_lmdb(dataroot)
elif data_type == "img":
paths = sorted(_get_paths_from_images(dataroot))
else:
raise NotImplementedError("data_type [%s] is not recognized." % data_type)
return env, paths
def _read_lmdb_img(env, path):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: xinntao/BasicSR
Commit Name: 6917d8a3dbf6617f02b1247fd50fbc20d3cb6fd4
Time: 2018-06-10
Author: wxt1994@126.com
File Name: codes/data/util.py
Class Name:
Method Name: get_image_paths
Project Name: pyinstaller/pyinstaller
Commit Name: e80458a7207562957d25950b1e242ff128897c30
Time: 2020-04-03
Author: 15150702+jonnyhsu@users.noreply.github.com
File Name: PyInstaller/hooks/hook-shapely.py
Class Name:
Method Name:
Project Name: tensorflow/tpu
Commit Name: 6769bcc7e5f1c879f69e7570125c034c4cea680f
Time: 2020-07-08
Author: allencwang@google.com
File Name: tools/datasets/imagenet_to_gcs.py
Class Name:
Method Name: main