class_docstr: The Places365-Standard Dataset, in low resolution format only.
  Produces BGR images of shape (256, 256, 3) in range [0, 255].
docstr: Args:
      dir: path to the Places365-Standard dataset in its "easy directory
          structure".  See http://places2.csail.mit.edu/download.html
      name: one of "train" or "val"
      shuffle (bool): shuffle the dataset. Defaults to True if name=='train'.
code: def __init__(self, dir, name, shuffle=None):
      """
      Args:
          dir: path to the Places365-Standard dataset in its "easy directory
              structure".  See http://places2.csail.mit.edu/download.html
          name: one of "train" or "val"
          shuffle (bool): shuffle the dataset. Defaults to True if name=='train'.
      """
      assert name in ["train", "val"], name
      dir = os.path.expanduser(dir)
      assert os.path.isdir(dir), dir
      self.name = name
      if shuffle is None:
          shuffle = name == "train"
      self.shuffle = shuffle
  
      label_file = os.path.join(dir, name + ".txt")
      all_files = []
      labels = set()
      with open(label_file) as f:
          for line in f:
              filepath = os.path.join(dir, line.strip())
              line = line.strip().split("/")
              label = line[1]
              all_files.append((filepath, label))
              labels.add(label)
      self._labels = sorted(labels)
      # class ids are sorted alphabetically:
      # https://github.com/CSAILVision/places365/blob/master/categories_places365.txt
      labelmap = {label: id for id, label in enumerate(self._labels)}
      self._files = [(path, labelmap[x]) for path, x in all_files]
      logger.info(
          "Found {} images in {}.".format(len(self._files), label_file)
      )
  
file_path: tensorpack/tensorpack/dataflow/dataset/places.py
imports: import os
  import numpy
  from ...utils import logger
  from ..base import RNGDataFlow
label_desc: Use image node_id 1 to create a new Places365Standard object from inherited base classes: RNGDataFlow with example: obj = Places365Standard(dir, name, shuffle)