drprojects/superpoint_transformer

Notebook reproduction

Closed this issue · 1 comments

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?

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:

  • you introduced some additional modifications on the Data object (ie have you made any modification to the notebook so far ?)
  • the Vancouver dataset tile you are using is not the same as the one I used in the tutorial. In which case, it is likely the center used for visualization is simply outside the range of your cloud's point coordinates. To adjust this, run the previous cell:
    data.show(class_names=VANCOUVER_CLASS_NAMES, class_colors=VANCOUVER_CLASS_COLORS) and find new center coordinates better suited to your tile by mouse hovering over points

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