I use Mask-R-CNN to train my data with it. When i use TensorBoard to see the result, i have the loss, mrcnn_bbox_loss, mrcnn_class_loss, mrcnn_mask_loss, rpn_bbox_loss, rpn_class_loss and all the same 6 loss for the validation: val_loss, val_mrcnn_bbox_loss etc.
I want to know what is each loss exactly.
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?
My guess is:
loss: it's all the 5 losses in summary (but i don't know how TensorBoard summarizes it).
mrcnn_bbox_loss: is the size of the bounding box correct or not?
mrcnn_class_loss: is the class correct? is the pixel correctly assign to the class?
mrcnn_mask_loss: is the shape of the instance correct or not? is the pixel correctly assign to the instance?
rpn_bbox_loss: is the size of the bbox correct?
rpn_class_loss: is the class of the bbox correct?
But i am pretty sure this is not right...
And are some lossed irrelevant if i have only 1 class? For example only the background and 1 other class?
My data have only the background and 1 other class and this is my result on TensorBoard:
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...
Here is my prediction:
The pre-processed and annotated images are used to train and validate the Mask R-CNN Classifier. Our experimental results show that damage can be classified efficiently with 95.13% accuracy on a custom dataset and 96.87% on randomly picked images.
RPN Loss Function The first term is the classification loss over 2 classes (There is object or not). The second term is the regression loss of bounding boxes only when there is object (i.e. p_i* =1). Thus, RPN network is to pre-check which location contains object.
Mask R-CNN is a state of the art model for instance segmentation, developed on top of Faster R-CNN. Faster R-CNN is a region-based convolutional neural networks [2], that returns bounding boxes for each object and its class label with a confidence score.
According to both the code comments and the documentation in the Python Package Index, these losses are defined as:
Each of these loss metrics is the sum of all the loss values calculated individually for each of the regions of interest. The general loss 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.
In terms of how these losses are calculated as per the original paper, they can be described as follows (note that the definitions are quite rough for the sake of a more intuitive explanation):
As you already said, these loss metrics are indeed training losses, and the ones with the val_ 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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With