GithubHelp home page GithubHelp logo

isl-org / open3d-ml Goto Github PK

View Code? Open in Web Editor NEW
1.7K 46.0 307.0 46.82 MB

An extension of Open3D to address 3D Machine Learning tasks

License: Other

Shell 1.62% Python 98.37% Makefile 0.01%
3d-perception datasets pretrained-models lidar rgbd tensorflow pytorch visualization semantic-segmentation object-detection

open3d-ml's Introduction

ML

Ubuntu CI Style check PyTorch badge TensorFlow badge

Installation | Get started | Structure | Tasks & Algorithms | Model Zoo | Datasets | How-tos | Contribute

Open3D-ML is an extension of Open3D for 3D machine learning tasks. It builds on top of the Open3D core library and extends it with machine learning tools for 3D data processing. This repo focuses on applications such as semantic point cloud segmentation and provides pretrained models that can be applied to common tasks as well as pipelines for training.

Open3D-ML works with TensorFlow and PyTorch to integrate easily into existing projects and also provides general functionality independent of ML frameworks such as data visualization.

Installation

Users

Open3D-ML is integrated in the Open3D v0.11+ python distribution and is compatible with the following versions of ML frameworks.

  • PyTorch 2.0.*
  • TensorFlow 2.13.* (macOS, see below for Linux)
  • CUDA 10.1, 11.* (On GNU/Linux x86_64, optional)

You can install Open3D with

# make sure you have the latest pip version
pip install --upgrade pip
# install open3d
pip install open3d

To install a compatible version of PyTorch or TensorFlow you can use the respective requirements files:

# To install a compatible version of TensorFlow
pip install -r requirements-tensorflow.txt
# To install a compatible version of PyTorch
pip install -r requirements-torch.txt
# To install a compatible version of PyTorch with CUDA on Linux
pip install -r requirements-torch-cuda.txt

To test the installation use

# with PyTorch
$ python -c "import open3d.ml.torch as ml3d"
# or with TensorFlow
$ python -c "import open3d.ml.tf as ml3d"

If you need to use different versions of the ML frameworks or CUDA we recommend to build Open3D from source or build Open3D in docker.

From v0.18 onwards on Linux, the PyPI Open3D wheel does not have native support for Tensorflow due to build incompatibilities between PyTorch and Tensorflow [See Python 3.11 support PR] for details. If you'd like to use Open3D with Tensorflow on Linux, you can build Open3D wheel from source in docker with support for Tensorflow (but not PyTorch) as:

cd docker
# Build open3d and open3d-cpu wheels for Python 3.10 with Tensorflow support
export BUILD_PYTORCH_OPS=OFF BUILD_TENSORFLOW_OPS=ON
./docker_build.sh cuda_wheel_py310

Getting started

Reading a dataset

The dataset namespace contains classes for reading common datasets. Here we read the SemanticKITTI dataset and visualize it.

import open3d.ml.torch as ml3d  # or open3d.ml.tf as ml3d

# construct a dataset by specifying dataset_path
dataset = ml3d.datasets.SemanticKITTI(dataset_path='/path/to/SemanticKITTI/')

# get the 'all' split that combines training, validation and test set
all_split = dataset.get_split('all')

# print the attributes of the first datum
print(all_split.get_attr(0))

# print the shape of the first point cloud
print(all_split.get_data(0)['point'].shape)

# show the first 100 frames using the visualizer
vis = ml3d.vis.Visualizer()
vis.visualize_dataset(dataset, 'all', indices=range(100))

Visualizer GIF

Loading a config file

Configs of models, datasets, and pipelines are stored in ml3d/configs. Users can also construct their own yaml files to keep record of their customized configurations. Here is an example of reading a config file and constructing modules from it.

import open3d.ml as _ml3d
import open3d.ml.torch as ml3d # or open3d.ml.tf as ml3d

framework = "torch" # or tf
cfg_file = "ml3d/configs/randlanet_semantickitti.yml"
cfg = _ml3d.utils.Config.load_from_file(cfg_file)

# fetch the classes by the name
Pipeline = _ml3d.utils.get_module("pipeline", cfg.pipeline.name, framework)
Model = _ml3d.utils.get_module("model", cfg.model.name, framework)
Dataset = _ml3d.utils.get_module("dataset", cfg.dataset.name)

# use the arguments in the config file to construct the instances
cfg.dataset['dataset_path'] = "/path/to/your/dataset"
dataset = Dataset(cfg.dataset.pop('dataset_path', None), **cfg.dataset)
model = Model(**cfg.model)
pipeline = Pipeline(model, dataset, **cfg.pipeline)

Semantic Segmentation

Running a pretrained model for semantic segmentation

Building on the previous example we can instantiate a pipeline with a pretrained model for semantic segmentation and run it on a point cloud of our dataset. See the model zoo for obtaining the weights of the pretrained model.

import os
import open3d.ml as _ml3d
import open3d.ml.torch as ml3d

cfg_file = "ml3d/configs/randlanet_semantickitti.yml"
cfg = _ml3d.utils.Config.load_from_file(cfg_file)

model = ml3d.models.RandLANet(**cfg.model)
cfg.dataset['dataset_path'] = "/path/to/your/dataset"
dataset = ml3d.datasets.SemanticKITTI(cfg.dataset.pop('dataset_path', None), **cfg.dataset)
pipeline = ml3d.pipelines.SemanticSegmentation(model, dataset=dataset, device="gpu", **cfg.pipeline)

# download the weights.
ckpt_folder = "./logs/"
os.makedirs(ckpt_folder, exist_ok=True)
ckpt_path = ckpt_folder + "randlanet_semantickitti_202201071330utc.pth"
randlanet_url = "https://storage.googleapis.com/open3d-releases/model-zoo/randlanet_semantickitti_202201071330utc.pth"
if not os.path.exists(ckpt_path):
    cmd = "wget {} -O {}".format(randlanet_url, ckpt_path)
    os.system(cmd)

# load the parameters.
pipeline.load_ckpt(ckpt_path=ckpt_path)

test_split = dataset.get_split("test")
data = test_split.get_data(0)

# run inference on a single example.
# returns dict with 'predict_labels' and 'predict_scores'.
result = pipeline.run_inference(data)

# evaluate performance on the test set; this will write logs to './logs'.
pipeline.run_test()

Users can also use predefined scripts to load pretrained weights and run testing.

Training a model for semantic segmentation

Similar as for inference, pipelines provide an interface for training a model on a dataset.

# use a cache for storing the results of the preprocessing (default path is './logs/cache')
dataset = ml3d.datasets.SemanticKITTI(dataset_path='/path/to/SemanticKITTI/', use_cache=True)

# create the model with random initialization.
model = RandLANet()

pipeline = SemanticSegmentation(model=model, dataset=dataset, max_epoch=100)

# prints training progress in the console.
pipeline.run_train()

For more examples see examples/ and the scripts/ directories. You can also enable saving training summaries in the config file and visualize ground truth and results with tensorboard. See this tutorial for details.

3D Object Detection

Running a pretrained model for 3D object detection

The 3D object detection model is similar to a semantic segmentation model. We can instantiate a pipeline with a pretrained model for Object Detection and run it on a point cloud of our dataset. See the model zoo for obtaining the weights of the pretrained model.

import os
import open3d.ml as _ml3d
import open3d.ml.torch as ml3d

cfg_file = "ml3d/configs/pointpillars_kitti.yml"
cfg = _ml3d.utils.Config.load_from_file(cfg_file)

model = ml3d.models.PointPillars(**cfg.model)
cfg.dataset['dataset_path'] = "/path/to/your/dataset"
dataset = ml3d.datasets.KITTI(cfg.dataset.pop('dataset_path', None), **cfg.dataset)
pipeline = ml3d.pipelines.ObjectDetection(model, dataset=dataset, device="gpu", **cfg.pipeline)

# download the weights.
ckpt_folder = "./logs/"
os.makedirs(ckpt_folder, exist_ok=True)
ckpt_path = ckpt_folder + "pointpillars_kitti_202012221652utc.pth"
pointpillar_url = "https://storage.googleapis.com/open3d-releases/model-zoo/pointpillars_kitti_202012221652utc.pth"
if not os.path.exists(ckpt_path):
    cmd = "wget {} -O {}".format(pointpillar_url, ckpt_path)
    os.system(cmd)

# load the parameters.
pipeline.load_ckpt(ckpt_path=ckpt_path)

test_split = dataset.get_split("test")
data = test_split.get_data(0)

# run inference on a single example.
# returns dict with 'predict_labels' and 'predict_scores'.
result = pipeline.run_inference(data)

# evaluate performance on the test set; this will write logs to './logs'.
pipeline.run_test()

Users can also use predefined scripts to load pretrained weights and run testing.

Training a model for 3D object detection

Similar as for inference, pipelines provide an interface for training a model on a dataset.

# use a cache for storing the results of the preprocessing (default path is './logs/cache')
dataset = ml3d.datasets.KITTI(dataset_path='/path/to/KITTI/', use_cache=True)

# create the model with random initialization.
model = PointPillars()

pipeline = ObjectDetection(model=model, dataset=dataset, max_epoch=100)

# prints training progress in the console.
pipeline.run_train()

Below is an example of visualization using KITTI. The example shows the use of bounding boxes for the KITTI dataset.

For more examples see examples/ and the scripts/ directories. You can also enable saving training summaries in the config file and visualize ground truth and results with tensorboard. See this tutorial for details.

Using predefined scripts

scripts/run_pipeline.py provides an easy interface for training and evaluating a model on a dataset. It saves the trouble of defining specific model and passing exact configuration.

python scripts/run_pipeline.py {tf/torch} -c <path-to-config> --pipeline {SemanticSegmentation/ObjectDetection} --<extra args>

You can use script for both semantic segmentation and object detection. You must specify either SemanticSegmentation or ObjectDetection in the pipeline parameter. Note that extra args will be prioritized over the same parameter present in the configuration file. So instead of changing param in config file, you may pass the same as a command line argument while launching the script.

For eg.

