1. A method of image segmentation performed by a computer system, comprising: (i) refining a current segmentation mask associated with an object of interest and excluding, from the current segmentation mask, any image element associated with a previously generated fence; (ii) calculating a first shape descriptor for a subset of image elements of the current segmentation mask; (iii) selecting one or more image elements of the current segmentation mask that violate a shape constraint by comparing the first shape descriptor to a second shape descriptor of a shape prior; (iv) generating one or more fences around the selected one or more image elements; and (v) repeating at least steps (i), (ii), (iii) and (iv) until a terminating condition is met.