Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solution of TypeError: 'NoneType' object is not subscriptable #49

Open
hulxhlx opened this issue Nov 12, 2024 · 0 comments
Open

Solution of TypeError: 'NoneType' object is not subscriptable #49

hulxhlx opened this issue Nov 12, 2024 · 0 comments

Comments

@hulxhlx
Copy link

hulxhlx commented Nov 12, 2024

Traceback (most recent call last):
File "/home/xxx/3DGS/CF-3DGS/run_cf3dgs.py", line 47, in
trainer.train_from_progressive()
File "/home/xxx/3DGS/CF-3DGS/trainer/cf3dgs_trainer.py", line 445, in train_from_progressive
gauss_params = self.init_two_view(
File "/home/xxx/3DGS/CF-3DGS/trainer/cf3dgs_trainer.py", line 198, in init_two_view
loss, rend_dict, psnr_train = self.train_step(self.gs_render,
File "/home/xxx/3DGS/CF-3DGS/trainer/cf3dgs_trainer.py", line 119, in train_step
image, viewspace_point_tensor, visibility_filter, radii = (render_pkg["image"],
TypeError: 'NoneType' object is not subscriptable
Training progress: 0%|

solution:
in file gaussian_model_cf.py
in the end ,add this:

    elif len(out) == 5:
        rendered_image, radii, rendered_depth, rendered_alpha, n_touched= out

        rendered_image = rendered_image.clamp(0, 1)

        # Those Gaussians that were frustum culled or had a radius of 0 were not visible.
        # They will be excluded from value updates used in the splitting criteria.
        return {
            "image": rendered_image,
            "depth": rendered_depth,
            "viewspace_points": screenspace_points,
            "visibility_filter": radii > 0,
            "radii": radii,
            "n_touched": n_touched,
        }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant