class_docstr: Generator the panoptc ground truth for evaluation, where values are 0,1,2,3,...
      11000, 11001, ..., 18000, 18001, ignore_index(general 255).
  
  Args:
      ignore_index (int): The ignore label for semantic segmentation.
      rgb2id (function): Function, panoptic label is encoded in a colored image, this function convert color to the
          corresponding panoptic label.
      label_divisor(int, optional): An Integer, used to convert panoptic id = semantic id * label_divisor + instance_id. Default: 1000.
class_docstr_tok: ["Generator","the","panoptc","ground","truth","for","evaluation",",","where","values","are","0,1,2,3",",","...","11000",",","11001",",","...",",","18000",",","18001",",","ignore_index","(","general","255",")",".","Args",":","ignore_index","(","int",")",":","The","ignore","label","for","semantic","segmentation",".","rgb2id","(","function",")",":","Function",",","panoptic","label","is","encoded","in","a","colored","image",",","this","function","convert","color","to","the","corresponding","panoptic","label",".","label_divisor","(","int",",","optional",")",":","An","Integer",",","used","to","convert","panoptic","id","=","semantic","id","*","label_divisor","+","instance_id",".","Default",":","1000","."]
docstr: Generates the raw panoptic target
  
  Args:
      panoptic (numpy.array): colored image encoding panoptic label.
      segments (list): A list of dictionary containing information of every segment, it has fields:
          - id: panoptic id, after decoding `panoptic`.
          - category_id: semantic class id.
          - area: segment area.
          - bbox: segment bounding box.
          - iscrowd: crowd region.
  
  Returns:
      A dictionary with fields:
          - panoptic: Tensor, panoptic label, shape=(H, W).
docstr_tok: ["Generates","the","raw","panoptic","target","Args",":","panoptic","(","numpy.array",")",":","colored","image","encoding","panoptic","label",".","segments","(","list",")",":","A","list","of","dictionary","containing","information","of","every","segment",",","it","has","fields",":","-","id",":","panoptic","id",",","after","decoding","`","panoptic","`",".","-","category_id",":","semantic","class","id",".","-","area",":","segment","area",".","-","bbox",":","segment","bounding","box",".","-","iscrowd",":","crowd","region",".","Returns",":","A","dictionary","with","fields",":","-","panoptic",":","Tensor",",","panoptic","label",",","shape=","(","H",",","W",")","."]
code: def __call__(self, panoptic, segments):
      """
      Generates the raw panoptic target
  
      Args:
          panoptic (numpy.array): colored image encoding panoptic label.
          segments (list): A list of dictionary containing information of every segment, it has fields:
              - id: panoptic id, after decoding `panoptic`.
              - category_id: semantic class id.
              - area: segment area.
              - bbox: segment bounding box.
              - iscrowd: crowd region.
  
      Returns:
          A dictionary with fields:
              - panoptic: Tensor, panoptic label, shape=(H, W).
      """
      panoptic = self.rgb2id(panoptic)
      raw_panoptic = np.zeros_like(panoptic) + self.ingore_index
      for seg in segments:
          cat_id = seg["category_id"]
          # if seg['iscrowd'] == 1:
          #     continue
          if seg["id"] < 1000:
              raw_panoptic[panoptic == seg["id"]] = cat_id
          else:
              ins_id = seg["id"] % self.label_divisor
              raw_panoptic[panoptic == seg["id"]] = (
                  cat_id * self.label_divisor + ins_id
              )
      return dict(panoptic=raw_panoptic.astype("long"))
  
file_path: PaddleSeg/contrib/PanopticDeepLab/transforms/target_transforms.py
imports: import numpy
label_desc: Use image node_id 2 for calling the RawPanopticTargetGenerator obj's underlying member method code with example usage: obj.__call__(panoptic, segments) and returns: dict