docstr: Args:
      dataset_cfg: EasyDict() with key
          POINT_CLOUD_RANGE
          POINT_FEATURE_ENCODING
          DATA_PROCESSOR
      class_names: list of str
      root_path: path with all info for a scene_id
          color, color_2det, depth, label, vote, ...
      gt_path: xxx.json
          just to get correct floor height
      an2d_root: path to scene_id.json
          or None
      logger:
      frame_rate: int
      subsample: int
      world_coordinate: bool
docstr_tok: ["Args",":","dataset_cfg",":","EasyDict","(",")","with","key","POINT_CLOUD_RANGE","POINT_FEATURE_ENCODING","DATA_PROCESSOR","class_names",":","list","of","str","root_path",":","path","with","all","info","for","a","scene_id","color",",","color_2det",",","depth",",","label",",","vote",",","...","gt_path",":","xxx.json","just","to","get","correct","floor","height","an2d_root",":","path","to","scene_id.json","or","None","logger",":","frame_rate",":","int","subsample",":","int","world_coordinate",":","bool"]
code: def __init__(
      self,
      dataset_cfg,
      class_names,
      root_path=None,
      gt_path=None,
      logger=None,
      frame_rate=1,
      with_color_image=True,
      subsample=2,
      world_coordinate=True,
  ):
      """
      Args:
          dataset_cfg: EasyDict() with key
              POINT_CLOUD_RANGE
              POINT_FEATURE_ENCODING
              DATA_PROCESSOR
          class_names: list of str
          root_path: path with all info for a scene_id
              color, color_2det, depth, label, vote, ...
          gt_path: xxx.json
              just to get correct floor height
          an2d_root: path to scene_id.json
              or None
          logger:
          frame_rate: int
          subsample: int
          world_coordinate: bool
      """
      self.root_path = root_path
  
      # pipeline does box residual coding here
      self.num_class = len(class_names)
  
      self.dc = ARKitDatasetConfig()
  
      depth_folder = os.path.join(self.root_path, "lowres_depth")
      if not os.path.exists(depth_folder):
          self.frame_ids = []
      else:
          depth_images = sorted(
              glob.glob(os.path.join(depth_folder, "*.png"))
          )
          self.frame_ids = [os.path.basename(x) for x in depth_images]
          self.frame_ids = [
              x.split(".png")[0].split("_")[1] for x in self.frame_ids
          ]
          self.video_id = depth_folder.split("/")[-3]
          self.frame_ids = [x for x in self.frame_ids]
          self.frame_ids.sort()
          self.intrinsics = {}
  
      traj_file = os.path.join(self.root_path, "lowres_wide.traj")
      with open(traj_file) as f:
          self.traj = f.readlines()
      # convert traj to json dict
      poses_from_traj = {}
      for line in self.traj:
          traj_timestamp = line.split(" ")[0]
          poses_from_traj[
              f"{round(float(traj_timestamp), 3):.3f}"
          ] = TrajStringToMatrix(line)[1].tolist()
  
      if os.path.exists(traj_file):
          # self.poses = json.load(open(traj_file))
          self.poses = poses_from_traj
      else:
          self.poses = {}
  
      # get intrinsics
      for frame_id in self.frame_ids:
          intrinsic_fn = os.path.join(
              self.root_path,
              "lowres_wide_intrinsics",
              f"{self.video_id}_{frame_id}.pincam",
          )
          if not os.path.exists(intrinsic_fn):
              intrinsic_fn = os.path.join(
                  self.root_path,
                  "lowres_wide_intrinsics",
                  f"{self.video_id}_{float(frame_id) - 0.001:.3f}.pincam",
              )
          if not os.path.exists(intrinsic_fn):
              intrinsic_fn = os.path.join(
                  self.root_path,
                  "lowres_wide_intrinsics",
                  f"{self.video_id}_{float(frame_id) + 0.001:.3f}.pincam",
              )
          if not os.path.exists(intrinsic_fn):
              print("frame_id", frame_id)
              print(intrinsic_fn)
          self.intrinsics[frame_id] = st2_camera_intrinsics(
              intrinsic_fn
          )
  
      # # intrinsic_fn = os.path.join(self.root_path, "camera.txt")
      # intrinsic_fn = os.path.join(self.root_path, "color.pincam")
      # if os.path.exists(intrinsic_fn):
      #     self.intrinsics = st2_camera_intrinsics(intrinsic_fn)
      # else:
      #     self.intrinsics = None
  
      self.frame_rate = frame_rate
      self.subsample = subsample
      self.with_color_image = with_color_image
      self.world_coordinate = world_coordinate
  
      if gt_path is not None and os.path.exists(gt_path):
          skipped, gt_corners, gt_centers, gt_sizes, _, _ = extract_gt(
              gt_path
          )
          self.gt_corners = gt_corners
          self.gt_centers = gt_centers
          self.gt_sizes = gt_sizes
      else:
          self.gt_corners = None
          self.gt_centers = None
          self.gt_sizes = None
  
file_path: ARKitScenes/threedod/benchmark_scripts/utils/tenFpsDataLoader.py
imports: import copy
  import cv2
  import glob
  import json
  import numpy
  import os
  from .box_utils import compute_box_3d, boxes_to_corners_3d, get_size
  from .rotation import convert_angle_axis_to_matrix3
  from .taxonomy import class_names, ARKitDatasetConfig
label_desc: Use image node_id 1 to create a new TenFpsDataLoader object from inherited base classes: object with example: obj = TenFpsDataLoader(dataset_cfg, class_names, root_path, gt_path, logger, frame_rate, with_color_image, subsample, world_coordinate)