Improving the segmentation generator