class_docstr: The PSSL dataset for segmentation. PSSL is short for Pseudo Semantic Segmentation Labels, where the pseudo label
  is computed by the Consensus explanation algorithm.
  
  The PSSL refers to "Distilling Ensemble of Explanations for Weakly-Supervised Pre-Training of Image Segmentation 
  Models" (https://arxiv.org/abs/2207.03335). 
  
  The Consensus explanation refers to "Cross-Model Consensus of Explanations and Beyond for Image Classification 
  Models: An Empirical Study" (https://arxiv.org/abs/2109.00707).
  
  To use this dataset, we need to additionally prepare the orignal ImageNet dataset, which has the folder structure
  as follows:
  
      imagenet_root
      |
      |--train
      |  |--n01440764
      |  |  |--n01440764_10026.JPEG
      |  |  |--...
      |  |--nxxxxxxxx
      |  |--...
  
  where only the "train" set is needed.
  
  The PSSL dataset has the folder structure as follows:
  
      pssl_root
      |
      |--train
      |  |--n01440764
      |  |  |--n01440764_10026.JPEG_eiseg.npz
      |  |  |--...
      |  |--nxxxxxxxx
      |  |--...
      |
      |--imagenet_lsvrc_2015_synsets.txt
      |--train.txt
  
  where "train.txt" and "imagenet_lsvrc_2015_synsets.txt" are included in the PSSL dataset.
  
  Args:
      transforms (list): Transforms for image.
      imagenet_root (str): The path to the original ImageNet dataset.
      pssl_root (str): The path to the PSSL dataset.
      mode (str, optional): Which part of dataset to use. it is one of ('train', 'val', 'test'). Default: 'train'.
      edge (bool, optional): Whether to compute edge while training. Default: False.
code: def __getitem__(self, idx):
      image_path, label_path = self.file_list[idx]
      data = {"img": image_path, "trans_info": [], "gt_fields": []}
  
      # get class_id by image path
      class_name = (image_path.split("/")[-1]).split("_")[0]
      class_id = self.class_id_dict[class_name]
  
      pssl_seg = np.load(label_path)["arr_0"]
      gt_semantic_seg = np.zeros_like(pssl_seg, dtype=np.int64) + 1000
      # [0, 999] for imagenet classes, 1000 for background, others(-1) will be ignored during training.
      gt_semantic_seg[pssl_seg == 1] = class_id
      data["label"] = gt_semantic_seg
  
      if self.mode == "train":
          data["gt_fields"].append("label")
      data = self.transforms(data)
      return data
  
file_path: PaddleSeg/paddleseg/datasets/pssl.py
imports: import os
  import numpy
  from paddleseg.datasets import Dataset
  from paddleseg.cvlibs import manager
  from paddleseg.transforms import Compose
label_desc: Use image node_id 2 for calling the PSSLDataset obj's underlying member method code with example usage: obj.__getitem__(idx) and returns: data