nerfstudio-project / nerfstudio

A collaboration friendly studio for NeRFs
https://docs.nerf.studio
Apache License 2.0
8.87k stars 1.18k forks source link

Fix parsing of non ascii image names in colmap's images.bin #3256

Closed TamirCohen closed 13 hours ago

TamirCohen commented 3 days ago

If colmap image file name is non ascii an error will be thrown in the line current_char.decode("utf-8") while trying to parse the file images.bin It is thrown because it tries to decode a single byte as utf-8, And non ascii chars are represented using more bytes than 1.

My solution proposal is to read all the bytes, and than decode it. I tested it and it worked OK

TamirCohen commented 2 days ago

Thanks @kerrj. Due to an error in the sphynx build I can not merge it (I do not think it is related to my commit). Should I wait after https://github.com/nerfstudio-project/nerfstudio/pull/3265 is fixed and then merge it?

kerrj commented 1 day ago

Could you re-run lint please? the linter was updated along with the np 2.0 patch

TamirCohen commented 17 hours ago

I reran it and it did not work because there are empy comments in: https://github.com/nerfstudio-project/nerfstudio/blob/d6df39b70d2e0b444178d23b694989e39d624781/nerfstudio/configs/method_configs.py#L304

https://github.com/nerfstudio-project/nerfstudio/blame/d6df39b70d2e0b444178d23b694989e39d624781/tests/pipelines/test_vanilla_pipeline.py#L45

Should we remove these empty comment in another PR or in this PR?

jb-ye commented 13 hours ago

Just rebase to the top main should resolve the issue.