Most of the time the background estimation algorithm within the foreground segmentation causes more problems than it solves. It should be opt-in instead of opt-out. Currently, for better masking results on most samples add background=0 to calls to level_set.foreground_segmentation.