reduced-3dgs 1.10.5__cp310-cp310-win_amd64.whl → 1.10.7__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.
@@ -4,7 +4,15 @@ from typing import Dict, Tuple
4
4
  import torch
5
5
  import torch.nn as nn
6
6
  import numpy as np
7
- from sklearn.cluster import MiniBatchKMeans as KMeans
7
+ try:
8
+ from cuml.cluster import KMeans
9
+ kmeans_init = 'k-means||'
10
+ except ImportError:
11
+ print("Cuml not found, using sklearn's MiniBatchKMeans for quantization.")
12
+ from sklearn.cluster import MiniBatchKMeans
13
+ from functools import partial
14
+ KMeans = partial(MiniBatchKMeans, batch_size=256 * os.cpu_count())
15
+ kmeans_init = 'k-means++'
8
16
  from gaussian_splatting import GaussianModel
9
17
  from plyfile import PlyData, PlyElement
10
18
  import numpy as np
@@ -65,9 +73,8 @@ class VectorQuantizer(AbstractQuantizer):
65
73
  def generate_codebook(self, values: torch.Tensor, num_clusters, init_codebook=None):
66
74
  kmeans = KMeans(
67
75
  n_clusters=num_clusters, tol=self.tol, max_iter=self.max_iter,
68
- init='k-means++' if init_codebook is None else init_codebook.cpu().numpy(),
69
- random_state=0, n_init="auto", verbose=0,
70
- batch_size=256 * os.cpu_count()
76
+ init=kmeans_init if init_codebook is None else init_codebook.cpu().numpy(),
77
+ random_state=0, n_init="auto", verbose=1,
71
78
  )
72
79
  ids = torch.tensor(kmeans.fit_predict(values.cpu().numpy()), device=values.device)
73
80
  centers = torch.tensor(kmeans.cluster_centers_, dtype=values.dtype, device=values.device)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: reduced_3dgs
3
- Version: 1.10.5
3
+ Version: 1.10.7
4
4
  Summary: Refactored code for the paper "Reducing the Memory Footprint of 3D Gaussian Splatting"
5
5
  Home-page: https://github.com/yindaheng98/reduced-3dgs
6
6
  Author: yindaheng98
@@ -8,13 +8,8 @@ Author-email: yindaheng98@gmail.com
8
8
  Classifier: Programming Language :: Python :: 3
9
9
  Description-Content-Type: text/markdown
10
10
  License-File: LICENSE.md
11
- Requires-Dist: tqdm
12
- Requires-Dist: plyfile
13
- Requires-Dist: scikit-learn
14
- Requires-Dist: torch
15
- Requires-Dist: torchvision
16
- Requires-Dist: numpy
17
11
  Requires-Dist: gaussian-splatting
12
+ Requires-Dist: scikit-learn
18
13
  Dynamic: author
19
14
  Dynamic: author-email
20
15
  Dynamic: classifier