# Launch training for RandLANet on SemanticKITTI with torch.
python scripts/run_pipeline.py torch -c ml3d/configs/randlanet_semantickitti.yml --dataset.dataset_path <path-to-dataset> --pipeline SemanticSegmentation --dataset.use_cache True

# Launch testing for PointPillars on KITTI with torch.
python scripts/run_pipeline.py torch -c ml3d/configs/pointpillars_kitti.yml --split test --dataset.dataset_path <path-to-dataset> --pipeline ObjectDetection --dataset.use_cache True

For further help, run python scripts/run_pipeline.py --help.

Repository structure

The core part of Open3D-ML lives in the ml3d subfolder, which is integrated into Open3D in the ml namespace. In addition to the core part, the directories examples and scripts provide supporting scripts for getting started with setting up a training pipeline or running a network on a dataset.

├─ docs                   # Markdown and rst files for documentation
├─ examples               # Place for example scripts and notebooks
├─ ml3d                   # Package root dir that is integrated in open3d
     ├─ configs           # Model configuration files
     ├─ datasets          # Generic dataset code; will be integratede as open3d.ml.{tf,torch}.datasets
     ├─ metrics           # Metrics available for evaluating ML models
     ├─ utils             # Framework independent utilities; available as open3d.ml.{tf,torch}.utils
     ├─ vis               # ML specific visualization functions
     ├─ tf                # Directory for TensorFlow specific code. same structure as ml3d/torch.
     │                    # This will be available as open3d.ml.tf
     ├─ torch             # Directory for PyTorch specific code; available as open3d.ml.torch
          ├─ dataloaders  # Framework specific dataset code, e.g. wrappers that can make use of the
          │               # generic dataset code.
          ├─ models       # Code for models
          ├─ modules      # Smaller modules, e.g., metrics and losses
          ├─ pipelines    # Pipelines for tasks like semantic segmentation
          ├─ utils        # Utilities for <>
├─ scripts                # Demo scripts for training and dataset download scripts

Tasks and Algorithms

Semantic Segmentation

For the task of semantic segmentation, we measure the performance of different methods using the mean intersection-over-union (mIoU) over all classes. The table shows the available models and datasets for the segmentation task and the respective scores. Each score links to the respective weight file.

Model / Dataset SemanticKITTI Toronto 3D S3DIS Semantic3D Paris-Lille3D ScanNet
RandLA-Net (tf) 53.7 73.7 70.9 76.0 70.0* -
RandLA-Net (torch) 52.8 74.0 70.9 76.0 70.0* -
KPConv (tf) 58.7 65.6 65.0 - 76.7 -
KPConv (torch) 58.0 65.6 60.0 - 76.7 -
SparseConvUnet (torch) - - - - - 68
SparseConvUnet (tf) - - - - - 68.2
PointTransformer (torch) - - 69.2 - - -
PointTransformer (tf) - - 69.2 - - -

(*) Using weights from original author.

Object Detection

For the task of object detection, we measure the performance of different methods using the mean average precision (mAP) for bird's eye view (BEV) and 3D. The table shows the available models and datasets for the object detection task and the respective scores. Each score links to the respective weight file. For the evaluation, the models were evaluated using the validation subset, according to KITTI's validation criteria. The models were trained for three classes (car, pedestrian and cyclist). The calculated values are the mean value over the mAP of all classes for all difficulty levels. For the Waymo dataset, the models were trained on three classes (pedestrian, vehicle, cyclist).

Model / Dataset KITTI [BEV / 3D] @ 0.70 Waymo (BEV / 3D) @ 0.50
PointPillars (tf) 61.6 / 55.2 -
PointPillars (torch) 61.2 / 52.8 avg: 61.01 / 48.30 | best: 61.47 / 57.55 [^wpp-train]
PointRCNN (tf) 78.2 / 65.9 -
PointRCNN (torch) 78.2 / 65.9 -

[^wpp-train]: The avg. metrics are the average of three sets of training runs with 4, 8, 16 and 32 GPUs. Training was for halted after 30 epochs. Model checkpoint is available for the best training run.

Training PointRCNN

To use ground truth sampling data augmentation for training, we can generate the ground truth database as follows:

python scripts/collect_bboxes.py --dataset_path <path_to_data_root>

This will generate a database consisting of objects from the train split. It is recommended to use this augmentation for dataset like KITTI where objects are sparse.

The two stages of PointRCNN are trained separately. To train the proposal generation stage of PointRCNN with PyTorch, run the following command:

# Train RPN for 100 epochs.
python scripts/run_pipeline.py torch -c ml3d/configs/pointrcnn_kitti.yml --dataset.dataset_path <path-to-dataset> --mode RPN --epochs 100

After getting a well trained RPN network, we can train RCNN network with frozen RPN weights.

# Train RCNN for 70 epochs.
python scripts/run_pipeline.py torch -c ml3d/configs/pointrcnn_kitti.yml --dataset.dataset_path <path-to-dataset> --mode RCNN --model.ckpt_path <path_to_checkpoint> --epochs 100

Model Zoo

For a full list of all weight files see model_weights.txt and the MD5 checksum file model_weights.md5.

Datasets

The following is a list of datasets for which we provide dataset reader classes.

For downloading these datasets visit the respective webpages and have a look at the scripts in scripts/download_datasets.

How-tos

Contribute

There are many ways to contribute to this project. You can:

  • Implement a new model
  • Add code for reading a new dataset
  • Share parameters and weights for an existing model
  • Report problems and bugs

Please, make your pull requests to the dev branch. Open3D is a community effort. We welcome and celebrate contributions from the community!

If you want to share weights for a model you trained please attach or link the weights file in the pull request. For bugs and problems, open an issue. Please also check out our communication channels to get in contact with the community.

Communication channels

  • Forum: discussion on the usage of Open3D.
  • Discord Chat: online chats, discussions, and collaboration with other users and developers.

Citation

Please cite our work (pdf) if you use Open3D.

@article{Zhou2018,
    author    = {Qian-Yi Zhou and Jaesik Park and Vladlen Koltun},
    title     = {{Open3D}: {A} Modern Library for {3D} Data Processing},
    journal   = {arXiv:1801.09847},
    year      = {2018},
}

open3d-ml's People

Contributors

aeioaeu avatar ajinkyakhoche avatar amirshal avatar benjaminum avatar bhaskar-anand-iith avatar cclauss avatar clarytyllc avatar dependabot[bot] avatar dkurt avatar eiiijiiiy avatar errissa avatar friendship1 avatar germanros1987 avatar kukuruza avatar kylevedder avatar lc-guy avatar maxim0815 avatar ntw-au avatar prantl avatar prewettg avatar rzetko avatar sanskar107 avatar sawravchy avatar ssheorey avatar tejaswid avatar thomasfroech avatar yilingqiao avatar yishgene avatar yxlao avatar zhongyidu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

open3d-ml's Issues

Support for object part segmentation

I did not find any support for object part segmentation (part of chairs, airplanes etc.) in this new relase of Open3D, like the one provided by PointNet. Am i missing something or it is a choice to include online Rand-LA Net and KP-Conv for classification and parse scene segmentation?

Prepare my own dataset (ply to npy)

As the input point cloud is expected to be in npy format (e.g. in vis_pred.py), I would like to know how to convert my own point cloud in .ply format into npy format (compatible with open3d-ml).

Any suggestions would be great. Thanks in advance!

is Open3D-ML live?

cannot pull open3D version 0.11 from pip nor compile from source at this moment

Providing a new dataset, but can't train a model on it

Hi,
I have an annotated dataset from urban scenes of Montreal, colorised and captured with profiler lidars on a mobile truck.
I'll be glad to share it to the community, with the dataset loader, but i have troubles to train a model from scratch for semantic segmentation.
I managed to run inference using other trained models, and this works pretty well.
However, I also tried to train from scratch models of parislille or toronto, using their datasets, dataloaders and their configuration files, but training does not seem to converge, even after hundreads of epochs.
Does anyone have the same issue, or managed to train a model from scratch using pipeline.run_train() ?
Thank you,
Arnaud

Code for measuring dataset performance (mIoU)

Is the code available for measuring the performance? Like using the mean intersection-over-union (mIoU) over all classes, as mentioned on the model_zoo page.

In the file ml3d/datasets/utils/dataprocessing.py it looks like this is calculated using confusion matrices.

How to predict my own point cloud data using pretrained Semantic3d model?

My point cloud data only have three dimensions(x, y, z), and it seems that the downloaded pretrained Semantic3d model didn't work.

Here is the code:

`def get_custom_data(pc_names, path):
pc_data = []
for i, name in enumerate(pc_names):
pc_path = join(path, 'points', name + '.npy')
label_path = join(path, 'labels', name + '.npy')
point = np.load(pc_path)
label = np.zeros((len(point), 1))
data = {
'point': point,
'feat': None,
'label': label,
}
pc_data.append(data)
return pc_data

def main():
kitti_labels = ml3d.datasets.Semantic3d.get_label_to_names()
v = ml3d.vis.Visualizer()
lut = ml3d.vis.LabelLUT()
for val in sorted(kitti_labels.keys()):
lut.add_label(kitti_labels[val], val)
v.set_lut("labels", lut)
v.set_lut("pred", lut)
ckpt_path = ‘path/pretrained semantic3d model’
model = ml3d.models.RandLANet(ckpt_path=ckpt_path)
pipeline_r = ml3d.pipelines.SemanticSegmentation(model)
pipeline_r.load_ckpt(model.cfg.ckpt_path)
ckpt_path = ‘path/pretrained semantic3d model’
model = ml3d.models.KPFCNN(ckpt_path=ckpt_path, in_radius=10)
pipeline_k = ml3d.pipelines.SemanticSegmentation(model)
pipeline_k.load_ckpt(model.cfg.ckpt_path)
data_path = example_dir + "/demo_data"
pc_names = ["1", "2"]
pcs = get_custom_data(pc_names, data_path)
pcs_with_pred = pred_custom_data(pc_names, pcs, pipeline_r, pipeline_k)
v.visualize(pcs_with_pred)`

