class_docstr: Basic wrapper around several `DataLoader`s with factory methods for computer vision problems
class_docstr_tok: ["Basic","wrapper","around","several","`","DataLoader","`","s","with","factory","methods","for","computer","vision","problems"]
docstr: Create from imagenet style dataset in `path` with `train` and `valid` subfolders (or provide `valid_pct`)
docstr_tok: ["Create","from","imagenet","style","dataset","in","`","path","`","with","`","train","`","and","`","valid","`","subfolders","(","or","provide","`","valid_pct","`",")"]
code: def from_folder(
      cls,
      path,
      train="train",
      valid="valid",
      valid_pct=None,
      seed=None,
      vocab=None,
      item_tfms=None,
      batch_tfms=None,
      img_cls=PILImage,
      **kwargs,
  ):
      "Create from imagenet style dataset in `path` with `train` and `valid` subfolders (or provide `valid_pct`)"
      splitter = (
          GrandparentSplitter(train_name=train, valid_name=valid)
          if valid_pct is None
          else RandomSplitter(valid_pct, seed=seed)
      )
      get_items = (
          get_image_files
          if valid_pct
          else partial(get_image_files, folders=[train, valid])
      )
      dblock = DataBlock(
          blocks=(ImageBlock(img_cls), CategoryBlock(vocab=vocab)),
          get_items=get_items,
          splitter=splitter,
          get_y=parent_label,
          item_tfms=item_tfms,
          batch_tfms=batch_tfms,
      )
      return cls.from_dblock(dblock, path, path=path, **kwargs)
  
imports: from __future__ import annotations
  from ..torch_basics import *
  from ..data.all import *
  from .core import *
  import types
label_desc: Use image node_id 1 for calling the ImageDataLoaders obj's underlying member method code with example usage: obj.from_folder(cls, path, train, valid, valid_pct, seed, vocab, item_tfms, batch_tfms, img_cls) and returns: cls