代码学习_KPConv_models.blocks
文章只是个人学习过程中的记录,因水平极其有限,仅供参考,欢迎一起交流
class KPConv(nn.Module)
- 初始化赋值
- 创建kernel points: K_points_numpy
# Initialize weights [n_kpoints, in_fdim, out_fdim]
self.weights = Parameter(torch.zeros((self.K, in_channels, out_channels), dtype=torch.float32),
requires_grad=True)
# Initialize kernel points [num_kpoints, dimension=3]
self.kernel_points = Parameter(torch.tensor(K_points_numpy, dtype=torch.float32),
requires_grad=False)
- 对于点云中某点x,取出其邻域内的点,并与自身作差 ~ y_i
- 细节见附1
- 计算其与 kernel 的距离的平方 ~ sq_distances
# Get neighbor points
neighbors = s_pts[neighb_inds, :] # [n_points, n_neighbors, dim]
# Center every neighborhood
neighbors = neighbors - q_pts.unsqueeze_(1) # [n_points, n_neighbors, dim]
# kernel_points [num_kpoints, dim=3]
deformed_K_points = self.kernel_points # [num_kpoints, dim]
# Get all difference matrices [n_points, n_neighbors, n_kpoints, dim]
neighbors.unsqueeze_(2)
differences = neighbors - deformed_K_points
# Get the square distances [n_points, n_neighbors, n_kpoints]
sq_distances = torch.sum
本文是作者关于深度学习中KPConv模型的学习笔记,主要关注点在于KPConv模块的初始化、邻居点的选择及其特征计算过程。介绍了如何从点云数据中选取邻域点,计算点与核的距离,应用核函数进行特征加权,以及最终的特征归一化。文中还提及了邻居点的选取方法,但表示这一部分有待进一步学习。
最低0.47元/天 解锁文章
1450

被折叠的 条评论
为什么被折叠?



