class_docstr: Unify different panoptic annotation/prediction formats
class_docstr_tok: ["Unify","different","panoptic","annotation\/prediction","formats"]
docstr: Returns:
      (H, W) array, a mask for all pixels that have a prediction
docstr_tok: ["Returns",":","(","H",",","W",")","array",",","a","mask","for","all","pixels","that","have","a","prediction"]
code: def non_empty_mask(self):
      """
      Returns:
          (H, W) array, a mask for all pixels that have a prediction
      """
      empty_ids = []
      for id in self._seg_ids:
          if id not in self._sinfo:
              empty_ids.append(id)
      if len(empty_ids) == 0:
          return np.zeros(self._seg.shape, dtype=np.uint8)
      assert (
          len(empty_ids) == 1
      ), ">1 ids corresponds to no labels. This is currently not supported"
      return (self._seg != empty_ids[0]).numpy().astype(bool)
  
imports: import colorsys
  import logging
  import math
  import numpy
  from enum import Enum, unique
  import cv2
  import matplotlib
  import matplotlib.colors
  import matplotlib.figure
  import pycocotools.mask
  import torch
  from matplotlib.backends.backend_agg import FigureCanvasAgg
  from PIL import Image
  from detectron2.data import MetadataCatalog
  from detectron2.structures import BitMasks, Boxes, BoxMode, Keypoints, PolygonMasks, RotatedBoxes
  from detectron2.utils.file_io import PathManager
  from .colormap import random_color
label_desc: Use image node_id 2 for calling the _PanopticPrediction obj's underlying member method code with example usage: obj.non_empty_mask() and returns: unknown, np