ouenal / scribblekitti

Scribble-Supervised LiDAR Semantic Segmentation, CVPR 2022 (ORAL)
https://ouenal.github.io/scribblekitti/
142 stars 17 forks source link

Test on own data #9

Closed christophTUM closed 1 year ago

christophTUM commented 1 year ago

Hello,

how can i test one of your models on my own data? Thanks!

ouenal commented 1 year ago

You can change the dataloader here to suit your own data.

Depending on the type of data you have, a simple solution might be to change the lidar_paths and label_paths definitions here and here, (also rememer to remove the previous related code bits). You should be then able to use the complete dataset class structure without changing anything else and load your own data.

christophTUM commented 1 year ago

Thank you for the fast response! Is it also possible to just actually use it on data without labels or is it just possible to train it on own data?

ouenal commented 1 year ago

If you want to only do inference and not write your own dataloader for it, it should be possible to use evaluate.py and save the model predictions from there. I don't think the test dataloader is implemented in this repo, but a good workaround would be to replace the get_label method with something like:

    def get_label(self, idx):
        lidar_path = self.lidar_paths[idx]
        lidar = np.fromfile(lidar_path, dtype=np.float32)
        empty_label = np.zeros((lidar.shape[0],1))
        return empty_label

You might want to check if the extra dimension (1) is indeed needed, also check the dtype of the label itself if it plays any role. But the code should work with this change, at least work well enough for you to tap into the model predictions.