add a post_processing method aiming at solving illdefined segmentation
minor changes