Skip to content

Instantly share code, notes, and snippets.

@DiegoAgher
Created January 3, 2019 20:44
Show Gist options
  • Save DiegoAgher/47a065f6bcd8bb47568da670c67ebe4b to your computer and use it in GitHub Desktop.
Save DiegoAgher/47a065f6bcd8bb47568da670c67ebe4b to your computer and use it in GitHub Desktop.
blurry sequences
seq_length = 9
random_chars = np.random.randint(0, len(x_train)-1, seq_length)
image_seq = []
for j in random_chars:
 if np.random.random(1) >= 0.5:
 image_seq.append(cv2.medianBlur(x_train[j], 5))
 else:
 image_seq.append(x_train[j])
image_seq = np.concatenate(image_seq, axis=1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment