It turned out that
Code:
Levels(0, 0.01, 250, 0, 255).Crop(200,800,-200,-50).AddBorders(200,800,200,50).mt_binarize(180).mt_expand_multi(mode="ellipse",sw=8,sh=8,u=-128,v=-128)
is not the best way to create the mask. Sometimes it picks up white parts other than the subtitles.
StainlessS, could you recommend settings to DetectSub_MI() ?