<p>According to both the <a href="https://github.com/matterport/Mask_RCNN/blob/master/mrcnn/model.py" rel="noreferrer">code comments</a> and the <a href="https://www.pydoc.io/pypi/mrcnn-0.0.1/autoapi/model/index.html#model.rpn_class_loss_graph" rel="noreferrer">documentation</a> in the Python Package Index, these losses are defined as:</p>

<ul>
<li><strong>rpn_class_loss</strong> = RPN anchor classifier loss</li>
<li><strong>rpn_bbox_loss</strong> = RPN bounding box loss graph</li>
<li><strong>mrcnn_class_loss</strong> = loss for the classifier head of Mask R-CNN</li>
<li><strong>mrcnn_bbox_loss</strong> = loss for Mask R-CNN bounding box refinement</li>
<li><strong>mrcnn_mask_loss</strong> = mask binary cross-entropy loss for the masks head</li>
</ul>

<p>Each of these loss metrics is the sum of all the loss values calculated individually for each of the regions of interest. The general <strong>loss</strong> metric given in the log is the sum of the other five losses (you can check it by summing them up) as defined by the Mask R-CNN's authors. </p>

<p>In terms of how these losses are calculated as per the <a href="https://arxiv.org/pdf/1703.06870.pdf" rel="noreferrer">original paper</a>, they can be described as follows (note that the definitions are quite rough for the sake of a more intuitive explanation):</p>

<ul>
<li>The classification loss values are basically dependent on the confidence score of the true class, hence the <strong>classification losses reflect</strong> how confident the model is when predicting the class labels, or in other words, <strong>how close the model is to predicting the correct class</strong>. In the case of mrcnn_class_loss, all the object classes are covered, whereas in the case of rpn_class_loss the only classification that is done is labelling the anchor boxes as foreground or background (which is the reason why this loss tends to have lower values, as conceptually there are only 'two classes' than can be predicted).</li>
<li>The <strong>bounding box loss values reflect the distance between the true box parameters</strong> -that is, the (x,y) coordinates of the box location, its width and its height- <strong>and the predicted ones</strong>. It is by its nature a regression loss, and it penalizes larger absolute differences (in an approximately exponential manner for lower differences, and linearly for larger differences - see <a href="https://www.researchgate.net/profile/Zhenhua_Feng3/publication/321180616/figure/fig4/AS:631643995918366@1527607072866/Plots-of-the-L1-L2-and-smooth-L1-loss-functions.png" rel="noreferrer">Smooth L1 loss</a> function for more insight). Hence, it ultimately shows <strong>how good the model is at locating objects</strong> within the image, in the case of rpn_bbox_loss; and how good the model is <strong>at precisely predicting the area</strong>(s) within an image <strong>corresponding to the different objects</strong> that are present, in the case of mrcnn_bbox_loss.</li>
<li>The <strong>mask loss</strong>, similarly to the classification loss, <strong>penalizes wrong per-pixel binary classifications (foreground/background</strong>, in respect to the true class label). It is calculated differently for each of the regions of interest: Mask R-CNN encodes a binary mask per class for each of the RoIs, and the mask loss for a specific RoI is calculated based only on the mask corresponding to its true class, which prevents the mask loss from being affected by class predictions.</li>
</ul>

<p>As you already said, these loss metrics are indeed training losses, and the ones with the <em>val_</em> prefix are the validation losses. Fluctuations in the validation loss can occur for several different reasons, and it's hard to guess at first sight based only on your charts. They might be caused by a learning rate that is too high (making the stochastic gradient descent overshoot when trying to find a minimum), or a validation set that is too small (which gives unreliable loss values, as small changes in the output can produce big loss value changes). </p>
What exactly are the losses in Matterport Mask-R-CNN?
<p>I use Mask-R-CNN to train my data with it. When i use TensorBoard to see the result, i have the <strong>loss,</strong> <strong>mrcnn_bbox_loss</strong>, <strong>mrcnn_class_loss</strong>, <strong>mrcnn_mask_loss</strong>, <strong>rpn_bbox_loss</strong>, <strong>rpn_class_loss</strong> and all the same 6 loss for the validation: <strong>val_loss,</strong> <strong>val_mrcnn_bbox_loss</strong> etc. </p>

<p>I want to know what is each loss exactly. </p>

<p>Also i want to know if the first 6 losses are the train loss or what are they? If they aren't the train loss, how can i see the train loss?</p>

<p>My guess is:</p>

<p><strong>loss</strong>: it's all the 5 losses in summary (but i don't know how TensorBoard summarizes it).</p>

<p><strong>mrcnn_bbox_loss</strong>: is the size of the bounding box correct or not? </p>

<p><strong>mrcnn_class_loss</strong>: is the class correct? is the pixel correctly assign to the class?</p>

<p><strong>mrcnn_mask_loss</strong>: is the shape of the instance correct or not? is the pixel correctly assign to the instance?</p>

<p><strong>rpn_bbox_loss</strong>:  is the size of the bbox correct?</p>

<p><strong>rpn_class_loss</strong>: is the class of the bbox correct?</p>

<p>But i am pretty sure this is not right...</p>

<p>And are some lossed irrelevant if i have only 1 class? For example only the background and 1 other class?</p>

<p>My data have only the background and 1 other class and this is my result on TensorBoard:</p>

<p><a href="https://i.stack.imgur.com/z4plk.png" rel="noreferrer"><img src="https://i.stack.imgur.com/z4plk.png" alt="Result 1:"></a><a href="https://i.stack.imgur.com/yVMeK.png" rel="noreferrer"><img src="https://i.stack.imgur.com/yVMeK.png" alt="Result 2:"></a><a href="https://i.stack.imgur.com/P5J1Z.png" rel="noreferrer"><img src="https://i.stack.imgur.com/P5J1Z.png" alt="Result 3:"></a><a href="https://i.stack.imgur.com/aIb5Z.png" rel="noreferrer"><img src="https://i.stack.imgur.com/aIb5Z.png" alt="Result :4"></a></p>

<p>My prediction is ok, but i don't know why some losses from my validation is going up and down at the end... I thought it has to be first only down and after overfitting only up.
The prediction i used is the green line on TensorBoard with the most epochs. I am not sure if my Network is overfitted, therfore i am wondering why some losses in the validation look how they look...</p>

<p>Here is my prediction:
<a href="https://i.stack.imgur.com/ovIts.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ovIts.png" alt="Example of my Trainset:"></a>
<a href="https://i.stack.imgur.com/yPVH0.png" rel="noreferrer"><img src="https://i.stack.imgur.com/yPVH0.png" alt="This is the Ground Truth of my Testset example:"></a>
<a href="https://i.stack.imgur.com/hnHaM.png" rel="noreferrer"><img src="https://i.stack.imgur.com/hnHaM.png" alt="This is the prediction from the Testset example:"></a></p>