gsvvcompressor 1.2.0__cp310-cp310-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- gsvvcompressor/__init__.py +13 -0
- gsvvcompressor/__main__.py +243 -0
- gsvvcompressor/combinations/__init__.py +84 -0
- gsvvcompressor/combinations/registry.py +52 -0
- gsvvcompressor/combinations/vq_xyz_1mask.py +89 -0
- gsvvcompressor/combinations/vq_xyz_1mask_zstd.py +103 -0
- gsvvcompressor/combinations/vq_xyz_draco.py +468 -0
- gsvvcompressor/combinations/vq_xyz_draco_2pass.py +156 -0
- gsvvcompressor/combinations/vq_xyz_zstd.py +106 -0
- gsvvcompressor/compress/__init__.py +5 -0
- gsvvcompressor/compress/zstd.py +144 -0
- gsvvcompressor/decoder.py +155 -0
- gsvvcompressor/deserializer.py +42 -0
- gsvvcompressor/draco/__init__.py +34 -0
- gsvvcompressor/draco/draco_decoder.exe +0 -0
- gsvvcompressor/draco/draco_encoder.exe +0 -0
- gsvvcompressor/draco/dracoreduced3dgs.cp310-win_amd64.pyd +0 -0
- gsvvcompressor/draco/interface.py +339 -0
- gsvvcompressor/draco/serialize.py +235 -0
- gsvvcompressor/draco/twopass.py +359 -0
- gsvvcompressor/encoder.py +122 -0
- gsvvcompressor/interframe/__init__.py +11 -0
- gsvvcompressor/interframe/combine.py +271 -0
- gsvvcompressor/interframe/decoder.py +99 -0
- gsvvcompressor/interframe/encoder.py +92 -0
- gsvvcompressor/interframe/interface.py +221 -0
- gsvvcompressor/interframe/twopass.py +226 -0
- gsvvcompressor/io/__init__.py +31 -0
- gsvvcompressor/io/bytes.py +103 -0
- gsvvcompressor/io/config.py +78 -0
- gsvvcompressor/io/gaussian_model.py +127 -0
- gsvvcompressor/movecameras.py +33 -0
- gsvvcompressor/payload.py +34 -0
- gsvvcompressor/serializer.py +42 -0
- gsvvcompressor/vq/__init__.py +15 -0
- gsvvcompressor/vq/interface.py +324 -0
- gsvvcompressor/vq/singlemask.py +127 -0
- gsvvcompressor/vq/twopass.py +1 -0
- gsvvcompressor/xyz/__init__.py +26 -0
- gsvvcompressor/xyz/dense.py +39 -0
- gsvvcompressor/xyz/interface.py +382 -0
- gsvvcompressor/xyz/knn.py +141 -0
- gsvvcompressor/xyz/quant.py +143 -0
- gsvvcompressor/xyz/size.py +44 -0
- gsvvcompressor/xyz/twopass.py +1 -0
- gsvvcompressor-1.2.0.dist-info/METADATA +690 -0
- gsvvcompressor-1.2.0.dist-info/RECORD +50 -0
- gsvvcompressor-1.2.0.dist-info/WHEEL +5 -0
- gsvvcompressor-1.2.0.dist-info/licenses/LICENSE +21 -0
- gsvvcompressor-1.2.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Quantization step size calculation.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from typing import Optional
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def compute_step_size(
|
|
9
|
+
dense_scale: float,
|
|
10
|
+
alpha: float = 0.2,
|
|
11
|
+
min_step: Optional[float] = None,
|
|
12
|
+
max_step: Optional[float] = None,
|
|
13
|
+
) -> float:
|
|
14
|
+
"""
|
|
15
|
+
Compute quantization step size from dense scale.
|
|
16
|
+
|
|
17
|
+
The step size is computed as:
|
|
18
|
+
step_size = alpha * dense_scale
|
|
19
|
+
|
|
20
|
+
Args:
|
|
21
|
+
dense_scale: The dense region scale estimate (d_dense), typically from
|
|
22
|
+
compute_dense_scale().
|
|
23
|
+
alpha: Scaling factor for step size (typical range: 0.1 to 0.25).
|
|
24
|
+
Smaller values preserve more detail but increase data size.
|
|
25
|
+
min_step: Optional minimum step size to prevent extremely fine quantization.
|
|
26
|
+
max_step: Optional maximum step size to prevent overly coarse quantization.
|
|
27
|
+
|
|
28
|
+
Returns:
|
|
29
|
+
The quantization step size (delta).
|
|
30
|
+
|
|
31
|
+
Example:
|
|
32
|
+
>>> from cevv.xyz import compute_nn_distances, compute_dense_scale, compute_step_size
|
|
33
|
+
>>> nn_distances = compute_nn_distances(points, k=1, sample_size=10000)
|
|
34
|
+
>>> dense_scale = compute_dense_scale(nn_distances, quantile=0.05)
|
|
35
|
+
>>> step_size = compute_step_size(dense_scale, alpha=0.2)
|
|
36
|
+
"""
|
|
37
|
+
step_size = alpha * dense_scale
|
|
38
|
+
|
|
39
|
+
if min_step is not None:
|
|
40
|
+
step_size = max(step_size, min_step)
|
|
41
|
+
if max_step is not None:
|
|
42
|
+
step_size = min(step_size, max_step)
|
|
43
|
+
|
|
44
|
+
return step_size
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# TODO: two pass xyz interframe encoder/decoder, produce codebook on the whole 3DGS seq in pass one
|