@@ -41,46 +36,33 @@ This repository contains the **refactored Python code for [Reduced-3DGS](https:/
41
36
  * [Pytorch](https://pytorch.org/) (v2.4 or higher recommended)
42
37
  * [CUDA Toolkit](https://developer.nvidia.com/cuda-12-4-0-download-archive) (12.4 recommended, should match with PyTorch version)
43
38
 
44
- ## Install (PyPI)
45
-
39
+ (Optional) If you have trouble with [`gaussian-splatting`](https://github.com/yindaheng98/gaussian-splatting), try to install it from source:
46
40
  ```sh
47
- pip install --upgrade reduced-3dgs
41
+ pip install wheel setuptools
42
+ pip install --upgrade git+https://github.com/yindaheng98/gaussian-splatting.git@master --no-build-isolation
48
43
  ```
49
44
 
50
- ## Install (Build from source)
51
-
52
- ```sh
53
- pip install --upgrade git+https://github.com/yindaheng98/reduced-3dgs.git@main
54
- ```
55
- If you have trouble with [`gaussian-splatting`](https://github.com/yindaheng98/gaussian-splatting), you can install it from source:
56
- ```sh
57
- pip install --upgrade git+https://github.com/yindaheng98/gaussian-splatting.git@master
58
- ```
45
+ ## PyPI Install
59
46
 
60
- ## Install (Development)
61
-
62
- Install [`gaussian-splatting`](https://github.com/yindaheng98/gaussian-splatting).
63
- You can download the wheel from [PyPI](https://pypi.org/project/gaussian-splatting/):
64
47
  ```shell
65
- pip install --upgrade gaussian-splatting
48
+ pip install --upgrade reduced-3dgs
66
49
  ```
67
- Alternatively, install the latest version from the source:
68
- ```sh
69
- pip install --upgrade git+https://github.com/yindaheng98/gaussian-splatting.git@master
50
+ or
51
+ build latest from source:
52
+ ```shell
53
+ pip install wheel setuptools
54
+ pip install --upgrade git+https://github.com/yindaheng98/reduced-3dgs.git@main --no-build-isolation
70
55
  ```
71
56
 
57
+ ### Development Install
58
+
72
59
  ```shell
73
60
  git clone --recursive https://github.com/yindaheng98/reduced-3dgs
74
61
  cd reduced-3dgs
75
- pip install tqdm plyfile scikit-learn numpy tifffile triton xformers
62
+ pip install scikit-learn
76
63
  pip install --target . --upgrade --no-deps .
77
64
  ```
78
65
 
79
- (Optional) If you prefer not to install `gaussian-splatting` in your environment, you can install it in your `reduced-3dgs` directory:
80
- ```sh
81
- pip install --target . --no-deps --upgrade git+https://github.com/yindaheng98/gaussian-splatting.git@master
82
- ```
83
-
84
66
  ## Quick Start
85
67
 
86
68
  1. Download the dataset (T&T+DB COLMAP dataset, size 650MB):
@@ -3,12 +3,12 @@ reduced_3dgs/combinations.py,sha256=dRrtTIQLggUP22Olp0DVSlD0C8YDgnrpTlrCcGZyWM0,
3
3
  reduced_3dgs/prepare.py,sha256=MFUUckRHKfgcva4ZOBxfPFyE95N-OlCQLplpmEPuzOk,4440
4
4
  reduced_3dgs/quantize.py,sha256=BVqBb2tQgiP3hap5-OByD8VELtJJGfEeFzaVFyzCJZU,2572
5
5
  reduced_3dgs/train.py,sha256=yRQPQv-hTOBQN-tqGHYs2aIZ0AbWq158CXpthYN2cfw,5666
6
- reduced_3dgs/diff_gaussian_rasterization/_C.cp310-win_amd64.pyd,sha256=TMZt_ILcUKvBkIbYStob3cTLoefyr4kXp-2itriwn80,1610752
6
+ reduced_3dgs/diff_gaussian_rasterization/_C.cp310-win_amd64.pyd,sha256=umncdQpRjdTtR0dzSn1EW-ZG_gkEweJvFOi23QxGOWM,1610752
7
7
  reduced_3dgs/diff_gaussian_rasterization/__init__.py,sha256=oV6JjTc-50MscX4XHeIWSgLr3l8Y25knBIs-0gRbJr4,7932
8
8
  reduced_3dgs/importance/__init__.py,sha256=neJsbY5cLikEGBQGdR4MjwCQ5VWVikT1357DwL0EtWU,289
9
9
  reduced_3dgs/importance/combinations.py,sha256=F9IYDZ6iquZw5Djn2An88dlp2MUGieAyuZyVaDZdSts,2962
10
10
  reduced_3dgs/importance/trainer.py,sha256=Sj4ORvoYtFT7z3hifzFZDfhFyqumHraXyk3vMVtk0AU,12661
11
- reduced_3dgs/importance/diff_gaussian_rasterization/_C.cp310-win_amd64.pyd,sha256=50q0WCbcCipKx7KX9DFOQpLwoWQWc2GSQy2rQl9Arpw,1302016
11
+ reduced_3dgs/importance/diff_gaussian_rasterization/_C.cp310-win_amd64.pyd,sha256=o6a3wL0bQzhmpj3qIk3g_6T80xPthL1bO9kJlcuiATs,1302016
12
12
  reduced_3dgs/importance/diff_gaussian_rasterization/__init__.py,sha256=Tix8auyXBb_QFQtXrV3sLE9kdnl5zgHH0BbqcFzDp84,12850
13
13
  reduced_3dgs/pruning/__init__.py,sha256=E_YxJ9cDV_B6EJbYUBEcuRYMIht_C72rI1VJUXFCLpM,201
14
14
  reduced_3dgs/pruning/combinations.py,sha256=xO39d08DEsDnKI5np_1xQ4H29O486Q_cThLfWhlH810,2385
@@ -16,14 +16,14 @@ reduced_3dgs/pruning/trainer.py,sha256=JJml-uYfDfUpbsjRNZbIvnUYYslVgFXkhejbkYSo0
16
16
  reduced_3dgs/quantization/__init__.py,sha256=1z1xMn3yj9u7cR9JizGrI3WSyIES_Tqq6oDquvglSeo,225
17
17
  reduced_3dgs/quantization/abc.py,sha256=rsi8HFRwQCltWTYiJ3BpygtQDT7hK6J01jKMOboOY8w,1910
18
18
  reduced_3dgs/quantization/exclude_zeros.py,sha256=fKSgjHous4OpdI6mQi9z23if9jnbB79w2jChpxkCJWw,2381
19
- reduced_3dgs/quantization/quantizer.py,sha256=lsaJ4yjxquC9XCDZPTGIKe8EgHAEwmVw9rt73oezjmc,17686
19
+ reduced_3dgs/quantization/quantizer.py,sha256=2myyBsYPGbzjZhjpKnYMYcvk6INqeds7wRdBRbIPki4,17948
20
20
  reduced_3dgs/quantization/wrapper.py,sha256=cyXqfJgo9b3fS7DYXxOk5LmQudvrEhweOebFsjRnXiQ,2549
21
21
  reduced_3dgs/shculling/__init__.py,sha256=nP2BejDCUdCmJNRbg0hfhHREO6jyZXwIcRiw6ttVgqo,149
22
22
  reduced_3dgs/shculling/gaussian_model.py,sha256=f8QWaL09vaV9Tcf6Dngjg_Fmk1wTQPAjWhuhI_N02Y8,2877
23
23
  reduced_3dgs/shculling/trainer.py,sha256=9hwR77djhZpyf-URhwKHjnLbe0ZAOS-DIw58RzkcHXQ,6369
24
- reduced_3dgs/simple_knn/_C.cp310-win_amd64.pyd,sha256=ECRSqGV4JPfE26Vo9ydc2lW9bV5owZjwX2YzYvvCm8c,1248768
25
- reduced_3dgs-1.10.5.dist-info/licenses/LICENSE.md,sha256=LQ4_LAqlncGkg_mQy5ykMAFtQDSPB0eKmIEtBut0yjw,4916
26
- reduced_3dgs-1.10.5.dist-info/METADATA,sha256=g3qnk4Dz-uJb0CTA3mJ_mc5rkU0LL8dYpovZuh0yw1A,13015
27
- reduced_3dgs-1.10.5.dist-info/WHEEL,sha256=KUuBC6lxAbHCKilKua8R9W_TM71_-9Sg5uEP3uDWcoU,101
28
- reduced_3dgs-1.10.5.dist-info/top_level.txt,sha256=PpU5aT3-baSCdqCtTaZknoB32H93UeKCkYDkRCCZMEI,13
29
- reduced_3dgs-1.10.5.dist-info/RECORD,,
24
+ reduced_3dgs/simple_knn/_C.cp310-win_amd64.pyd,sha256=6DC6PsctGeSGC1i_ruHtFyDnWilQ9smDsz2ZhROCJeE,1248768
25
+ reduced_3dgs-1.10.7.dist-info/licenses/LICENSE.md,sha256=LQ4_LAqlncGkg_mQy5ykMAFtQDSPB0eKmIEtBut0yjw,4916
26
+ reduced_3dgs-1.10.7.dist-info/METADATA,sha256=XffxXiROEKO9jeTVmfiZcWBAHK0cgSS9B6ZKvY5wT5k,12317
27
+ reduced_3dgs-1.10.7.dist-info/WHEEL,sha256=KUuBC6lxAbHCKilKua8R9W_TM71_-9Sg5uEP3uDWcoU,101
28
+ reduced_3dgs-1.10.7.dist-info/top_level.txt,sha256=PpU5aT3-baSCdqCtTaZknoB32H93UeKCkYDkRCCZMEI,13
29
+ reduced_3dgs-1.10.7.dist-info/RECORD,,