title: MASK R-CNN, why val_mrcnn_bbox_loss and val_mrcnn_mask_loss are 0?
body: <pre><code>Starting at epoch 0. LR=0.002
  
  Checkpoint Path: /content/Mask_RCNN/logs/crack_images20200707T0451/mask_rcnn_crack_images_{epoch:04d}.h5
  Selecting layers to train
  fpn_c5p5               (Conv2D)
  fpn_c4p4               (Conv2D)
  fpn_c3p3               (Conv2D)
  fpn_c2p2               (Conv2D)
  fpn_p5                 (Conv2D)
  fpn_p2                 (Conv2D)
  fpn_p3                 (Conv2D)
  fpn_p4                 (Conv2D)
  In model:  rpn_model
      rpn_conv_shared        (Conv2D)
      rpn_class_raw          (Conv2D)
      rpn_bbox_pred          (Conv2D)
  mrcnn_mask_conv1       (TimeDistributed)
  mrcnn_mask_bn1         (TimeDistributed)
  mrcnn_mask_conv2       (TimeDistributed)
  mrcnn_mask_bn2         (TimeDistributed)
  mrcnn_class_conv1      (TimeDistributed)
  mrcnn_class_bn1        (TimeDistributed)
  mrcnn_mask_conv3       (TimeDistributed)
  mrcnn_mask_bn3         (TimeDistributed)
  mrcnn_class_conv2      (TimeDistributed)
  mrcnn_class_bn2        (TimeDistributed)
  mrcnn_mask_conv4       (TimeDistributed)
  mrcnn_mask_bn4         (TimeDistributed)
  mrcnn_bbox_fc          (TimeDistributed)
  mrcnn_mask_deconv      (TimeDistributed)
  mrcnn_class_logits     (TimeDistributed)
  mrcnn_mask             (TimeDistributed)
  Epoch 1/20
  100/100 [==============================] - 2546s - loss: 59.9573 - rpn_class_loss: 4.9158 - rpn_bbox_loss: 55.0416 - mrcnn_class_loss: 2.5773e-06 - mrcnn_bbox_loss: 0.0000e+00 - mrcnn_mask_loss: 0.0000e+00 - val_loss: 42.9541 - val_rpn_class_loss: 8.3271 - val_rpn_bbox_loss: 34.6270 - val_mrcnn_class_loss: 4.1246e-06 - val_mrcnn_bbox_loss: 0.0000e+00 - val_mrcnn_mask_loss: 0.0000e+00
  Epoch 2/20
  100/100 [==============================] - 2466s - loss: 47.9174 - rpn_class_loss: 3.4403 - rpn_bbox_loss: 44.4434 - mrcnn_class_loss: 0.0044 - mrcnn_bbox_loss: 0.0198 - mrcnn_mask_loss: 0.0096 - val_loss: 40.8780 - val_rpn_class_loss: 1.7095 - val_rpn_bbox_loss: 39.1685 - val_mrcnn_class_loss: 4.3463e-05 - val_mrcnn_bbox_loss: 0.0000e+00 - val_mrcnn_mask_loss: 0.0000e+00
  Epoch 3/20
  100/100 [==============================] - 2432s - loss: 45.2084 - rpn_class_loss: 2.1342 - rpn_bbox_loss: 43.0547 - mrcnn_class_loss: 0.0030 - mrcnn_bbox_loss: 0.0062 - mrcnn_mask_loss: 0.0103 - val_loss: 40.2231 - val_rpn_class_loss: 1.9367 - val_rpn_bbox_loss: 38.2864 - val_mrcnn_class_loss: 7.5409e-05 - val_mrcnn_bbox_loss: 0.0000e+00 - val_mrcnn_mask_loss: 0.0000e+00
  Epoch 4/20
  100/100 [==============================] - 2402s - loss: 44.3991 - rpn_class_loss: 2.0594 - rpn_bbox_loss: 42.3396 - mrcnn_class_loss: 7.5638e-05 - mrcnn_bbox_loss: 0.0000e+00 - mrcnn_mask_loss: 0.0000e+00 - val_loss: 42.4247 - val_rpn_class_loss: 3.2007 - val_rpn_bbox_loss: 39.2239 - val_mrcnn_class_loss: 7.1904e-05 - val_mrcnn_bbox_loss: 0.0000e+00 - val_mrcnn_mask_loss: 0.0000e+00
  Epoch 5/20
  100/100 [==============================] - 2404s - loss: 47.2541 - rpn_class_loss: 3.9966 - rpn_bbox_loss: 43.2575 - mrcnn_class_loss: 4.8513e-05 - mrcnn_bbox_loss: 0.0000e+00 - mrcnn_mask_loss: 0.0000e+00 - val_loss: 36.8668 - val_rpn_class_loss: 0.6245 - val_rpn_bbox_loss: 36.2422 - val_mrcnn_class_loss: 3.1065e-05 - val_mrcnn_bbox_loss: 0.0000e+00 - val_mrcnn_mask_loss: 0.0000e+00
  Epoch 6/20
  100/100 [==============================] - 2402s - loss: 41.3224 - rpn_class_loss: 3.4068 - rpn_bbox_loss: 37.9156 - mrcnn_class_loss: 2.7582e-05 - mrcnn_bbox_loss: 0.0000e+00 - mrcnn_mask_loss: 0.0000e+00 - val_loss: 30.5534 - val_rpn_class_loss: 1.2449 - val_rpn_bbox_loss: 29.3085 - val_mrcnn_class_loss: 2.4438e-05 - val_mrcnn_bbox_loss: 0.0000e+00 - val_mrcnn_mask_loss: 0.0000e+00
  Epoch 7/20
  100/100 [==============================] - 2391s - loss: 45.0313 - rpn_class_loss: 3.8534 - rpn_bbox_loss: 41.1548 - mrcnn_class_loss: 0.0021 - mrcnn_bbox_loss: 0.0122 - mrcnn_mask_loss: 0.0089 - val_loss: 41.7707 - val_rpn_class_loss: 0.9706 - val_rpn_bbox_loss: 40.8001 - val_mrcnn_class_loss: 3.5309e-05 - val_mrcnn_bbox_loss: 0.0000e+00 - val_mrcnn_mask_loss: 0.0000e+00
  Epoch 8/20
  100/100 [==============================] - 2435s - loss: 41.4883 - rpn_class_loss: 2.7715 - rpn_bbox_loss: 38.6841 - mrcnn_class_loss: 0.0016 - mrcnn_bbox_loss: 0.0224 - mrcnn_mask_loss: 0.0086 - val_loss: 42.0558 - val_rpn_class_loss: 2.9680 - val_rpn_bbox_loss: 39.0877 - val_mrcnn_class_loss: 2.6321e-05 - val_mrcnn_bbox_loss: 0.0000e+00 - val_mrcnn_mask_loss: 0.0000e+00
  Epoch 9/20
  100/100 [==============================] - 2473s - loss: 41.6691 - rpn_class_loss: 2.3281 - rpn_bbox_loss: 39.3410 - mrcnn_class_loss: 2.8393e-05 - mrcnn_bbox_loss: 0.0000e+00 - mrcnn_mask_loss: 0.0000e+00 - val_loss: 38.0360 - val_rpn_class_loss: 1.7419 - val_rpn_bbox_loss: 36.2941 - val_mrcnn_class_loss: 2.2530e-05 - val_mrcnn_bbox_loss: 0.0000e+00 - val_mrcnn_mask_loss: 0.0000e+00
  Epoch 10/20
  100/100 [==============================] - 2450s - loss: 39.7236 - rpn_class_loss: 2.0216 - rpn_bbox_loss: 37.6904 - mrcnn_class_loss: 0.0010 - mrcnn_bbox_loss: 0.0026 - mrcnn_mask_loss: 0.0080 - val_loss: 33.0290 - val_rpn_class_loss: 6.8746 - val_rpn_bbox_loss: 26.1544 - val_mrcnn_class_loss: 2.5153e-05 - val_mrcnn_bbox_loss: 0.0000e+00 - val_mrcnn_mask_loss: 0.0000e+00
  Epoch 11/20
  100/100 [==============================] - 2397s - loss: 40.1832 - rpn_class_loss: 3.3822 - rpn_bbox_loss: 36.8010 - mrcnn_class_loss: 2.4559e-05 - mrcnn_bbox_loss: 0.0000e+00 - mrcnn_mask_loss: 0.0000e+00 - val_loss: 36.0607 - val_rpn_class_loss: 4.1198 - val_rpn_bbox_loss: 31.9409 - val_mrcnn_class_loss: 2.4557e-05 - val_mrcnn_bbox_loss: 0.0000e+00 - val_mrcnn_mask_loss: 0.0000e+00
  Epoch 12/20
  100/100 [==============================] - 2391s - loss: 31.5999 - rpn_class_loss: 2.2898 - rpn_bbox_loss: 29.3101 - mrcnn_class_loss: 2.5380e-05 - mrcnn_bbox_loss: 0.0000e+00 - mrcnn_mask_loss: 0.0000e+00 - val_loss: 28.0113 - val_rpn_class_loss: 0.6510 - val_rpn_bbox_loss: 27.3603 - val_mrcnn_class_loss: 2.1243e-05 - val_mrcnn_bbox_loss: 0.0000e+00 - val_mrcnn_mask_loss: 0.0000e+00
  Epoch 13/20
  100/100 [==============================] - 2441s - loss: 29.5633 - rpn_class_loss: 2.0158 - rpn_bbox_loss: 27.5475 - mrcnn_class_loss: 2.8165e-05 - mrcnn_bbox_loss: 0.0000e+00 - mrcnn_mask_loss: 0.0000e+00 - val_loss: 24.3744 - val_rpn_class_loss: 1.0115 - val_rpn_bbox_loss: 23.3629 - val_mrcnn_class_loss: 2.1410e-05 - val_mrcnn_bbox_loss: 0.0000e+00 - val_mrcnn_mask_loss: 0.0000e+00
  Epoch 14/20
  100/100 [==============================] - 2424s - loss: 29.5249 - rpn_class_loss: 2.8759 - rpn_bbox_loss: 26.6115 - mrcnn_class_loss: 0.0013 - mrcnn_bbox_loss: 0.0202 - mrcnn_mask_loss: 0.0160 - val_loss: 21.7251 - val_rpn_class_loss: 1.2835 - val_rpn_bbox_loss: 20.4416 - val_mrcnn_class_loss: 1.4686e-05 - val_mrcnn_bbox_loss: 0.0000e+00 - val_mrcnn_mask_loss: 0.0000e+00
  Epoch 15/20
  100/100 [==============================] - 2441s - loss: 25.1142 - rpn_class_loss: 2.5004 - rpn_bbox_loss: 22.6137 - mrcnn_class_loss: 1.3815e-05 - mrcnn_bbox_loss: 0.0000e+00 - mrcnn_mask_loss: 0.0000e+00 - val_loss: 31.8563 - val_rpn_class_loss: 0.5517 - val_rpn_bbox_loss: 31.3045 - val_mrcnn_class_loss: 1.5712e-05 - val_mrcnn_bbox_loss: 0.0000e+00 - val_mrcnn_mask_loss: 0.0000e+00
  Epoch 16/20
  100/100 [==============================] - 2371s - loss: 28.6811 - rpn_class_loss: 2.5408 - rpn_bbox_loss: 26.1402 - mrcnn_class_loss: 9.1934e-06 - mrcnn_bbox_loss: 0.0000e+00 - mrcnn_mask_loss: 0.0000e+00 - val_loss: 20.2755 - val_rpn_class_loss: 0.6740 - val_rpn_bbox_loss: 19.6015 - val_mrcnn_class_loss: 6.0320e-06 - val_mrcnn_bbox_loss: 0.0000e+00 - val_mrcnn_mask_loss: 0.0000e+00
  Epoch 17/20
  100/100 [==============================] - 2427s - loss: 26.1218 - rpn_class_loss: 4.1050 - rpn_bbox_loss: 21.9986 - mrcnn_class_loss: 0.0018 - mrcnn_bbox_loss: 0.0074 - mrcnn_mask_loss: 0.0091 - val_loss: 23.0992 - val_rpn_class_loss: 3.4643 - val_rpn_bbox_loss: 19.6348 - val_mrcnn_class_loss: 5.0068e-06 - val_mrcnn_bbox_loss: 0.0000e+00 - val_mrcnn_mask_loss: 0.0000e+00
  Epoch 18/20
  100/100 [==============================] - 2487s - loss: 27.5055 - rpn_class_loss: 2.8223 - rpn_bbox_loss: 24.6514 - mrcnn_class_loss: 0.0017 - mrcnn_bbox_loss: 0.0155 - mrcnn_mask_loss: 0.0145 - val_loss: 20.8848 - val_rpn_class_loss: 2.3465 - val_rpn_bbox_loss: 18.5383 - val_mrcnn_class_loss: 2.8133e-06 - val_mrcnn_bbox_loss: 0.0000e+00 - val_mrcnn_mask_loss: 0.0000e+00
  Epoch 19/20
  100/100 [==============================] - 2537s - loss: 21.7046 - rpn_class_loss: 1.6853 - rpn_bbox_loss: 20.0193 - mrcnn_class_loss: 3.7229e-06 - mrcnn_bbox_loss: 0.0000e+00 - mrcnn_mask_loss: 0.0000e+00 - val_loss: 27.4155 - val_rpn_class_loss: 8.5852 - val_rpn_bbox_loss: 18.8303 - val_mrcnn_class_loss: 4.4346e-06 - val_mrcnn_bbox_loss: 0.0000e+00 - val_mrcnn_mask_loss: 0.0000e+00
  Epoch 20/20
  100/100 [==============================] - 2537s - loss: 25.0851 - rpn_class_loss: 2.9776 - rpn_bbox_loss: 22.1076 - mrcnn_class_loss: 2.8539e-06 - mrcnn_bbox_loss: 0.0000e+00 - mrcnn_mask_loss: 0.0000e+00 - val_loss: 17.3773 - val_rpn_class_loss: 2.7509 - val_rpn_bbox_loss: 14.6263 - val_mrcnn_class_loss: 2.5272e-06 - val_mrcnn_bbox_loss: 0.0000e+00 - val_mrcnn_mask_loss: 0.0000e+00
  Fine tune Resnet stage 4 and up
  Training took 814.59 minutes
  </code></pre>
  <p>I ran 20 epochs and noticed that the val_mrcnn_bbox_loss and val_mrcnn_mask_loss were 0 right from the beginning and I would like to ask:</p>
  <ol>
  <li>What does each loss mean? Is there perhaps a documentation explaining them?</li>
  <li>Why are the two losses 0? Is there something wrong?</li>
  </ol>
  <hr />
  <p>What I have done was:</p>
  <ul>
  <li>Draw labels using a website called Labelbox</li>
  <li>Export the labels as a JSON file</li>
  <li>Run a script to convert the JSON file to suit the COCO format</li>
  <li>Run MASK-RCNN</li>
  </ul>
  <hr />
  <p>So far I'm unable to produce any segmentations for my predictions but I am guessing it is due to the low number of epochs I have ran.</p>
  <p>I am new to classification through segmentation and I would appreciate any advice. Thanks!</p>