gaussian-splatting 1.19.1__cp310-cp310-win_amd64.whl → 1.19.2__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.
Potentially problematic release.
This version of gaussian-splatting might be problematic. Click here for more details.
- gaussian_splatting/diff_gaussian_rasterization/_C.cp310-win_amd64.pyd +0 -0
- gaussian_splatting/render.py +9 -4
- gaussian_splatting/simple_knn/_C.cp310-win_amd64.pyd +0 -0
- gaussian_splatting/train.py +7 -2
- {gaussian_splatting-1.19.1.dist-info → gaussian_splatting-1.19.2.dist-info}/METADATA +1 -1
- {gaussian_splatting-1.19.1.dist-info → gaussian_splatting-1.19.2.dist-info}/RECORD +9 -9
- {gaussian_splatting-1.19.1.dist-info → gaussian_splatting-1.19.2.dist-info}/WHEEL +0 -0
- {gaussian_splatting-1.19.1.dist-info → gaussian_splatting-1.19.2.dist-info}/licenses/LICENSE.md +0 -0
- {gaussian_splatting-1.19.1.dist-info → gaussian_splatting-1.19.2.dist-info}/top_level.txt +0 -0
|
Binary file
|
gaussian_splatting/render.py
CHANGED
|
@@ -15,8 +15,8 @@ from gaussian_splatting.prepare import prepare_dataset, prepare_gaussians
|
|
|
15
15
|
def prepare_rendering(
|
|
16
16
|
sh_degree: int, source: str, device: str,
|
|
17
17
|
trainable_camera: bool = False, load_ply: str = None, load_camera: str = None,
|
|
18
|
-
load_depth=True) -> Tuple[CameraDataset, GaussianModel]:
|
|
19
|
-
dataset = prepare_dataset(source=source, device=device, trainable_camera=trainable_camera, load_camera=load_camera, load_mask=
|
|
18
|
+
load_mask=True, load_depth=True) -> Tuple[CameraDataset, GaussianModel]:
|
|
19
|
+
dataset = prepare_dataset(source=source, device=device, trainable_camera=trainable_camera, load_camera=load_camera, load_mask=load_mask, load_depth=load_depth)
|
|
20
20
|
gaussians = prepare_gaussians(sh_degree=sh_degree, source=source, device=device, trainable_camera=trainable_camera, load_ply=load_ply)
|
|
21
21
|
return dataset, gaussians
|
|
22
22
|
|
|
@@ -57,13 +57,16 @@ def rendering(
|
|
|
57
57
|
gt_path = os.path.join(save, "gt")
|
|
58
58
|
makedirs(render_path, exist_ok=True)
|
|
59
59
|
makedirs(gt_path, exist_ok=True)
|
|
60
|
-
pbar = tqdm(dataset, desc="Rendering
|
|
60
|
+
pbar = tqdm(dataset, dynamic_ncols=True, desc="Rendering")
|
|
61
61
|
with open(os.path.join(save, "quality.csv"), "w") as f:
|
|
62
62
|
f.write("name,psnr,ssim,lpips\n")
|
|
63
63
|
for idx, camera in enumerate(pbar):
|
|
64
64
|
out = gaussians(camera)
|
|
65
65
|
rendering = out["render"]
|
|
66
66
|
gt = camera.ground_truth_image
|
|
67
|
+
if camera.ground_truth_image_mask is not None:
|
|
68
|
+
gt *= camera.ground_truth_image_mask
|
|
69
|
+
rendering *= camera.ground_truth_image_mask
|
|
67
70
|
psnr_value = psnr(rendering, gt).mean().item()
|
|
68
71
|
ssim_value = ssim(rendering, gt).mean().item()
|
|
69
72
|
lpips_value = lpips(rendering, gt).mean().item()
|
|
@@ -96,6 +99,7 @@ if __name__ == "__main__":
|
|
|
96
99
|
parser.add_argument("--load_camera", default=None, type=str)
|
|
97
100
|
parser.add_argument("--mode", choices=["base", "camera"], default="base")
|
|
98
101
|
parser.add_argument("--device", default="cuda", type=str)
|
|
102
|
+
parser.add_argument("--no_image_mask", action="store_true")
|
|
99
103
|
parser.add_argument("--no_rescale_depth_gt", action="store_true")
|
|
100
104
|
parser.add_argument("--save_depth_pcd", action="store_true")
|
|
101
105
|
args = parser.parse_args()
|
|
@@ -104,5 +108,6 @@ if __name__ == "__main__":
|
|
|
104
108
|
with torch.no_grad():
|
|
105
109
|
dataset, gaussians = prepare_rendering(
|
|
106
110
|
sh_degree=args.sh_degree, source=args.source, device=args.device, trainable_camera=args.mode == "camera",
|
|
107
|
-
load_ply=load_ply, load_camera=args.load_camera,
|
|
111
|
+
load_ply=load_ply, load_camera=args.load_camera,
|
|
112
|
+
load_mask=not args.no_image_mask, load_depth=args.save_depth_pcd)
|
|
108
113
|
rendering(dataset, gaussians, save, save_pcd=args.save_depth_pcd, rescale_depth_gt=not args.no_rescale_depth_gt)
|
|
Binary file
|
gaussian_splatting/train.py
CHANGED
|
@@ -31,7 +31,7 @@ def save_cfg_args(destination: str, sh_degree: int, source: str):
|
|
|
31
31
|
|
|
32
32
|
def training(dataset: CameraDataset, gaussians: GaussianModel, trainer: AbstractTrainer, destination: str, iteration: int, save_iterations: List[int], device: str):
|
|
33
33
|
shutil.rmtree(os.path.join(destination, "point_cloud"), ignore_errors=True) # remove the previous point cloud
|
|
34
|
-
pbar = tqdm(range(1, iteration+1))
|
|
34
|
+
pbar = tqdm(range(1, iteration+1), dynamic_ncols=True, desc="Training")
|
|
35
35
|
epoch = list(range(len(dataset)))
|
|
36
36
|
epoch_psnr = torch.empty(3, 0, device=device)
|
|
37
37
|
ema_loss_for_log = 0.0
|
|
@@ -45,8 +45,13 @@ def training(dataset: CameraDataset, gaussians: GaussianModel, trainer: Abstract
|
|
|
45
45
|
idx = epoch[epoch_idx]
|
|
46
46
|
loss, out = trainer.step(dataset[idx])
|
|
47
47
|
with torch.no_grad():
|
|
48
|
+
ground_truth_image = dataset[idx].ground_truth_image
|
|
49
|
+
rendered_image = out["render"]
|
|
50
|
+
if dataset[idx].ground_truth_image_mask is not None:
|
|
51
|
+
ground_truth_image *= dataset[idx].ground_truth_image_mask
|
|
52
|
+
rendered_image *= dataset[idx].ground_truth_image_mask
|
|
48
53
|
ema_loss_for_log = 0.4 * loss.item() + 0.6 * ema_loss_for_log
|
|
49
|
-
epoch_psnr = torch.concat([epoch_psnr, psnr(
|
|
54
|
+
epoch_psnr = torch.concat([epoch_psnr, psnr(rendered_image, ground_truth_image)], dim=1)
|
|
50
55
|
if step % 10 == 0:
|
|
51
56
|
pbar.set_postfix({'epoch': step // len(dataset), 'loss': ema_loss_for_log, 'psnr': avg_psnr_for_log, 'n': gaussians._xyz.shape[0]})
|
|
52
57
|
if step in save_iterations:
|
|
@@ -3,8 +3,8 @@ gaussian_splatting/camera.py,sha256=vo7mu6lyFpIhDqOAgNiJuPan8t_nDJn5cJkAYygLFcA,
|
|
|
3
3
|
gaussian_splatting/camera_trainable.py,sha256=nI6hFFRV2ev7VwLlKUbzEdN9zUmngYZAANGLr1p1yBA,3841
|
|
4
4
|
gaussian_splatting/gaussian_model.py,sha256=_Dy_dDa2prALhVgg428a-O8-8PODg3c_JPkOJJ8X4o8,13275
|
|
5
5
|
gaussian_splatting/prepare.py,sha256=rgwdDhPU-sS57ZgTLKwzognbS1hfR2JtjZqlC4FqPbI,3241
|
|
6
|
-
gaussian_splatting/render.py,sha256=
|
|
7
|
-
gaussian_splatting/train.py,sha256=
|
|
6
|
+
gaussian_splatting/render.py,sha256=RhZoILWxtkuDEhiL2cQsvZWNBmkyDAROYdvrQaFhPkc,6295
|
|
7
|
+
gaussian_splatting/train.py,sha256=RdPg53jf2C8SBosTod5GmoDcIIk83hhdAIcd1prvTcM,5735
|
|
8
8
|
gaussian_splatting/dataset/__init__.py,sha256=-runuT-61P0YVpfV_WXqwUZM1oY0N012YH13Bt3rzSU,138
|
|
9
9
|
gaussian_splatting/dataset/camera_trainable.py,sha256=Kd8v-_ZJ9dLIQ2QyVOXbmouYf5QjbgOgHNRHVpkgCms,5041
|
|
10
10
|
gaussian_splatting/dataset/dataset.py,sha256=0tmIZ5P7kOEdABiEAXPznkRN91e5rcT5VsAzOLoOuEM,2392
|
|
@@ -12,9 +12,9 @@ gaussian_splatting/dataset/colmap/__init__.py,sha256=YEYT2k2WJSqrkkZq4KAJYS9UMgq
|
|
|
12
12
|
gaussian_splatting/dataset/colmap/dataset.py,sha256=0UBQ6ynOqElHZSphJ-MSbYQqCwwYZaAXl1y9AY5YKuY,4720
|
|
13
13
|
gaussian_splatting/dataset/colmap/params_init.py,sha256=6_6gZ0Wl4aZrps2PJ_U234sxW5D-vOTfwioVa1FWC-E,1802
|
|
14
14
|
gaussian_splatting/dataset/colmap/read_write_model.py,sha256=TenI7ai5UV7Ksg2vAXvJWnYFwOOo1tlS_633RfCLuQU,23137
|
|
15
|
-
gaussian_splatting/diff_gaussian_rasterization/_C.cp310-win_amd64.pyd,sha256=
|
|
15
|
+
gaussian_splatting/diff_gaussian_rasterization/_C.cp310-win_amd64.pyd,sha256=UfYzEygfKz1Tg6C_SWSy6GKzTlJwREg2NPVF-qx51jg,1287680
|
|
16
16
|
gaussian_splatting/diff_gaussian_rasterization/__init__.py,sha256=a9D0IZiPx-Mk1795hSq54T-NYT4MtEN_MZrxeMhw0Eo,6705
|
|
17
|
-
gaussian_splatting/simple_knn/_C.cp310-win_amd64.pyd,sha256=
|
|
17
|
+
gaussian_splatting/simple_knn/_C.cp310-win_amd64.pyd,sha256=Y2py_Za4ucGG1t7iV-9GPejKs8lokpEru6T7TdVmJts,1156608
|
|
18
18
|
gaussian_splatting/trainer/__init__.py,sha256=962fEY8A0spSQn5de_d_LkPOjA1PYKrLbuAkxwZo7mI,940
|
|
19
19
|
gaussian_splatting/trainer/abc.py,sha256=_gcqmEobhSOdZnMyNb2oKS6cZJ-Mg3oYL4xJ5Y3_oic,4262
|
|
20
20
|
gaussian_splatting/trainer/base.py,sha256=fngLruQ9hMSNLFbc_5woG7jm6cidpoZ0dzk_zImRaE4,4851
|
|
@@ -45,8 +45,8 @@ gaussian_splatting/utils/lpipsPyTorch/modules/__init__.py,sha256=47DEQpj8HBSa-_T
|
|
|
45
45
|
gaussian_splatting/utils/lpipsPyTorch/modules/lpips.py,sha256=YScu0oXIEstCCjJVRItS_R_csUw70sBMFuP8Syl2UdI,1187
|
|
46
46
|
gaussian_splatting/utils/lpipsPyTorch/modules/networks.py,sha256=kqIebq7dAhHypTXweFVEf_RDbN7_Zv7O3MlD-CfRvpg,2788
|
|
47
47
|
gaussian_splatting/utils/lpipsPyTorch/modules/utils.py,sha256=TDcem3E3HqDNN2MT8qlOL_BKVHeO4HRE77JxF-kOWk8,915
|
|
48
|
-
gaussian_splatting-1.19.
|
|
49
|
-
gaussian_splatting-1.19.
|
|
50
|
-
gaussian_splatting-1.19.
|
|
51
|
-
gaussian_splatting-1.19.
|
|
52
|
-
gaussian_splatting-1.19.
|
|
48
|
+
gaussian_splatting-1.19.2.dist-info/licenses/LICENSE.md,sha256=bMuRQKn0u485mx8JBBTJ5Simc-aWHaQsxmoB6jsg5oE,4752
|
|
49
|
+
gaussian_splatting-1.19.2.dist-info/METADATA,sha256=LlY7Xiln84Uz24GZUl14IqxRsWL3nUXOe0jLZHNdAdY,17183
|
|
50
|
+
gaussian_splatting-1.19.2.dist-info/WHEEL,sha256=KUuBC6lxAbHCKilKua8R9W_TM71_-9Sg5uEP3uDWcoU,101
|
|
51
|
+
gaussian_splatting-1.19.2.dist-info/top_level.txt,sha256=uaYrPYXRHhpybgCnsoazTcdhpzZGnLT_vd5eoRzBWWI,19
|
|
52
|
+
gaussian_splatting-1.19.2.dist-info/RECORD,,
|
|
File without changes
|
{gaussian_splatting-1.19.1.dist-info → gaussian_splatting-1.19.2.dist-info}/licenses/LICENSE.md
RENAMED
|
File without changes
|
|
File without changes
|