Fix bug of multiple pre-processing when segmentation (PyTorch) #645
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It is very slow in performing segmentation inference.
#531
#234
And, it is because the dataloader will apply multiple data preprocessing if self.cache_convert is None.
Open3D-ML/ml3d/torch/dataloaders/torch_dataloader.py
Lines 77 to 83 in fcf97c0
When running the run_inference method, the cache_convert of dataloader is None.
Open3D-ML/ml3d/torch/pipelines/semantic_segmentation.py
Lines 143 to 147 in fcf97c0
This leads to extreme slowness in performing reasoning.
I've added a get_cache method to provide cache to avoid slowdowns caused by multiple preprocessing during inference.
I tested it on a GV100 GPU with RandLA-Net on the Toronto3D dataset.
Inferencing time for a single scene is only two minutes and 37 seconds.
Reasoning is considerably faster than before