image

pipeline.run_inference(data) very slow

I am running inference using the the pre-trained KPConv implementation on a single example from the Toronto_3D dataset and the inference is very very slow.

I am using an AWS p3.2xlarge with a V100 GPU. For some reason the GPU utilization is mostly zero. The code has high CPU utilization. Here is the code

import os
import open3d.ml as _ml3d
import open3d.ml.torch as ml3d

cfg_file = "../Open3D-ML/ml3d/configs/kpconv_toronto3d.yml"
cfg = _ml3d.utils.Config.load_from_file(cfg_file)

model = ml3d.models.KPFCNN(**cfg.model)
cfg.dataset['dataset_path'] = "../datasets/Toronto_3D"
dataset = ml3d.datasets.Toronto3D(cfg.dataset.pop('dataset_path', None), **cfg.dataset)
pipeline = ml3d.pipelines.SemanticSegmentation(model, dataset=dataset, device="gpu", **cfg.pipeline)

# download the weights.
ckpt_folder = "./logs/"
os.makedirs(ckpt_folder, exist_ok=True)
ckpt_path = ckpt_folder + "kpconv_toronto3d_202010081102utc.pth"
kpconv_url = "https://storage.googleapis.com/open3d-releases/model-zoo/kpconv_toronto3d_202010081102utc.pth"
if not os.path.exists(ckpt_path):
    cmd = "wget {} -O {}".format(kpconv_url, ckpt_path)
    os.system(cmd)

# load the parameters.
pipeline.load_ckpt(ckpt_path=ckpt_path)

test_split = dataset.get_split("test")
data = test_split.get_data(0)

# run inference on a single example.
# returns dict with 'predict_labels' and 'predict_scores'.
result = pipeline.run_inference(data) ### This step is very slow

How to evaluate the RandLA-Net on Toronto 3D per class with pytorch model?

Hi,

I noticed that you provided the pre-trained torch version RandLA-Net Model on dataset Toronto 3D, and the mean IOU is 71.2, as you described.

However, the accuracy and mean IOU are not calculated when I tried to run the pipeline.run_test() (torch version). Do you know how to calculate the mean IOU and per class IOU for Toronto 3D?

python requirements: plyfile is GPLv3 software, should be removed to remain MIT licensed?

plyfile is GPL licensed; I would love to use your awesome library in our projects, but many users (myself included) are unable to incorporate GPL'd works into our projects, because we can't allow our own project to be governed by the GPL's terms.

Would you consider removing GPL'd dependencies from your requirements?

Information for plyfile in PyPi and it's latest release tag:
https://pypi.org/project/plyfile/
https://github.com/dranjan/python-plyfile/blob/v0.7.2/COPYING

From pip-tools (pip-compile):
https://gist.github.com/EricCousineau-TRI/ee119a3feeed77ac289ed06b01e587cc/2b82e765860be56776d538335ad2649924493065#file-requirements-txt-sh-L121-L122

Relates isl-org/Open3D#2991

\cc @yxlao

RuntimeError: Error(s) in loading state_dict for RandLANet

i ran the instructions here in 'google colab' but it failed
https://github.com/intel-isl/Open3D-ML/blob/master/docs/howtos.md#visualize-network-predictions

INFO - 2021-01-29 11:09:29,809 - semantic_segmentation - Loading checkpoint ./logs/vis_weights_RandLANet.pth


RuntimeError Traceback (most recent call last)

in ()
11 model = RandLANet(ckpt_path=ckpt_path)
12 pipeline_r = SemanticSegmentation(model)
---> 13 pipeline_r.load_ckpt(model.cfg.ckpt_path)
14
15 ckpt_path = "./logs/vis_weights_{}.pth".format('KPFCNN')

1 frames

/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py in load_state_dict(self, state_dict, strict)
1043 if len(error_msgs) > 0:
1044 raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
-> 1045 self.class.name, "\n\t".join(error_msgs)))
1046 return _IncompatibleKeys(missing_keys, unexpected_keys)
1047

