class_docstr: The ``ImageClassificationData`` class is a :class:`~flash.core.data.data_module.DataModule` with a set of
  classmethods for loading data for image classification.
docstr: Creates a :class:`~flash.core.data.data_module.DataModule` object from the given export file and data
  directory using the :class:`~flash.core.data.io.input.Input` of name
  :attr:`~flash.core.data.io.input.InputFormat.FOLDERS` from the passed or constructed
  :class:`~flash.core.data.io.input_transform.InputTransform`.
  
  Args:
      export_json: path to label studio export file
      train_export_json: path to label studio export file for train set.(overrides export_json if specified)
      val_export_json: path to label studio export file for validation
      test_export_json: path to label studio export file for test
      predict_export_json: path to label studio export file for predict
      data_folder: path to label studio data folder
      train_data_folder: path to label studio data folder for train data set.(overrides data_folder if specified)
      val_data_folder: path to label studio data folder for validation data
      test_data_folder: path to label studio data folder for test data
      predict_data_folder: path to label studio data folder for predict data
      input_cls: The :class:`~flash.core.data.io.input.Input` type to use for loading the data.
      transform: The :class:`~flash.core.data.io.input_transform.InputTransform` type to use.
      transform_kwargs: Dict of keyword arguments to be provided when instantiating the transforms.
      val_split: The ``val_split`` argument to pass to the :class:`~flash.core.data.data_module.DataModule`.
      multi_label: Whether the labels are multi encoded
      data_module_kwargs: Additional keyword arguments to use when constructing the datamodule.
  
  Returns:
      The constructed data module.
  
  Examples::
  
      data_module = DataModule.from_labelstudio(
          export_json='project.json',
          data_folder='label-studio/media/upload',
          val_split=0.8,
      )
code: def from_labelstudio(
      cls,
      export_json: str = None,
      train_export_json: str = None,
      val_export_json: str = None,
      test_export_json: str = None,
      predict_export_json: str = None,
      data_folder: str = None,
      train_data_folder: str = None,
      val_data_folder: str = None,
      test_data_folder: str = None,
      predict_data_folder: str = None,
      input_cls: Type[Input] = LabelStudioImageClassificationInput,
      transform: INPUT_TRANSFORM_TYPE = ImageClassificationInputTransform,
      transform_kwargs: Optional[Dict] = None,
      val_split: Optional[float] = None,
      multi_label: Optional[bool] = False,
      **data_module_kwargs: Any,
  ) -> "ImageClassificationData":
      """Creates a :class:`~flash.core.data.data_module.DataModule` object from the given export file and data
      directory using the :class:`~flash.core.data.io.input.Input` of name
      :attr:`~flash.core.data.io.input.InputFormat.FOLDERS` from the passed or constructed
      :class:`~flash.core.data.io.input_transform.InputTransform`.
  
      Args:
          export_json: path to label studio export file
          train_export_json: path to label studio export file for train set.(overrides export_json if specified)
          val_export_json: path to label studio export file for validation
          test_export_json: path to label studio export file for test
          predict_export_json: path to label studio export file for predict
          data_folder: path to label studio data folder
          train_data_folder: path to label studio data folder for train data set.(overrides data_folder if specified)
          val_data_folder: path to label studio data folder for validation data
          test_data_folder: path to label studio data folder for test data
          predict_data_folder: path to label studio data folder for predict data
          input_cls: The :class:`~flash.core.data.io.input.Input` type to use for loading the data.
          transform: The :class:`~flash.core.data.io.input_transform.InputTransform` type to use.
          transform_kwargs: Dict of keyword arguments to be provided when instantiating the transforms.
          val_split: The ``val_split`` argument to pass to the :class:`~flash.core.data.data_module.DataModule`.
          multi_label: Whether the labels are multi encoded
          data_module_kwargs: Additional keyword arguments to use when constructing the datamodule.
  
      Returns:
          The constructed data module.
  
      Examples::
  
          data_module = DataModule.from_labelstudio(
              export_json='project.json',
              data_folder='label-studio/media/upload',
              val_split=0.8,
          )
  
      """
  
      (
          train_data,
          val_data,
          test_data,
          predict_data,
      ) = _parse_labelstudio_arguments(
          export_json=export_json,
          train_export_json=train_export_json,
          val_export_json=val_export_json,
          test_export_json=test_export_json,
          predict_export_json=predict_export_json,
          data_folder=data_folder,
          train_data_folder=train_data_folder,
          val_data_folder=val_data_folder,
          test_data_folder=test_data_folder,
          predict_data_folder=predict_data_folder,
          val_split=val_split,
          multi_label=multi_label,
      )
  
      ds_kw = {}
  
      train_input = input_cls(
          RunningStage.TRAINING, train_data, **ds_kw
      )
      ds_kw["parameters"] = getattr(train_input, "parameters", None)
  
      return cls(
          train_input,
          input_cls(RunningStage.VALIDATING, val_data, **ds_kw),
          input_cls(RunningStage.TESTING, val_data, **ds_kw),
          input_cls(RunningStage.PREDICTING, predict_data, **ds_kw),
          transform=transform,
          transform_kwargs=transform_kwargs,
          **data_module_kwargs,
      )
  
imports: from typing import Any, Callable, Collection, Dict, List, Optional, Sequence, Tuple, Type, Union
  import numpy
  import pandas
  from torch import Tensor
  from torch.utils.data import Dataset
  from flash.core.data.base_viz import BaseVisualization
  from flash.core.data.callback import BaseDataFetcher
  from flash.core.data.data_module import DataModule, DatasetInput
  from flash.core.data.io.input import DataKeys, Input
  from flash.core.data.io.input_transform import INPUT_TRANSFORM_TYPE
  from flash.core.data.utilities.classification import TargetFormatter
  from flash.core.data.utilities.paths import PATH_TYPE
  from flash.core.integrations.labelstudio.input import LabelStudioImageClassificationInput, _parse_labelstudio_arguments
  from flash.core.utilities.imports import _FIFTYONE_AVAILABLE, _MATPLOTLIB_AVAILABLE, _TOPIC_IMAGE_AVAILABLE, Image, requires
  from flash.core.utilities.stages import RunningStage
  from flash.image.classification.input import ImageClassificationCSVInput, ImageClassificationDataFrameInput, ImageClassificationFiftyOneInput, ImageClassificationFilesInput, ImageClassificationFolderInput, ImageClassificationImageInput, ImageClassificationNumpyInput, ImageClassificationTensorInput
  from flash.image.classification.input_transform import ImageClassificationInputTransform
label_desc: Use image node_id 9 for calling the ImageClassificationData obj's underlying member method code with example usage: obj.from_labelstudio(cls, export_json, train_export_json, val_export_json, test_export_json, predict_export_json, data_folder, train_data_folder, val_data_folder, test_data_folder, predict_data_folder, input_cls, transform, transform_kwargs, val_split, multi_label) and returns: cls