Skip to content

Instantly share code, notes, and snippets.

@quangnhat185
Last active April 11, 2020 12:49
Show Gist options
  • Save quangnhat185/e86eb17ccb59520ff597784d2cd63b76 to your computer and use it in GitHub Desktop.
Save quangnhat185/e86eb17ccb59520ff597784d2cd63b76 to your computer and use it in GitHub Desktop.
# Create a list of image paths
image_paths = glob.glob("Plate_examples/*.jpg")
print("Found %i images..."%(len(image_paths)))
# Visualize data in subplot
fig = plt.figure(figsize=(12,8))
cols = 5
rows = 4
fig_list = []
for i in range(cols*rows):
fig_list.append(fig.add_subplot(rows,cols,i+1))
title = splitext(basename(image_paths[i]))[0]
fig_list[-1].set_title(title)
img = preprocess_image(image_paths[i],True)
plt.axis(False)
plt.imshow(img)
plt.tight_layout(True)
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment