Last active
February 24, 2018 20:34
-
-
Save surmenok/cf9118c47b0e038625a33341b1746042 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sz = 96 | |
| # Look at examples of image augmentation | |
| def get_augs(): | |
| x,_ = next(iter(data.aug_dl)) | |
| return data.trn_ds.denorm(x)[1] | |
| aug_tfms = [RandomRotate(20), RandomLighting(0.8, 0.8)] | |
| tfms = tfms_from_model(arch, sz, aug_tfms=aug_tfms, max_zoom=1.2) | |
| data = ImageClassifierData.from_paths(path, tfms=tfms, test_name='test') | |
| ims = np.stack([get_augs() for i in range(6)]) | |
| plots(ims, rows=2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment