diff --git a/nerfstudio/cameras/cameras.py b/nerfstudio/cameras/cameras.py index 8d66e3ae4..edc8da0a0 100644 --- a/nerfstudio/cameras/cameras.py +++ b/nerfstudio/cameras/cameras.py @@ -420,7 +420,7 @@ class Cameras: self.cy[indices], height=self._image_heights[indices], width=self._image_widths[indices], - distortion_params=self.distortion_params[indices] if self.distortion_params else None, + distortion_params=self.distortion_params[indices] if self.distortion_params is not None else None, camera_type=self.camera_type[indices], ) if isinstance(indices, (int, slice)): @@ -433,6 +433,8 @@ class Cameras: self.cy[indices + (slice(None),)], height=self._image_heights[indices + (slice(None),)], width=self._image_widths[indices + (slice(None),)], - distortion_params=self.distortion_params[indices + (slice(None),)] if self.distortion_params else None, + distortion_params=self.distortion_params[indices + (slice(None),)] + if self.distortion_params is not None + else None, camera_type=self.camera_type[indices + (slice(None),)], )