prs-eth / OverlapPredator

[CVPR 2021, Oral] PREDATOR: Registration of 3D Point Clouds with Low Overlap.
https://shengyuh.github.io/predator/index.html
MIT License
512 stars 73 forks source link

Ambiguous overlap ratio for Modelnet and ModelLoNet #64

Open Hui-design opened 1 year ago

Hui-design commented 1 year ago

Hi! Thank you for the amazing work!

We have a question about the calculation of the overlap ratio. In your paper you say "ModelNet which has 73.5% pairwise overlap on average, and ModelLoNet which contains a lower 53.6% average overlap". However, when I wrote a piece of code to test the overlap ratio, I could only get 51.35% for ModelNet and 43.16% for ModelLoNet. What is the reason? The testing code is as follows, I put it under datasets/modelnet.py

if __name__ == "__main__":
    from lib.utils import setup_seed, load_config
    from easydict import EasyDict as edict
    import pdb
    import torch
    from tqdm import tqdm

    config_dir = 'configs/test/modelnet.yaml'
    config = load_config(config_dir)
    config = edict(config)
    test_dataset = get_test_datasets(config)

    overlap_list = []
    test_loader = torch.utils.data.DataLoader(test_dataset, batch_size=1, shuffle=False, num_workers=4)
    for i, data in tqdm(enumerate(test_loader)):
        # pdb.set_trace()
        correspondence = data[6]
        src_idx = list(set(correspondence[0][:,0].int().tolist()))
        overlap_list.append(len(src_idx)/717)
    print(np.mean(overlap_list)) 

Thank you and look forward to your reply!