RuntimeError: Error(s) in loading state_dict for RandLANet:
Unexpected key(s) in state_dict: "Encoder_layer_4mlp1.biases", "Encoder_layer_4mlp1.weights", "Encoder_layer_4mlp1.conv.weight", "Encoder_layer_4mlp1.conv.bias", "Encoder_layer_4mlp1.batch_normalization.weight", "Encoder_layer_4mlp1.batch_normalization.bias", "Encoder_layer_4mlp1.batch_normalization.running_mean", "Encoder_layer_4mlp1.batch_normalization.running_var", "Encoder_layer_4mlp1.batch_normalization.num_batches_tracked", "Encoder_layer_4LFAmlp1.biases", "Encoder_layer_4LFAmlp1.weights", "Encoder_layer_4LFAmlp1.conv.weight", "Encoder_layer_4LFAmlp1.conv.bias", "Encoder_layer_4LFAmlp1.batch_normalization.weight", "Encoder_layer_4LFAmlp1.batch_normalization.bias", "Encoder_layer_4LFAmlp1.batch_normalization.running_mean", "Encoder_layer_4LFAmlp1.batch_normalization.running_var", "Encoder_layer_4LFAmlp1.batch_normalization.num_batches_tracked", "Encoder_layer_4LFAatt_pooling_1fc.weight", "Encoder_layer_4LFAatt_pooling_1fc.bias", "Encoder_layer_4LFAatt_pooling_1mlp.biases", "Encoder_layer_4LFAatt_pooling_1mlp.weights", "Encoder_layer_4LFAatt_pooling_1mlp.conv.weight", "Encoder_layer_4LFAatt_pooling_1mlp.conv.bias", "Encoder_layer_4LFAatt_pooling_1mlp.batch_normalization.weight", "Encoder_layer_4LFAatt_pooling_1mlp.batch_normalization.bias", "Encoder_layer_4LFAatt_pooling_1mlp.batch_normalization.running_mean", "Encoder_layer_4LFAatt_pooling_1mlp.batch_normalization.running_var", "Encoder_layer_4LFAatt_pooling_1mlp.batch_normalization.num_batches_tracked", "Encoder_lay...
size mismatch for fc0.weight: copying a param with shape torch.Size([8, 6]) from checkpoint, the shape in current model is torch.Size([8, 3]).
size mismatch for decoder_0.biases: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([512]).
size mismatch for decoder_0.weights: copying a param with shape torch.Size([1024, 1024, 1, 1]) from checkpoint, the shape in current model is torch.Size([512, 512, 1, 1]).
size mismatch for decoder_0.conv.weight: copying a param with shape torch.Size([1024, 1024, 1, 1]) from checkpoint, the shape in current model is torch.Size([512, 512, 1, 1]).
size mismatch for decoder_0.conv.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([512]).
size mismatch for decoder_0.batch_normalization.weight: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([512]).
size mismatch for decoder_0.batch_normalization.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([512]).
size mismatch for decoder_0.batch_normalization.running_mean: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([512]).
size mismatch for decoder_0.batch_normalization.running_var: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([512]).
size mismatch for Decoder_layer_0.biases: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([256]).
size mismatch for Decoder_layer_0.weights: copying a param with shape torch.Size([1536, 512, 1, 1]) from checkpoint, the shape in current model is torch.Size([768, 256, 1, 1]).
size mismatch for Decoder_layer_0.conv.weight: copying a param with shape torch.Size([1536, 512, 1, 1]) from checkpoint, the shape in current model is torch.Size([768, 256, 1, 1]).
size mismatch for Decoder_layer_0.conv.bias: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([256]).
size mismatch for Decoder_layer_0.batch_normalization.weight: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([256]).
size mismatch for Decoder_layer_0.batch_normalization.bias: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([256]).
size mismatch for Decoder_layer_0.batch_normalization.running_mean: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([256]).
size mismatch for Decoder_layer_0.batch_normalization.running_var: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([256]).
size mismatch for Decoder_layer_1.biases: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([128]).
size mismatch for Decoder_layer_1.weights: copying a param with shape torch.Size([768, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([384, 128, 1, 1]).
size mismatch for Decoder_layer_1.conv.weight: copying a param with shape torch.Size([768, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([384, 128, 1, 1]).
size mismatch for Decoder_layer_1.conv.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([128]).
size mismatch for Decoder_layer_1.batch_normalization.weight: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([128]).
size mismatch for Decoder_layer_1.batch_normalization.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([128]).
size mismatch for Decoder_layer_1.batch_normalization.running_mean: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([128]).
size mismatch for Decoder_layer_1.batch_normalization.running_var: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([128]).
size mismatch for Decoder_layer_2.biases: copying a param with shape torch.Size([128]) from checkpoint, the shape in current model is torch.Size([32]).
size mismatch for Decoder_layer_2.weights: copying a param with shape torch.Size([384, 128, 1, 1]) from checkpoint, the shape in current model is torch.Size([160, 32, 1, 1]).
size mismatch for Decoder_layer_2.conv.weight: copying a param with shape torch.Size([384, 128, 1, 1]) from checkpoint, the shape in current model is torch.Size([160, 32, 1, 1]).
size mismatch for Decoder_layer_2.conv.bias: copying a param with shape torch.Size([128]) from checkpoint, the shape in current model is torch.Size([32]).
size mismatch for Decoder_layer_2.batch_normalization.weight: copying a param with shape torch.Size([128]) from checkpoint, the shape in current model is torch.Size([32]).
size mismatch for Decoder_layer_2.batch_normalization.bias: copying a param with shape torch.Size([128]) from checkpoint, the shape in current model is torch.Size([32]).
size mismatch for Decoder_layer_2.batch_normalization.running_mean: copying a param with shape torch.Size([128]) from checkpoint, the shape in current model is torch.Size([32]).
size mismatch for Decoder_layer_2.batch_normalization.running_var: copying a param with shape torch.Size([128]) from checkpoint, the shape in current model is torch.Size([32]).
size mismatch for Decoder_layer_3.weights: copying a param with shape torch.Size([160, 32, 1, 1]) from checkpoint, the shape in current model is torch.Size([64, 32, 1, 1]).
size mismatch for Decoder_layer_3.conv.weight: copying a param with shape torch.Size([160, 32, 1, 1]) from checkpoint, the shape in current model is torch.Size([64, 32, 1, 1]).
size mismatch for fc.biases: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([19]).
size mismatch for fc.weights: copying a param with shape torch.Size([8, 32, 1, 1]) from checkpoint, the shape in current model is torch.Size([19, 32, 1, 1]).
size mismatch for fc.conv.weight: copying a param with shape torch.Size([8, 32, 1, 1]) from checkpoint, the shape in current model is torch.Size([19, 32, 1, 1]).
size mismatch for fc.conv.bias: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([19]).

vis.visualize_dataset() labels are off (by one?)

I ran some of the README.md example code using the KITTI dataset and noticed that the labels are wrong. I noticed this too with my custom dataset.

import open3d.ml as _ml3d
import open3d.ml.torch as ml3d # or open3d.ml.tf as ml3d

dataset = ml3d.datasets.SemanticKITTI(dataset_path='/media/equant/7fe7f0a0-e17f-46d2-82d3-e7a8c25200bb/work/SemanticKITTI/',
    test_split=[ '12' ],
    training_split=[ '10' ],
    validation_split=['08'],
    all_split=[ '08', '10', '12' ],
)   

# get the 'all' split that combines training, validation and test set
all_split = dataset.get_split('all')

# print the attributes of the first datum
print(all_split.get_attr(0))

# print the shape of the first point cloud
print(all_split.get_data(0)['point'].shape)

# show the first 100 frames using the visualizer
vis = ml3d.vis.Visualizer()
vis.visualize_dataset(dataset, 'all', indices=range(1))

With a little inspection I hope you can see that the labels reported are not correct.
The points with the label "traffic-sign" correspond to what should be vegetation. What is labeled "trunk" are points that should be labeled "unlabeled". Etc.

Screenshot_2021-02-17_10-17-03

Semantic Segmentation Case Failed

Hi, thanks for your great work.

When I tested your semantic segmentation script in README.md, it failed on pipeline.run_test() as follow:

INFO - 2021-04-16 16:21:50,465 - semantic_segmentation - Loading checkpoint /home/hao/project/autodrive/lidar/Open3D-ML/logs/randlanet_semantickitti_202009090354utc.pth
INFO - 2021-04-16 16:21:52,719 - semantickitti - Found 20351 pointclouds for test
/home/hao/anaconda3/envs/open3d/lib/python3.7/site-packages/open3d/_ml3d/torch/models/randlanet.py:449: UserWarning: Mixed memory format inputs detected while calling the operator. The operator will output channels_last tensor even if some of the inputs are not in channels_last format. (Triggered internally at /opt/conda/conda-bld/pytorch_1595629427478/work/aten/src/ATen/native/TensorIterator.cpp:924.)
result = m_leakyrelu(f_pc + shortcut)
test 0/1: 100%|█████████████████████████████████████████████████| 79845/79845 [00:07<00:00, 6425.66it/s]INFO - 2021-04-16 16:22:02,695 - semantic_segmentation - DEVICE : cuda
INFO - 2021-04-16 16:22:02,695 - semantic_segmentation - Logging in file : ./logs/RandLANet_SemanticKITTI_torch/log_test_2021-04-16_16:22:02.txt
INFO - 2021-04-16 16:22:02,740 - semantickitti - Found 20351 pointclouds for test
test 0/1: 100%|█████████████████████████████████████████████████| 79845/79845 [00:20<00:00, 6425.66it/s]Traceback (most recent call last):
File "test.py", line 33, in
pipeline.run_test()
File "/home/hao/anaconda3/envs/open3d/lib/python3.7/site-packages/open3d/_ml3d/torch/pipelines/semantic_segmentation.py", line 208, in run_test
use_cache=dataset.cfg.use_cache)
File "/home/hao/anaconda3/envs/open3d/lib/python3.7/site-packages/open3d/_ml3d/torch/dataloaders/torch_dataloader.py", line 79, in init
sampler.initialize_with_dataloader(self)
File "/home/hao/anaconda3/envs/open3d/lib/python3.7/site-packages/open3d/_ml3d/datasets/samplers/semseg_spatially_regular.py", line 29, in initialize_with_dataloader
data = dataloader.cache_convert(attr['name'])
File "/home/hao/anaconda3/envs/open3d/lib/python3.7/site-packages/open3d/_ml3d/utils/dataset_helper.py", line 62, in call
output = self._read(fpath)
File "/home/hao/anaconda3/envs/open3d/lib/python3.7/site-packages/open3d/_ml3d/utils/dataset_helper.py", line 70, in _read
return np.load(fpath, allow_pickle=True).item()
File "/home/hao/anaconda3/envs/open3d/lib/python3.7/site-packages/numpy/lib/npyio.py", line 440, in load
pickle_kwargs=pickle_kwargs)
File "/home/hao/anaconda3/envs/open3d/lib/python3.7/site-packages/numpy/lib/format.py", line 732, in read_array
array = pickle.load(fp, **pickle_kwargs)
_pickle.UnpicklingError: pickle data was truncated
test 0/1: 100%|█████████████████████████████████████████████████| 79845/79845 [00:27<00:00, 2863.22it/s]

Any suggestions about that?

visualize custom data in the row

Hello,

I'm trying to visualize the custom data, only for detection inference.

now I got point cloud and model predictions from some of my own test data.
I can easily visualize the single frame with the bounding boxes,
however, when I want to visualize a bag of point cloud,
I failed to visualize the bounding box from different point cloud.

I try to load my predicted label to BEVBox3D, and append these boxes to the bounding box list, then send to Visualizer.visualize.

the point cloud can show in the row, but bo boxes show in windows.

Thanks !

AttributeError: 'Object3d' object has no attribute 'name'

I'm trying to train pointpillars model with kitti dataset, using:

python /content/Open3D-ML/scripts/run_pipeline.py tf -c /content/Open3D-ML/ml3d/configs/pointpillars_kitti.yml --split train --dataset.dataset_path <path_to_dataset> --pipeline ObjectDetection --dataset.use_cache True --main_log_dir <path>

But I get the following error, after it completes the preprocess and starts training:

  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/tf/pipelines/object_detection.py", line 232, in run_train
    data = train_loader[i]['data']
  File "/usr/local/lib/python3.7/dist-packages/open3d/_ml3d/tf/dataloaders/tf_dataloader.py", line 135, in __getitem__
    data = self.transform(data, attr)
  File "/usr/local/lib/python3.7/dist-packages/open3d/_ml3d/tf/models/point_pillars.py", line 286, in transform
    data = self.augment_data(data, attr)
  File "/usr/local/lib/python3.7/dist-packages/open3d/_ml3d/tf/models/point_pillars.py", line 267, in augment_data
    self.load_gt_database(pickle_path, **cfg['ObjectSample'])
  File "/usr/local/lib/python3.7/dist-packages/open3d/_ml3d/tf/models/point_pillars.py", line 252, in load_gt_database
    if db_box.name in sample_dict.keys():
AttributeError: 'Object3d' object has no attribute 'name'
training:   0% 0/5000 [00:04<?, ?it/s]

NameError: name 'diff' is not defined. when I inference my own data


NameError Traceback (most recent call last)
in
7 pc_data.append(data)
8 cur=pc_data[0]
----> 9 results_r=pipeline_r.run_inference(cur)

~/anaconda3/envs/open3d/lib/python3.7/site-packages/open3d/_ml3d/torch/pipelines/semantic_segmentation.py in run_inference(self, data)
165
166 with torch.no_grad():
--> 167 for step, inputs in enumerate(infer_loader):
168 results = model(inputs['data'])
169 self.update_tests(infer_sampler, inputs, results)

~/anaconda3/envs/open3d/lib/python3.7/site-packages/torch/utils/data/dataloader.py in next(self)
361
362 def next(self):
--> 363 data = self._next_data()
364 self._num_yielded += 1
365 if self._dataset_kind == _DatasetKind.Iterable and \

~/anaconda3/envs/open3d/lib/python3.7/site-packages/torch/utils/data/dataloader.py in _next_data(self)
401 def _next_data(self):
402 index = self._next_index() # may raise StopIteration
--> 403 data = self._dataset_fetcher.fetch(index) # may raise StopIteration
404 if self._pin_memory:
405 data = _utils.pin_memory.pin_memory(data)

~/anaconda3/envs/open3d/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py in fetch(self, possibly_batched_index)
42 def fetch(self, possibly_batched_index):
43 if self.auto_collation:
---> 44 data = [self.dataset[idx] for idx in possibly_batched_index]
45 else:
46 data = self.dataset[possibly_batched_index]

~/anaconda3/envs/open3d/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py in (.0)
42 def fetch(self, possibly_batched_index):
43 if self.auto_collation:
---> 44 data = [self.dataset[idx] for idx in possibly_batched_index]
45 else:
46 data = self.dataset[possibly_batched_index]

~/anaconda3/envs/open3d/lib/python3.7/site-packages/open3d/_ml3d/torch/dataloaders/torch_dataloader.py in getitem(self, index)
95
96 if self.transform is not None:
---> 97 data = self.transform(data, attr)
98
99 inputs = {'data': data, 'attr': attr}

~/anaconda3/envs/open3d/lib/python3.7/site-packages/open3d/_ml3d/torch/models/randlanet.py in transform(self, data, attr, min_possibility_idx)
162 label=label,
163 search_tree=tree,
--> 164 num_points=self.cfg.num_points)
165
166 label = label[selected_idxs]

~/anaconda3/envs/open3d/lib/python3.7/site-packages/open3d/_ml3d/datasets/samplers/semseg_spatially_regular.py in _random_centered_gen(**kwargs)
84 if (pc.shape[0] < num_points):
85 idxs = np.array(range(pc.shape[0]))
---> 86 idxs = list(idxs) + list(random.choices(idxs, k=diff))
87 else:
88 idxs = search_tree.query(center_point,

NameError: name 'diff' is not defined

'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)
in ()
34
35 # evaluate performance on the test set; this will write logs to './logs'.
---> 36 pipeline.run_test()

/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.

NameError: name 'exists' is not defined

I am running the doc file in a Jupyer notebook and I got this error

---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-3-f5271fea4446> in <module>
      6 
      7 ckpt_path = "./logs/vis_weights_{}.pth".format('RandLANet')
----> 8 if not exist(ckpt_path):
      9     cmd = "wget {} -O {}".format(randlanet_url, ckpt_path)
     10     os.system(cmd)

NameError: name 'exists' is not defined

AttributeError: module 'open3d' has no attribute '__DEVICE_API__'

I tried to install opne3d-ml on nvidia docker container.

tensorflow == 2.4 open3d ==0.12 python 3.8.5 RTX 3090 ti

But I got this error..

Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.8/dist-packages/open3d/ml/init.py", line 29, in
if _open3d.DEVICE_API == 'cuda':
AttributeError: module 'open3d' has no attribute 'DEVICE_API'

open3d 0.12.0 does not work in windows + conda env

when installed using default steps in README.md (pip install open3d + tensorflow and/or pytorch),

It says the installed open3d package was not built with tensorflow or pytorch support.

python -c "import open3d.ml.tf as ml3d" --> Exception: Open3D was not built with TensorFlow support!
python -c "import open3d.ml.torch as ml3d" --> Exception: Open3D was not built with PyTorch support!

Found some old git issues (v.0.11.0) of complaining open3d windows package does not include open3d-ml as well?
Is there any issues with windows build scripts currently??

[BUG] AttributeError: 'SemanticSegmentation' object has no attribute 'cfg_tb'

This seems to be a bug. I get the following error when I try to train.

Traceback (most recent call last):
  File "open3d_train1.py", line 28, in <module>
    pipeline.run_train()
  File "/home/ubuntu/anaconda3/envs/open3d-ml/lib/python3.7/site-packages/open3d/_ml3d/torch/pipelines/semantic_segmentation.py", line 354, in run_train
    self.save_config(writer)
  File "/home/ubuntu/anaconda3/envs/open3d-ml/lib/python3.7/site-packages/open3d/_ml3d/torch/pipelines/semantic_segmentation.py", line 559, in save_config
    writer.add_text("Description/Open3D-ML", self.cfg_tb['readme'], 0)
AttributeError: 'SemanticSegmentation' object has no attribute 'cfg_tb'

And I cannot find the attribute cfg_tb in the example configurations at least.

Error(s) in loading state_dict for RandLANet

I am trying to run a pretrained model from modelzoo for s3dis dataset.
I downloaded the model from :
https://storage.googleapis.com/open3d-releases/model-zoo/randlanet_s3dis_area5_202010091333utc.pth .

I used the following code (just like vis_pred.py) to use this model.

model = ml3d.models.RandLANet(ckpt_path=ckpt_path) #ckpt_path = path to the above downloaded model
pipeline_r = ml3d.pipelines.SemanticSegmentation(model)
pipeline_r.load_ckpt(model.cfg.ckpt_path)

I get the following error on the third statement ( pipeline_r.load_ckpt(model.cfg.ckpt_path) ):

Error(s) in loading state_dict for RandLANet.

Kindly help me in this matter.

semantic segmentation of point clouds

How can I use my own point clouds as input for the semantic segmenation process? Do I need to pre-process my point clouds and which format is generally required (npy / txt)? I would like to test the pre-trained models for this task. I would really appreciate any help.

Roadmap and Milestones

Hi, can I please know roadmap and milestones for the project so that I can actively contribute.

Thanks,
Rakesh

RandLANet_S3DIS_tf very low mIoU with the provided weight file

Hi guys, i am running the RandLANet_S3DIS_tf pipeline script and never able to reach the mIoU stated in the repo as 67.0 using the provided weight file?

I am using Open3D-ML 0.12, using the S3DIS datasets, the provided weight file and the pipeline test script.
image

Visualizer with LabelLUT prints wrong labels when one of the classes is not present in the data.

I've encountered a peculiar bug: when visualising a pointcloud using vis.visualize(data) with a pre-defined LabelLUT, the visualisation goed wrong when one of the classes is not present in the data.

Example: I ran RandLA-Net with pre-trained weights on the Paris-Lille-3D validation set (using the code snippet from the readme). It outputs predictions for the classes [1, ..., 9], where 0 is ignored ('unknown class'). Therefore, the data has no points labelled as 0. When I initialise the visualizer with the full set of labels, including class '0', all labels <=4 are shifted 1 down, class 4 is 'missing', and all other classes are shown correctly. When I initialise the visualiser without class 0, it shows everything correctly.

When I set all labels for class '1' to '0' (so now the data does not contain any point of class '1', the same happens: classes 2, 3, and 4 are shifted down, and 4 disappears.

Code:

result = pipeline.run_inference(data)

dataset = ml3d.datasets.ParisLille3D(data_dir)
test_split = dataset.get_split("val")
data = test_split.get_data(0)

paris_labels = ml3d.datasets.ParisLille3D.get_label_to_names()
# paris_labels.pop(0)
v = ml3d.vis.Visualizer()
lut = ml3d.vis.LabelLUT()
for val in sorted(paris_labels.keys()):
    lut.add_label(paris_labels[val], val)
v.set_lut("labels", lut)

data_viz = {}
data_viz['name'] = 'randla_npm3d_val'
data_viz['points'] = data['point']
data_viz['labels'] = result['predict_labels'] + 1

v.visualize([data_viz])

Example: here the visualisation is correct for class 4.
Example of correct behaviour

The same data, but now the LabelLUT includes class 0. The data for class 4 is now shown as class 3. Nothing is shown for class 4. Classes >4 are shown correctly (excluded from screenshot for clarity).
Example of incorrect behaviour

A quick fix is to set any single label to the missing class (e.g.) 0:

data_viz['labels'][0] = 0

Semantic Segmentation Test Error

Hello,
Thanks for your great job doing this library.

Here is my Issue
I've create a custom dataset, using Custom3D format
I've managed to train a RANLANET for a semantic segmentation using "run_pipeline.py" scripy using my own custom config file.

After training the network, I tried to test the network with my test dataset, but it failed

This is the error:
error

I don't know if my dataset is wrong, or my config file is wrong or is a bug.

Thanks for your help

Inconsistent validation results

Hi all, thank you very much for the incredible work you have doing.
I'm running inference on the validation split of SemanticKITTI by using the following function I added in the SemanticSegmentation class:

def run_valid(self):
        model = self.model
        dataset = self.dataset
        device = self.device
        cfg = self.cfg
        model.device = device
        model.to(device)

        timestamp = datetime.now().strftime('%Y-%m-%d_%H:%M:%S')
        metric = SemSegMetric(self, model, dataset, device)

        log.info("DEVICE : {}".format(device))
        log_file_path = join(cfg.logs_dir, 'log_test_' + timestamp + '.txt')
        log.info("Logging in file : {}".format(log_file_path))
        log.addHandler(logging.FileHandler(log_file_path))

        batcher = self.get_batcher(device, split='validation')

        valid_split = TorchDataloader(dataset=dataset.get_split('validation'),
                                      preprocess=model.preprocess,
                                      transform=model.transform,
                                      use_cache=dataset.cfg.use_cache,
                                      steps_per_epoch=dataset.cfg.get(
                                          'steps_per_epoch_valid', None))

        valid_loader = DataLoader(valid_split,
                                  batch_size=cfg.val_batch_size,
                                  shuffle=True,
                                  collate_fn=batcher.collate_fn)

        self.load_ckpt(model.cfg.ckpt_path)

        datset_split = self.dataset.get_split('validation')

        log.info("Started validation")

        self.valid_accs = []
        self.valid_ious = []

        with torch.no_grad():
            for step, inputs in enumerate(tqdm(valid_loader, desc='validation')):
                
                results = model(inputs['data'])
                labels = inputs['data']['labels']

                pred_scores, gt_labels = filter_valid_label(results, labels, model.cfg.num_classes, 
                                                       model.cfg.ignored_label_inds, device)

                if pred_scores.size()[-1] == 0:
                    continue
                

                acc = metric.acc(pred_scores, gt_labels)
                iou = metric.iou(pred_scores, gt_labels)
                self.valid_accs.append(acc)
                self.valid_ious.append(iou)

            log.info("valid acc: {}".format(
                np.nanmean(np.array(self.valid_accs)[:, -1])))
            log.info("valid iou: {}".format(
                np.nanmean(np.array(self.valid_ious)[:, -1])))

Everything works with RandLA but I have inconsistent results with 1) what reported in the table and 2) between consecutive runs.
These are the results I get between 3 consecutive runs:

RUN 1
valid acc: 0.6399258845541128
valid iou: 0.4675712403922625
RUN 2
valid acc: 0.638801616699286
valid iou: 0.46817005750227314
RUN 3
valid acc: 0.6440866445326203
valid iou: 0.48439236029086935

I tried to run by setting the same np.random.seed(seed=1024), but nothing changed, still different results.
Is these anything I'm missing? Any solution? Which split do the numbers for the pre-trained models refer to?
Another thing I noticed is that checksum differ from the one you report on the website. I downloaded several times and always got the same checksum but still different from the reported one.

Adding multiple Heads

Thanks for the great work!
Is it possible to add a semantic segmentation head to point pillars detection method in your implementation?
Any suggestions?

What does predict_scores represent?

Hi, I am training a KPFCNN model to run semantic segmentation inference and output the confidence scores for each points.
However, I notice that my output values, 'predict_scores', consists of values higher than 1, as well as negative scores, which should not be the case if 'predict_scores' refers to the confidence level (0-1) for each class.
May I also clarify what 'predict_scores' refer to?

results_r = pipeline_r.run_inference(data)
print(results_r['predict_scores]

(
Screenshot from 2020-12-29 14-18-22

(My model consists of 2 distinct classes)

open3d ML support for windows

Thank you for your hard work for open3d ml. I am using windows 10.
An error "Open3D was not built with PyTorch support!" was returned when running as "import open3d.ml.torch as ml3d".
Open3d itself is working very well.
Is open3d ML supported for windows as of Dec, 2020? If not, do you have any plans for windows support in the near future?

Thanks in advance

[KITTI] How to display image next to the point cloud

Hi, I'm trying to use Open3D to visualize point clouds, labels and predictions from KITTI. Is there a way or any tip you can give to visualize the image associated with each pointcloud in the GUI? That would be extremely helpful, thanks.

testing results on Semantic3D (using torch framework) do not make sense!

Initializing from scratch.
Writing summary in train_log/00001_RandLANet_Semantic3D_torch.
Started training
=== EPOCH 0/100 ===
loss train: 1.981 eval: 2.344
acc train: 0.188 eval: 0.155
iou train: 0.086 eval: 0.046
Epoch 0: save ckpt to ./logs/RandLANet_Semantic3D_torch/checkpoint
=== EPOCH 1/100 ===
loss train: 1.747 eval: 9.761
acc train: 0.266 eval: 0.003
iou train: 0.122 eval: 0.001
=== EPOCH 2/100 ===
loss train: 1.601 eval: 10.447
acc train: 0.344 eval: 0.094
iou train: 0.162 eval: 0.006
=== EPOCH 3/100 ===
loss train: 1.432 eval: 7.275
acc train: 0.396 eval: 0.092
iou train: 0.205 eval: 0.021
=== EPOCH 4/100 ===
loss train: 1.312 eval: 1.544
acc train: 0.444 eval: 0.282
iou train: 0.240 eval: 0.138
=== EPOCH 5/100 ===
loss train: 1.282 eval: 2.148
acc train: 0.460 eval: 0.276
iou train: 0.249 eval: 0.118
Epoch 5: save ckpt to ./logs/RandLANet_Semantic3D_torch/checkpoint
=== EPOCH 6/100 ===
loss train: 1.197 eval: 1.432
acc train: 0.484 eval: 0.290
iou train: 0.276 eval: 0.094
=== EPOCH 7/100 ===
loss train: 1.182 eval: 2.137
acc train: 0.495 eval: 0.224
iou train: 0.285 eval: 0.061
=== EPOCH 8/100 ===
loss train: 1.124 eval: 1.178
acc train: 0.511 eval: 0.422
iou train: 0.294 eval: 0.274
=== EPOCH 9/100 ===
loss train: 1.044 eval: 0.998
acc train: 0.544 eval: 0.672
iou train: 0.328 eval: 0.291
=== EPOCH 10/100 ===
loss train: 1.036 eval: 1.086
acc train: 0.562 eval: 0.500
iou train: 0.337 eval: 0.301
Epoch 10: save ckpt to ./logs/RandLANet_Semantic3D_torch/checkpoint
=== EPOCH 11/100 ===
loss train: 1.037 eval: 1.043
acc train: 0.566 eval: 0.723
iou train: 0.338 eval: 0.304
=== EPOCH 12/100 ===
loss train: 0.956 eval: 1.005
acc train: 0.609 eval: 0.524
iou train: 0.382 eval: 0.232
=== EPOCH 13/100 ===
loss train: 0.920 eval: 1.707
acc train: 0.612 eval: 0.306
iou train: 0.380 eval: 0.142
=== EPOCH 14/100 ===
loss train: 0.943 eval: 1.862
acc train: 0.623 eval: 0.289
iou train: 0.389 eval: 0.130
=== EPOCH 15/100 ===
loss train: 0.845 eval: 1.486
acc train: 0.645 eval: 0.344
iou train: 0.417 eval: 0.161
Epoch 15: save ckpt to ./logs/RandLANet_Semantic3D_torch/checkpoint
=== EPOCH 16/100 ===
loss train: 0.831 eval: 1.138
acc train: 0.668 eval: 0.450
iou train: 0.431 eval: 0.222
=== EPOCH 17/100 ===
loss train: 0.785 eval: 1.560
acc train: 0.675 eval: 0.390
iou train: 0.450 eval: 0.173
=== EPOCH 18/100 ===
loss train: 0.777 eval: 0.880
acc train: 0.672 eval: 0.617
iou train: 0.449 eval: 0.305
=== EPOCH 19/100 ===
loss train: 0.711 eval: 1.099
acc train: 0.709 eval: 0.529
iou train: 0.485 eval: 0.307
=== EPOCH 20/100 ===
loss train: 0.722 eval: 1.138
acc train: 0.697 eval: 0.487
iou train: 0.468 eval: 0.235
Epoch 20: save ckpt to ./logs/RandLANet_Semantic3D_torch/checkpoint
=== EPOCH 21/100 ===
loss train: 0.708 eval: 1.007
acc train: 0.708 eval: 0.506
iou train: 0.486 eval: 0.246
=== EPOCH 22/100 ===
loss train: 0.652 eval: 0.742
acc train: 0.730 eval: 0.699
iou train: 0.515 eval: 0.291
=== EPOCH 23/100 ===
loss train: 0.682 eval: 0.905
acc train: 0.734 eval: 0.577
iou train: 0.518 eval: 0.223
=== EPOCH 24/100 ===
loss train: 0.636 eval: 0.719
acc train: 0.745 eval: 0.599
iou train: 0.531 eval: 0.327
=== EPOCH 25/100 ===
loss train: 0.593 eval: 1.294
acc train: 0.749 eval: 0.557
iou train: 0.538 eval: 0.234
Epoch 25: save ckpt to ./logs/RandLANet_Semantic3D_torch/checkpoint
=== EPOCH 26/100 ===
loss train: 0.567 eval: 0.863
acc train: 0.757 eval: 0.571
iou train: 0.553 eval: 0.308
=== EPOCH 27/100 ===
loss train: 0.532 eval: 1.114
acc train: 0.767 eval: 0.493
iou train: 0.572 eval: 0.279
=== EPOCH 28/100 ===
loss train: 0.591 eval: 0.941
acc train: 0.770 eval: 0.651
iou train: 0.569 eval: 0.292
=== EPOCH 29/100 ===
loss train: 0.530 eval: 1.074
acc train: 0.782 eval: 0.549
iou train: 0.575 eval: 0.353
=== EPOCH 30/100 ===
loss train: 0.520 eval: 1.127
acc train: 0.783 eval: 0.601
iou train: 0.593 eval: 0.344
Epoch 30: save ckpt to ./logs/RandLANet_Semantic3D_torch/checkpoint
=== EPOCH 31/100 ===
loss train: 0.496 eval: 1.298
acc train: 0.792 eval: 0.552
iou train: 0.605 eval: 0.246
=== EPOCH 32/100 ===
loss train: 0.452 eval: 0.995
acc train: 0.802 eval: 0.673
iou train: 0.618 eval: 0.323
=== EPOCH 33/100 ===
loss train: 0.540 eval: 0.718
acc train: 0.793 eval: 0.599
iou train: 0.589 eval: 0.291
=== EPOCH 34/100 ===
loss train: 0.465 eval: 0.728
acc train: 0.801 eval: 0.702
iou train: 0.617 eval: 0.346
=== EPOCH 35/100 ===
loss train: 0.448 eval: 0.521
acc train: 0.809 eval: 0.738
iou train: 0.620 eval: 0.411
Epoch 35: save ckpt to ./logs/RandLANet_Semantic3D_torch/checkpoint
=== EPOCH 36/100 ===
loss train: 0.408 eval: 0.875
acc train: 0.816 eval: 0.662
iou train: 0.634 eval: 0.314
=== EPOCH 37/100 ===
loss train: 0.398 eval: 0.919
acc train: 0.808 eval: 0.634
iou train: 0.637 eval: 0.274
=== EPOCH 38/100 ===
loss train: 0.441 eval: 0.646
acc train: 0.811 eval: 0.669
iou train: 0.630 eval: 0.337
=== EPOCH 39/100 ===
loss train: 0.408 eval: 0.560
acc train: 0.832 eval: 0.762
iou train: 0.661 eval: 0.434
=== EPOCH 40/100 ===
loss train: 0.387 eval: 0.798
acc train: 0.836 eval: 0.719
iou train: 0.655 eval: 0.435
Epoch 40: save ckpt to ./logs/RandLANet_Semantic3D_torch/checkpoint
=== EPOCH 41/100 ===
loss train: 0.441 eval: 0.609
acc train: 0.807 eval: 0.683
iou train: 0.632 eval: 0.317
=== EPOCH 42/100 ===
loss train: 0.376 eval: 0.686
acc train: 0.827 eval: 0.736
iou train: 0.652 eval: 0.439
=== EPOCH 43/100 ===
loss train: 0.386 eval: 0.477
acc train: 0.828 eval: 0.739
iou train: 0.652 eval: 0.447
=== EPOCH 44/100 ===
loss train: 0.390 eval: 0.148
acc train: 0.834 eval: 0.845
iou train: 0.658 eval: 0.622
=== EPOCH 45/100 ===
loss train: 0.361 eval: 0.523
acc train: 0.848 eval: 0.841
iou train: 0.675 eval: 0.349
Epoch 45: save ckpt to ./logs/RandLANet_Semantic3D_torch/checkpoint
=== EPOCH 46/100 ===
loss train: 0.401 eval: 0.813
acc train: 0.829 eval: 0.657
iou train: 0.650 eval: 0.375
=== EPOCH 47/100 ===
loss train: 0.357 eval: 0.632
acc train: 0.846 eval: 0.664
iou train: 0.681 eval: 0.373
=== EPOCH 48/100 ===
loss train: 0.366 eval: 0.530
acc train: 0.830 eval: 0.790
iou train: 0.663 eval: 0.357
=== EPOCH 49/100 ===
loss train: 0.365 eval: 0.770
acc train: 0.838 eval: 0.657
iou train: 0.674 eval: 0.403
=== EPOCH 50/100 ===
loss train: 0.364 eval: 1.051
acc train: 0.835 eval: 0.578
iou train: 0.668 eval: 0.308
Epoch 50: save ckpt to ./logs/RandLANet_Semantic3D_torch/checkpoint
=== EPOCH 51/100 ===
loss train: 0.343 eval: 0.657
acc train: 0.845 eval: 0.728
iou train: 0.681 eval: 0.460
=== EPOCH 52/100 ===
loss train: 0.327 eval: 0.952
acc train: 0.840 eval: 0.640
iou train: 0.679 eval: 0.405
=== EPOCH 53/100 ===
loss train: 0.320 eval: 0.636
acc train: 0.854 eval: 0.787
iou train: 0.691 eval: 0.444
=== EPOCH 54/100 ===
loss train: 0.360 eval: 0.548
acc train: 0.840 eval: 0.788
iou train: 0.678 eval: 0.448
=== EPOCH 55/100 ===
loss train: 0.339 eval: 0.810
acc train: 0.848 eval: 0.710
iou train: 0.687 eval: 0.388
Epoch 55: save ckpt to ./logs/RandLANet_Semantic3D_torch/checkpoint
=== EPOCH 56/100 ===
loss train: 0.416 eval: 0.822
acc train: 0.840 eval: 0.678
iou train: 0.685 eval: 0.336
=== EPOCH 57/100 ===
loss train: 0.344 eval: 0.746
acc train: 0.842 eval: 0.704
iou train: 0.672 eval: 0.408
=== EPOCH 58/100 ===
loss train: 0.350 eval: 0.377
acc train: 0.850 eval: 0.774
iou train: 0.687 eval: 0.444
=== EPOCH 59/100 ===
loss train: 0.315 eval: 0.775
acc train: 0.851 eval: 0.653
iou train: 0.682 eval: 0.484
=== EPOCH 60/100 ===
loss train: 0.348 eval: 0.400
acc train: 0.837 eval: 0.731
iou train: 0.681 eval: 0.389
Epoch 60: save ckpt to ./logs/RandLANet_Semantic3D_torch/checkpoint
=== EPOCH 61/100 ===
loss train: 0.297 eval: 0.453
acc train: 0.859 eval: 0.778
iou train: 0.700 eval: 0.492
=== EPOCH 62/100 ===
loss train: 0.350 eval: 0.909
acc train: 0.840 eval: 0.610
iou train: 0.679 eval: 0.292
=== EPOCH 63/100 ===
loss train: 0.342 eval: 0.608
acc train: 0.856 eval: 0.738
iou train: 0.696 eval: 0.471
=== EPOCH 64/100 ===
loss train: 0.355 eval: 0.548
acc train: 0.847 eval: 0.793
iou train: 0.682 eval: 0.401
=== EPOCH 65/100 ===
loss train: 0.316 eval: 0.703
acc train: 0.852 eval: 0.715
iou train: 0.684 eval: 0.406
Epoch 65: save ckpt to ./logs/RandLANet_Semantic3D_torch/checkpoint
=== EPOCH 66/100 ===
loss train: 0.329 eval: 0.578
acc train: 0.853 eval: 0.710
iou train: 0.694 eval: 0.443
=== EPOCH 67/100 ===
loss train: 0.290 eval: 0.536
acc train: 0.866 eval: 0.714
iou train: 0.713 eval: 0.385
=== EPOCH 68/100 ===
loss train: 0.292 eval: 0.675
acc train: 0.859 eval: 0.668
iou train: 0.710 eval: 0.410
=== EPOCH 69/100 ===
loss train: 0.287 eval: 0.480
acc train: 0.858 eval: 0.773
iou train: 0.712 eval: 0.458
=== EPOCH 70/100 ===
loss train: 0.291 eval: 0.793
acc train: 0.865 eval: 0.739
iou train: 0.713 eval: 0.495
Epoch 70: save ckpt to ./logs/RandLANet_Semantic3D_torch/checkpoint
=== EPOCH 71/100 ===
loss train: 0.290 eval: 0.868
acc train: 0.855 eval: 0.643
iou train: 0.697 eval: 0.432
=== EPOCH 72/100 ===
loss train: 0.320 eval: 0.453
acc train: 0.857 eval: 0.798
iou train: 0.708 eval: 0.475
=== EPOCH 73/100 ===
loss train: 0.340 eval: 0.723
acc train: 0.840 eval: 0.559
iou train: 0.687 eval: 0.345
=== EPOCH 74/100 ===
loss train: 0.300 eval: 0.796
acc train: 0.851 eval: 0.618
iou train: 0.702 eval: 0.355
=== EPOCH 75/100 ===
loss train: 0.284 eval: 0.541
acc train: 0.867 eval: 0.766
iou train: 0.715 eval: 0.374
Epoch 75: save ckpt to ./logs/RandLANet_Semantic3D_torch/checkpoint
=== EPOCH 76/100 ===
loss train: 0.326 eval: 0.495
acc train: 0.859 eval: 0.807
iou train: 0.700 eval: 0.387
=== EPOCH 77/100 ===
loss train: 0.327 eval: 0.573
acc train: 0.861 eval: 0.733
iou train: 0.708 eval: 0.403
=== EPOCH 78/100 ===
loss train: 0.340 eval: 0.833
acc train: 0.864 eval: 0.719
iou train: 0.708 eval: 0.465
=== EPOCH 79/100 ===
loss train: 0.280 eval: 0.711
acc train: 0.864 eval: 0.635
iou train: 0.706 eval: 0.423
=== EPOCH 80/100 ===
loss train: 0.331 eval: 0.520
acc train: 0.864 eval: 0.749
iou train: 0.702 eval: 0.441
Epoch 80: save ckpt to ./logs/RandLANet_Semantic3D_torch/checkpoint
=== EPOCH 81/100 ===
loss train: 0.304 eval: 0.340
acc train: 0.864 eval: 0.816
iou train: 0.705 eval: 0.542
=== EPOCH 82/100 ===
loss train: 0.277 eval: 0.974
acc train: 0.866 eval: 0.613
iou train: 0.710 eval: 0.416
=== EPOCH 83/100 ===
loss train: 0.313 eval: 0.591
acc train: 0.854 eval: 0.767
iou train: 0.691 eval: 0.460
=== EPOCH 84/100 ===
loss train: 0.334 eval: 0.473
acc train: 0.859 eval: 0.801
iou train: 0.696 eval: 0.489
=== EPOCH 85/100 ===
loss train: 0.325 eval: 0.295
acc train: 0.858 eval: 0.839
iou train: 0.704 eval: 0.524
Epoch 85: save ckpt to ./logs/RandLANet_Semantic3D_torch/checkpoint
=== EPOCH 86/100 ===
loss train: 0.291 eval: 1.024
acc train: 0.859 eval: 0.545
iou train: 0.700 eval: 0.342
=== EPOCH 87/100 ===
loss train: 0.305 eval: 0.718
acc train: 0.862 eval: 0.674
iou train: 0.706 eval: 0.419
=== EPOCH 88/100 ===
loss train: 0.289 eval: 0.502
acc train: 0.860 eval: 0.750
iou train: 0.708 eval: 0.472
=== EPOCH 89/100 ===
loss train: 0.310 eval: 0.467
acc train: 0.857 eval: 0.730
iou train: 0.695 eval: 0.510
=== EPOCH 90/100 ===
loss train: 0.327 eval: 0.510
acc train: 0.854 eval: 0.689
iou train: 0.699 eval: 0.437
Epoch 90: save ckpt to ./logs/RandLANet_Semantic3D_torch/checkpoint
=== EPOCH 91/100 ===
loss train: 0.293 eval: 0.363
acc train: 0.864 eval: 0.754
iou train: 0.714 eval: 0.467
=== EPOCH 92/100 ===
loss train: 0.293 eval: 0.439
acc train: 0.871 eval: 0.780
iou train: 0.710 eval: 0.504
=== EPOCH 93/100 ===
loss train: 0.280 eval: 0.452
acc train: 0.862 eval: 0.834
iou train: 0.705 eval: 0.536
=== EPOCH 94/100 ===
loss train: 0.312 eval: 0.657
acc train: 0.865 eval: 0.732
iou train: 0.706 eval: 0.501
=== EPOCH 95/100 ===
loss train: 0.276 eval: 0.237
acc train: 0.871 eval: 0.855
iou train: 0.715 eval: 0.600
Epoch 95: save ckpt to ./logs/RandLANet_Semantic3D_torch/checkpoint
=== EPOCH 96/100 ===
loss train: 0.291 eval: 0.739
acc train: 0.860 eval: 0.562
iou train: 0.701 eval: 0.295
=== EPOCH 97/100 ===
loss train: 0.328 eval: 0.538
acc train: 0.857 eval: 0.699
iou train: 0.708 eval: 0.463
=== EPOCH 98/100 ===
loss train: 0.271 eval: 0.784
acc train: 0.861 eval: 0.704
iou train: 0.713 eval: 0.404
=== EPOCH 99/100 ===
loss train: 0.299 eval: 0.249
acc train: 0.854 eval: 0.900
iou train: 0.693 eval: 0.363
=== EPOCH 100/100 ===
loss train: 0.282 eval: 0.577
acc train: 0.850 eval: 0.728
iou train: 0.698 eval: 0.359
Epoch 100: save ckpt to ./logs/RandLANet_Semantic3D_torch/checkpoint
ckpt_path not given. Restore from the latest ckpt
Loading checkpoint ./logs/RandLANet_Semantic3D_torch/checkpoint/ckpt_00100.pth

Tesing test data on Semantic3D dataset by using examples/visualize.py script,but the visualization result is as follows:
微信图片编辑_20201230100928

Custom Dataset

Hi, I've been trying to create a custom dataset and have questions. On the front README file, there is a link to the How-To "Adding a new dataset" which suggests creating a Class based off of the BaseDataset. However, in the docs I also see the option for using the Custom3D class for custom datasets.

I've created a Custom3D dataset for my pointcloud data. When I pass it into ml3d.pipelines.SemanticSegmentation() there are no complaints, and when I pass it into visualize_dataset() it works.

model = ml3d.models.RandLANet()

pipeline = ml3d.pipelines.SemanticSegmentation(model=model, dataset=dataset, max_epoch=100)

# prints training progress in the console.
pipeline.run_train()

The above code snippet exists with the error "AttributeError: 'SemanticSegmentation' object has no attribute 'cfg_tb'".

What is the correct way to create a custom dataset?

How to use L515 to build a 3D model of an object with Open3D?

I would like to ask is there any Python coding example, which can operate the L515 to scan around an object and create a 3D model? The final exported product could be a point cloud model or a mesh model, point cloud model would be more preferable. Thank you.

Open3d ML support for Ubuntu 16.04

Hi, thank you for your great work.

Currently, Ubuntu 16.04 is not supported by Open3D-ML, even we try to compile the Open3D from the source code?

Do you have a plan to support Ubuntu 16.04 platform in the future?

[Model Zoo] RandLA-Net (tf) ERROR 403: Forbidden.

When I download RandLA-Net (tf) from Model Zoo's, I get an error.

$ wget https://storage.googleapis.com/open3d-releases/model-zoo/randlanet_semantickitti_202010091306.zip
--2021-02-23 08:30:00--  https://storage.googleapis.com/open3d-releases/model-zoo/randlanet_semantickitti_202010091306.zip
Resolving storage.googleapis.com (storage.googleapis.com)... 2404:6800:4004:81c::2010, 2404:6800:4004:813::2010, 2404:6800:4004:80b::2010, ...
Connecting to storage.googleapis.com (storage.googleapis.com)|2404:6800:4004:81c::2010|:443... connected.
HTTP request sent, awaiting response... 403 Forbidden
2021-02-23 08:30:01 ERROR 403: Forbidden.

I also get an error page when I click on the URL link.

This XML file does not appear to have any style information associated with it. The document tree is shown below.

<Error>
<Code>AccessDenied</Code>
<Message>Access denied.</Message>
<Details>Anonymous caller does not have storage.objects.get access to the Google Cloud Storage object.</Details>
</Error>

ImportError: cannot import name 'iou_bev_cpu' from 'open3d.ml.contrib'

After using
source /path/to/Open3D-ML/set_open3d_ml_root.sh
I got this error when trying to test the integration of MyModel

 File "tests/test_integration.py", line 13, in test_integration_torch
    import open3d.ml.torch as ml3d
  File "/usr/local/lib/python3.8/dist-packages/open3d/__init__.py", line 111, in <module>
    import open3d.ml
  File "/usr/local/lib/python3.8/dist-packages/open3d/ml/__init__.py", line 35, in <module>
    from . import datasets
  File "/usr/local/lib/python3.8/dist-packages/open3d/ml/datasets.py", line 32, in <module>
    from ml3d.datasets import *
  File "/home/docker_open3d/catkin_ws/src/Open3D_ROS/Open3D-ML/ml3d/datasets/__init__.py", line 5, in <module>
    from .semantickitti import SemanticKITTI
  File "/home/docker_open3d/catkin_ws/src/Open3D_ROS/Open3D-ML/ml3d/datasets/semantickitti.py", line 10, in <module>
    from .utils import DataProcessing
  File "/home/docker_open3d/catkin_ws/src/Open3D_ROS/Open3D-ML/ml3d/datasets/utils/__init__.py", line 1, in <module>
    from .dataprocessing import DataProcessing
  File "/home/docker_open3d/catkin_ws/src/Open3D_ROS/Open3D-ML/ml3d/datasets/utils/dataprocessing.py", line 9, in <module>
    from .operations import *
  File "/home/docker_open3d/catkin_ws/src/Open3D_ROS/Open3D-ML/ml3d/datasets/utils/operations.py", line 5, in <module>
    from ...metrics import iou_bev
  File "/home/docker_open3d/catkin_ws/src/Open3D_ROS/Open3D-ML/ml3d/metrics/__init__.py", line 8, in <module>
    from open3d.ml.contrib import iou_bev_cpu as iou_bev
ImportError: cannot import name 'iou_bev_cpu' from 'open3d.ml.contrib' (/usr/local/lib/python3.8/dist-packages/open3d/ml/contrib/__init__.py)

AssertionError: Wrong feature dimension, please update dim_input(3 + feature_dimension) in config

I've changed the code in examples/vis_pred.py to visualize the prediction for semantic3D using the pre-trained model.

The code was changed as follows:

semantic_labels = ml3d.datasets.Semantic3D.get_label_to_names()
v = ml3d.vis.Visualizer()
lut = ml3d.vis.LabelLUT()
for val in sorted(semantic_labels.keys()):
    lut.add_label(semantic_labels[val], val)
v.set_lut("pred", lut)

randlanet_url = "https://storage.googleapis.com/open3d-releases/model-zoo/randlanet_semantic3d_202012120312utc.pth"

ckpt_path = example_dir + "/vis_weights_{}.pth".format('RandLANet')
if not exists(ckpt_path):
    cmd = "wget {} -O {}".format(randlanet_url, ckpt_path)
    os.system(cmd)
    
cfg_file = "/path/to/randlanet_semantic3d.yml"
cfg = _ml3d.utils.Config.load_from_file(cfg_file)

model = ml3d.models.RandLANet(**cfg.model)
pipeline = ml3d.pipelines.SemanticSegmentation(model, **cfg.pipeline)
pipeline.load_ckpt(model.cfg.ckpt_path)

data_path = example_dir + "/demo_data"
pc_names = ["bildstein_station1_xyz_intensity_rgb_float32"]
pcs = get_custom_data(pc_names, data_path)

pcs_with_pred = pred_custom_data(pc_names, pcs, pipeline)

v.visualize(pcs_with_pred) 

I haven't changed anything in randlanet_semantic3d.yml, just added the ckpt_path. That's it.

When I run the code, I get the following error:

"AssertionError: Wrong feature dimension, please update dim_input(3 + feature_dimension) in config"

I tried to changed the number of the dim_input in the yml file, but it didn't help since dim_input = 6 is needed for semantic3d.

Kindly request help on this issue.
Thanks in advance

AttributeError: 'Semantic3DSplit' object has no attribute 'sampler'

Hi
I got a problem show in the title when I want to train a model using semantic3d by follow:

  • python scripts/run_pipeline.py torch -c ml3d/configs/randlanet_semantic3d.yml -m --dataset.dataset_path --pipeline SemanticSegmentation

  • Ubuntu18.04

  • CUDA-10.1

  • Pytorch1.6.0+torchvision0.7.0

  • Python3.7.0

Cloud you tell me what' the problem? Thank you for you kind help!

Training and testing result of kpconv on toronto3d do not make sense

@sanskar107
Thank you for your great work. I am very interested in your project, but I encountered the following problems when training and testing kpconv model on toronto3d. Looking forward to your reply. Thank you very much!
1.Testing problem
When I used the predefined scripts "ml3d/configs/kpconv_toronto3d.yml" and weight file "https://storage.googleapis.com/open3d-releases/model-zoo/kpconv_toronto3d_202012221551utc.pth" to test the kpconv model on toronto3d, I got a overall accuracy of 82.02% and MIOU of 46.4. That is lower than your score MIOU 65.6.
2.Training problem
Then I used the predefined scripts "ml3d/configs/kpconv_toronto3d.yml" to train the kpconv model on toronto3d from scratch. The results do not make sense.
图片
图片

Installation issue

I have installed and worked with open3d without issue.
I started to install Open3D-ML and the installation seems right.

When I tested it, I got this error? Please help!

C:\Users\drhie\Downloads\Open3D-ML-master>python
Python 3.6.10 |Anaconda, Inc.| (default, May 7 2020, 19:46:08) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

import open3d
>>> import open3d.ml.torch
Traceback (most recent call last):
File "", line 1, in
File "C:\Anaconda3\envs\mas\lib\site-packages\open3d\ml\torch_init_.py", line 33, in
raise Exception('Open3D was not built with PyTorch support!')
Exception: Open3D was not built with PyTorch support!

>>> import open3d.ml.tf
2020-11-12 14:33:45.723533: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudart64_101.dll
Traceback (most recent call last):
File "", line 1, in
File "C:\Anaconda3\envs\mas\lib\site-packages\open3d\ml\tf_init_.py", line 32, in
raise Exception('Open3D was not built with TensorFlow support!')
Exception: Open3D was not built with TensorFlow support!

segmentation fault

Is the following error unresolvable in wsl2?

(open3d) rjsgml5698@DESKTOP-BVT01B5:/mnt/c/Develop/d3d/open3d-ml/examples$ python visualize.py kitti '/mnt/f/kitti-dataset/'
2020-10-23 09:40:10.226722: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1
INFO - 2020-10-23 09:40:11,427 - semantickitti - Found 19130 pointclouds for training
Segmentation fault

OS: [Ubuntu 20.04 on Windows 10(build version:1909)]
Python version: 3.6.12
Open3D version: 0.11.0(latest released) : conda install -c open3d-admin open3d

RandLA torch results

Hi,
I run the pretrained RandLA torch model for SemanticKITTI on the validation split of SemanticKITTI and I got the following numbers:

test acc: 0.6835311938123804
test iou: 0.4933693851882593

While the reported mIoU is of 52.8. Are these numbers referred to the test split? If yes, which are the results on the validation split? For validating on the valid split I simply changed the evaluated split in your evaluation tutorial code.
Thanks in advance for any help!

"CUDA_ERROR_OUT_OF_MEMORY" error for both models

Cannot run any of the two models KPConv or RandLaNet with S3DIS or SemanticKITTI because CUDA error of running out of memory.
Can someone confirm ~4GB dedicated graphics memory is enough or not to hold the models?

Current Graphics Card:
Quadro T2000 with Max-Q Design
Total Memory:: 4096MB
Total Dedicated Memory: 3914 MB

I have tried many different combinations so far such as run_pipeline.py, examples jupyter books, etc.
Non of the models can continue beyond epoch=0.
I have also tried CUDA allow memory growth trick as well. Still it grows until >3600MB and gives the above error.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.