drprojects / superpoint_transformer

Official PyTorch implementation of Superpoint Transformer introduced in [ICCV'23] "Efficient 3D Semantic Segmentation with Superpoint Transformer" and SuperCluster introduced in [3DV'24 Oral] "Scalable 3D Panoptic Segmentation As Superpoint Graph Clustering"
MIT License
567 stars 74 forks source link

Notebook reproduction #133

Closed IsraelAbebe closed 3 months ago

IsraelAbebe commented 3 months ago

Thank you for the amazing work

I was running the superpoint_transformer_tutorial.ipynb with data downloaded from the https://webtransfer.vancouver.ca/opendata/2022LiDAR/482000_5455000.zip as mentioned in the instruction.

I couldnt get past intensity based evaluation and also visualize model output.

in the visualization i get

data.show(center=[425, 282, 15], radius=30, keys=['intensity'], class_names=VANCOUVER_CLASS_NAMES, class_colors=VANCOUVER_CLASS_COLORS)

>>>    343 void_classes = [num_classes] if num_classes else []
    345 # Draw a trace for position-colored 3D point cloud
--> 346 mini = data_0.pos.min(dim=0).values
    347 maxi = data_0.pos.max(dim=0).values
    348 colors = (data_0.pos - mini) / (maxi - mini + 1e-6)

IndexError: min(): Expected reduction dim 0 to have non-zero size.

and visualizing transformations

nag.show(class_names=VANCOUVER_CLASS_NAMES, class_colors=VANCOUVER_CLASS_COLORS, center=[485, 505, 0], radius=20, keys=nag[0].keys, centroids=True, h_edge=True)

>>> File ~/superpoint_transformer/src/utils/sparse.py:17, in indices_to_pointers(indices)
     15 device = indices.device
     16 assert len(indices.shape) == 1, "Only 1D indices are accepted."
---> 17 assert indices.shape[0] >= 1, "At least one group index is required."
     18 assert is_dense(indices), "Indices must be dense"
     20 # Sort indices if need be

AssertionError: At least one group index is required.

what am i doing wrong ? if this is related to the data should i download specific one?

drprojects commented 3 months ago

Hi @IsraelAbebe, thanks for your interest in the project !

The error you are seeing suggests you are visualizing an empty Data object (ie with 0 points). I can think of 2 ways this could have happened to you:

PS: If you ❤️ or use this project, don't forget to give it a ⭐, it means a lot to us !