How to read the images?

#1
by bokangz - opened

Hi, I found the dataset image is stored in strings, I wonder how to read it or save it to image format?

Hey!

import base64
imgdata = base64.b64decode(image_str)
filename = 'image.jpg'
with open(filename, 'wb') as f:
    f.write(imgdata)

Sign up or log in to comment