I scraped a few images. However, a lot of them are GIF and octet-stream. It seems the ‘ImageFolder’ directly ignores those kind of images. For example, the image_datasets below only has 2 data points as there are only 2 jpg images in this folder and the others are GIF or octet-stream.
image_datasets = datasets.ImageFolder(os.path.join(data_dir, validation)
 Number of datapoints: 2

Is there any more general way to read the image files.