class_docstr: ImageSet wraps a set of ImageFeature
docstr: Read images as Image Set
  if sc is defined, Read image as DistributedImageSet from local file system or HDFS
  if sc is null, Read image as LocalImageSet from local file system
  :param path path to read images
  if sc is defined, path can be local or HDFS. Wildcard character are supported.
  if sc is null, path is local directory/image file/image file with wildcard character
  
  if withLabel is set to true, path should be a directory that have two levels. The
  first level is class folders, and the second is images. All images belong to a same
  class should be put into the same class folder. So each image in the path is labeled by the
  folder it belongs.
  
  :param sc SparkContext
  :param min_partitions A suggestion value of the minimal splitting number for input data.
  :param resize_height height after resize, by default is -1 which will not resize the image
  :param resize_width width after resize, by default is -1 which will not resize the image
  :param image_codec specifying the color type of a loaded image, same as in OpenCV.imread.
         By default is Imgcodecs.CV_LOAD_IMAGE_UNCHANGED(-1)
  :param with_label whether to treat folders in the path as image classification labels
         and read the labels into ImageSet.
  :param one_based_label whether to use one based label
  :return ImageSet
docstr_tok: ["Read","images","as","Image","Set","if","sc","is","defined",",","Read","image","as","DistributedImageSet","from","local","file","system","or","HDFS","if","sc","is","null",",","Read","image","as","LocalImageSet","from","local","file","system",":","param","path","path","to","read","images","if","sc","is","defined",",","path","can","be","local","or","HDFS",".","Wildcard","character","are","supported",".","if","sc","is","null",",","path","is","local","directory\/image","file\/image","file","with","wildcard","character","if","withLabel","is","set","to","true",",","path","should","be","a","directory","that","have","two","levels",".","The","first","level","is","class","folders",",","and","the","second","is","images",".","All","images","belong","to","a","same","class","should","be","put","into","the","same","class","folder",".","So","each","image","in","the","path","is","labeled","by","the","folder","it","belongs",".",":","param","sc","SparkContext",":","param","min_partitions","A","suggestion","value","of","the","minimal","splitting","number","for","input","data",".",":","param","resize_height","height","after","resize",",","by","default","is","-1","which","will","not","resize","the","image",":","param","resize_width","width","after","resize",",","by","default","is","-1","which","will","not","resize","the","image",":","param","image_codec","specifying","the","color","type","of","a","loaded","image",",","same","as","in","OpenCV.imread",".","By","default","is","Imgcodecs.CV_LOAD_IMAGE_UNCHANGED","(","-1",")",":","param","with_label","whether","to","treat","folders","in","the","path","as","image","classification","labels","and","read","the","labels","into","ImageSet",".",":","param","one_based_label","whether","to","use","one","based","label",":","return","ImageSet"]
code: def read(
      cls,
      path,
      sc=None,
      min_partitions=1,
      resize_height=-1,
      resize_width=-1,
      image_codec=-1,
      with_label=False,
      one_based_label=True,
      bigdl_type="float",
  ):
      """
      Read images as Image Set
      if sc is defined, Read image as DistributedImageSet from local file system or HDFS
      if sc is null, Read image as LocalImageSet from local file system
      :param path path to read images
      if sc is defined, path can be local or HDFS. Wildcard character are supported.
      if sc is null, path is local directory/image file/image file with wildcard character
  
      if withLabel is set to true, path should be a directory that have two levels. The
      first level is class folders, and the second is images. All images belong to a same
      class should be put into the same class folder. So each image in the path is labeled by the
      folder it belongs.
  
      :param sc SparkContext
      :param min_partitions A suggestion value of the minimal splitting number for input data.
      :param resize_height height after resize, by default is -1 which will not resize the image
      :param resize_width width after resize, by default is -1 which will not resize the image
      :param image_codec specifying the color type of a loaded image, same as in OpenCV.imread.
             By default is Imgcodecs.CV_LOAD_IMAGE_UNCHANGED(-1)
      :param with_label whether to treat folders in the path as image classification labels
             and read the labels into ImageSet.
      :param one_based_label whether to use one based label
      :return ImageSet
      """
      return ImageSet(
          jvalue=callZooFunc(
              bigdl_type,
              "readImageSet",
              path,
              sc,
              min_partitions,
              resize_height,
              resize_width,
              image_codec,
              with_label,
              one_based_label,
          )
      )
  
imports: from bigdl.dllib.feature.transform.vision.image import ImageFrame
  from bigdl.dllib.utils.common import *
  from bigdl.dllib.utils.file_utils import callZooFunc
  from bigdl.dllib.utils.log4Error import *
label_desc: Use image node_id 5 for calling the ImageSet obj's underlying member method code with example usage: obj.read(cls, path, sc, min_partitions, resize_height, resize_width, image_codec, with_label, one_based_label, bigdl_type) and returns: ImageSet