Machine learning for image enhancement