def load_bsd_gt(filename):
gt = loadmat(filename)
gt = gt['groundTruth']
cols = gt.shape[1]
what = ['Segmentation','Boundaries']
ret = list()
for i in range(cols):
j=0
tmp = list()
for w in what:
tmp.append(gt[0][j][w][0][0][:])
j+=1
ret.append(tmp)
return ret
我找到了解决问题的方法。 我不认为这是最佳的,但它的工作。你知道吗
如果有人有更好的方法,请随时添加评论或答案。你知道吗
相关问题 更多 >
编程相关推荐