Tensorflow: How to ignore specific labels during semantic segmentation?

前端 未结 2 550
执笔经年
执笔经年 2021-02-15 14:49

I\'m using tensorflow for semantic segmentation. How can I tell tensorflow to ignore a specific label when computing the pixelwise loss?

I\'ve read in this post that f

2条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-15 14:58

    Sorry, I'm new to this but I believe in https://github.com/tensorflow/models/blob/master/research/deeplab/g3doc/faq.md, it is mentioned that new datasets need to be added here. In "segmentation_dataset.py", at each dataset, you get to specify ignore_label. For example,

    _PASCAL_VOC_SEG_INFORMATION = DatasetDescriptor(
        splits_to_sizes={
            'train': 1464,
            'trainval': 2913,
            'val': 1449,
        },
        num_classes=21,
        ignore_label=255,
    )
    

提交回复
热议问题