PointNet与PointCNN从文章到代码都有很多相似之处,两者对比看待,或许更有助于我们理解。
众所周知,PointNet中使用了maxpooling和T-net,作者文章中起到关键作用的是maxpooling,而T-net对性能的提升作用也还是有的(两个T-net加上regularization 贡献了2.1个百分点),但奇怪的是在PointNet++的代码中,已经看不到T-net了(这一点论文没有提及,github上也有人提问,但是作者没有回复)。
但是,与之相似的PointCNN中有个X变换矩阵,但X变换对于PointCNN的作用可就非常重要了,因为它连maxpooling都没有用。下面我们就对两者进行比较。
首先是PointNet中的T-net代码:
def feature_transform_net(inputs, is_training, bn_decay=None, K=64):
""" Feature Transform Net, input is BxNx1xK
Return:
Transformation matrix of size KxK """
batch_size = inputs.get_shape()[0].value
num_point = inputs.get_shape()[1].value
net = tf_util.conv2d(inputs, 64, [1,1],
padding='VALID', stride=[1,1],