MCPcopy Create free account
hub / github.com/PaddlePaddle/Research / reader

Function reader

CV/webvision2018/reader.py:129–139  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

127 data_dir=None,
128 crop_size=224):
129 def reader():
130
131 with open(file_list) as flist:
132 full_lines = [line.strip() for line in flist]
133 if shuffle:
134 np.random.shuffle(lines)
135 lines = full_lines
136 for line in lines:
137 img_path, label = line.strip().split()
138 img_path = os.path.join(data_dir, img_path)
139 yield [img_path]
140
141
142 image_mapper = functools.partial(process_image,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected