An Auto-Encoder Strategy for Adaptive Image Segmentation