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.
Files changed (50) hide show
  1. gsvvcompressor/__init__.py +13 -0
  2. gsvvcompressor/__main__.py +243 -0
  3. gsvvcompressor/combinations/__init__.py +84 -0
  4. gsvvcompressor/combinations/registry.py +52 -0
  5. gsvvcompressor/combinations/vq_xyz_1mask.py +89 -0
  6. gsvvcompressor/combinations/vq_xyz_1mask_zstd.py +103 -0
  7. gsvvcompressor/combinations/vq_xyz_draco.py +468 -0
  8. gsvvcompressor/combinations/vq_xyz_draco_2pass.py +156 -0
  9. gsvvcompressor/combinations/vq_xyz_zstd.py +106 -0
  10. gsvvcompressor/compress/__init__.py +5 -0
  11. gsvvcompressor/compress/zstd.py +144 -0
  12. gsvvcompressor/decoder.py +155 -0
  13. gsvvcompressor/deserializer.py +42 -0
  14. gsvvcompressor/draco/__init__.py +34 -0
  15. gsvvcompressor/draco/draco_decoder.exe +0 -0
  16. gsvvcompressor/draco/draco_encoder.exe +0 -0
  17. gsvvcompressor/draco/dracoreduced3dgs.cp310-win_amd64.pyd +0 -0
  18. gsvvcompressor/draco/interface.py +339 -0
  19. gsvvcompressor/draco/serialize.py +235 -0
  20. gsvvcompressor/draco/twopass.py +359 -0
  21. gsvvcompressor/encoder.py +122 -0
  22. gsvvcompressor/interframe/__init__.py +11 -0
  23. gsvvcompressor/interframe/combine.py +271 -0
  24. gsvvcompressor/interframe/decoder.py +99 -0
  25. gsvvcompressor/interframe/encoder.py +92 -0
  26. gsvvcompressor/interframe/interface.py +221 -0
  27. gsvvcompressor/interframe/twopass.py +226 -0
  28. gsvvcompressor/io/__init__.py +31 -0
  29. gsvvcompressor/io/bytes.py +103 -0
  30. gsvvcompressor/io/config.py +78 -0
  31. gsvvcompressor/io/gaussian_model.py +127 -0
  32. gsvvcompressor/movecameras.py +33 -0
  33. gsvvcompressor/payload.py +34 -0
  34. gsvvcompressor/serializer.py +42 -0
  35. gsvvcompressor/vq/__init__.py +15 -0
  36. gsvvcompressor/vq/interface.py +324 -0
  37. gsvvcompressor/vq/singlemask.py +127 -0
  38. gsvvcompressor/vq/twopass.py +1 -0
  39. gsvvcompressor/xyz/__init__.py +26 -0
  40. gsvvcompressor/xyz/dense.py +39 -0
  41. gsvvcompressor/xyz/interface.py +382 -0
  42. gsvvcompressor/xyz/knn.py +141 -0
  43. gsvvcompressor/xyz/quant.py +143 -0
  44. gsvvcompressor/xyz/size.py +44 -0
  45. gsvvcompressor/xyz/twopass.py +1 -0
  46. gsvvcompressor-1.2.0.dist-info/METADATA +690 -0
  47. gsvvcompressor-1.2.0.dist-info/RECORD +50 -0
  48. gsvvcompressor-1.2.0.dist-info/WHEEL +5 -0
  49. gsvvcompressor-1.2.0.dist-info/licenses/LICENSE +21 -0
  50. 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