class_docstr: ImageClassification dataset as DataFrame.
  
  Parameters
  ----------
  data : the input for pd.DataFrame
      The input data.
  classes : list of str, optional
      The class synsets for this dataset, if `None`, it will infer from the data.
  image_column : str, default is 'image'
      The name of the column for image paths.
  label_column : str, default is 'label'
      The name for the label column, leave it as is if no label column is available. Note that
      in such case you won't be able to train with this dataset, but can still visualize the images.
class_docstr_tok: ["ImageClassification","dataset","as","DataFrame",".","Parameters","--","--","--","--","--","data",":","the","input","for","pd.DataFrame","The","input","data",".","classes",":","list","of","str",",","optional","The","class","synsets","for","this","dataset",",","if","`","None","`",",","it","will","infer","from","the","data",".","image_column",":","str",",","default","is","'image'","The","name","of","the","column","for","image","paths",".","label_column",":","str",",","default","is","'label'","The","name","for","the","label","column",",","leave","it","as","is","if","no","label","column","is","available",".","Note","that","in","such","case","you","wo","n't","be","able","to","train","with","this","dataset",",","but","can","still","visualize","the","images","."]
docstr: Method for loading (already) splited datasets under root.
  like::
      root/train/car/0001.jpg
      root/train/car/xxxa.jpg
      root/train/car/yyyb.jpg
      root/val/bus/123.png
      root/test/bus/023.jpg
      root/test/bus/wwww.jpg
  will be loaded into three splits, with 3/1/2 images, respectively.
  You can specify the sub-folder names of `train`/`val`/`test` individually. If one particular sub-folder is not
  found, the corresponding returned dataset will be `None`.
  Note: if your existing dataset isn't split into such format, please use `from_folder` function and apply
  random splitting using `random_split` function afterwards.
  
  Example:
  >>> train_data, val_data, test_data = ImageClassificationDataset.from_folders('./data', val='validation')
  >> assert len(train_data) == 3
  
  
  Parameters
  ----------
  root : str or pathlib.Path or url
      The root dir for the entire dataset, if url is provided, the data will be downloaded and extracted.
  train : str
      The sub-folder name for training images.
  val : str
      The sub-folder name for training images.
  test : str
      The sub-folder name for training images.
  exts : iterable of str
      The supported image extensions when searching for sub-sub-directories.
  
  Returns
  -------
  (train_data, val_data, test_data) of type tuple(ImageClassificationDataset, )
      splited datasets, can be `None` if no sub-directory found.
code: def from_folders(
      cls,
      root,
      train="train",
      val="val",
      test="test",
      exts=(".jpg", ".jpeg", ".png"),
      no_class=False,
  ):
      """Method for loading (already) splited datasets under root.
      like::
          root/train/car/0001.jpg
          root/train/car/xxxa.jpg
          root/train/car/yyyb.jpg
          root/val/bus/123.png
          root/test/bus/023.jpg
          root/test/bus/wwww.jpg
      will be loaded into three splits, with 3/1/2 images, respectively.
      You can specify the sub-folder names of `train`/`val`/`test` individually. If one particular sub-folder is not
      found, the corresponding returned dataset will be `None`.
      Note: if your existing dataset isn't split into such format, please use `from_folder` function and apply
      random splitting using `random_split` function afterwards.
  
      Example:
      >>> train_data, val_data, test_data = ImageClassificationDataset.from_folders('./data', val='validation')
      >> assert len(train_data) == 3
  
  
      Parameters
      ----------
      root : str or pathlib.Path or url
          The root dir for the entire dataset, if url is provided, the data will be downloaded and extracted.
      train : str
          The sub-folder name for training images.
      val : str
          The sub-folder name for training images.
      test : str
          The sub-folder name for training images.
      exts : iterable of str
          The supported image extensions when searching for sub-sub-directories.
  
      Returns
      -------
      (train_data, val_data, test_data) of type tuple(ImageClassificationDataset, )
          splited datasets, can be `None` if no sub-directory found.
  
      """
      if is_url(root):
          root = url_data(root)
      if isinstance(root, Path):
          assert root.exists(), "{} not exist".format(str(root))
          root = str(root.resolve())
      assert isinstance(root, str)
      root = os.path.abspath(os.path.expanduser(root))
      train_root = os.path.join(root, train)
      val_root = os.path.join(root, val)
      test_root = os.path.join(root, test)
      empty = cls({"image": [], "label": []})
      train_data, val_data, test_data = empty, empty, empty
      # train
      if os.path.isdir(train_root):
          train_data = cls.from_folder(
              train_root, exts=exts, no_class=no_class
          )
      else:
          raise ValueError(
              "Train split does not exist: {}".format(train)
          )
      # val
      if os.path.isdir(val_root):
          val_data = cls.from_folder(
              val_root, exts=exts, no_class=no_class
          )
      # test
      if os.path.isdir(test_root):
          test_data = cls.from_folder(
              test_root, exts=exts, no_class=no_class
          )
  
      # check synsets, val/test synsets can be subsets(order matters!) or exact matches of train synset
      if len(val_data) and not _check_synsets(
          train_data.classes, val_data.classes
      ):
          warnings.warn(
              "Train/val synsets does not match: {} vs {}".format(
                  train_data.classes, val_data.classes
              )
          )
      if len(test_data) and not _check_synsets(
          train_data.classes, test_data.classes
      ):
          warnings.warn(
              "Train/val synsets does not match: {} vs {}".format(
                  train_data.classes, test_data.classes
              )
          )
  
      return train_data, val_data, test_data
  
imports: import logging
  import os
  from pathlib import Path
  import warnings
  import numpy
  import pandas
  import matplotlib.pyplot
  from PIL import Image
  import cv2
  from ..data import is_url, url_data
  from ...utils.filesystem import import_try_install
  from ...utils.bbox import bbox_xywh_to_xyxy, bbox_clip_xyxy
label_desc: Use image node_id 10 for calling the ImageClassificationDataset obj's underlying member method code with example usage: obj.from_folders(cls, root, train, val, test, exts, no_class) and returns: train_data,  val_data,  test_data