question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PointNet++ implementation

See original GitHub issue

❓ Questions & Help

Hi, I have some questions about implementation of PointNet++ in examples. First one: now there are the following lines:

idx = fps(pos, batch, ratio=0.5)  # 512 points
edge_index = radius(
    pos[idx], pos, 0.1, batch[idx], batch, max_num_neighbors=64)

If I understand correctly, it means that we find 64 sampled points for each point from initial point cloud. But in original pointnet++ we should find 64 points from initial point cloud for each sampled point (which is not the same thing). So it seems for me that more correct way is:

idx = fps(pos, batch, ratio=0.5)  # 512 points
edge_index = radius(
    pos, pos[idx], 0.1, batch, batch[idx], max_num_neighbors=64)

The second question. It seems for me that there is a problem with indices.

idx = fps(pos, batch, ratio=0.25)  # 128 points
edge_index = radius(
    pos[idx], pos, 0.2, batch[idx], batch, max_num_neighbors=64)
N, M = pos.size(0), idx.size(0)

Let’s assume that idx has size 1, so there is only 1 sampled point. Then pos[idx] also has size 1, which means, that edge_index[1] is [0, ..., 0]. Now, look at the next line

x = F.relu(self.local_sa2(x, pos, edge_index, size=(N, M)))

Inside PointConv propagate we now have x_i = [x[0], ..., x[0]], whereas it should be [x[idx[0]], ..., x[idx[0]]]. If my understanding is correct, then there is a problem with local and global indices of sampled points.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
rusty1scommented, Oct 22, 2021

I think it is, as node features are converted into (x, None) format inside PointNetConv, see https://github.com/pyg-team/pytorch_geometric/blob/master/torch_geometric/nn/conv/point_conv.py#L66-L67. Nonetheless, I changed the example in master to make this more align with other operators, see https://github.com/pyg-team/pytorch_geometric/blob/master/examples/pointnet2_classification.py#L24

0reactions
jacobjjcommented, Oct 22, 2021
Read more comments on GitHub >

github_iconTop Results From Across the Web

PointNet: Deep Learning on Point Sets for 3D Classification ...
Our network, named PointNet, provides a unified architecture for applications ranging from object classification, part segmentation, to scene semantic parsing.
Read more >
Point cloud classification with PointNet - Keras
Description: Implementation of PointNet for ModelNet10 classification. View in Colab • GitHub source. Point cloud classification. Introduction.
Read more >
Deep Learning on Point clouds: Implementing PointNet in ...
PointNet is a simple and effective Neural Network for point cloud recognition. In this tutorial we will implement it using PyTorch.
Read more >
PointNet: Deep Learning on Point Sets for ... - Papers With Code
Our network, named PointNet, provides a unified architecture for applications ranging from object classification, ... See all 100 implementations.
Read more >
PointNet Explained Visually | by DataScienceUB - Medium
It was implemented in 2017 and was the first architecture that directly took point clouds as input for 3D recognition tasks. The idea...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found