pointnet和pointnet++

PointNet和PointNet++是用于点云处理的深度学习模型,主要应用于点云分类和分割任务。PointNet通过T-net进行空间变换,通过max pool获取全局特征。然而,它忽略了局部信息,不适合处理多实例分类问题。PointNet++引入set abstraction和feature propagation,考虑了局部结构,提高了处理能力。在分割任务中,PointNet++借鉴了DSSD的框架,通过Feature Propagation layers结合高层和低层特征。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

pointnet++是pointnet的改进版本,两者都可以做点云分类和点云分割
代码:pointnet系列

pointnet:

分类:
这里写图片描述
输入:B*N*(d+C) d为坐标xyz,C为点属性(在modelnet40数据集没有点属性)图中为B*N*3
transform:通过T-net得到B*3*3的变换矩阵,对坐标进空间变换
mlp:相当于1*1的卷积
max pool:获取全局特征
输出:k个分类

def get_model(point_cloud, is_training, bn_decay=None):

    """ Classification PointNet, input is BxNx3, output Bx40 """

    batch_size = point_cloud.get_shape()[0].value

    num_point = point_cloud.get_shape()[1].value

    end_points = {}



    with tf.variable_scope('transform_net1') as sc:

        transform = input_transform_net(point_cloud, is_training, bn_decay, K=3)

    point_cloud_transformed = tf.matmul(point_cloud, transform)

    input_image = tf.expand_dims(point_cloud_transformed, -1)



    net = tf_util.conv2d(input_image, 64, [1,3],

                         padding='VALID', stride=[1,1],

                         bn=True, is_training=is_training,

                         scope='conv1', bn_decay=bn_decay)

    net = tf_util.conv2d(net, 64, [1,1],

                         padding='VALID', stride=[1,1],

                         bn=True, is_training=is_training,

                         scope='conv2', bn_decay=bn_decay)



    with tf.variable_scope('transform_net2') as sc:

        transform = feature_transform_net(net, is_training, bn_decay, K=64)

    end_points['transform'] = transform

    net_transformed = tf.matmul(tf.squeeze(net, axis=[2]), transform)

    net_transformed = tf.expand_dims(net_transformed, [2])



    net = tf_util.conv2d(net_transformed, 64, [1,1],

                         padding='VALID', stride=[1,1],

                         bn=True, is_training=is_training,

                         scope='conv3', bn_decay=bn_decay)

    net = tf_util.conv2d(net, 128, [1,1],

                         padding='VALID', stride=[1,1],

                         bn=True, is_training=is_training,

                         scope='conv4', bn_decay=bn_decay)

    net = tf_util.conv2d(net, 1024, [1,1],

                         padding='VALID', stride=[1,1],

                         bn=True, is_training=is_training,

                         scope='conv5', bn_decay=bn_decay)



    # Symmetric function: max pooling

    net = tf_util.max_pool2d(net, [num_point,1],

                             padding='VALID', scope='maxpool')



    net = tf.reshape(net, [batch_size, -1])

    net = tf_util.fully_connected(net, 512, bn=True, is_training=is_training,

                                  scope='fc1', bn_decay=bn_decay)

    net = tf_util.dropout(net, keep_prob=0.7, is_training=is_training,

                          scope='dp1')

    net = tf_util.fully_connected(net, 256<
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值