Skip to content

Instantly share code, notes, and snippets.

@CaptainAshis
Created August 27, 2018 09:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CaptainAshis/22627df373e8868aea31650c67335b80 to your computer and use it in GitHub Desktop.
Save CaptainAshis/22627df373e8868aea31650c67335b80 to your computer and use it in GitHub Desktop.
image size fastai
img.size
##(500, 375)
# Mapping name of the file to size of the file
size_d={k:PIL.Image.open(PATH+k).size for k in data.trn_ds.fnames}
row_sz,col_sz=list(zip(*size_d.values()))
row_sz=np.array(row_sz)
col_sz=np.array(col_sz)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment