我想从BSDS500数据集中的.mat文件中找到的基本事实创建图像。我想比较地面真相文件中的图像和我的程序生成的图像。我阅读了内容,其中一个文件的输出是:
[[array([[(array([[ 1, 1, 1, ..., 1, 1, 1],
[ 1, 1, 1, ..., 1, 1, 1],
[ 1, 1, 1, ..., 1, 1, 1],
...,
[36, 36, 36, ..., 36, 36, 36],
[36, 36, 36, ..., 36, 36, 36],
[36, 36, 36, ..., 36, 36, 36]], dtype=uint16), array([[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
...,
[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0]], dtype=uint8))]],
dtype=[('Segmentation', 'O'), ('Boundaries', 'O')])
array([[(array([[ 1, 1, 1, ..., 1, 1, 1],
[ 1, 1, 1, ..., 1, 1, 1],
[ 1, 1, 1, ..., 1, 1, 1],
...,
[11, 11, 11, ..., 11, 11, 11],
[11, 11, 11, ..., 11, 11, 11],
[11, 11, 11, ..., 11, 11, 11]], dtype=uint16), array([[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
...,
[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0]], dtype=uint8))]],
dtype=[('Segmentation', 'O'), ('Boundaries', 'O')])
array([[(array([[ 1, 1, 1, ..., 1, 1, 1],
[ 1, 1, 1, ..., 1, 1, 1],
[ 1, 1, 1, ..., 1, 1, 1],
...,
[14, 14, 14, ..., 14, 14, 14],
[14, 14, 14, ..., 14, 14, 14],
[14, 14, 14, ..., 14, 14, 14]], dtype=uint16), array([[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
...,
[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0]], dtype=uint8))]],
dtype=[('Segmentation', 'O'), ('Boundaries', 'O')])
array([[(array([[1, 1, 1, ..., 1, 1, 1],
[1, 1, 1, ..., 1, 1, 1],
[1, 1, 1, ..., 1, 1, 1],
...,
[6, 6, 6, ..., 6, 6, 6],
[6, 6, 6, ..., 6, 6, 6],
[6, 6, 6, ..., 6, 6, 6]], dtype=uint16), array([[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
...,
[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0]], dtype=uint8))]],
dtype=[('Segmentation', 'O'), ('Boundaries', 'O')])
array([[(array([[1, 1, 1, ..., 1, 1, 1],
[1, 1, 1, ..., 1, 1, 1],
[1, 1, 1, ..., 1, 1, 1],
...,
[9, 9, 9, ..., 9, 9, 9],
[9, 9, 9, ..., 9, 9, 9],
[9, 9, 9, ..., 9, 9, 9]], dtype=uint16), array([[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
...,
[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0]], dtype=uint8))]],
dtype=[('Segmentation', 'O'), ('Boundaries', 'O')])]]
我不知道如何在我的代码中使用它来检查我的分段程序是否运行良好
让我们加载matfile:
file
是一个词汇表,其键'groundTruth'
包含相关信息。在下面的片段中,edges
有图像的轮廓,segmap
是分割图。边缘阵列是标准化的,因此您必须将它们乘以255才能获得图像查看这些链接以获取完整的代码。它们包含python和matlab中的mat文件处理脚本。 BSDS500 data processing (convert groundtruth to jpg format), Convert bsds500 data set PS:即使链接不可用,主要答案也在上面的代码中
相关问题 更多 >
编程相关推荐