(args)
| 167 | |
| 168 | |
| 169 | def get_data(args): |
| 170 | datadir = args.data |
| 171 | imgs = glob.glob(os.path.join(datadir, '*.jpg')) |
| 172 | ds = ImageFromFile(imgs, channel=3, shuffle=True) |
| 173 | |
| 174 | ds = MapData(ds, functools.partial(split_input, args.mode)) |
| 175 | augs = [imgaug.Resize(286), imgaug.RandomCrop(256)] |
| 176 | ds = AugmentImageComponents(ds, augs, (0, 1)) |
| 177 | ds = BatchData(ds, BATCH) |
| 178 | ds = MultiProcessRunner(ds, 100, 1) |
| 179 | return ds |
| 180 | |
| 181 | |
| 182 | def sample(datadir, model_path): |
no test coverage detected