class_docstr: Action forecasting video data set for EpicKitchen-55 Dataset.
  <https://epic-kitchens.github.io/2019/>
  
  This dataset handles the loading, decoding, and clip sampling for the videos.
class_docstr_tok: ["Action","forecasting","video","data","set","for","EpicKitchen-55","Dataset",".","<","https",":","\/\/epic-kitchens.github.io\/2019\/",">","This","dataset","handles","the","loading",",","decoding",",","and","clip","sampling","for","the","videos","."]
docstr: Args:
      frames_per_clip (int): The number of frames per clip to sample.
      seconds_per_clip (float): The length of each sampled subclip in seconds.
      clip_time_stride (float): The time difference in seconds between the start of
          each input subclip.
      num_input_clips (int): The number of subclips to be included in the video data.
  
  Returns:
      A function that takes in a list of frame indicies and outputs a subsampled list.
docstr_tok: ["Args",":","frames_per_clip","(","int",")",":","The","number","of","frames","per","clip","to","sample",".","seconds_per_clip","(","float",")",":","The","length","of","each","sampled","subclip","in","seconds",".","clip_time_stride","(","float",")",":","The","time","difference","in","seconds","between","the","start","of","each","input","subclip",".","num_input_clips","(","int",")",":","The","number","of","subclips","to","be","included","in","the","video","data",".","Returns",":","A","function","that","takes","in","a","list","of","frame","indicies","and","outputs","a","subsampled","list","."]
code: def _frame_filter_generator(
      frames_per_clip: int,
      seconds_per_clip: float,
      clip_time_stride: float,
      num_input_clips: int,
  ) -> Callable[[List[int]], List[int]]:
      """
      Args:
          frames_per_clip (int): The number of frames per clip to sample.
          seconds_per_clip (float): The length of each sampled subclip in seconds.
          clip_time_stride (float): The time difference in seconds between the start of
              each input subclip.
          num_input_clips (int): The number of subclips to be included in the video data.
  
      Returns:
          A function that takes in a list of frame indicies and outputs a subsampled list.
      """
      time_window_length = (
          seconds_per_clip + (num_input_clips - 1) * clip_time_stride
      )
      desired_frames_per_second = frames_per_clip / seconds_per_clip
  
      def frame_filter(frame_indices: List[int]) -> List[int]:
          num_available_frames_for_all_clips = len(frame_indices)
          available_frames_per_second = (
              num_available_frames_for_all_clips / time_window_length
          )
          intra_clip_sampling_stride = int(
              available_frames_per_second // desired_frames_per_second
          )
          selected_frames = set()
          for i in range(num_input_clips):
              clip_start_index = int(
                  i * clip_time_stride * available_frames_per_second
              )
              for j in range(frames_per_clip):
                  selected_frames.add(
                      clip_start_index + j * intra_clip_sampling_stride
                  )
          return [
              x
              for i, x in enumerate(frame_indices)
              if i in selected_frames
          ]
  
      return frame_filter
  
file_path: pytorchvideo/pytorchvideo/data/epic_kitchen_forecasting.py
imports: from dataclasses import fields
  from enum import Enum
  from typing import Any, Callable, Dict, List, Optional
  import torch
  from pytorchvideo.data.dataset_manifest_utils import EncodedVideoInfo, VideoClipInfo, VideoDatasetType, VideoFrameInfo, VideoInfo
  from pytorchvideo.data.epic_kitchen import ActionData, EpicKitchenDataset
  from pytorchvideo.data.video import Video
label_desc: Use image node_id 3 for calling the EpicKitchenForecasting obj's underlying member method code with example usage: obj._frame_filter_generator(frames_per_clip, seconds_per_clip, clip_time_stride, num_input_clips) and returns: frame_filter, unknown