class_docstr: Dataset for a class of objects, where each datapoint is a SceneInstanceDataset.
class_docstr_tok: ["Dataset","for","a","class","of","objects",",","where","each","datapoint","is","a","SceneInstanceDataset","."]
code: def get_gt_pose(self, scaled=False):
      # Load gt pose without normalization to unit sphere
      camera_dict = np.load(self.cam_file)
      world_mats = [
          camera_dict["world_mat_%d" % idx].astype(np.float32)
          for idx in range(self.n_images)
      ]
      scale_mats = [
          camera_dict["scale_mat_%d" % idx].astype(np.float32)
          for idx in range(self.n_images)
      ]
  
      pose_all = []
      for scale_mat, world_mat in zip(scale_mats, world_mats):
          P = world_mat
          if scaled:
              P = world_mat @ scale_mat
          P = P[:3, :4]
          _, pose = rend_util.load_K_Rt_from_P(None, P)
          pose_all.append(torch.from_numpy(pose).float())
  
      return torch.cat([p.float().unsqueeze(0) for p in pose_all], 0)
  
file_path: insightface/reconstruction/PBIDR/code/datasets/dataset.py
imports: import os
  import torch
  import numpy
  import utils.general
  from utils import rend_util
label_desc: Use image node_id 7 for calling the IFDataset obj's underlying member method code with example usage: obj.get_gt_pose(scaled) and returns: torch