From ffd43ba0e52e405e9afc07bdab1cf0f3e0746260 Mon Sep 17 00:00:00 2001 From: fleischmann Date: Mon, 4 Aug 2025 15:36:57 +0200 Subject: [PATCH 1/3] opacity shape change in .ply format --- src/ffsplat/models/transformations.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ffsplat/models/transformations.py b/src/ffsplat/models/transformations.py index de46609..1cb8e5f 100644 --- a/src/ffsplat/models/transformations.py +++ b/src/ffsplat/models/transformations.py @@ -1070,7 +1070,12 @@ def apply( decoding_update: list[dict[str, Any]] = [] match params: case {"type": "ply", "file_path": file_path, "base_path": base_path, "field_prefix": field_prefix}: - fields_to_write = {name[len(field_prefix) :]: field for name, field in parentOp.input_fields.items()} + fields_to_write: dict[str, Field] = {} + for name, field in parentOp.input_fields.items(): + if field.data.shape[-1] == 1: + # Squeeze the last dimension if it is 1 + field.data = field.data.squeeze(-1) + fields_to_write[name[len(field_prefix) :]] = field decoding_update.append({ "input_fields": [], "transforms": [ From ef2d7afac03a5460f887c64a50ad071371f9d04f Mon Sep 17 00:00:00 2001 From: fleischmann Date: Mon, 4 Aug 2025 16:13:49 +0200 Subject: [PATCH 2/3] fix inconsitent naming of inria-format --- src/ffsplat/cli/live.py | 4 ++-- .../{3DGS-INRIA-nosh-ply.yaml => 3DGS-INRIA-nosh.ply.yaml} | 0 .../conf/format/{3DGS-INRIA-ply.yaml => 3DGS-INRIA.ply.yaml} | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename src/ffsplat/conf/format/{3DGS-INRIA-nosh-ply.yaml => 3DGS-INRIA-nosh.ply.yaml} (100%) rename src/ffsplat/conf/format/{3DGS-INRIA-ply.yaml => 3DGS-INRIA.ply.yaml} (100%) diff --git a/src/ffsplat/cli/live.py b/src/ffsplat/cli/live.py index 6bb57c9..1aa91d6 100644 --- a/src/ffsplat/cli/live.py +++ b/src/ffsplat/cli/live.py @@ -38,8 +38,8 @@ available_output_format: list[str] = [ "SOG-PlayCanvas", "SOG-web", - "3DGS-INRIA-ply", - "3DGS-INRIA-nosh-ply", + "3DGS-INRIA.ply", + "3DGS-INRIA-nosh.ply", "SOG-web-png", "SOG-web-nosh", "SOG-web-sh-split", diff --git a/src/ffsplat/conf/format/3DGS-INRIA-nosh-ply.yaml b/src/ffsplat/conf/format/3DGS-INRIA-nosh.ply.yaml similarity index 100% rename from src/ffsplat/conf/format/3DGS-INRIA-nosh-ply.yaml rename to src/ffsplat/conf/format/3DGS-INRIA-nosh.ply.yaml diff --git a/src/ffsplat/conf/format/3DGS-INRIA-ply.yaml b/src/ffsplat/conf/format/3DGS-INRIA.ply.yaml similarity index 100% rename from src/ffsplat/conf/format/3DGS-INRIA-ply.yaml rename to src/ffsplat/conf/format/3DGS-INRIA.ply.yaml From 64bfac4dc4fdd710e4543f0998a1fbecf3928417 Mon Sep 17 00:00:00 2001 From: fleischmann Date: Mon, 4 Aug 2025 16:25:17 +0200 Subject: [PATCH 3/3] cleanup --- src/ffsplat/models/transformations.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/ffsplat/models/transformations.py b/src/ffsplat/models/transformations.py index 1cb8e5f..bd1285a 100644 --- a/src/ffsplat/models/transformations.py +++ b/src/ffsplat/models/transformations.py @@ -1073,7 +1073,6 @@ def apply( fields_to_write: dict[str, Field] = {} for name, field in parentOp.input_fields.items(): if field.data.shape[-1] == 1: - # Squeeze the last dimension if it is 1 field.data = field.data.squeeze(-1) fields_to_write[name[len(field_prefix) :]] = field decoding_update.append({