Foreground and background region sampling.
During training, Mask RCNN (or Faster RCNN) decides foreground and background regions by setting a threshold on the value of IoU, , regions with IoU smaller/larger than \(0.5\)  are background/foreground respectively in the case of ROI head. When balancing the number of two regions, boxes are randomly sampled. Note that we use the same thresholds as default Mask RCNN.
While localization quality estimation [1]} requires carefully selecting the thresholds during training, LDET does not.
