Pointnet系列(一)Pointnet

 

目录

 

简介

网络结构

代码

transform nets

pointnet classification

运行

References


简介

点云数据是3D视觉中最为 常见的数据类型了,它包含了空间中点的xyz、rgb、normal、curvature等信息,然后实际上点云是一种不规则的表示形式,在研究中经常会将点云转换成3D voxel grids 或者图片的集合来表示。而在pcl中会使用特定的数据结构去保存点云如八叉树和KD树。在基于点云数据的深度学习研究中,很少有网络直接处理场景的点云数据,因此作者们在这个领域探索并设计了Pointnet网络结构直接使用原始点云数据作为输入,并用了一些方法使得网络能对输入点云的扰动具有鲁棒性。整个网络结构很简单却能有效的处理数据,并在当时的数据集上有着不错的表现,为后来的处理点云数据的深度学习网络结构埋下了基础。

 

网络结构

在设计网络结构的时候还是要考虑点云只是一系列点的集合,因此需要一些symmetric的操作,作者直接使用max pooling,结果发现网络能够很好的学习interesting or informative的点,是一个key approach。

classification任务和segmentation任务对feature的要求不同,会在segmentation任务中考虑同时使用较local的和较globa的,而classification任务就不需要local的那些直接用global的feature,因此在网络结构中,segmentation的结构是classification结构的一个扩展。

在基于点云的任务中,我们期望最终输出的结果可以对点云本身的几何变换具有鲁棒性,即对场景物体点云进行了一些旋转平移变换后不应该影响网络对其classification和segmentation的结果。一种自然的解决方案是在特征提取之前将所有输入集对齐到规范空间。因此作者借由spatial transformer networ的思想对网络进行了特别设计,分别应用了一个input transform 和 一个 feature transform(T-net)直接对数据进行变换,让feature map 可以对齐在一块。feature space transformation matrix的参数相比spatial transform matrix多很多,因此作者对其进行了regularization,使其接近于正交矩阵,而正交阵也不会丢失输入信息。

代码

transform nets

https://github.com/charlesq34/pointnet/blob/master/models/transform_nets.py

看到定义了input_transform_net 和feature_transform_net,卷积层和全连接层的叠加,输出分别是3*3和64*64

pointnet classification

https://github.com/charlesq34/pointnet/blob/master/models/pointnet_cls.py

网络的实现细节可以在这里看到,loss其实由两部分构成:classification的loss和transform的loss组成,进行梯度下降优化

运行

git clone https://github.com/charlesq34/pointnet.git

sudo apt-get install libhdf5-dev
sudo pip install h5py

python train.py

会发现不能安全的下载数据

修改provider.py中line 15 为    

os.system('wget --no-check-certificate %s; unzip %s' % (www, zipfile))

References

https://arxiv.org/abs/1612.00593

http://stanford.edu/~rqi/pointnet/

https://github.com/charlesq34/pointnet

猜你喜欢

转载自blog.csdn.net/sinat_37011812/article/details/81872592
今日推荐