zhangxy0517 / 3D-Registration-with-Maximal-Cliques

Source code of CVPR 2023 paper
MIT License
421 stars 45 forks source link

如何加入GEO-Transformer框架? #21

Open 17854174130 opened 11 months ago

17854174130 commented 11 months ago

您好! 非常感谢您的工作!我是一名学习点云配准的初学者,最近在研读您的文章,在文章里看到可以与GEOTransformer结合达到最先进的效果,这太让人振奋了!于是我想亲手做一下实验。但是我遇到了几个问题: 1.用哪个版本的MAC? 2.加入到其中哪个环节? 希望可以得到您的回答,非常感谢!

17854174130 commented 11 months ago

确实有很多问题,有点无从下手,希望可以得到您的帮助,感谢!

zhangxy0517 commented 11 months ago

1、目前提供的python版本仅供演示用,如需实现完整功能请参照c++代码补充(linux registraion.cpp 的1055行至1227行) 2、替换 eval.py 的 evaluate registration部分

17854174130 commented 11 months ago

非常感谢您的回复: 通过对文章和代码的阅读,我发现registraion.cpp 的1055行至1227行主要工作是搜索点云中的团结构,旨在加强其亲和力。可能是我的理解有误,将此处代码替换到eval.py 的 evaluate registration的工作使我无法理解,evaluate registration好像是评估配准工作。为了确定我正确理解您的意思,我将被替换的代码附在下面。 为何要将此处代码替换到eval.py 的 evaluate registration?希望可以得到您的回复,感谢!

2. evaluate registration

        if args.method == 'lgr':
            estimated_transform = data_dict['estimated_transform']
        elif args.method == 'ransac':
            estimated_transform = registration_with_ransac_from_correspondences(  
                src_corr_points,
                ref_corr_points,
                distance_threshold=cfg.ransac.distance_threshold,
                ransac_n=cfg.ransac.num_points,
                num_iterations=cfg.ransac.num_iterations,
            )
        elif args.method == 'svd':
            with torch.no_grad():
                ref_corr_points = torch.from_numpy(ref_corr_points).cuda()
                src_corr_points = torch.from_numpy(src_corr_points).cuda()
                corr_scores = torch.from_numpy(corr_scores).cuda()
                estimated_transform = weighted_procrustes( 
                    src_corr_points, ref_corr_points, corr_scores, return_transform=True
                )
                estimated_transform = estimated_transform.detach().cpu().numpy()
        else:
            raise ValueError(f'Unsupported registration method: {args.method}.')

        estimated_transforms.append(
            dict(
                test_pair=[ref_frame, src_frame],
                num_fragments=num_fragments,
                transform=estimated_transform,
            )
        )

        if gt_indices[ref_frame, src_frame] != -1:
zhangxy0517 commented 11 months ago

我的意思是MAC整体替换evaluate registration