def __init__(self, data_root, split): super(Dataset, self).__init__() self.data_root = data_root self.split = split camera_path = os.path.join(self.data_root, 'camera.pkl') self.cam = snapshot_dutils.get_camera(camera_path) self.K = self.cam['K'] self.RT = np.concatenate([self.cam['R'], self.cam['T'][:, None]], axis=1) self.ni = 60 self.nrays = cfg.N_rand
def __init__(self, data_root, split): super(Dataset, self).__init__() self.data_root = data_root self.split = split camera_path = os.path.join(self.data_root, 'camera.pkl') self.cam = snapshot_dutils.get_camera(camera_path) self.begin_i = cfg.begin_i self.ni = cfg.ni params_path = os.path.join(data_root, 'params.npy') self.params = np.load(params_path, allow_pickle=True).item() self.nrays = cfg.N_rand