class_docstr: We use random rays from a SINGLE time stamp per batch.
class_docstr_tok: ["We","use","random","rays","from","a","SINGLE","time","stamp","per","batch","."]
docstr: Args:
      opt (Namespace): options
      scene (BaseScene): the background scene
      dset_type (str): train/val/test set
      split (str): split file path
      near_far_cache (dict, optional): The SMPL mesh guided near and far for each pixels. Defaults to None.
                                       Key: file name of image.
                                       Value: ndarray with shape [h, w, 3].
docstr_tok: ["Args",":","opt","(","Namespace",")",":","options","scene","(","BaseScene",")",":","the","background","scene","dset_type","(","str",")",":","train\/val\/test","set","split","(","str",")",":","split","file","path","near_far_cache","(","dict",",","optional",")",":","The","SMPL","mesh","guided","near","and","far","for","each","pixels",".","Defaults","to","None",".","Key",":","file","name","of","image",".","Value",":","ndarray","with","shape","[","h",",","w",",","3","]","."]
code: def __init__(self, opt, scene, dset_type, split, near_far_cache=None):
      """
      Args:
          opt (Namespace): options
          scene (BaseScene): the background scene
          dset_type (str): train/val/test set
          split (str): split file path
          near_far_cache (dict, optional): The SMPL mesh guided near and far for each pixels. Defaults to None.
                                           Key: file name of image.
                                           Value: ndarray with shape [h, w, 3].
      """
      self.opt = opt
      self.scene = scene
      self.device = scene.captures[0].posed_mesh.device
      self.dset_type = dset_type
      self.split = split
      self.inclusions = neuman_helper.read_text(split)
      print(
          f"{dset_type} dataset has {len(self.inclusions)} samples: {self.inclusions}"
      )
      self.white_bkg = opt.white_bkg
      self.batch_size = opt.rays_per_batch
      if near_far_cache is None:
          cache_helper.export_near_far_cache(
              opt, scene, opt.geo_threshold, opt.chunk, self.device
          )
          self.near_far_cache = cache_helper.load_near_far_cache(
              opt, scene, opt.geo_threshold
          )
      else:
          self.near_far_cache = near_far_cache
      self.num_patch = 1 if opt.penalize_lpips > 0 else 0
      self.cap_id = None
  
file_path: ml-neuman/datasets/human_rays.py
imports: import os
  import random
  import numpy
  import torch
  from torch.utils import data
  from data_io import cache_helper
  from utils import ray_utils
  from utils.constant import PATCH_SIZE, PATCH_SIZE_SQUARED, NEAR_INDEX, FAR_INDEX, TRAIN_SET_LENGTH, VALIDATION_SET_LENGTH
  from data_io import neuman_helper
label_desc: Use image node_id 1 to create a new HumanRayDataset object from inherited base classes: data with example: obj = HumanRayDataset(opt, scene, dset_type, split, near_far_cache)