High-performance Gaussian Splatting format conversion library for Python.
pip install gaussforgeimport gaussforge
# Create instance
gf = gaussforge.GaussForge()
# Read a PLY file
with open("model.ply", "rb") as f:
data = f.read()
result = gf.read(data, "ply")
if "error" not in result:
print(f"Loaded {result['data']['numPoints']} points")
# Convert to another format
converted = gf.convert(data, "ply", "splat")
if "error" not in converted:
with open("output.splat", "wb") as f:
f.write(converted["data"])ply- Standard PLY formatcompressed.ply- Compressed PLY formatsplat- Splat formatksplat- K-Splat formatspz- SPZ compressed formatsog- SOG format
Create a new GaussForge instance.
Read Gaussian data from bytes.
data: Raw file data as bytesformat: Input format namestrict: Enable strict validation (default: False)
Returns a dict with data key containing the parsed Gaussian data, or error key on failure.
Write Gaussian IR to bytes.
ir: Gaussian intermediate representation dictformat: Output format namestrict: Enable strict validation (default: False)
Returns a dict with data key containing the encoded bytes, or error key on failure.
Convert between formats directly.
data: Input file data as bytesin_format: Input format nameout_format: Output format namestrict: Enable strict validation (default: False)
Returns a dict with data key containing the converted bytes, or error key on failure.
Get detailed model information.
data: Raw file data as bytesformat: Input format namefile_size: Optional file size for reporting
Returns a dict with data key containing model info, or error key on failure.
Get list of supported format names.
Get library version string.
cd python
pip install -e .Apache-2.0