已解决
语义分割准确率计算
来自网友在路上 183883提问 提问时间:2023-11-05 22:45:35阅读次数: 83
最佳答案 问答题库838位专家为你答疑解惑
目录
pytorch版
pytorch准确率,miou:
sklearn版
pytorch版
"""
reference from: https://github.com/LeeJunHyun/Image_Segmentation/blob/master/evaluation.py
"""import torch# SR : Segmentation Result
# GT : Ground Truthdef get_accuracy(SR,GT,threshold=0.5):SR = SR > thresholdGT = GT == torch.max(GT)corr = torch.sum(SR==GT)tensor_size = SR.size(0)*SR.size(1)*SR.size(2)*SR.size(3)acc = float(corr)/float(tenso
查看全文
99%的人还看了
猜你感兴趣
版权申明
本文"语义分割准确率计算":http://eshow365.cn/6-33077-0.html 内容来自互联网,请自行判断内容的正确性。如有侵权请联系我们,立即删除!
- 上一篇: 2023面试知识点三
- 下一篇: node教程(五)接口+会话