May 2019
Intermediate to advanced
272 pages
7h 19m
English
We are going to use the Oxford-102 Flowers dataset along with five text descriptions per image. In this implementation, we are going to use embedding provided by the authors in the paper Generative Adversarial Text- to-image Synthesis. You can use text embedding-model, or train a new text-embedding model by following the instructions in the author's GitHub repo: https://github.com/reedscot/icml2016.
We define a helper function to convert images from bytes:
def images_from_bytes(byte_images, img_size=(64, 64)): # uses PIL's Image to open and resize bytes images using int type images = [ np.array(Image.open(io.BytesIO(img)).resize(img_size), dtype=int) for img in byte_images] # scales the images to [-1, 1] and cast them to float ...
Read now
Unlock full access