Closed yzslab closed 2 years ago
It sounds like your python installation is having trouble reading images? This is most likely unrelated to our codebase. Have you confirmed that our unit tests pass, and have you tried loading an image with PIL outside of this codebase?
It sounds like your python installation is having trouble reading images? This is most likely unrelated to our codebase. Have you confirmed that our unit tests pass, and have you tried loading an image with PIL outside of this codebase?
Hi, thanks for your reply.
I tried to read image with PIL outside of this codebase:
from PIL import Image
Image.open(open("dataset/tat_intermediate_Playground/train/rgb/00001.png"))
and it reported the same error. So, this problem is indeed related to PIL.
I also found that adding a parameter mode='rb'
to open()
can solve it (source).
After adding mode='rb'
to the line 697 of internal/datasets.py
, the training works now.
Thanks.
Could you clarify which line you needed to add mode='rb' to? Or better yet, could you push a CL? Line 697 in the repo doesn't have any code that opens files.
Could you clarify which line you needed to add mode='rb' to? Or better yet, could you push a CL? Line 697 in the repo doesn't have any code that opens files.
Hi, seems like because of this commit: https://github.com/google-research/multinerf/commit/25d1748612579dcb8c9e1689cfe64a1f2345c2ba, the line number has been changed.
Here is the line 697 I mentioned before: https://github.com/google-research/multinerf/blob/4f6ffeca73888a83a53f60d880b21633ac6cf28b/internal/datasets.py#L697
Its new line number is 737 now: https://github.com/google-research/multinerf/blob/7c9dc01cef398e35c7b86fb52d9ecb5a979f5b85/internal/datasets.py#L737
Hi, I am trying to train Tanks and Temples dataset by this command:
But it reports UnicodeDecodeError:
Do you know how to fix it? Thanks.