reduced-3dgs 1.10.9__cp311-cp311-win_amd64.whl → 1.10.12__cp311-cp311-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.
reduced_3dgs/train.py CHANGED
@@ -27,26 +27,39 @@ def prepare_training(
27
27
 
28
28
  def training(dataset: CameraDataset, gaussians: GaussianModel, trainer: AbstractTrainer, quantizer: AbstractQuantizer, destination: str, iteration: int, save_iterations: List[int], device: str, empty_cache_every_step=False):
29
29
  shutil.rmtree(os.path.join(destination, "point_cloud"), ignore_errors=True) # remove the previous point cloud
30
- pbar = tqdm(range(1, iteration+1))
30
+ pbar = tqdm(range(1, iteration+1), dynamic_ncols=True, desc="Training")
31
31
  epoch = list(range(len(dataset)))
32
32
  epoch_psnr = torch.empty(3, 0, device=device)
33
+ epoch_maskpsnr = torch.empty(3, 0, device=device)
33
34
  ema_loss_for_log = 0.0
34
35
  avg_psnr_for_log = 0.0
36
+ avg_maskpsnr_for_log = 0.0
35
37
  for step in pbar:
36
38
  epoch_idx = step % len(dataset)
37
39
  if epoch_idx == 0:
38
40
  avg_psnr_for_log = epoch_psnr.mean().item()
41
+ avg_maskpsnr_for_log = epoch_maskpsnr.mean().item()
39
42
  epoch_psnr = torch.empty(3, 0, device=device)
43
+ epoch_maskpsnr = torch.empty(3, 0, device=device)
40
44
  random.shuffle(epoch)
41
45
  idx = epoch[epoch_idx]
42
46
  loss, out = trainer.step(dataset[idx])
43
47
  if empty_cache_every_step:
44
48
  torch.cuda.empty_cache()
45
49
  with torch.no_grad():
50
+ ground_truth_image = dataset[idx].ground_truth_image
51
+ rendered_image = out["render"]
52
+ epoch_psnr = torch.concat([epoch_psnr, psnr(rendered_image, ground_truth_image)], dim=1)
53
+ if dataset[idx].ground_truth_image_mask is not None:
54
+ ground_truth_maskimage = ground_truth_image * dataset[idx].ground_truth_image_mask
55
+ rendered_maskimage = rendered_image * dataset[idx].ground_truth_image_mask
56
+ epoch_maskpsnr = torch.concat([epoch_maskpsnr, psnr(rendered_maskimage, ground_truth_maskimage)], dim=1)
46
57
  ema_loss_for_log = 0.4 * loss.item() + 0.6 * ema_loss_for_log
47
- epoch_psnr = torch.concat([epoch_psnr, psnr(out["render"], dataset[idx].ground_truth_image)], dim=1)
48
58
  if step % 10 == 0:
49
- pbar.set_postfix({'epoch': step // len(dataset), 'loss': ema_loss_for_log, 'psnr': avg_psnr_for_log, 'n': gaussians._xyz.shape[0]})
59
+ postfix = {'epoch': step // len(dataset), 'loss': ema_loss_for_log, 'psnr': avg_psnr_for_log, 'n': gaussians._xyz.shape[0]}
60
+ if avg_maskpsnr_for_log > 0:
61
+ postfix['psnr (mask)'] = avg_maskpsnr_for_log
62
+ pbar.set_postfix(postfix)
50
63
  if step in save_iterations:
51
64
  save_path = os.path.join(destination, "point_cloud", "iteration_" + str(step))
52
65
  os.makedirs(save_path, exist_ok=True)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: reduced_3dgs
3
- Version: 1.10.9
3
+ Version: 1.10.12
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
@@ -2,13 +2,13 @@ reduced_3dgs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  reduced_3dgs/combinations.py,sha256=dRrtTIQLggUP22Olp0DVSlD0C8YDgnrpTlrCcGZyWM0,9441
3
3
  reduced_3dgs/prepare.py,sha256=MFUUckRHKfgcva4ZOBxfPFyE95N-OlCQLplpmEPuzOk,4440
4
4
  reduced_3dgs/quantize.py,sha256=BVqBb2tQgiP3hap5-OByD8VELtJJGfEeFzaVFyzCJZU,2572
5
- reduced_3dgs/train.py,sha256=yyo1gmdwM5EW3_asAD1uhioJICCPKrFdIucIB-K6iSc,5856
6
- reduced_3dgs/diff_gaussian_rasterization/_C.cp311-win_amd64.pyd,sha256=pU3iAWEIGdMLLzAKITTYUNOJYptPP2v6OsxFClXo9-k,1623552
5
+ reduced_3dgs/train.py,sha256=P9GCoEVl_VGldKuA3ycj1nea5rTc3xqu_f02a8oe-Lc,6734
6
+ reduced_3dgs/diff_gaussian_rasterization/_C.cp311-win_amd64.pyd,sha256=aWFuGgyzyWa0cjbPxVD-hytfzFy7OoBp2cmWhUjlxCQ,1623552
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.cp311-win_amd64.pyd,sha256=RPSU4Z1HToiQRDyBsQE2KDqdkHyMvxIeX0rJ-L27iP0,1309696
11
+ reduced_3dgs/importance/diff_gaussian_rasterization/_C.cp311-win_amd64.pyd,sha256=F8XFzTme9bbxV3mo_q9aW_O-UzCdLnb0Hb_kjyLE0oA,1309696
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
@@ -21,9 +21,9 @@ reduced_3dgs/quantization/wrapper.py,sha256=cyXqfJgo9b3fS7DYXxOk5LmQudvrEhweOebF
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.cp311-win_amd64.pyd,sha256=ecvkYxpxmkZXcAbYSRXhNxQOghv4T_irRavqSfufx74,1256448
25
- reduced_3dgs-1.10.9.dist-info/licenses/LICENSE.md,sha256=LQ4_LAqlncGkg_mQy5ykMAFtQDSPB0eKmIEtBut0yjw,4916
26
- reduced_3dgs-1.10.9.dist-info/METADATA,sha256=Wk8Ps_Lgg5dut6dcmaGlw4jht2YZnfhXBk-BoqW_8M0,12403
27
- reduced_3dgs-1.10.9.dist-info/WHEEL,sha256=JLOMsP7F5qtkAkINx5UnzbFguf8CqZeraV8o04b0I8I,101
28
- reduced_3dgs-1.10.9.dist-info/top_level.txt,sha256=PpU5aT3-baSCdqCtTaZknoB32H93UeKCkYDkRCCZMEI,13
29
- reduced_3dgs-1.10.9.dist-info/RECORD,,
24
+ reduced_3dgs/simple_knn/_C.cp311-win_amd64.pyd,sha256=wSW7NtSfC_zKK3EieP3moJtC-WZkiXbnDzbmz-A8opA,1256448
25
+ reduced_3dgs-1.10.12.dist-info/licenses/LICENSE.md,sha256=LQ4_LAqlncGkg_mQy5ykMAFtQDSPB0eKmIEtBut0yjw,4916
26
+ reduced_3dgs-1.10.12.dist-info/METADATA,sha256=7cQgH63LmWATezhRqXDPA6ytT_Ld9mYXKppGqvR8QTw,12404
27
+ reduced_3dgs-1.10.12.dist-info/WHEEL,sha256=JLOMsP7F5qtkAkINx5UnzbFguf8CqZeraV8o04b0I8I,101
28
+ reduced_3dgs-1.10.12.dist-info/top_level.txt,sha256=PpU5aT3-baSCdqCtTaZknoB32H93UeKCkYDkRCCZMEI,13
29
+ reduced_3dgs-1.10.12.dist-info/RECORD,,