Skip to content

get_miou预测出错 #33

@LeonardJiao

Description

@LeonardJiao

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions