Image segmentation improvements