Skip to content

Instantly share code, notes, and snippets.

@zoecarver
Last active November 27, 2018 03:15
Show Gist options
  • Save zoecarver/706508f9d559496410aacf63b6855b0b to your computer and use it in GitHub Desktop.
Save zoecarver/706508f9d559496410aacf63b6855b0b to your computer and use it in GitHub Desktop.
people_glob = glob('dataset/people/*.png')
background_glob = glob('dataset/not-people/*.png')
people = []
not_people = []
for filename in people_glob:
image = cv2.imread(filename, COLOR_RGB2GRAY)
image = cv2.resize(image, (64, 64))
people.append(image)
for filename in background_glob:
image = cv2.imread(filename, COLOR_RGB2GRAY)
image = cv2.resize(image, (64, 64))
not_people.append(image)
people_len = len(people)
not_people_len = len(not_people)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment