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_pose_init(self):
      # get noisy initializations obtained with the linear method
      cam_file = "{0}/cameras_linear_init.npz".format(self.instance_dir)
      camera_dict = np.load(cam_file)
      scale_mats = [
          camera_dict["scale_mat_%d" % idx].astype(np.float32)
          for idx in range(self.n_images)
      ]
      world_mats = [
          camera_dict["world_mat_%d" % idx].astype(np.float32)
          for idx in range(self.n_images)
      ]
  
      init_pose = []
      for scale_mat, world_mat in zip(scale_mats, world_mats):
          P = world_mat @ scale_mat
          P = P[:3, :4]
          _, pose = rend_util.load_K_Rt_from_P(None, P)
          init_pose.append(pose)
      init_pose = torch.cat(
          [
              torch.Tensor(pose).float().unsqueeze(0)
              for pose in init_pose
          ],
          0,
      ).cuda()
      init_quat = rend_util.rot_to_quat(init_pose[:, :3, :3])
      init_quat = torch.cat([init_quat, init_pose[:, :3, 3]], 1)
  
      return init_quat
  
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 8 for calling the IFDataset obj's underlying member method code with example usage: obj.get_pose_init() and returns: init_quat