Output defect heatmap

Hi!

I’m testing deep learning for image inspection of surface defects and I was wondering if it’s possible to train it with something like the image on the left, to output something like the image on the right ( or a real gray-scaled heat map ) :

Thanks !