Recovering compressed images for automatic crack segmentation using generative models