class_docstr: Dataset for GTEA, ADL and KITCHEN.
  
  Args:
      root_path (string): The root path in which video folders lie.
      annotationfile_path (string): The annotation file containing one row per video sample.
      dataset_split (string): Split type (train or test)
      image_modality (string): Image modality (RGB or Optical Flow)
      num_segments (int): The number of segments the video should be divided into to sample frames from.
      frames_per_segment (int): The number of frames that should be loaded per segment.
      imagefile_template (string): The image filename template.
      transform (Compose): Video transform.
      random_shift (bool): Whether the frames from each segment should be taken consecutively starting from
                      the center(False) of the segment, or consecutively starting from
                      a random(True) location inside the segment range.
      test_mode (bool): Whether this is a test dataset. If so, chooses frames from segments with random_shift=False.
      n_classes (int): The number of classes.
class_docstr_tok: ["Dataset","for","GTEA",",","ADL","and","KITCHEN",".","Args",":","root_path","(","string",")",":","The","root","path","in","which","video","folders","lie",".","annotationfile_path","(","string",")",":","The","annotation","file","containing","one","row","per","video","sample",".","dataset_split","(","string",")",":","Split","type","(","train","or","test",")","image_modality","(","string",")",":","Image","modality","(","RGB","or","Optical","Flow",")","num_segments","(","int",")",":","The","number","of","segments","the","video","should","be","divided","into","to","sample","frames","from",".","frames_per_segment","(","int",")",":","The","number","of","frames","that","should","be","loaded","per","segment",".","imagefile_template","(","string",")",":","The","image","filename","template",".","transform","(","Compose",")",":","Video","transform",".","random_shift","(","bool",")",":","Whether","the","frames","from","each","segment","should","be","taken","consecutively","starting","from","the","center","(","False",")","of","the","segment",",","or","consecutively","starting","from","a","random","(","True",")","location","inside","the","segment","range",".","test_mode","(","bool",")",":","Whether","this","is","a","test","dataset",".","If","so",",","chooses","frames","from","segments","with","random_shift=False",".","n_classes","(","int",")",":","The","number","of","classes","."]
code: def __init__(
      self,
      root_path: str,
      annotationfile_path: str,
      dataset_split: str,
      image_modality: str,
      num_segments: int = 1,
      frames_per_segment: int = 16,
      imagefile_template: str = "img_{:010d}.jpg",
      transform=None,
      random_shift: bool = True,
      test_mode: bool = False,
      n_classes: int = 8,
  ):
      self.root_path = Path(root_path)
      self.image_modality = image_modality
      self.dataset = dataset_split
      self.n_classes = n_classes
      self.img_path = self.root_path.joinpath(self.image_modality)
      super(BasicVideoDataset, self).__init__(
          root_path,
          annotationfile_path,
          image_modality,
          num_segments,
          frames_per_segment,
          imagefile_template,
          transform,
          random_shift,
          test_mode,
      )
  
file_path: pykale/kale/loaddata/video_datasets.py
imports: import logging
  import math
  import os
  from pathlib import Path
  import pandas
  from PIL import Image
  from kale.loaddata.videos import VideoFrameDataset, VideoRecord
label_desc: Use image node_id 1 to create a new BasicVideoDataset object from inherited base classes: VideoFrameDataset with example: obj = BasicVideoDataset(root_path, annotationfile_path, dataset_split, image_modality, num_segments, frames_per_segment, imagefile_template, transform, random_shift, test_mode, n_classes)