Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Training for custom dataset #2

Closed
ttsesm opened this issue Apr 29, 2022 · 3 comments
Closed

Training for custom dataset #2

ttsesm opened this issue Apr 29, 2022 · 3 comments

Comments

@ttsesm
Copy link

ttsesm commented Apr 29, 2022

Hi @yewzijian,

Thanks for sharing your work. I would like to ask you whether you could elaborate with some details about how someone could train the model for a custom dataset.

Thanks.

@yewzijian
Copy link
Owner

You can look at the implementation of the data loaders in src/datasets. Note that depending on your dataset, the network parameters may also need to be changed.

@ttsesm
Copy link
Author

ttsesm commented May 2, 2022

I see, thanks.

I am skipping through the code now to get a better understanding of the pipeline. I had a look on the dataloaders as you suggested and one question that derived is why the input data kind of differs on the two loaders?

3Dmatch:

        data_pair = {
            'src_xyz': torch.from_numpy(src_xyz).float(),
            'tgt_xyz': torch.from_numpy(tgt_xyz).float(),
            'src_overlap': torch.from_numpy(src_overlap_mask),
            'tgt_overlap': torch.from_numpy(tgt_overlap_mask),
            'correspondences': torch.from_numpy(src_tgt_corr),  # indices
            'pose': torch.from_numpy(pose).float(),
            'idx': item,
            'src_path': src_path,
            'tgt_path': tgt_path,
            'overlap_p': overlap_p,
        }

Modelnet:

        sample_out = {
            'src_xyz': torch.from_numpy(sample['points_src'][:, :3]),
            'tgt_xyz': torch.from_numpy(sample['points_ref'][:, :3]),
            'tgt_raw': torch.from_numpy(sample['points_raw'][:, :3]),
            'src_overlap': torch.from_numpy(sample['src_overlap']),
            'tgt_overlap': torch.from_numpy(sample['ref_overlap']),
            'correspondences': torch.from_numpy(sample['correspondences']),
            'pose': torch.from_numpy(sample['transform_gt']),
            'idx': torch.from_numpy(sample['idx']),
            'corr_xyz': torch.from_numpy(corr_xyz),
        }

There are some common elements but also some different ones, why is that?

@yewzijian
Copy link
Owner

Hi @ttsesm, the fields that are not in common are not necessary and most of them can be removed. However certain fields, e.g. tgt_raw might be used for computing the evaluation metrics.

@ttsesm ttsesm closed this as completed May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants