class_docstr: Instance segmentation dataset for PASCAL `VOC2012`_.
  
  .. _`VOC2012`: http://host.robots.ox.ac.uk/pascal/VOC/voc2012/
  
  Args:
      data_dir (string): Path to the root of the training data. If this is
          :obj:`auto`, this class will automatically download data for you
          under :obj:`$CHAINER_DATASET_ROOT/pfnet/chainercv/voc`.
      split ({'train', 'val', 'trainval'}): Select a split of the dataset.
  
  This dataset returns the following data.
  
  .. csv-table::
      :header: name, shape, dtype, format
  
      :obj:`img`, ":math:`(3, H, W)`", :obj:`float32`,         "RGB, :math:`[0, 255]`"
      :obj:`mask`, ":math:`(R, H, W)`", :obj:`bool`, --
      :obj:`label`, ":math:`(R,)`", :obj:`int32`,         ":math:`[0, \#fg\_class - 1]`"
class_docstr_tok: ["Instance","segmentation","dataset","for","PASCAL","`","VOC2012","`","_",".","..","_","`","VOC2012","`",":","http",":","\/\/host.robots.ox.ac.uk\/pascal\/VOC\/voc2012\/","Args",":","data_dir","(","string",")",":","Path","to","the","root","of","the","training","data",".","If","this","is",":","obj",":","`","auto","`",",","this","class","will","automatically","download","data","for","you","under",":","obj",":","`","$","CHAINER_DATASET_ROOT\/pfnet\/chainercv\/voc","`",".","split","(","{","'train","'",",","'val","'",",","'trainval","'","}",")",":","Select","a","split","of","the","dataset",".","This","dataset","returns","the","following","data",".","..","csv-table",":",":",":","header",":","name",",","shape",",","dtype",",","format",":","obj",":","`","img","`",",","``",":","math",":","`","(","3",",","H",",","W",")","`","``",",",":","obj",":","`","float32","`",",","``","RGB",",",":","math",":","`","[","0",",","255","]","`","``",":","obj",":","`","mask","`",",","``",":","math",":","`","(","R",",","H",",","W",")","`","``",",",":","obj",":","`","bool","`",",","--",":","obj",":","`","label","`",",","``",":","math",":","`","(","R",",",")","`","``",",",":","obj",":","`","int32","`",",","``",":","math",":","`","[","0",",","\\","#","fg\\_class","-","1","]","`","``"]
code: def _load_label_inst(self, data_id):
      label_file = os.path.join(
          self.data_dir, "SegmentationClass", data_id + ".png"
      )
      inst_file = os.path.join(
          self.data_dir, "SegmentationObject", data_id + ".png"
      )
      label_img = read_label(label_file, dtype=np.int32)
      label_img[label_img == 255] = -1
      inst_img = read_label(inst_file, dtype=np.int32)
      inst_img[inst_img == 0] = -1
      inst_img[inst_img == 255] = -1
      return label_img, inst_img
  
file_path: chainercv/chainercv/datasets/voc/voc_instance_segmentation_dataset.py
imports: import numpy
  import os
  from chainercv.chainer_experimental.datasets.sliceable import GetterDataset
  from chainercv.datasets.voc import voc_utils
  from chainercv.utils import read_image
  from chainercv.utils import read_label
label_desc: Use image node_id 5 for calling the VOCInstanceSegmentationDataset obj's underlying member method code with example usage: obj._load_label_inst(data_id) and returns: label_img,  inst_img