You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I followed the instructions from the README.md, ran the code and it turned out that the compiler complained about some kind of python grammatical errors as "list indices must be integers or slices, not tuple". The compiler also pinned the problem source to the function generate_rays() defined at the 202th line in the datasets.py.
I changed camera_directions = [v @ p2c[:3, :3].T for v, p2c in zip(pixel_directions, self.pix2cam)] directions = [v @ c2w[:3, :3].T for v, c2w in zip(camera_directions, self.cam_to_world)] origins = [np.broadcast_to(c2w[:3, -1], v.shape) for v, c2w in zip(directions, self.cam_to_world)]
to camera_directions = [v @ np.array(p2c)[:3, :3].T for v, p2c in zip(pixel_directions, self.pix2cam)] directions = [v @ np.array(c2w)[:3, :3].T for v, c2w in zip(camera_directions, self.cam_to_world)] origins = [np.broadcast_to(np.array(c2w)[:3, -1], v.shape) for v, c2w in zip(directions, self.cam_to_world)]
then it seemed everything was alright. I am not sure whether this is caused by the python version mismatch or something like this.
The text was updated successfully, but these errors were encountered:
I followed the instructions from the README.md, ran the code and it turned out that the compiler complained about some kind of python grammatical errors as "list indices must be integers or slices, not tuple". The compiler also pinned the problem source to the function generate_rays() defined at the 202th line in the datasets.py.
I changed
camera_directions = [v @ p2c[:3, :3].T for v, p2c in zip(pixel_directions, self.pix2cam)]
directions = [v @ c2w[:3, :3].T for v, c2w in zip(camera_directions, self.cam_to_world)]
origins = [np.broadcast_to(c2w[:3, -1], v.shape) for v, c2w in zip(directions, self.cam_to_world)]
to
camera_directions = [v @ np.array(p2c)[:3, :3].T for v, p2c in zip(pixel_directions, self.pix2cam)]
directions = [v @ np.array(c2w)[:3, :3].T for v, c2w in zip(camera_directions, self.cam_to_world)]
origins = [np.broadcast_to(np.array(c2w)[:3, -1], v.shape) for v, c2w in zip(directions, self.cam_to_world)]
then it seemed everything was alright. I am not sure whether this is caused by the python version mismatch or something like this.
The text was updated successfully, but these errors were encountered: