nerfbaselines.io

nerfbaselines.io.deserialize_nb_info(info: dict) dict[source]
nerfbaselines.io.get_checkpoint_sha(path: str) str[source]
nerfbaselines.io.get_method_sha(method: Method) str[source]
nerfbaselines.io.get_metrics_hash(metrics_lists)[source]
nerfbaselines.io.get_predictions_sha(predictions: str, description: str = 'hashing predictions')[source]
nerfbaselines.io.get_torch_checkpoint_sha(checkpoint_data)[source]
nerfbaselines.io.load_trajectory(file) Trajectory[source]
nerfbaselines.io.new_nb_info(train_dataset_metadata, method: Method, config_overrides, evaluation_protocol=None, resources_utilization_info=None, total_train_time=None, applied_presets=None)[source]
nerfbaselines.io.numpy_from_base64(data: str) ndarray[source]
nerfbaselines.io.numpy_to_base64(array: ndarray) str[source]
nerfbaselines.io.open_any(path: str | Path | BinaryIO, mode: Literal['r', 'w'] = 'r') Iterator[IO[bytes]][source]
nerfbaselines.io.open_any_directory(path: str | Path, mode: Literal['r', 'w'] = 'r') Iterator[str][source]
nerfbaselines.io.read_image(file: BinaryIO | str | Path) ndarray[source]
nerfbaselines.io.save_cameras_npz(file, cameras)[source]
nerfbaselines.io.save_depth(file: BinaryIO | str | Path, tensor: ndarray)[source]
nerfbaselines.io.save_evaluation_results(file, metrics: Dict, metrics_lists, predictions_sha: str, ground_truth_sha: str, evaluation_protocol: str, nb_info: Dict)[source]
nerfbaselines.io.save_image(file: BinaryIO | str | Path, tensor: ndarray)[source]
nerfbaselines.io.save_output_artifact(model_path: str | Path, predictions_path: str | Path, metrics_path: str | Path, tensorboard_path: str | Path, output_path: str | Path, validate: bool = True)[source]

Prepares artifacts for upload to the NeRF benchmark.

Parameters:
  • model_path – Path to the model directory.

  • predictions_path – Path to the predictions directory/file.

  • metrics_path – Path to the metrics file.

  • tensorboard_path – Path to the tensorboard events file.

nerfbaselines.io.save_predictions(output: str, predictions: Iterable[Dict[str, ndarray]], dataset: Dataset, *, nb_info=None) Iterable[Dict[str, ndarray]][source]
nerfbaselines.io.save_trajectory(trajectory: Trajectory, file) None[source]
nerfbaselines.io.serialize_evaluation_results(metrics: Dict, metrics_lists, predictions_sha: str, ground_truth_sha: str, evaluation_protocol: str, nb_info: Dict)[source]
nerfbaselines.io.serialize_nb_info(info: dict) dict[source]
nerfbaselines.io.wget(url: str, output: str | Path)[source]