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: 10
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: silvandeleemput/memcnn
Commit Name: e78b409a087ed1208f07ef05513eeac9b37f042f
Time: 2018-10-14
Author: tychovdo@gmail.com
File Name: memcnn/models/revop.py
Class Name: ReversibleBlock
Method Name: __init__
Project Name: zegami/image-similarity-clustering
Commit Name: dcd82a95dee25d14cdf112b5be18e6dc0a19c7eb
Time: 2020-03-18
Author: douglawrence0010@gmail.com
File Name: cli.py
Class Name:
Method Name: main