title: Inaccurate masks with Mask-RCNN: Stairs effect and sudden stops
body: <p>I've been using matterport's Mask R-CNN to train on a custom dataset. However, there seem to be some parameters that i failed to correctly define because on practically all of the images, the bottom or top of the object's mask is cut off:
  <a href="https://i.stack.imgur.com/YiGbq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YiGbq.png" alt="innacurate prediction: mask is cut-off on the bottom" /></a></p>
  <p>As you can see, the bounding box is fine since it covers the whole blade, but the mask seems to suddenly stop in a horizontal line on the bottom.</p>
  <p>On another hand, there is a stair-like effect on masks of larger and curvier objects such as this one (in addition to the bottom and top cut-offs):
  <a href="https://i.stack.imgur.com/riTf8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/riTf8.png" alt="enter image description here" /></a></p>
  <ul>
  <li>The original images are downscaled to <code>IMAGE_MIN_DIM = IMAGE_MAX_DIM = 1024</code> using the &quot;square&quot; mode.</li>
  <li><code>USE_MINI_MASK</code> is set to true with <code>MINI_MASK_SHAPE = (512, 512)</code> (somehow if i set it off, RAM gets filled and training chrashes).</li>
  <li><code>RPN_ANCHOR_SCALES = (64, 128, 256, 512, 1024)</code> since the objects occupy a large space of the image.</li>
  </ul>
  <p>It doesn't feel like the problem comes from the amount of training. These two predictions come from 6 epochs of 7000 steps per epoch (took around 17 hours). And the problem appears from early stage and persists along all the epochs.</p>
  <p>Any idea on what changes to make ?</p>