zjuluolun / BEVPlace

A LiDAR-based complete global localization method.
208 stars 19 forks source link

How to run inference code to get video as shown #14

Open sparshgarg23 opened 2 months ago

sparshgarg23 commented 2 months ago

I was wondering if there are any code related to inference that allows us to visualize the results?

zjuluolun commented 2 months ago

Hi @sparshgarg23 , the visualization code has been integrated into "main.py". After running the tests, you can find the evaluation images in the default "out_imgs/" folder.

sparshgarg23 commented 2 months ago

ok,thanks i also noticed that when i ran the evaluation code after the evaluation was finished,rather than getting the results displayed I ended up getting the ^C displayed on the console. I am currently training on colab ,any idea why this happens. I tried to train the model on my own and just now used your checkpoint as well ,but it's still the same output. For your reference enclosed is the console output

===> Building model
/usr/local/lib/python3.10/dist-packages/torchvision/models/_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or `None` for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing `weights=ResNet34_Weights.IMAGENET1K_V1`. You can also use `weights=ResNet34_Weights.DEFAULT` to get the most up-to-date weights.
  warnings.warn(msg)
=> loading checkpoint '/content/BEVPlace/runs/Aug08_10-17-29/model_best.pth.tar'
=> loaded checkpoint '/content/BEVPlace/runs/Aug08_10-17-29/model_best.pth.tar' (epoch 5)
===> Running evaluation step
====> Extracting Features of KITTI and calculating recalls
/usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py:558: UserWarning: This DataLoader will create 24 worker processes in total. Our suggested max number of worker in current system is 12, which is smaller than what this DataLoader is going to create. Please be aware that excessive worker creation might get DataLoader running slow or even freeze, lower the worker number to avoid potential slowness/freeze if necessary.
  warnings.warn(_create_warning_msg(
100% 32/32 [01:09<00:00,  2.18s/it]
^C
zjuluolun commented 2 months ago

This is likely because the program is still running. Saving the local features for pose estimation can take several minutes. Please wait for the code to finish.