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: A dataset for loading image files stored in a folder structure.
  like::
      root/car/0001.jpg
      root/car/xxxa.jpg
      root/car/yyyb.jpg
      root/bus/123.png
      root/bus/023.jpg
      root/bus/wwww.jpg
  
  Parameters
  -----------
  root : str or pathlib.Path
      The root folder
  exts : iterable of str
      The image file extensions
code: def from_folder(
      cls, root, exts=(".jpg", ".jpeg", ".png"), no_class=False
  ):
      r"""A dataset for loading image files stored in a folder structure.
      like::
          root/car/0001.jpg
          root/car/xxxa.jpg
          root/car/yyyb.jpg
          root/bus/123.png
          root/bus/023.jpg
          root/bus/wwww.jpg
  
      Parameters
      -----------
      root : str or pathlib.Path
          The root folder
      exts : iterable of str
          The image file extensions
      """
      if is_url(root):
          root = url_data(root)
      synsets = []
      items = {"image": [], "label": []}
      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))
  
      for folder in sorted(os.listdir(root)):
          path = os.path.join(root, folder)
          if not os.path.isdir(path):
              logger.debug(
                  "Ignoring %s, which is not a directory.",
                  path,
                  stacklevel=3,
              )
              continue
          label = len(synsets)
          synsets.append(folder)
          for filename in sorted(os.listdir(path)):
              filename = os.path.join(path, filename)
              ext = os.path.splitext(filename)[1]
              if ext.lower() not in exts:
                  logger.debug(
                      "Ignoring %s of type %s. Only support %s",
                      filename,
                      ext,
                      ", ".join(exts),
                  )
                  continue
              items["image"].append(filename)
              items["label"].append(label)
      return cls(items, classes=synsets, no_class=no_class)
  
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 9 for calling the ImageClassificationDataset obj's underlying member method code with example usage: obj.from_folder(cls, root, exts, no_class) and returns: cls