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

Request a simple demo script #3

Closed
peiyunh opened this issue Aug 19, 2019 · 8 comments
Closed

Request a simple demo script #3

peiyunh opened this issue Aug 19, 2019 · 8 comments

Comments

@peiyunh
Copy link

peiyunh commented Aug 19, 2019

Hi,

Thanks for sharing your amazing work.

This is a shot in the dark, but I am wondering if you consider releasing a simple demo script that takes a LiDAR sweep as input and output predicted semantic labels. I am asking because I want to run the pretrained models on a different dataset. The easiest way seems to be porting my dataset into the same format as SemanticKITTI. Is that the case?

Thanks,
Peiyun

@tano297
Copy link
Member

tano297 commented Aug 20, 2019

Hi,

Not a shot in the dark at all.

I thought of providing this functionality as I do in bonnetal with an infer_video.py and infer_img.py, but unfortunately, images are a lot more standard than point clouds to deal with.

So, I quickly realized that to make an infer_scan.py script I would have to specify a format, and if we decided on our own format, then our inference script was already good enough.

I could provide a script, for example, for .ply, .stl, or .pcd files, or something standard like that, but since I am going to release a ROS interface soon after ICRA deadline I let this side project go for now.

So, long story short, putting the data in the kitti format is the easiest way for now.

@peiyunh
Copy link
Author

peiyunh commented Aug 27, 2019

Thanks for the reply! Closing the issue.

@peiyunh peiyunh closed this as completed Aug 27, 2019
@ivannson
Copy link

@peiyunh Were you able to run get the predictions for your own dataset? And did you get those predictions after training with KITTI data?

@tano297 I noticed that in infer.py script, the data split into train, val and test, so there has to be at least one sequence from 00 to 07 for train, 08 for val, and any other sequence for the test. I was wondering what is the reason for doing so and if it's possible to skip train and val, since the model is already trained, and go directly to predictions?

@tano297
Copy link
Member

tano297 commented Sep 13, 2019

@ivannson. It is completely possible.

2 ways to do this:

  • Simplest: Just split the test set into the 3 categories again, i.e:

Changing

split: # sequence numbers
  train:
    - 0
    - 1
    - 2
    - 3
    - 4
    - 5
    - 6
    - 7
    - 9
    - 10
  valid:
    - 8
  test:
    - 11
    - 12
    - 13
    - 14
    - 15
    - 16
    - 17
    - 18
    - 19
    - 20
    - 21

for

split: # sequence numbers
  train:
    - 11
  valid:
    - 12
  test:
    - 13
    - 14
    - 15
    - 16
    - 17
    - 18
    - 19
    - 20
    - 21
  • Another way is by going to modules/user.py and commenting the following lines:
  def infer(self):
    # do train set
    # self.infer_subset(loader=self.parser.get_train_set(),
    #                 to_orig_fn=self.parser.to_original)

    # do valid set
    # self.infer_subset(loader=self.parser.get_valid_set(),
    #                  to_orig_fn=self.parser.to_original)
    
    # do test set
    self.infer_subset(loader=self.parser.get_test_set(),
                      to_orig_fn=self.parser.to_original)

    print('Finished Infering')

    return

Both are hacks. Feel free to modify the infer function to take something like "do_train, do_valid, do_test" as parameters and submit a PR, I'm happy to change this

@ivannson
Copy link

Great, will do that. Thanks a lot for such a quick reply!

@peiyunh
Copy link
Author

peiyunh commented Sep 13, 2019

@ivannson Yes, I was able to get the predictions on my own dataset. I basically took the code from infer_subset and replaced the existing data loader with an iterator over my own dataset.

@abhigoku10
Copy link

@peiyunh is it possible ot share the inference pipeline on the custom dataset so that i can try it with my own data ?? thansk in advance

@xdtzzz
Copy link

xdtzzz commented May 19, 2021

@peiyunh hi, i also do this work, but i don't know how to use infer.py to get predictions with my own dataset. Where should to be modified? i only test my own dataset, what are the train, valid and test dataset?

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

5 participants