return output path in segmentation