Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_miou预测出错 #33

Open
LeonardJiao opened this issue Jan 11, 2024 · 0 comments
Open

get_miou预测出错 #33

LeonardJiao opened this issue Jan 11, 2024 · 0 comments

Comments

@LeonardJiao
Copy link

Traceback (most recent call last):
File "/home/jiaorunnong/pspnet-pytorch-master/get_miou.py", line 60, in
hist, IoUs, PA_Recall, Precision = compute_mIoU(gt_dir, pred_dir, image_ids, num_classes, name_classes) # 执行计算mIoU的函数
File "/home/jiaorunnong/pspnet-pytorch-master/utils/utils_metrics.py", line 118, in compute_mIoU
hist += fast_hist(label.flatten(), pred.flatten(), num_classes)
File "/home/jiaorunnong/pspnet-pytorch-master/utils/utils_metrics.py", line 48, in fast_hist
return np.bincount(n * a[k].astype(int) + b[k], minlength=n ** 2).reshape(n, n)
ValueError: cannot reshape array of size 14 into shape (3,3)
同样的数据集在deeplabv3+没有问题,标签也没有问题,请问具体是哪出问题了呀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant