Export segmentation to labelmap using python