Skip to content

Instantly share code, notes, and snippets.

@okdolly-001
Created June 25, 2018 01:44
Show Gist options
  • Select an option

  • Save okdolly-001/4c744edc9f2fb49e4a4447e9ccacda23 to your computer and use it in GitHub Desktop.

Select an option

Save okdolly-001/4c744edc9f2fb49e4a4447e9ccacda23 to your computer and use it in GitHub Desktop.
load image from a directory #matplotlib #image #cv
import matplotlib.image as mpimg
import glob
import os
def load_data(dir_name = 'plates'):
""" Your implementation """
data_path = os.path.join(dir_name, '*g')
files = glob.glob(data_path)
data = [mpimg.imread(img) for img in files]
return data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment