facebookresearch / OrienterNet

Source Code for Paper "OrienterNet Visual Localization in 2D Public Maps with Neural Matching"
Other
463 stars 48 forks source link

Downloading of KITTI dataset for evaluation #39

Open Jael8300 opened 1 year ago

Jael8300 commented 1 year ago

Hi,

Thank you so much for sharing your amazing work. I've got a really simple problem that I can't seem to solve, hence submitting an issue. I was able to replicate the evaluation for the MGL dataset, however when downloading and preparing the dataset for kitti, I would always encounter the following error:

OrienterNetTest) tester@workstation3:~/ChingHui/OrienterNet$ python -m maploc.data.kitti.prepare Traceback (most recent call last): File "/home/tester/miniconda3/envs/OrienterNetTest/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/home/tester/miniconda3/envs/OrienterNetTest/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/home/tester/ChingHui/OrienterNet/maploc/data/kitti/prepare.py", line 100, in "--data_dir", type=Path, default=Path(KittiDataModule.default_cfg["local_dir"]) KeyError: 'local_dir'

How can I resolve this issue? Thank you so much for your time!

sarlinpe commented 1 year ago

Fixed in https://github.com/facebookresearch/OrienterNet/commit/38e60a1160925b099ac2f521ef699f52f53e236b.

Jael8300 commented 1 year ago

Thank you so much for your quick reply!

I've made amendments to my code as provided in your reply. However when I run the evaluation, it would provide me with an error FileNotFoundError: [Errno 2] No such file or directory: '/home/tester/ChingHui/OrienterNet/datasets/kitti/2011_09_26/2011_09_26_drive_0002_sync/oxts/data/0000000048.txt'

It would seem that the files I downloaded does not have the same drive name as in names in the train_files.txt, which I assume is what is required here. How should I navigate this problem? OrienterNet_kittidataset

sarlinpe commented 10 months ago

Did you eventually figure out this problem? Which lines throws this error? 2011_09_26_drive_0002_sync is included in train_files.txt so it should have been downloaded automatically - did any error appear in the downloading step?

Jael8300 commented 9 months ago

Hi! I didn't manage to solve the previous error, but instead I ran everything from the beginning again, and was able to download the kitti dataset without any trouble. However, the error this time is different and instead what I received during evaluation is the 'FileNotFoundError: Cannot find the KITTI dataset, run maploc.data.kitti.prepare' from maploc/data/kitti/dataset.py line 74.

image

When I checked the code, the error is thrown when self-root or self.root.downloaded does not exist. The self.root turns out to be datasets/kitti which exists, however a downloaded folder did not exist in the datasets/kitti folder which resulted in the thrown error.

image

Do you have any advice on how I should go about solving this error?

Jael8300 commented 9 months ago

image As for the error mentioned previously, I tried downloading the KITTI dataset again but the 2011_09_26_drive_0002_sync doesn't seem to be available which is causing the error.

sarlinpe commented 9 months ago

There was indeed a bug in the downloading code, it has been fixed in https://github.com/facebookresearch/OrienterNet/pull/45. Please delete the existing data folder and run maploc.data.kitti.prepare again.

shoulder1love commented 3 weeks ago

image As for the error mentioned previously, I tried downloading the KITTI dataset again but the 2011_09_26_drive_0002_sync doesn't seem to be available which is causing the error.

Hey, maybe the error occurs here: there is no .downloaded file in the path.

https://github.com/facebookresearch/OrienterNet/blob/0280b6e248046dc7d714801d7d0651a162fd5a63/maploc/data/kitti/dataset.py#L73

Just have a try with: python3 -m maploc.data.kitti.prepare --generate_tiles https://github.com/facebookresearch/OrienterNet/blob/0280b6e248046dc7d714801d7d0651a162fd5a63/maploc/data/kitti/prepare.py#L119

the problem by my side solved