class_docstr: Base video dataset for VID, MOT and VIS tasks.
class_docstr_tok: ["Base","video","dataset","for","VID",",","MOT","and","VIS","tasks","."]
docstr: Following image detection, we provide this interface function. Get
  category ids by video index and frame index.
  
  Args:
      index: The index of the dataset. It support two kinds of inputs:
          Tuple:
              video_idx (int): Index of video.
              frame_idx (int): Index of frame.
          Int: Index of video.
  
  Returns:
      List[int]: All categories in the image of specified video index
      and frame index.
docstr_tok: ["Following","image","detection",",","we","provide","this","interface","function",".","Get","category","ids","by","video","index","and","frame","index",".","Args",":","index",":","The","index","of","the","dataset",".","It","support","two","kinds","of","inputs",":","Tuple",":","video_idx","(","int",")",":","Index","of","video",".","frame_idx","(","int",")",":","Index","of","frame",".","Int",":","Index","of","video",".","Returns",":","List","[","int","]",":","All","categories","in","the","image","of","specified","video","index","and","frame","index","."]
code: def get_cat_ids(self, index) -> List[int]:
      """Following image detection, we provide this interface function. Get
      category ids by video index and frame index.
  
      Args:
          index: The index of the dataset. It support two kinds of inputs:
              Tuple:
                  video_idx (int): Index of video.
                  frame_idx (int): Index of frame.
              Int: Index of video.
  
      Returns:
          List[int]: All categories in the image of specified video index
          and frame index.
      """
      if isinstance(index, tuple):
          assert (
              len(index) == 2
          ), f"Expect the length of index is 2, but got {len(index)}"
          video_idx, frame_idx = index
          instances = self.get_data_info(video_idx)["images"][
              frame_idx
          ]["instances"]
          return [instance["bbox_label"] for instance in instances]
      else:
          cat_ids = []
          for img in self.get_data_info(index)["images"]:
              for instance in img["instances"]:
                  cat_ids.append(instance["bbox_label"])
          return cat_ids
  
file_path: mmdetection/mmdet/datasets/base_video_dataset.py
imports: import copy
  import os.path
  from collections import defaultdict
  from typing import Any, List, Tuple
  import mmengine.fileio
  from mmengine.dataset import BaseDataset
  from mmengine.logging import print_log
  from mmdet.datasets.api_wrappers import COCO
  from mmdet.registry import DATASETS
label_desc: Use image node_id 6 for calling the BaseVideoDataset obj's underlying member method code with example usage: obj.get_cat_ids(index) and returns: unknown, cat_ids