点云学习:点动了,哪些预测应该跟着变?
Learning on point clouds
训练共享点特征与两个输出头,检查排列、邻域、梯度和一个表现很好的简单基线。
point-clouds文件换了行,椅子还是那把椅子
扫描仪把同一把椅子记录了两遍。两个文件包含相同的三维坐标,只是第二个文件的行顺序变了。分类器应该给出相同的椅子分数;分割模型应该给每个物理点保留相同的标签,只是标签跟着点换了行。
这是点云学习的第一个区别:整体分类应当对点的排列不变,逐点预测则应当随排列等变。这两种性质都不保证椅子翻转后、加入远处离群点后,或者只扫描椅背时,答案仍然不变。PointNet 围绕共享逐点表示和对称聚合组织网络;PointNet++ 加入局部邻域与层级;DGCNN 在学习到的特征空间中重新计算邻居。PointNet PointNet++ DGCNN
点云是一组没有固定排列意义的采样位置,还可能带有颜色、强度、法向量、时间戳或传感器置信度。采样过程不能忽略:玻璃表面缺失、椅腿被遮挡、行人发生移动,都不是普通的换行。点云本身也不会自动提供网格面片、封闭表面、自由空间标签或明确的长度单位。
训练之前,先写清坐标系、单位、附加通道、物体或场景边界,以及训练与测试如何划分。把毫米当作米,会改变所有具有物理半径的邻域。把同一次物体扫描中的点拆到训练集和测试集,可能泄漏物体几何;如果要考察对新物体或新场景的泛化,就应留出整个物体或场景。
| 要回答的问题 | 合理的第一项检查 | 这项检查不能证明什么 |
|---|---|---|
| 文件的行顺序变了吗? | 打乱行后比较预测 | 对另一轮扫描的稳健性 |
| 物体沿固定轴对齐、拉伸程度不同吗? | 比较坐标方差 | 任意旋转后的识别能力 |
| 这个邻域近似一个平面吗? | 查看协方差特征值 | 全局一致的法向方向 |
| 模型学到了可迁移的几何吗? | 留出不同物体、传感器与条件 | 从一次合成划分推断部署效果 |
本文的完整 NumPy 例子训练一个小型共享网络,同时完成整体分类和逐点标注;程序也包含几何预处理和一个可求导的 EdgeConv 层。它没有复现完整的 PointNet、PointNet++、DGCNN 架构或原论文榜单。坐标方差基线是实验的一部分,它表现好时也应该如实报告。
排列是一种对称性,几何还需要其他约定
先把对称性写准确
用矩阵的每一行表示一个点,排列矩阵用于重新排列这些行:
整体分类器 F 与逐点预测器 G 应分别满足:
每个点必须使用同一个共享函数;如果第 17 行拥有单独的权重,文件中的位置就会影响含义。本模型用 tanh 逐点层、逐通道最大池化和线性分类头:
W 的形状是 3 乘 K,H 有 N 行、K 个通道;玩具任务有两个类别,因此 C 是 K 乘 2。代码把 g 和 a 保存为一维数组。重新排列只改变 H 的行,不改变每一列的最大值,因此最终线性层收到的 g 不变。这是固定模型的代数性质,不需要靠训练发现。PointNet:共享特征与对称性
逐点分割把每一行局部特征与同一份全局摘要连接起来:
点换了顺序,局部特征跟着换行,g 保持不变,所以输出行随输入排列。全局摘要让一个点的标签能够参考物体的其他部分,但它没有显式保存每一对点之间的几何关系。
最大池化:有用的压缩,也有明确边界
如果通道 k 只有一个最大值,上游导数就传给对应点。并列最大值处不可微;本程序选用平均分配的次梯度:
等号上的标记表示并列处选定的次梯度,不是在声称所有框架都这样分配。分类梯度从各通道最大值进入;分割损失还会给其他点提供直接的局部梯度。
每个通道保留一个取得最大值的点,再对这些点取并集。最多保留 K 个不同的点,就能复现这个固定逐点特征函数的 g。增加一行重复点也不改变 g;加入一个在某通道超过原有最大值的点,则可能改变它。这些是最大池化的精确性质,不能推出任意删点或增加离群点都无害。PointNet 的分析在明确条件下讨论关键点集与上界集合;其通用逼近结论针对指定有界域、固定点数上的连续集合函数,并要求足够宽的表示,不能保证本文训练出来的 K=12 模型识别所有形状。PointNet,第 4.3 节
还有一个容易漏掉的条件:预处理也可能依赖整个点集。本文的零均值、单位半径归一化为:
当 r 非零时,它消除共同平移和正的统一缩放。只复制其中一个点会改变均值,可能改变所有点归一化后的坐标。因此,关键点子集只有在不单独重新归一化时,才保留原先固定的归一化特征。做不变性测试时,要明确这一边界。
邻域与法向量
体素网格用向下取整把坐标放入整数格子,再可以用格内点的质心代表整个格子。负坐标要向下取整,不能简单截断到零。格子尺寸与坐标使用相同单位;移动网格原点,也可能改变哪些点落在同一格。
在一个局部邻域中,主成分分析使用:
对于足够接近平面、且不共线的邻域,最小特征值对应的特征向量可以估计局部法向。n 与 −n 同样符合数据。共线邻域存在多个零方差方向;各向同性邻域则没有优先的法向。本函数拒绝前一种退化情形,并为后一种情形返回特征值间隔诊断。总能求出一个特征向量,不等于真的观察到了有意义的表面。
k 近邻固定邻居数量,但其物理半径随密度变化;球邻域固定半径,点数则可以变化。最远点采样不断选取离已选集合最远的点,再让共享点网络处理局部分组。PointNet++ 建立这样的层级,并组合不同尺度以处理采样密度变化。PointNet++,第 3.1—3.3 节
实现细节会影响严格的对称性。核读的 PointNet++ GPU 代码从输入下标零开始最远点采样,球查询按输入顺序保留最先命中的点,达到上限就停止。因此,排列输入可能改变采样中心或截断后的邻域。教学 FPS 也从下标零开始;与该内核不同,当重复坐标让距离耗尽时,本程序明确禁止重复选择已经选过的下标。球查询采用开半径,没有命中就返回空数组,而不假设填充下标始终有效。这些是明示的教学约定,不是逐位复刻上游实现。固定采样代码 分组代码
PointNet++ 还用距离加权插值和跨层连接,把较稀疏层的特征传播回较密集点集。论文默认使用三个邻居和距离平方的倒数作为权重。零距离需要另行规定处理方式;本文程序没有实现整个层级或这项插值,因此不声称复现这些组成部分。PointNet++,第 3.4 节
EdgeConv 学习关系,也可以重新建立图
对每个中心 i,在当前特征空间寻找邻居,再计算:
边函数同时使用中心特征和相对差值。这里是采用 tanh 的小型边聚合教学实例,不是论文完整网络。DGCNN 用各层生成的特征更新近邻,空间上很远的点也可能在学习后的特征空间成为邻居。DGCNN,第 3.1—3.3 节
差值项会抵消共同平移,中心项不会。如果把中心通道的权重设为零,并且邻居图保持不变,这个特定层才对其特征输入的共同平移不变。中心位置本来就可能包含有用信息,因此不能悄悄把这种不变性赋予一般形式的层。
近邻下标会离散变化。远离距离并列与邻居切换边界时,可以把选定的边视为固定图来求导;代码还在邻居不发生变化的位置,验证了重新计算图时的导数。到了边界,同一个光滑导数不一定存在。本程序的 kNN 按输入下标处理等距并列,因此在并列情况下,它本身也可能破坏严格的排列等变性。
对齐惩罚不等于旋转不变性认证
PointNet 用小网络预测输入变换和特征变换,并用软约束鼓励特征变换接近正交。本程序独立提供未乘二分之一的 Frobenius 范数平方惩罚及导数:
实际训练的小模型不包含变换网络。核读的上游分类器用 TensorFlow 的 l2_loss 实现正则项,该操作返回元素平方和的一半;本文独立惩罚不带这个二分之一。系数数值相同,并不表示惩罚大小相同。TensorFlow 操作定义核读的变换头把最后一层权重初始化为零,并加入单位矩阵偏置。本项目没有运行上游 TensorFlow 模型。PointNet 论文 固定分类器 变换头
即使正交惩罚为零,也仍然允许反射,因为正交矩阵的行列式可能为 −1。软惩罚、学习到的对齐函数、对所有旋转严格不变,是三个不同的结论。应测试实际应用关心的变换。
训练目标与计算成本
对每个物体,程序使用整体分类交叉熵,加上逐点交叉熵均值的四分之一:
指数运算前先减去最大 logit。整体与逐点损失使用两个输出头,但都会更新共享的 W 和 b。所有权重、偏置和输入导数都直接用 NumPy 实现,并用有限差分作独立数值检查。
共享层的梯度有两条来路。记 U 为分割头连接后的特征,B 为上面的池化次梯度,e 为独热目标向量。下面把输出头导数视为行向量,并在外积中把 g 视为列向量。逐点均值带来 1/N;整体交叉熵对这个物体只有一个目标。
两个输出头的偏置梯度分别是 D_c 与 D_s 的行和。把 D_g 广播回所有点,再乘 B,会把它的贡献送到通道最大值处;局部分支在乘 tanh 导数之前加入另一条梯度。train 再把各物体梯度取平均,得到批梯度。因此,即使一个点没有赢得任何池化通道,也能收到分割监督。
对于 N 个点、d 维输入、K 个隐藏通道,共享层耗时 O(NdK),池化耗时 O(NK),隐藏特征存储为 O(NK),输出头的额外开销由类别数决定。本文的暴力邻居构建耗时 O(N²d),距离矩阵占用 O(N²) 空间,随后还会逐行完整排序;它不是可扩展的近邻索引。选 M 个中心的 FPS 耗时 O(MNd)。这个小程序的目的,是让中间数组能够被检查,而不是声称拥有生产级内存效率。
让完整模型和基线识别留出的物体
使用 Python 3.12 和 NumPy 1.26.4。把下面代码保存为 points.py,执行 python points.py。训练集使用种子 17 生成 24 个物体,测试集使用种子 29 生成另外 16 个物体,每个物体有 24 个采样点。两类分别是单位球面采样,以及沿 x 轴拉长的椭球面采样,随后逐物体归一化。逐点标签表示归一化后 z 是否为正。这是标签规则透明的合成学习问题,不是语义分割数据集。
模型采用 K=12、确定性初始化、120 次全批量梯度更新和 0.15 学习率。固定的方差比阈值提供分类基线。阈值和超参数没有使用测试标签拟合。
"""Original NumPy point-set teaching models; not a PointNet benchmark replica.
Known conventions: nonempty finite sets, channelwise max (ties share gradient),
FPS starts at input index zero, capped open-ball queries keep input order,
kNN excludes self and breaks distance ties by input index. Dense neighborhoods.
"""
import json
import numpy as np
def cloud(value, dim=None):
x=np.asarray(value,dtype=float)
if x.ndim!=2 or not len(x) or not x.shape[1] or not np.isfinite(x).all():
raise ValueError('A nonempty finite N by D cloud is required')
if dim is not None and x.shape[1]!=dim:raise ValueError('Wrong feature dimension')
return x
def count(value,maximum):
if isinstance(value,(bool,np.bool_)) or not isinstance(value,(int,np.integer)) or not 1<=value<=maximum:
raise ValueError('Count must be an integer in the available range')
return int(value)
def normalize(x):
x=cloud(x,3);center=x.mean(axis=0);y=x-center;scale=np.linalg.norm(y,axis=1).max()
if scale<1e-12:raise ValueError('A coincident cloud has no geometric scale')
return y/scale,center,scale
def voxel_centroids(x,size):
x=cloud(x,3)
if not np.isfinite(size) or size<=0:raise ValueError('Positive finite voxel size required')
cells=np.floor(x/size)
if np.max(np.abs(cells))>=2**52:raise ValueError('Voxel indices exceed reliable float precision')
keys,inverse=np.unique(cells.astype(np.int64),axis=0,return_inverse=True)
return keys,np.array([x[inverse==i].mean(axis=0) for i in range(len(keys))])
def normal_pca(x):
x=cloud(x,3)
if len(x)<3:raise ValueError('At least three neighbors required')
y=x-x.mean(axis=0);values,vectors=np.linalg.eigh(y.T@y/len(x))
if values[1]<=1e-12*max(values[2],1e-30):raise ValueError('Collinear or coincident neighborhood')
# Sign is intrinsically ambiguous; eigenvalue gap reports stability.
return vectors[:,0],values,float((values[1]-values[0])/max(values[2],1e-30))
def fps(x,m):
x=cloud(x);m=count(m,len(x));selected=[];distance=np.full(len(x),np.inf)
current=0
for _ in range(m):
selected.append(current)
distance=np.minimum(distance,np.sum((x-x[current])**2,axis=1))
# Unlike the upstream GPU kernel, ensure distinct indices on duplicates.
distance[selected]=-np.inf
current=int(np.argmax(distance))
return np.array(selected)
def ball_query(x,centers,radius,cap):
x=cloud(x);centers=cloud(centers,x.shape[1]);cap=count(cap,len(x))
if not np.isfinite(radius) or radius<=0:raise ValueError('Positive finite radius required')
groups=[]
for c in centers:
hits=np.flatnonzero(np.linalg.norm(x-c,axis=1)<radius)[:cap]
groups.append(hits) # Empty groups stay empty; no uninitialized padded indices.
return groups
def knn(x,k):
x=cloud(x);k=count(k,len(x)-1)
distance=np.sum((x[:,None]-x[None,:])**2,axis=2)
np.fill_diagonal(distance,np.inf)
return np.argsort(distance,axis=1,kind='stable')[:,:k]
def max_pool(h):
h=cloud(h);g=h.max(axis=0);mask=h==g
return g,mask/mask.sum(axis=0)
def orthogonal_penalty(a,weight=.01):
a=cloud(a)
if a.shape[0]!=a.shape[1] or not np.isfinite(weight) or weight<0:
raise ValueError('Square transform and nonnegative finite weight required')
error=a@a.T-np.eye(len(a))
return float(weight*np.sum(error**2)),4*weight*error@a
def edgeconv(x,weight,bias,k,adjacency=None):
"""One tanh EdgeConv; optional fixed graph for piecewise derivative checks."""
x=cloud(x);w=cloud(weight);b=np.asarray(bias,dtype=float)
if w.shape[0]!=2*x.shape[1] or b.shape!=(w.shape[1],) or not np.isfinite(b).all():
raise ValueError('Edge MLP dimensions must agree')
k=count(k,len(x)-1)
neighbors=knn(x,k) if adjacency is None else np.asarray(adjacency)
if neighbors.shape!=(len(x),k) or not np.issubdtype(neighbors.dtype,np.integer) or np.any(neighbors<0) or np.any(neighbors>=len(x)):
raise ValueError('Valid neighbor indices required')
center=np.broadcast_to(x[:,None],(len(x),k,x.shape[1]))
features=np.concatenate([center,x[neighbors]-center],axis=2)
hidden=np.tanh(features@w+b);out=hidden.max(axis=1)
mask=hidden==out[:,None];pool=mask/mask.sum(axis=1,keepdims=True)
return out,(x,w,neighbors,features,hidden,pool)
def edge_backward(upstream,cache):
x,w,neighbors,features,hidden,pool=cache
upstream=cloud(upstream,hidden.shape[-1])
if len(upstream)!=len(x):raise ValueError('One upstream row per center required')
dz=upstream[:,None]*pool*(1-hidden**2)
dw=np.einsum('nkd,nkh->dh',features,dz);db=dz.sum(axis=(0,1));df=dz@w.T
d=x.shape[1];dx=(df[:,:,:d]-df[:,:,d:]).sum(axis=1)
np.add.at(dx,neighbors.reshape(-1),df[:,:,d:].reshape(-1,d))
return dx,dw,db
def init_model(hidden=12,seed=13):
hidden=count(hidden,1024);rng=np.random.default_rng(seed)
return {'w':rng.normal(0,.5,(3,hidden)),'b':np.zeros(hidden),
'c':rng.normal(0,.2,(hidden,2)),'d':np.zeros(2),
's':rng.normal(0,.2,(2*hidden,2)),'t':np.zeros(2)}
def predict(x,p):
x=cloud(x,3)
if set(p)!={'w','b','c','d','s','t'} or np.ndim(p['b'])!=1:
raise ValueError('All six model parameter arrays are required')
shapes={'w':(3,len(p['b'])),'b':(len(p['b']),),'c':(len(p['b']),2),'d':(2,),
's':(2*len(p['b']),2),'t':(2,)}
if not len(p['b']) or set(p)!=set(shapes) or any(np.shape(p[key])!=shape or not np.isfinite(p[key]).all() for key,shape in shapes.items()):
raise ValueError('Finite model parameters with matching shapes required')
h=np.tanh(x@p['w']+p['b']);g,pool=max_pool(h)
combined=np.c_[h,np.broadcast_to(g,h.shape)]
return g@p['c']+p['d'],combined@p['s']+p['t'],(x,h,g,pool,combined)
def cross_entropy(logits,labels):
logits=cloud(logits);labels=np.asarray(labels)
if labels.shape!=(len(logits),) or not np.issubdtype(labels.dtype,np.integer) or np.any(labels<0) or np.any(labels>=logits.shape[1]):
raise ValueError('One valid integer class per row required')
shifted=logits-logits.max(axis=1,keepdims=True);logz=np.log(np.exp(shifted).sum(axis=1))
loss=np.mean(logz-shifted[np.arange(len(labels)),labels])
derivative=np.exp(shifted-logz[:,None]);derivative[np.arange(len(labels)),labels]-=1
return float(loss),derivative/len(labels)
def loss_grad(x,label,parts,p,seg_weight=.25):
if not np.isfinite(seg_weight) or seg_weight<0:raise ValueError('Nonnegative finite segmentation weight required')
cls,seg,(x,h,g,pool,combined)=predict(x,p)
lc,dc=cross_entropy(cls[None],np.asarray([label]));ls,ds=cross_entropy(seg,parts)
dc=dc[0];ds*=seg_weight
grad={'c':np.outer(g,dc),'d':dc,'s':combined.T@ds,'t':ds.sum(axis=0)}
dz=ds@p['s'].T;hidden=h.shape[1]
dg=dc@p['c'].T+dz[:,hidden:].sum(axis=0)
dh=dz[:,:hidden]+pool*dg;da=dh*(1-h*h)
grad.update(w=x.T@da,b=da.sum(axis=0))
return lc+seg_weight*ls,grad,da@p['w'].T
def dataset(objects,seed):
objects=count(objects,10000);rng=np.random.default_rng(seed);result=[]
for i in range(objects):
label=i%2;x=rng.normal(size=(24,3));x/=np.linalg.norm(x,axis=1,keepdims=True)
if label:x*=np.array([2.4,.6,.6])
x,_,_=normalize(x);parts=(x[:,2]>0).astype(int)
result.append((x,label,parts))
return result
def train(data,steps=120,rate=.15):
steps=count(steps,10000)
if not data or not np.isfinite(rate) or rate<=0:raise ValueError('Nonempty data and positive finite rate required')
p=init_model();history=[]
for _ in range(steps):
total=0.;grad={k:np.zeros_like(v) for k,v in p.items()}
for x,label,parts in data:
loss,d,_=loss_grad(x,label,parts,p);total+=loss
for key in p:grad[key]+=d[key]/len(data)
history.append(total/len(data))
for key in p:p[key]-=rate*grad[key]
return p,history
def evaluate(data,p):
obj=[];parts=[];baseline=[]
for x,label,truth in data:
a,b,_=predict(x,p);obj.append(int(a.argmax())==label);parts.extend(b.argmax(axis=1)==truth)
# Deliberately simple known orientation baseline, not fitted on test objects.
ratio=np.var(x[:,0])/np.mean(np.var(x[:,1:],axis=0))
baseline.append(int(ratio>2)==label)
return {'object_accuracy':float(np.mean(obj)),'part_accuracy':float(np.mean(parts)),
'axis_variance_baseline_accuracy':float(np.mean(baseline))}
def demo():
train_set=dataset(24,17);test_set=dataset(16,29);p,history=train(train_set)
x,label,parts=test_set[0];permutation=np.random.default_rng(1).permutation(len(x))
a,b,_=predict(x,p);ap,bp,_=predict(x[permutation],p)
critical=np.unique(np.argmax(np.tanh(x@p['w']+p['b']),axis=0))
reduced=predict(x[critical],p)[0]
return {'train_objects':len(train_set),'test_objects':len(test_set),'points_per_object':len(x),
'initial_train_loss':history[0],'final_train_loss':float(np.mean([loss_grad(*item,p)[0] for item in train_set])),
'test':evaluate(test_set,p),'critical_points_on_first_test_object':len(critical),
'critical_subset_classification_error':float(np.max(np.abs(a-reduced))),
'permutation_classification_error':float(np.max(np.abs(a-ap))),
'permutation_segmentation_error':float(np.max(np.abs(b[permutation]-bp))),
'training_losses':history}
if __name__=='__main__':print(json.dumps(demo(),indent=2))
实际运行的摘要如下;完整 JSON 还保存训练损失序列:
{
"train_objects": 24,
"test_objects": 16,
"points_per_object": 24,
"initial_train_loss": 1.0096980663785542,
"final_train_loss": 0.17448768695904268,
"test": {
"object_accuracy": 1.0,
"part_accuracy": 0.9140625,
"axis_variance_baseline_accuracy": 1.0
},
"critical_points_on_first_test_object": 9,
"critical_subset_classification_error": 0.0,
"permutation_classification_error": 0.0,
"permutation_segmentation_error": 0.0
}
小模型和简单基线都正确分类了这 16 个测试物体。这只能说明两者都解决了这个简单、固定轴对齐的划分。逐点标注准确率是另一项任务,分母也不同:384 个点中有 351 个正确,即 0.9140625。它不是平均交并比,整体分类基线也没有提供逐点标签。
对于第一个测试物体,保留九个关键点及其已经归一化的坐标,可以保持分类 logits 不变。本次运行中,对完整原始点集换行,分割输出也准确跟随排列。图中还复制了第一个已归一化的点,再对扩大的点集重新归一化:原有 24 行坐标变化的 Frobenius 范数为 0.159406,保留六位小数。这个数衡量坐标变化,不是分类误差。这些是有用的实现检查,不是对不同观测条件的稳健性评测。
干净的合成分数可能避开了真正的难处
方差基线能够成功,是因为朝向和长宽比已经把两类分开。把拉长的物体旋转到不熟悉的轴、只保留局部扫描、改变密度,或者加入真实传感器噪声,都会改变问题。每项变化都需要自己的留出评测。本文明示的逐物体中心化不使用标签,可以在推理时进行,但两个划分必须遵守相同规则。数据集层面的统计量或预处理方案,不能使用测试标签调优。
最大池化可以在固定表示不变时忽略很多点,也可能丢掉通道最大值没有表达的细节。局部方法让模型看到邻域,代价是邻域构建、密度选择,以及采样与并列规则可能引入的顺序影响。体素化减少点数,也会在选定分辨率下改变几何。这些方法各有适用条件。
本程序没有学习变换、深层层级、批归一化、dropout、完整动态图网络或大规模空间索引。法向估计是局部、未定向的;数据具有干净的物体边界和已知标签,也没有解决场景分离、配准或采集。把它作为项目起点之前,应先写清这些省略。
从四个角度检查自己是否理解
-
解释对称性。 一个点云有 N=100 个点,输出一个物体标签和 100 个逐点标签。重新排列输入行后,两种输出各应怎样变化?
答案:物体分数保持不变;逐点分数应使用同样的排列换行,让每个物理点保留自己的预测。如果要求整个逐点输出矩阵仍按旧行顺序逐项相同,就测错了性质。
-
手算池化导数。 三个点的两通道特征分别是 (1,3)、(1,2)、(0,3),池化输出收到的上游梯度是 (4,6)。按程序的并列规则,各点收到什么梯度?
答案:最大值为 (1,3)。第一通道把 4 平分给前两个点;第二通道把 6 平分给第一和第三个点。三行分别收到 (2,3)、(2,0)、(0,3)。这是并列处选定的次梯度,不是唯一的普通导数;非最大项不会通过这条池化路径收到梯度。
-
检查预处理说法。 在归一化之前复制一个点,再比较原有各行归一化后的坐标与分类 logits。最大池化能保证两者都不变吗?
答案:不能。重复点改变均值,也可能改变最大半径,其他点的归一化坐标因而可能移动。最大池化的重复不变性以其余逐点特征保持固定为条件。再做一次实验,改为复制已经归一化的行,才能隔离这一性质;此时坐标不变是明确条件,不能想当然。
-
设计下一项实验。 两种分类器在记录的测试集上都是 100%。需要什么证据,才能说学习模型更善于处理形状变化?
答案:先定义变化,例如留出的旋转或局部观测;固定训练流程与基线,按物体划分,在相同观测下评估两者,并分别报告整体与逐点指标。加入独立物体或种子之间的不确定性,查看失败案例。现有 16 个合成测试物体不足以证明谁更好,下一步应是更难的受控测试。
按问题读发展脉络,不把它变成榜单
PointNet 首次提交 arXiv 的日期是 2016 年 12 月 2 日,本文核读的 CVPR 论文来自 2017 年。PointNet++ 首次提交于 2017 年 6 月 7 日;DGCNN 首次提交于 2018 年 1 月 24 日。本文的方法讨论使用 DGCNN v1,不能把后来的出版日期或修订实验悄悄附到这个版本上。PointNet 记录 PointNet++ 记录 DGCNN 记录
读 PointNet 时,先看共享逐点特征与对称聚合如何分工,再核对集合函数和关键点论证的精确条件。读 PointNet++ 时,关注局部性、采样密度和特征传播;读 DGCNN 时,关注边特征以及学习空间中的图更新。固定版本代码有助于发现架构图省略的约定。本文教学例子没有复现这些论文报告的任何榜单成绩。
先判断,再看解释
固定共享逐点网络加最大池化,在复制已归一化的行时保持分类不变;如果先复制原始点、再求均值归一化,也能保证吗?
学习目标
- 区分点的排列、旋转、缺失观测与离群点。
- 推导共享特征与最大池化中的分类和分割梯度。
- 在明确约定下检查邻域、法向与特征图。
- 训练完整小型点云模型,并与非神经基线比较。
先修与延伸
查看知识关联图 →参考文献
- PointNet: Deep Learning on Point Sets for 3D Classification and Segmentation
Charles R. Qi; Hao Su; Kaichun Mo; Leonidas J. Guibas · 2017 - PointNet++: Deep Hierarchical Feature Learning on Point Sets in a Metric Space
Charles R. Qi; Li Yi; Hao Su; Leonidas J. Guibas · 2017 - Dynamic Graph CNN for Learning on Point Clouds (v1)
Yue Wang; Yongbin Sun; Ziwei Liu; Sanjay E. Sarma; Michael M. Bronstein; Justin M. Solomon · 2018 - charlesq34/pointnet — models/pointnet_cls.py
charlesq34/pointnet contributors - charlesq34/pointnet — models/transform_nets.py
charlesq34/pointnet contributors - charlesq34/pointnet2 — tf_ops/sampling/tf_sampling_g.cu
charlesq34/pointnet2 contributors - charlesq34/pointnet2 — tf_ops/grouping/tf_grouping_g.cu
charlesq34/pointnet2 contributors - PointNet arXiv submission history
Charles R. Qi and colleagues - PointNet++ arXiv submission history
Charles R. Qi and colleagues - DGCNN v1 arXiv submission history
Yue Wang and colleagues - TensorFlow tf.nn.l2_loss API definition
TensorFlow contributors
版本1 · 编写状态: 已完成记录中的技术复核
查看技术检查记录(AI)
Codex · 2026-09-08 · Codex single-AI-author technical check: scoped primary papers and pinned code, 30 formal numerical/bilingual/figure/review checks, 14 matching display equations per language, complete NumPy implementation and actual output, four explained exercises. Four SVG variants checked with four font families. Not human peer review or a real-data benchmark; detailed source and validation limits are recorded.
- 30 项正式检查直接执行生产文章中的程序;两题合计 64 项,包含 49 项原模型计算检查以及额外稿件、公式、图示与记录检查,不把结构断言写成独立模型复现。
- 逐节核对两语定义、假设、14 个展示公式、完整代码、实际输出、四题解释答案与限定引用。AI 作者复核,不是人工或独立专家审校。
- 四张双语桌面/手机原创 SVG 的数据与程序核算一致,四字体边界检查通过;正式页面的语言切换、复制、测验、缩写搜索、三尺寸与长公式实际滚动已在 written 阶段走通,最终 checked 构建另留验证记录。
- 核对 44 参数/21 输入导数、27 个 EdgeConv 参数与输入导数、正交惩罚、关键点、并列次梯度、排列/旋转/重复/离群点反例和采样约定。16 个合成测试物体上模型与方差基线均 100%,逐点标签 351/384,未宣称优于基线。DGCNN 日期按 UTC 改为 2018-01-24。
核对的来源位置:
- PointNet: Deep Learning on Point Sets for 3D Classification and Segmentation · Inspected physical PDF pages 3–5; introductory first-page excerpt only. Methods/conditions only; no original benchmark reproduced. SHA-256 7c4c69310de5130b079e80c5771322ed45ca8f032d592396303bc93b19bea3ec.
- PointNet++: Deep Hierarchical Feature Learning on Point Sets in a Metric Space · Inspected physical PDF pages 2–5; introductory first-page excerpt only. Methods/conditions only; no original benchmark reproduced. SHA-256 5cd120458cd481078aaf927f0bfed0ef646423e107f5cc2750b9c59f5b8e3795.
- Dynamic Graph CNN for Learning on Point Clouds (v1) · Inspected physical PDF pages 3–6; introductory first-page excerpt only. Methods/conditions only; no original benchmark reproduced. SHA-256 7129c7b30fe70fdb6afad3ef22c97214aa9b457e424d36f6eda987900c2a0af1.
- charlesq34/pointnet — models/pointnet_cls.py · Pinned 2618f72bc1a0fd21b074096e748016960d44ef55; read lines 18–92; not executed. No source code copied into the original NumPy teaching implementation. File SHA-256 e93faded7148265047d5087930548718201e54422b3e003b77a09d5c54b04aad.
- charlesq34/pointnet — models/transform_nets.py · Pinned 2618f72bc1a0fd21b074096e748016960d44ef55; read lines 39–51 and 83–95; not executed. No source code copied into the original NumPy teaching implementation. File SHA-256 e40b99fcbb28bccd13656060daa2b5a9e2db84f8e3b9cef4b6192a3f5d30b378.
- charlesq34/pointnet2 — tf_ops/sampling/tf_sampling_g.cu · Pinned 42926632a3c33461aebfbee2d829098b30a23aaa; read lines 105–171; not executed. No source code copied into the original NumPy teaching implementation. File SHA-256 1e219433f2114182bc619b8fcbf0d62b4c10b4ef3ad40a5a34047bc3698032e4.
- charlesq34/pointnet2 — tf_ops/grouping/tf_grouping_g.cu · Pinned 42926632a3c33461aebfbee2d829098b30a23aaa; read lines 1–43; not executed. No source code copied into the original NumPy teaching implementation. File SHA-256 8b5e5625c366a13e829a6dce5c1c4c2bc06f51cf81194ae2ff89c73694c228da.
- PointNet arXiv submission history · Official metadata and v1 submission history read with web tool; first submission 2016-12-02 UTC, not later proceedings date.
- PointNet++ arXiv submission history · Official metadata and v1 submission history read with web tool; first submission 2017-06-07 UTC, not later proceedings date.
- DGCNN v1 arXiv submission history · Official metadata and v1 submission history read with web tool; first submission 2018-01-24 UTC, not later proceedings date.
- TensorFlow tf.nn.l2_loss API definition · Web lines 704–736, displayed v2.16.1; updated 2024-04-26. Definition returns half the sum of squared entries; v1 alias displayed. No TensorFlow runtime executed.
相关主题