ouenal / scribblekitti

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

ValueError: 'Dataloader' returned 0 length. Please make sure that your Dataloader at least returns 1 batch #12

Closed LinLin1031 closed 1 year ago

LinLin1031 commented 1 year ago

Hello!

Why do I always get this problem when I run "evaluate.py"? I tried to change num_workers to 0, but I still can't avoid this error. I would appreciate your help.

Best.

ouenal commented 1 year ago

I would suggest checking to see if the file paths can be indeed found in your root directory. A quick way to do it would be to print len(self.train_dataset.lidar_paths) and len(self.val_dataset.lidar_paths) after setup.

LinLin1031 commented 1 year ago

Hello!

Thank you for your suggestion! I found the problem by debugging: I have not placed the data of sequence 08 in "data/sequences", so that len(self.val_dataset.lidar_paths) is 0.

Also, do I need to put all the velodyne and labels data of sequence 08, sequence 11-21 in the SemanticKITTI dataset into "data/sequences"? Because in "semantickitti.py", the value of the dictionary variable "split" is {'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]}, I think it will read the data of other sequences.

Best.

ouenal commented 1 year ago

You don't need to put the test sequences in if you don't plan on running inference on the test set.