Created
August 27, 2018 09:17
-
-
Save CaptainAshis/09405a7e9ad25904d4938e2bab7552c9 to your computer and use it in GitHub Desktop.
image_resiz fastai
This file contains 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
def get_data(sz,bs): | |
tfms=tfms_from_model(arch, sz,aug_tfms=transforms_side_on,max_zoom=1.1) | |
data= ImageClassifierData.from_csv(PATH,'train',f'{PATH}labels.csv',test_name='test',num_workers=8, | |
val_idxs=val_idxs,suffix='.jpg',tfms=tfms,bs=bs) | |
return data if sz>300 else data.resize(340,'tmp') | |
data=get_data(sz,bs) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment