<p>The loss function of the Mask R-CNN paper combines a <strong>weighted sum of 3 losses</strong> (the 3 outputs): classification, localization and segmentation mask:</p>

<p><img src="https://latex.codecogs.com/gif.latex?L=w_%7Bcls%7D%5Ccdot&space;L_%7Bcls%7D&plus;w_%7Bbbox%7D%5Ccdot&space;L_%7Bbbox%7D&plus;w_%7Bmask%7D%5Ccdot&space;L_%7Bmask%7D," title="L=w_{cls}\cdot L_{cls}+w_{bbox}\cdot L_{bbox}+w_{mask}\cdot L_{mask}," /></p>

<p>The classification and bounding-box (localization) losses are the same as in Faster R-CNN.</p>

<p><strong>What is added is a per-pixel sigmoid + binary loss for the mask</strong>.
The mask branch generates a mask for each class, without competition among classes (so if you have 10 classes the mask branch predicts 10 masks). The loss being used is per-pixel sigmoid + binary loss.</p>

<p>If you want to dive in a little bit deeper into the mask loss, the paper states that "Multinomial vs. Independent Masks: Mask R-CNN decouples mask and class prediction: as the existing box
branch predicts the class label, we generate a mask for each
class without competition among classes (by a per-pixel sigmoid and a binary loss). In Table 2b, we compare this to
using a per-pixel softmax and a multinomial loss (as commonly used in FCN [30])."</p>

<p>you can see it in the <a href="https://arxiv.org/pdf/1703.06870.pdf" rel="nofollow noreferrer">paper</a> at page number 6, table number 2.b ("Multinomial vs. Independent Masks").</p>
While training Mask RCNN using TensorFlow Object Detection API, what is the 'loss'?
<p>I am training for <strong>Custom Object Detection</strong> using <strong>Mask RCNN</strong> in <strong>TensorFlow Object Detection</strong>. Therefore, I am to predict the object instance mask along with the bounding box.</p>

<p>Pre-trained model : <code>mask_rcnn_inception_v2_coco</code></p>

<p>Following is a snapshot of my training.</p>

<blockquote>
  <p>INFO:tensorflow:global step 4181: loss = 0.0031 (3.290 sec/step)</p>
  
  <p>INFO:tensorflow:global step 4181: loss = 0.0031 (3.290 sec/step)</p>
  
  <p>INFO:tensorflow:global step 4182: loss = 0.0030 (2.745 sec/step)</p>
  
  <p>INFO:tensorflow:global step 4182: loss = 0.0030 (2.745 sec/step)</p>
</blockquote>

<p><strong>In this case, can you please tell me what is the loss here?</strong></p>

<p>My questions is not related to training loss and its variation w.r.t. the steps.</p>

<p>I am just unclear about what is meant by this loss while training a Mask RCNN? In a Mask RCNN, there are 3 parallel heads at the last layer,</p>

<ul>
<li>for detecting the class</li>
<li>for predicting bounding box</li>
<li>for predicting instance masks</li>
</ul>

<p><strong>In such a case, what is loss?</strong></p>