【发布时间】:2026-02-10 19:00:02
【问题描述】:
我想根据 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')])]]
我不知道如何在我的代码中使用它来检查我的分段程序是否运行良好。
【问题讨论】: