class_docstr: Egocentric video classification frame-based dataset for
  `DoMSEV <https://www.verlab.dcc.ufmg.br/semantic-hyperlapse/cvpr2018-dataset/>`_
  
  This dataset handles the loading, decoding, and configurable sampling for
  the image frames.
class_docstr_tok: ["Egocentric","video","classification","frame-based","dataset","for","`","DoMSEV","<","https",":","\/\/www.verlab.dcc.ufmg.br\/semantic-hyperlapse\/cvpr2018-dataset\/",">","`","_","This","dataset","handles","the","loading",",","decoding",",","and","configurable","sampling","for","the","image","frames","."]
docstr: Args:
      video_data_manifest_file_path (str):
          The path to a json file outlining the available video data for the
          associated videos.  File must be a csv (w/header) with columns:
          ``{[f.name for f in dataclass_fields(EncodedVideoInfo)]}``
  
          To generate this file from a directory of video frames, see helper
          functions in module: ``pytorchvideo.data.domsev.utils``
  
      video_info_file_path (str):
          Path or URI to manifest with basic metadata of each video.
          File must be a csv (w/header) with columns:
          ``{[f.name for f in dataclass_fields(VideoInfo)]}``
  
      labels_file_path (str):
          Path or URI to manifest with temporal annotations for each video.
          File must be a csv (w/header) with columns:
          ``{[f.name for f in dataclass_fields(LabelData)]}``
  
      dataset_type (VideoDatasetType): The data format in which dataset
          video data is stored (e.g. video frames, encoded video etc).
  
      transform (Optional[Callable[[Dict[str, Any]], Any]]):
          This callable is evaluated on the clip output before the clip is returned.
          It can be used for user-defined preprocessing and augmentations to the clips.
          The clip output format is described in __next__().
  
      multithreaded_io (bool):
          Boolean to control whether io operations are performed across multiple
          threads.
docstr_tok: ["Args",":","video_data_manifest_file_path","(","str",")",":","The","path","to","a","json","file","outlining","the","available","video","data","for","the","associated","videos",".","File","must","be","a","csv","(","w\/header",")","with","columns",":","``","{","[","f.name","for","f","in","dataclass_fields","(","EncodedVideoInfo",")","]","}","``","To","generate","this","file","from","a","directory","of","video","frames",",","see","helper","functions","in","module",":","``","pytorchvideo.data.domsev.utils","``","video_info_file_path","(","str",")",":","Path","or","URI","to","manifest","with","basic","metadata","of","each","video",".","File","must","be","a","csv","(","w\/header",")","with","columns",":","``","{","[","f.name","for","f","in","dataclass_fields","(","VideoInfo",")","]","}","``","labels_file_path","(","str",")",":","Path","or","URI","to","manifest","with","temporal","annotations","for","each","video",".","File","must","be","a","csv","(","w\/header",")","with","columns",":","``","{","[","f.name","for","f","in","dataclass_fields","(","LabelData",")","]","}","``","dataset_type","(","VideoDatasetType",")",":","The","data","format","in","which","dataset","video","data","is","stored","(","e.g",".","video","frames",",","encoded","video","etc",")",".","transform","(","Optional","[","Callable","[","[","Dict","[","str",",","Any","]","]",",","Any","]","]",")",":","This","callable","is","evaluated","on","the","clip","output","before","the","clip","is","returned",".","It","can","be","used","for","user-defined","preprocessing","and","augmentations","to","the","clips",".","The","clip","output","format","is","described","in","__next__","(",")",".","multithreaded_io","(","bool",")",":","Boolean","to","control","whether","io","operations","are","performed","across","multiple","threads","."]
code: def __init__(
      self,
      video_data_manifest_file_path: str,
      video_info_file_path: str,
      labels_file_path: str,
      transform: Optional[Callable[[Dict[str, Any]], Any]] = None,
      multithreaded_io: bool = False,
  ) -> None:
      """
      Args:
          video_data_manifest_file_path (str):
              The path to a json file outlining the available video data for the
              associated videos.  File must be a csv (w/header) with columns:
              ``{[f.name for f in dataclass_fields(EncodedVideoInfo)]}``
  
              To generate this file from a directory of video frames, see helper
              functions in module: ``pytorchvideo.data.domsev.utils``
  
          video_info_file_path (str):
              Path or URI to manifest with basic metadata of each video.
              File must be a csv (w/header) with columns:
              ``{[f.name for f in dataclass_fields(VideoInfo)]}``
  
          labels_file_path (str):
              Path or URI to manifest with temporal annotations for each video.
              File must be a csv (w/header) with columns:
              ``{[f.name for f in dataclass_fields(LabelData)]}``
  
          dataset_type (VideoDatasetType): The data format in which dataset
              video data is stored (e.g. video frames, encoded video etc).
  
          transform (Optional[Callable[[Dict[str, Any]], Any]]):
              This callable is evaluated on the clip output before the clip is returned.
              It can be used for user-defined preprocessing and augmentations to the clips.
              The clip output format is described in __next__().
  
          multithreaded_io (bool):
              Boolean to control whether io operations are performed across multiple
              threads.
      """
      assert video_info_file_path
      assert labels_file_path
      assert video_data_manifest_file_path
  
      ## Populate image frame and metadata data providers ##
      # Maps a image frame ID to an `ImageFrameInfo`
      frames_dict: Dict[
          str, ImageFrameInfo
      ] = ImageDataset._load_images(
          video_data_manifest_file_path,
          video_info_file_path,
          multithreaded_io,
      )
      video_labels: Dict[
          str, List[LabelData]
      ] = load_dataclass_dict_from_csv(
          labels_file_path, LabelData, "video_id", list_per_key=True
      )
      # Maps an image frame ID to the singular frame label
      self._labels_per_frame: Dict[
          str, int
      ] = DomsevFrameDataset._assign_labels_to_frames(
          frames_dict, video_labels
      )
  
      self._user_transform = transform
      self._transform = self._transform_frame
  
      # Shuffle the frames order for iteration
      self._frames = list(frames_dict.values())
      random.shuffle(self._frames)
  
imports: import logging
  import math
  import random
  import time
  from dataclasses import dataclass
  from enum import Enum
  from typing import Any, Callable, Dict, List, Optional, Tuple
  import numpy
  import torch
  from iopath.common.file_io import g_pathmgr
  from PIL import Image
  from pytorchvideo.data.dataset_manifest_utils import ImageDataset, ImageFrameInfo, VideoClipInfo, VideoDataset, VideoDatasetType
  from pytorchvideo.data.utils import DataclassFieldCaster, load_dataclass_dict_from_csv
  from pytorchvideo.data.video import Video
label_desc: Use image node_id 1 to create a new DomsevFrameDataset object from inherited base classes: torch.utils.data with example: obj = DomsevFrameDataset(video_data_manifest_file_path, video_info_file_path, labels_file_path, transform, multithreaded_io)