removed code not related to image segmentation