Discussion:
[theano-users] How to import the data of set of images into data-frame.
Ali Alani
2017-07-23 14:32:08 UTC
Permalink
I try to import the data of 3000 images to the data-frame each row
corresponds to one image. the problem with following code is only the last
image data store in the data-frame as shown below




from PIL import Image
import glob
image_list = []
for filename in glob.glob('Images path\*.bmp'):
img = PIL.Image.open(filename).convert("L")
np1 = numpy.array(img)
np_convert=numpy.invert(np1)
flat_arr = np_convert.ravel()
vector = np.matrix(flat_arr)
image_list.append(vector)
df_2 = pd.DataFrame(vector)


<Loading Image...>


Please, any help to import all data into data-frame will be highly
appreciated
--
---
You received this message because you are subscribed to the Google Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to theano-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...