I am reading all images of a folder from following code
from skimage.io import imread_collection
img_dir = 'cats/*.jpg'
col = imread_collection(img_dir)
for getting shape or size of col i used following:
col.shape
but get AttributeError: 'ImageCollection' object has no attribute 'shape'
how to solve this problem
ImageCollection
is a list of images, so you have to access individual images with their index.
From the docs:
>>> coll = io.ImageCollection(data_dir + '/chess*.png')
>>> len(coll)
2
>>> coll[0].shape
(200, 200)