Open3D-ML icon indicating copy to clipboard operation
Open3D-ML copied to clipboard

Attribute error on SemSegSpatiallyRegular sampler

Open RichardSnijder opened this issue 4 years ago • 0 comments

Checklist

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:

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

RichardSnijder avatar Mar 30 '22 14:03 RichardSnijder