add some logging and set shape after  segmentation