'S3DISSplit' object has no attribute 'sampler'
Hi! Thank you for your amazing job.
I wanted to see S3DIS results on RandLA-Net model. I've followed the instructions step by step at homepage.
Now sth went wrong when I perform pipeline.run_test() for the pre-trained model.
test 0/1: 100%|██████████| 87306/87306 [00:36<00:00, 1148.52it/s]INFO - 2021-01-14 06:39:25,229 - semantic_segmentation - DEVICE : cpu INFO - 2021-01-14 06:39:25,231 - semantic_segmentation - Logging in file : ./logs/RandLANet_S3DIS_torch/log_test_2021-01-14_06:39:25.txt INFO - 2021-01-14 06:39:25,233 - s3dis - Found 23 pointclouds for test
AttributeError Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/open3d/_ml3d/torch/pipelines/semantic_segmentation.py in run_test(self) 201 202 test_dataset = dataset.get_split('test') --> 203 test_sampler = test_dataset.sampler 204 test_split = TorchDataloader(dataset=test_dataset, 205 preprocess=model.preprocess,
AttributeError: 'S3DISSplit' object has no attribute 'sampler'
Why it said no attribute sampler? It seems the data has already been loaded. Thanks in advance.
@Katherine2013 PR #226 should fix this issue. Feel free to close this issue after testing it.
Hi Have you fixed this issue? I met the same problem when I tried to train a model use RandLA on Semantic3d dataset. I refered to #226 , but it didn't work.
@zcy1065670505 Hi there! I tried by following the instructions in #226 , still, it didn't work. So I switched back to RandLA tensorflow version.
Hi For my perject reason, It must be RandLA-Torch Version, Anyway can make it work ?
---Original--- From: @.> Date: Sat, Mar 27, 2021 20:07 PM To: @.>; Cc: @.@.>; Subject: Re: [intel-isl/Open3D-ML] 'S3DISSplit' object has no attribute 'sampler' (#211)
@zcy1065670505 Hi there! I tried by following the instructions in #226 , still, it didn't work. So I switched back to RandLA tensorflow version.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
@zcy1065670505 You can try some of the unofficial versions of pytorch RandLA on GitHub. But to my experience, feeding them by custom datasets may face some unexpected problems. Good luck!
@zcy1065670505 #226 fix is merged to the dev branch which will be merged to master in the next release( within 3-4 weeks). For the time being, you can use dev branch, I'll create a separate PR to master for the fix.
Hi @sanskar107, tried to run the custom3D torch script under dev branch however I still experienced the missing sampler attribute. Any advices will be appreciated!
INFO - 2021-04-06 03:10:01,543 - semantic_segmentation - DEVICE : cuda
INFO - 2021-04-06 03:10:01,543 - semantic_segmentation - Logging in file : ./logs/RandLANet_Custom3D_torch/log_train_2021-04-06_03:10:01.txt
INFO - 2021-04-06 03:10:01,544 - customdataset - Found 2 pointclouds for train
Traceback (most recent call last):
File "/content/Open3D-ML/scripts/run_pipeline.py", line 134, in <module>
main()
File "/content/Open3D-ML/scripts/run_pipeline.py", line 130, in main
pipeline.run_train()
File "/usr/local/lib/python3.7/dist-packages/open3d/_ml3d/torch/pipelines/semantic_segmentation.py", line 313, in run_train
train_sampler = train_dataset.sampler
AttributeError: 'Custom3DSplit' object has no attribute 'sampler'
@stellactyy From your error message usr/local/lib/python3.7/dist-packages/open3d/_ml3d/torch/pipelines/semantic_segmentation.py , it looks like bundled Open3D-ML is being used which comes with the wheel. Please source set_open3d_ml_root.sh to use the dev branch.
@sanskar107 Yes I have already source /content/Open3D-ML/set_open3d_ml_root.sh after switching the git clone repo to dev branch, however it still resulted in using the Open3D-ML in python3.7.
The following updating can make it work.
Edit the '~/.local/lib/python3.8/site-packages/open3d/_ml3d/datasets/s3dis.py'
class S3DISSplit(): to class S3DISSplit(BaseDatasetSplit):
and
def __init__(self, dataset, split='training'):
super().__init__(dataset, split=split)
Thanks @eiiijiiiy it works for me!
Fixed in the latest release.