gpt4 book ai didi

semantic-segmentation - 用于语义分割的 PASCAL VOC 中的真实像素标签

转载 作者:行者123 更新时间:2023-12-03 14:39:25 25 4
gpt4 key购买 nike

我正在试验 FCN(完全卷积网络),并试图重现原始论文中报告的结果(Long 等人。CVPR'15)。

在那篇论文中,作者报告了 PASCAL VOC 数据集的结果。下载并解压 2012 年的 train-val 数据集后 (http://host.robots.ox.ac.uk/pascal/VOC/voc2012/VOCtrainval_11-May-2012.tar
),我注意到 中有 2913 个 png 文件。 SegmentationClass 中相同数量的文件分割对象 子目录。

这些 png 文件中的像素值似乎是 32 的倍数(例如 0、128、192、224...),它们不在 0 和 20 之间的范围内。我只是想知道它们之间的对应关系是什么像素的像素值和真实标签。还是我看错了文件?

最佳答案

我知道这个问题是前一段时间被问到的。但是在使用 tensorflow deeplab 尝试 PASCAL VOC 2012 时,我提出了一个类似的问题。

如果你看 file_download_and_convert_voc2012.sh ,有“#移除ground truth annotations ”中的颜色图标记的行。这部分处理原始 SegmentationClass 文件并生成原始分割图像文件,其每个像素值介于 0 : 20 之间。(如果您可能会问为什么,请查看此帖子:Python: Use PIL to load png file gives strange results)

注意这个神奇的功能:

def _remove_colormap(filename):
"""Removes the color map from the annotation.

Args:
filename: Ground truth annotation filename.

Returns:
Annotation without color map.
"""
return np.array(Image.open(filename))

我不得不承认我并不完全了解操作
np.array(Image.open(filename))

我在下面展示了一组图像供您引用(从上到下:原始图像、分割类和分割原始类)

enter image description here

enter image description here

enter image description here

关于semantic-segmentation - 用于语义分割的 PASCAL VOC 中的真实像素标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49629933/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com