Skip to content

Commit

Permalink
Added the version
Browse files Browse the repository at this point in the history
  • Loading branch information
simonbethke committed Oct 11, 2024
1 parent 4db0c17 commit e00b2b1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nerfstudio/scripts/exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
from nerfstudio.utils.eval_utils import eval_setup
from nerfstudio.utils.rich_utils import CONSOLE

from importlib.metadata import version


@dataclass

Check failure on line 54 in nerfstudio/scripts/exporter.py

View workflow job for this annotation

GitHub Actions / build

Ruff (I001)

nerfstudio/scripts/exporter.py:19:1: I001 Import block is un-sorted or un-formatted
class Exporter:
Expand Down Expand Up @@ -534,10 +536,11 @@ def write_ply(
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(b"comment Written by Nerstudio\n")
ply_file.write(f"comment Written by Nerstudio {nerfstudio_version}\n".encode())
ply_file.write(f"element vertex {count}\n".encode())

# Write properties, in order due to OrderedDict
Expand Down

0 comments on commit e00b2b1

Please sign in to comment.