iPython code for segmentation