class_docstr: Dataset for EPIC-Kitchen.
class_docstr_tok: ["Dataset","for","EPIC-Kitchen","."]
code: def _load_image(self, directory, idx):
      if self.image_modality == "rgb":
          return [
              Image.open(
                  os.path.join(
                      directory, self.imagefile_template.format(idx)
                  )
              ).convert("RGB")
          ]
      elif self.image_modality == "flow":
          idx = math.ceil(idx / 2) - 1 if idx > 2 else 1
          u_img = Image.open(
              os.path.join(
                  directory, "u", self.imagefile_template.format(idx)
              )
          ).convert("L")
          v_img = Image.open(
              os.path.join(
                  directory, "v", self.imagefile_template.format(idx)
              )
          ).convert("L")
          return [u_img, v_img]
      else:
          raise RuntimeError(
              "Input modality is not in [rgb, flow, joint]. Current is {}".format(
                  self.image_modality
              )
          )
  
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 3 for calling the EPIC obj's underlying member method code with example usage: obj._load_image(directory, idx) and returns: list, list