Processing the image dataset