class_docstr: Dataset used to parallelize the transformation of the dataset via a DataLoader
class_docstr_tok: ["Dataset","used","to","parallelize","the","transformation","of","the","dataset","via","a","DataLoader"]
code: def __init__(self, input_path: str, output_path: str, train: bool):
      self.input_path = input_path
      self.output_path = output_path
      self.train = train
      self.images = []
      self.targets = []
      self.labels = sorted(os.listdir(self.input_path))
      split_generator = random.Random(42)
  
      # There is no train/val split in the RESISC45 dataset, so we have to create it
      for i, label in enumerate(self.labels):
          print(f"{i} -> {label}")
          label_path = os.path.join(self.input_path, label)
          files = sorted(os.listdir(label_path))
          split_generator.shuffle(files)
          train_samples = int(self.TRAIN_SPLIT_PERCENT * len(files))
          test_samples = int(self.TEST_SPLIT_PERCENT * len(files))
          if train:
              self.images.extend(files[:train_samples])
              self.targets.extend([i] * train_samples)
          else:
              self.images.extend(
                  files[train_samples : train_samples + test_samples]
              )
              self.targets.extend([i] * test_samples)
  
file_path: vissl/extra_scripts/datasets/create_resisc45_data_files.py
imports: import argparse
  import os
  import random
  import shutil
  from torch.utils.data import DataLoader
  from tqdm import tqdm
label_desc: Use image node_id 1 to create a new _RESISC45 object  with example: obj = _RESISC45(input_path, output_path, train)