Mask_RCNN icon indicating copy to clipboard operation
Mask_RCNN copied to clipboard

Training is not saving accuracy values MaskRCNN

Open ameliafdez opened this issue 5 years ago • 3 comments

hi! I'm trying to see accuracy while I'm training the model.

For that purpose, I have modified the model.py inside mrcnn folder like this:

metrics

I have seen in so many forums that this works for so many people in other neural networks, but not for me in MaskRCNN. When I train again the model with this modification, is not showing accuracy and in history.history() is not saving it. Only the different losses defined in MaskRCNN. What I want to know is how to modify the implementation in order to obtain values 'acc' and 'val_acc' like this:

example

Thanks in advance!!

ameliafdez avatar Feb 18 '20 18:02 ameliafdez

Accuracy is something easy to compute for basic classifiers, because it's only based on the True positive, False positive, True negative, and False negative. But when it comes to further such as detection or segmentation, this metric isn't representative, and even in classifiers, accuracy isn't always the metrics that will lead to the best model. In networks suc has Mask-RCNN, we use mAP metric instead.

If you really need such a thing, take a look at:

  • https://github.com/matterport/Mask_RCNN/issues/1839
  • https://medium.com/@jonathan_hui/map-mean-average-precision-for-object-detection-45c121a31173
  • And in ultils.py, see the compute_ap function. There, they calculate precision and recall metrics which are using TP, FP, FN... You would only need the last one which is TN, buuuut TN is not so obvious in MaskRCNN... Good luck to you

suchiz avatar Feb 20 '20 13:02 suchiz

very helpful answer @suchiz !! thanks u so much

ameliafdez avatar Feb 20 '20 23:02 ameliafdez

Hi guys i am using the same model also, but i am in trouble of plotting the train_accuracy and validation_accuracy , moreover my advisor is asking me to show him the accuracy for my project but i couldn't find anny as far as my knowledge

Thanks in advance

filmonmehari avatar May 07 '22 06:05 filmonmehari

hello! Did you solve this issue? I also want to get the accuracy of train_dataset and val_dataset.

dingyan-dy avatar Mar 14 '23 12:03 dingyan-dy