code: def __init__(self, path_or_io_or_image):
      if isinstance(path_or_io_or_image, (str, IOBase)):
          self.image = Image.open(path_or_io_or_image)
      else:
          self.image = path_or_io_or_image
      bands = self.image.getbands()
      # convert greyscale to rgb
      if len(bands) == 1:
          new_img = Image.new("RGB", self.image.size)
          new_img.paste(self.image)
          f = self.image.filename
          self.image = new_img
          self.image.filename = f
      self.skin_map = []
      self.skin_regions = []
      self.detected_regions = []
      self.merge_regions = []
      self.last_from, self.last_to = -1, -1
      self.result = None
      self.message = None
      self.width, self.height = self.image.size
      self.total_pixels = self.width * self.height
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import copy
  import math
  import time
  from io import IOBase
  from PIL import Image
  from skin_classifier import skin_classifier, Skin
label_desc: Use image node_id 1 to create a new Nude object from inherited base classes: object with example: obj = Nude(path_or_io_or_image)