Skip to content

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

Description

@BEFLIPPED

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 ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions