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 __getitem__(self, idx):
      uv = np.mgrid[0 : self.img_res[0], 0 : self.img_res[1]].astype(
          np.int32
      )
      uv = torch.from_numpy(np.flip(uv, axis=0).copy()).float()
      uv = uv.reshape(2, -1).transpose(1, 0)
  
      sample = {
          "object_mask": self.object_masks[idx],
          "uv": uv,
          "intrinsics": self.intrinsics_all[idx],
      }
  
      ground_truth = {"rgb": self.rgb_images[idx]}
  
      if self.sampling_idx is not None:
          ground_truth["rgb"] = self.rgb_images[idx][
              self.sampling_idx, :
          ]
          sample["object_mask"] = self.object_masks[idx][
              self.sampling_idx
          ]
          sample["uv"] = uv[self.sampling_idx, :]
  
      if not self.train_cameras:
          sample["pose"] = self.pose_all[idx]
  
      return idx, sample, ground_truth
  
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 3 for calling the IFDataset obj's underlying member method code with example usage: obj.__getitem__(idx) and returns: idx,  sample,  ground_truth