Machine learning in image enhancement