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

Modifications might be needed to run the code #6

Open
asjmasjm opened this issue Aug 11, 2023 · 1 comment
Open

Modifications might be needed to run the code #6

asjmasjm opened this issue Aug 11, 2023 · 1 comment

Comments

@asjmasjm
Copy link

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.

@DrawingProcess
Copy link

I have a same issue. Thank you for issue taking.

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

2 participants