A novel decoder based on Bayesian rules for task-driven object segmentation