Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

visualize ParisLille3D #527

Open
3 tasks done
Neural-Net-Ninja opened this issue May 2, 2022 · 1 comment
Open
3 tasks done

visualize ParisLille3D #527

Neural-Net-Ninja opened this issue May 2, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@Neural-Net-Ninja
Copy link

Checklist

Describe the issue

I am trying to visualize parislille3d data, the code identifies the presence of the dataset, but does not visualise it.

Steps to reproduce the bug

import os
import glob
import open3d.ml.tf as ml3d
import open3d.ml as _ml3d
from open3d.ml.tf.models import KPFCNN
from open3d.ml.tf.pipelines import SemanticSegmentation

# construct a dataset by specifying dataset_path
dataset = ml3d.datasets.ParisLille3D(dataset_path='/home/jarvis/Open3D-ML/data/Paris_Lille')

# get the 'validation' split that combines validation
validation_split = dataset.get_split('validation')

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

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

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

Error message

INFO - 2022-05-02 13:35:44,460 - parislille3d - Found 1 pointclouds for validation
{'idx': 0, 'name': 'Lille2', 'path': '/home/jarvis/Open3D-ML/data/Paris_Lille/training_10_classes/Lille2.ply', 'split': 'validation'}
INFO - 2022-05-02 13:35:45,937 - parislille3d - Found 1 pointclouds for validation
(21402421, 3)

IndexError Traceback (most recent call last)
/home/jarvis/Open3D-ML/paris.ipynb Cell 6' in <cell line: 15>()
13 # show the first 100 frames using the visualizer
14 vis = ml3d.vis.Visualizer()
---> 15 vis.visualize_dataset(dataset, 'validation', indices=range(100))

File ~/anaconda3/envs/interceptor/lib/python3.8/site-packages/open3d/_ml3d/vis/visualizer.py:1689, in Visualizer.visualize_dataset(self, dataset, split, indices, width, height)
1686 self.set_lut("labels", lut)
1688 self._consolidate_bounding_boxes = True
-> 1689 self._init_dataset(dataset, split, indices)
1690 self._visualize("Open3D - " + dataset.name, width, height)

File ~/anaconda3/envs/interceptor/lib/python3.8/site-packages/open3d/_ml3d/vis/visualizer.py:770, in Visualizer._init_dataset(self, dataset, split, indices)
769 def _init_dataset(self, dataset, split, indices):
--> 770 self._objects = DatasetModel(dataset, split, indices)
771 self._modality = dict()
772 self._modality['use_lidar'] = True

File ~/anaconda3/envs/interceptor/lib/python3.8/site-packages/open3d/_ml3d/vis/visualizer.py:292, in DatasetModel.init(self, dataset, split, indices)
290 path2idx[self.dataset.path_list[i]] = i
291 real_indices = [path2idx[p] for p in sorted(path2idx.keys())]
--> 292 indices = [real_indices[idx] for idx in indices]
294 # SemanticKITTI names its items <sequence#>
<timeslice#>,
295 # "mm_nnnnnn". We'd like to use the hierarchical feature of the tree
296 # to separate the sequences. We cannot change the name in the dataset
297 # because this format is used to report algorithm results, so do it
298 # here.
299 underscore_to_slash = False

File ~/anaconda3/envs/interceptor/lib/python3.8/site-packages/open3d/_ml3d/vis/visualizer.py:292, in (.0)
290 path2idx[self.dataset.path_list[i]] = i
291 real_indices = [path2idx[p] for p in sorted(path2idx.keys())]
--> 292 indices = [real_indices[idx] for idx in indices]
294 # SemanticKITTI names its items <sequence#>
<timeslice#>,
295 # "mm_nnnnnn". We'd like to use the hierarchical feature of the tree
296 # to separate the sequences. We cannot change the name in the dataset
297 # because this format is used to report algorithm results, so do it
298 # here.
299 underscore_to_slash = False

IndexError: list index out of range

Expected behavior

visualisation of data

Open3D, Python and System information

- Operating system: WSL 20.04 on windows 11
- Python version: Python 3.8.13
- Open3D version: Open3D 0.15.2
- System type: x86_64
- Is this a remote workstation?: no
- How did you install Open3D?: pip

Additional information

No response

@Neural-Net-Ninja Neural-Net-Ninja added the bug Something isn't working label May 2, 2022
@Neural-Net-Ninja
Copy link
Author

pcd = o3d.io.read_point_cloud("/home/jarvis/Open3D-ML/data/Paris_Lille/training_10_classes/Lille2.ply")
print(pcd)
o3d.visualization.draw_geometries ([pcd])

Simple visualisation like this seems to work.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant