isl-org / isl-org/Open3D-ML

Attribute error on SemSegSpatiallyRegular sampler

Open
#503 0 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
Python
Stars
2.3k
Forks
365
Avg merge
4h 6m
Merged PRs (30d)
1

Description

### Checklist

- [X] I have searched for [similar issues](https://github.com/isl-org/Open3D-ML/issues).
- [X] I have tested with the [latest development wheel](http://www.open3d.org/docs/latest/getting_started.html#development-version-pip).
- [X] I have checked the [release documentation](http://www.open3d.org/docs/release/) and the [latest documentation](http://www.open3d.org/docs/latest/) (for `master` branch).

### My Question

Hello,

I am trying to run a training program using the `KPFCNN` model and the `SemanticSegmentation` pipeline.
When I try to train the dataset provided, it results in an error stating the following:

`AttributeError: 'SemSegSpatiallyRegularSampler' object has no attribute 'cloud_id'`

Below the code I am using:
```ruby
import open3d.ml as _ml3d
import open3d.ml.torch as ml3d
from open3d.ml.torch.models import KPFCNN
from open3d.ml.torch.pipelines import SemanticSegmentation

dataset = ml3d.datasets.Custom3D(dataset_path='./input/dataset_v1',
name='dataset_v1',
cache_dir='./logs/cache',
train_dir='train2',
val_dir='val2',
test_dir='test')
train_split = dataset.get_split('training')
train_split = dataset.get_split('validation')
train_split = dataset.get_split('test')

#disabled lines of code below, since I do not need to visualize them,
#leaving the 2 lines in the code, just in case.
#MyVis = ml3d.vis.Visualizer()
#MyVis.visualize_dataset(dataset, 'test')

cfg_file = "temp.yml"
cfg = _ml3d.utils.Config.load_from_file(cfg_file)

cfg.dataset['dataset_path'] = "input/dataset_v1"
dataset = ml3d.datasets.Custom3D(cfg.dataset.pop('dataset_path', None), **cfg.dataset)
model = KPFCNN(**cfg.model)
pipeline = SemanticSegmentation(model, dataset, **cfg.pipeline)

pipeline.cfg_tb = {
'readme': "NA",
'cmd_line': "NA",
'dataset': "NA",
'model': "NA",
'pipeline': "NA"
}

pipeline.run_train()
```

The error I am getting is sourcing from `line 79` inside the `semseg_spatially_regular.py` file since this is the sampler obtained from the `temp.yaml` file.

Far above the error the following Attribute error is given, worth sharing here:
`AttributeError: Caught AttributeError in DataLoader worker process 0`

I don't know what to do with the error and how to solve it.

Hope anyone is able to help me out solving this error.

Config info:
Open3d version 0.15.2
Torch version: 1.8.2
CUDA verison: 11.0
GPU devices: 1
Video card: NVIDIA GeForce GTX 1060

Kind regards,
Richard

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.