googlecreativelab/quickdraw-dataset

How to transform .npz to photograph

Hansxsourse opened this issue · 3 comments

Hi
Now our team want to use the .npz dataset to do other research,but we tried many times, we can't transform the .npz numpy array to the grtaph like .jpg or .png. we show the shape about the array is (28,3). so we can't get back to rgb graph.
We read the quick draw rnn dataset paper, still don't know how to transform them.
Can you help me to solve it out?

Best wishes
Hans Yang

given a numpy array "A":

from PIL import Image
im = Image.fromarray(A)
im.save("your_file.jpeg")

you can replace "jpeg" with almost any format you want.
Also try this out using scipy
from scipy.misc import toimage toimage(data).show()

Hope this helps

given a numpy array "A":

from PIL import Image
im = Image.fromarray(A)
im.save("your_file.jpeg")

you can replace "jpeg" with almost any format you want.
Also try this out using scipy
from scipy.misc import toimage toimage(data).show()

Hope this helps

Cheers!
Thabks for reply!