class_docstr: Video Subsequence Dataset
class_docstr_tok: ["Video","Subsequence","Dataset"]
docstr: Dataset that contains the (image) data and semantic segmentation
  targets for one subsequence of a video sequence.
  
  :param file_paths: List containing the paths to all images files that
      are part of this subsequence.
  :param target_paths: List containing the paths to all target files
      corresponding to the `file_paths`.
  :param segmentation_file: Path to a `segmentation.json` file that
      specifies a mapping from label indices to object
      (or object category) names. Defaults to None, which loads a
      predefined default mapping.
  :param classmap_file: Path to a `classmap.json' file that specifies
      the mapping from object (or object category) names to a
      respective label. Defaults to None, which loads a predefined
      default mapping.
  :param patch_size: Size of the images and target data to be resized to.
      Defaults to (240, 135).
  :param transform: Eventual transformations to be applied to the image
      data.
  :param target_transform: Eventual transformations to be applied to the
      target data.
code: def __init__(
      self,
      file_paths,
      target_paths,
      segmentation_file,
      classmap_file=None,
      patch_size=(240, 135),
      transform=None,
      target_transform=None,
  ):
      """Dataset that contains the (image) data and semantic segmentation
      targets for one subsequence of a video sequence.
  
      :param file_paths: List containing the paths to all images files that
          are part of this subsequence.
      :param target_paths: List containing the paths to all target files
          corresponding to the `file_paths`.
      :param segmentation_file: Path to a `segmentation.json` file that
          specifies a mapping from label indices to object
          (or object category) names. Defaults to None, which loads a
          predefined default mapping.
      :param classmap_file: Path to a `classmap.json' file that specifies
          the mapping from object (or object category) names to a
          respective label. Defaults to None, which loads a predefined
          default mapping.
      :param patch_size: Size of the images and target data to be resized to.
          Defaults to (240, 135).
      :param transform: Eventual transformations to be applied to the image
          data.
      :param target_transform: Eventual transformations to be applied to the
          target data.
      """
      self.file_paths = file_paths
      self.targets = target_paths
      self.segmentation_file = segmentation_file
      self.classmap_file = classmap_file
      self.patch_size = patch_size
      self.transform = transform
      self.target_transform = transform
  
      # Init classmap
      self.classmap = self._load_classmap(
          classmap_file=self.classmap_file
      )
  
      # Init labelmap
      self.labelmap = self._load_labelmap(
          labelmap_file=self.segmentation_file
      )
      return
  
imports: from pathlib import Path
  import glob
  import os
  from typing import List, Optional, Union
  from warnings import warn
  import sys
  import json
  import numpy
  from PIL import Image
  from torch.utils.data import Dataset
  from avalanche.benchmarks.datasets import default_dataset_location
  from avalanche.benchmarks.datasets.endless_cl_sim import endless_cl_sim_data
  from avalanche.benchmarks.datasets.downloadable_dataset import DownloadableDataset
label_desc: Use image node_id 1 to create a new VideoSubSequence object from inherited base classes: Dataset with example: obj = VideoSubSequence(file_paths, target_paths, segmentation_file, classmap_file, patch_size, transform, target_transform)