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

A question about forward() of get_model() from pointnet2_part_seg_ssg.py #286

Open
BEFLIPPED opened this issue Jan 13, 2025 · 0 comments
Open

Comments

@BEFLIPPED
Copy link

I found something from https://github.com/charlesq34/pointnet2/blob/master/models/pointnet2_part_seg.py, as follows.

def get_model(point_cloud, is_training, bn_decay=None):
    """ Part segmentation PointNet, input is BxNx6 (XYZ NormalX NormalY NormalZ), output Bx50 """
    batch_size = point_cloud.get_shape()[0].value
    num_point = point_cloud.get_shape()[1].value
    end_points = {}
    l0_xyz = tf.slice(point_cloud, [0,0,0], [-1,-1,3])
    l0_points = tf.slice(point_cloud, [0,0,3], [-1,-1,3])

Some design in get_model(): forward() in pointnet2_part_seg_ssg.py from https://github.com/yanx27/Pointnet_Pointnet2_pytorch/blob/master/models/pointnet2_part_seg_ssg.py, as follows.

def forward(self, xyz, cls_label):
        # Set Abstraction layers
        B,C,N = xyz.shape
        if self.normal_channel:
            l0_points = xyz
            l0_xyz = xyz[:,:3,:]
        else:
            l0_points = xyz
            l0_xyz = xyz

If pc sent in model has xyz+nxnynz, the following processing may be different in corresponding function, especially in sample_and_group(). Could you please tell me the reason of the different design in pointnet2_part_seg_ssg.py? Whether the forward() is specially designed for pc which solely has xyz or not ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant