class_docstr: Object representing a segmentation map associated with an image.
  
  Attributes
  ----------
  DEFAULT_SEGMENT_COLORS : list of tuple of int
      Standard RGB colors to use during drawing, ordered by class index.
  
  Parameters
  ----------
  arr : (H,W) ndarray or (H,W,C) ndarray
      Array representing the segmentation map(s). May have dtypes bool,
      int or uint.
  
  shape : tuple of int
      Shape of the image on which the segmentation map(s) is/are placed.
      **Not** the shape of the segmentation map(s) array, unless it is
      identical to the image shape (note the likely difference between the
      arrays in the number of channels).
      This is expected to be ``(H, W)`` or ``(H, W, C)`` with ``C`` usually
      being ``3``.
      If there is no corresponding image, use ``(H_arr, W_arr)`` instead,
      where ``H_arr`` is the height of the segmentation map(s) array
      (analogous ``W_arr``).
  
  nb_classes : None or int, optional
      Deprecated.
class_docstr_tok: ["Object","representing","a","segmentation","map","associated","with","an","image",".","Attributes","--","--","--","--","--","DEFAULT_SEGMENT_COLORS",":","list","of","tuple","of","int","Standard","RGB","colors","to","use","during","drawing",",","ordered","by","class","index",".","Parameters","--","--","--","--","--","arr",":","(","H",",","W",")","ndarray","or","(","H",",","W",",","C",")","ndarray","Array","representing","the","segmentation","map","(","s",")",".","May","have","dtypes","bool",",","int","or","uint",".","shape",":","tuple","of","int","Shape","of","the","image","on","which","the","segmentation","map","(","s",")","is\/are","placed",".","*","*","Not","*","*","the","shape","of","the","segmentation","map","(","s",")","array",",","unless","it","is","identical","to","the","image","shape","(","note","the","likely","difference","between","the","arrays","in","the","number","of","channels",")",".","This","is","expected","to","be","``","(","H",",","W",")","``","or","``","(","H",",","W",",","C",")","``","with","``","C","``","usually","being","``","3","``",".","If","there","is","no","corresponding","image",",","use","``","(","H_arr",",","W_arr",")","``","instead",",","where","``","H_arr","``","is","the","height","of","the","segmentation","map","(","s",")","array","(","analogous","``","W_arr","``",")",".","nb_classes",":","None","or","int",",","optional","Deprecated","."]
docstr: Render the segmentation map as an RGB image.
  
  Parameters
  ----------
  size : None or float or iterable of int or iterable of float, optional
      Size of the rendered RGB image as ``(height, width)``.
      See :func:`~imgaug.imgaug.imresize_single_image` for details.
      If set to ``None``, no resizing is performed and the size of the
      segmentation map array is used.
  
  colors : None or list of tuple of int, optional
      Colors to use. One for each class to draw.
      If ``None``, then default colors will be used.
  
  Returns
  -------
  list of (H,W,3) ndarray
      Rendered segmentation map (dtype is ``uint8``).
      One per ``C`` in the original input array ``(H,W,C)``.
docstr_tok: ["Render","the","segmentation","map","as","an","RGB","image",".","Parameters","--","--","--","--","--","size",":","None","or","float","or","iterable","of","int","or","iterable","of","float",",","optional","Size","of","the","rendered","RGB","image","as","``","(","height",",","width",")","``",".","See",":","func",":","`","~imgaug.imgaug.imresize_single_image","`","for","details",".","If","set","to","``","None","``",",","no","resizing","is","performed","and","the","size","of","the","segmentation","map","array","is","used",".","colors",":","None","or","list","of","tuple","of","int",",","optional","Colors","to","use",".","One","for","each","class","to","draw",".","If","``","None","``",",","then","default","colors","will","be","used",".","Returns","--","--","--","-","list","of","(","H",",","W,3",")","ndarray","Rendered","segmentation","map","(","dtype","is","``","uint8","``",")",".","One","per","``","C","``","in","the","original","input","array","``","(","H",",","W",",","C",")","``","."]
code: def draw(self, size=None, colors=None):
      """
      Render the segmentation map as an RGB image.
  
      Parameters
      ----------
      size : None or float or iterable of int or iterable of float, optional
          Size of the rendered RGB image as ``(height, width)``.
          See :func:`~imgaug.imgaug.imresize_single_image` for details.
          If set to ``None``, no resizing is performed and the size of the
          segmentation map array is used.
  
      colors : None or list of tuple of int, optional
          Colors to use. One for each class to draw.
          If ``None``, then default colors will be used.
  
      Returns
      -------
      list of (H,W,3) ndarray
          Rendered segmentation map (dtype is ``uint8``).
          One per ``C`` in the original input array ``(H,W,C)``.
  
      """
  
      def _handle_sizeval(sizeval, arr_axis_size):
          if sizeval is None:
              return arr_axis_size
          if ia.is_single_float(sizeval):
              return max(int(arr_axis_size * sizeval), 1)
          if ia.is_single_integer(sizeval):
              return sizeval
          raise ValueError(
              "Expected float or int, got %s." % (type(sizeval),)
          )
  
      if size is None:
          size = [size, size]
      elif not ia.is_iterable(size):
          size = [size, size]
  
      height = _handle_sizeval(size[0], self.arr.shape[0])
      width = _handle_sizeval(size[1], self.arr.shape[1])
      image = np.zeros((height, width, 3), dtype=np.uint8)
  
      return self.draw_on_image(
          image,
          alpha=1.0,
          resize="segmentation_map",
          colors=colors,
          draw_background=True,
      )
  
imports: from __future__ import print_function, division, absolute_import
  import numpy
  import six.moves
  from ..None import imgaug
  from ..augmenters import blend
  from .base import IAugmentable
label_desc: Use image node_id 4 for calling the SegmentationMapsOnImage obj's underlying member method code with example usage: obj.draw(size, colors) and returns: self, arr_axis_size, max, sizeval