How to find IoU from segmentation masks?

后端 未结 1 692
梦谈多话
梦谈多话 2021-01-19 07:03

I am doing an image segmentation task and I am using a dataset that only has ground truths but no bounding boxes or polygons.

I have 2 classes( ignoring 0 for backgr

1条回答
  •  离开以前
    2021-01-19 07:31

    So I just found out that jaccard_similarity_score is regarded as IoU.

    So the solution is very simple,

    from sklearn.metrics import jaccard_similarity_score jac = jaccard_similarity_score(predictions, label, Normalize = True/False)

    Source link: https://scikit-learn.org/stable/modules/generated/sklearn.metrics.jaccard_score.html#sklearn.metrics.jaccard_score

    0 讨论(0)
提交回复
热议问题