pspnet-pytorch icon indicating copy to clipboard operation
pspnet-pytorch copied to clipboard

get_miou预测出错

Open LeonardJiao opened this issue 1 year ago • 0 comments

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+没有问题,标签也没有问题,请问具体是哪出问题了呀

LeonardJiao avatar Jan 11 '24 13:01 LeonardJiao