diff --git a/nerfstudio/scripts/exporter.py b/nerfstudio/scripts/exporter.py index 9c0812e3e..b6404af37 100644 --- a/nerfstudio/scripts/exporter.py +++ b/nerfstudio/scripts/exporter.py @@ -24,6 +24,7 @@ import sys import typing from collections import OrderedDict from dataclasses import dataclass, field +from importlib.metadata import version from pathlib import Path from typing import List, Optional, Tuple, Union, cast @@ -534,10 +535,12 @@ class ExportGaussianSplat(Exporter): raise ValueError("All tensors must be numpy arrays of float or uint8 type and not empty") with open(filename, "wb") as ply_file: + nerfstudio_version = version("nerfstudio") # Write PLY header ply_file.write(b"ply\n") ply_file.write(b"format binary_little_endian 1.0\n") - + ply_file.write(f"comment Generated by Nerstudio {nerfstudio_version}\n".encode()) + ply_file.write(b"comment Vertical Axis: z\n") ply_file.write(f"element vertex {count}\n".encode()) # Write properties, in order due to OrderedDict