Mask_RCNN
Mask_RCNN copied to clipboard
mrcnn_class_loss() keeps fluctuating
Hi all,
I am currently using the Mask_RCNN Model for a object tracking project. I have completed the training process successfully, with the loss functions displayed below (read from the event file).
Note that I set epochs for head layer as 80 (first stage), and epochs for fine tuning all layers as 160 (second stage).
My questions are:
- Why the event file only shows 80 epochs, and the tensorboard can read as far as 160 epochs?
- How to evaluate my training results from this graph? (loss stabilizes at about1.0, and mrcnn_class_loss keeps fluctuating) Note that I have only one class in my project.
- Based on Q2, how can I improve my model (from dataset or hyperparameter setup)?
I proposed a similar issue here. I have checked this link to understand the learning curve, and this link to learn about hyperparameters. Hope my info can help you deal with the problem.
If you have any ideas, please don't hesitate to comment below. Many thanks in advance for your kind support.
Best,
Erin
Hi all, I have tried to combine the two event files together, and the results are the same as tensorboard has shown, which means Q1 is solved. However, I still need your advice on how to improve the model (mainly about the mrcnn_class_loss()).
Hi,
have you tried to increase the loss_weights?
LOSS_WEIGHTS = {
"rpn_class_loss": 1.,
"rpn_bbox_loss": 1.,
"mrcnn_class_loss": 1.,
"mrcnn_bbox_loss": 1.,
"mrcnn_mask_loss": 1.
}
@Testbild Do you mean that I could try to increase the default loss weights? Why do you think this may work for me? Could you provide more info to explain the principles? Thanks.
The weight to my understanding increases the importance of the loss for your problem. Hence if this is important to you and you want to "punish" the model more for making mistakes in this regard you increase the weight. So that instead of contributing with a factor of 1 to the loss with a factor of 2 or 3.
Maybe just increase the respective loss weight to 2 or 3 and compare the results.
@Testbild Okay, this sounds reasonable. I will try it and let you know if I have further proceedings in improving the model performance. Thanks for your kind suggestions!
I'm trying to look at each loss too. But I haven't figured out the way to do it. Could you please show me the way?