Real3DAD-Reg3DAD代码及训练推理过程
Real3DAD-Reg3DAD代码及训练推理过程
train
对train_loader(4个点云,例[1, 383913, 3])进行for循环,添加点云到basic_template,但使用了break只选择了第一个点云作为模板(纯点云坐标,[383913, 3])
test
对test_loader(100个点云,例[1, 182495, 3])使用predict_pmae,然后进行for循环,例[1, 16384, 3],再调用_predict_pmae
首先_embed_pointmae,将测试的点云和basic_template里的点云配准,得到reg_data,然后将reg_data维度互换,再通过deep_feature_extractor使用point-mae进行编码,得到pmae_features, center, ori_idx, center_idx,其中维度:
- pmae_features:[1, 1152, 16384]
- center:[1, 16384, 3]
- ori_idx:[1, 16384, 128]
- center_idx:[1, 16384, 3]
其中,num_group是16384,xyz映射后维度总和384*3=1152,group_size = 128
一个group128个点,一共16384个group
patch_scores由 anomaly_scorer.predict得到,维度是[16384]向量
xyz_sampled 维度是[16384, 3]
以最近邻算法,对sample的点周围的点的label做fill操作
最后得到的full_scores维度是[182495]向量
过程中,sample的点的下标需要记录,sample_idx
patch_score得到的分数和sample_idx以及xyz_sampled是一一对应的
以airplane类举例,训练推理一个测试集(100个样例),需要3*2=6个小时
Real3DAD-Reg3DAD代码及训练推理过程
https://jetthuang.top/所有/Real3DAD-Reg3DAD代码及训练推理过程/