Clean up predictions, add ability to convert from samples to images.