SpareNet icon indicating copy to clipboard operation
SpareNet copied to clipboard

[Bug?] Issues about the dataloader and dataset.

Open AlexsaseXie opened this issue 4 years ago • 0 comments

I read the code in this repo and found some questions about the dataloader part. It seems that the code of dataloder is heavily brought from the GRNet repo while the author seems to change some behaviour of the dataloader.

Q1: The validation set of the ShapeNet is never used, while the test set is used during training https://github.com/microsoft/SpareNet/blob/main/datasets/data_loaders.py#L49

val_data_loader = torch.utils.data.DataLoader(
            dataset=test_dataset_loader.get_dataset(DatasetSubset.TEST),
            batch_size=1,
            num_workers=cfg.CONST.num_workers,
            collate_fn=collate_fn,
            pin_memory=True,
            shuffle=False,
        )

Q2: Only the last view of point cloud is used during training when training on ShapeNet with GRNet version. https://github.com/microsoft/SpareNet/blob/main/datasets/data_loaders.py#L148

Dataset(
            {
                "required_items": ["partial_cloud", "gtcloud"],
                "shuffle": subset == DatasetSubset.TRAIN,
            },
            file_list,
            transforms,
        )

The n_renderings param is never set so the rand_idx in Dataset.getitem is always -1 which refer to the last view of point cloud.

AlexsaseXie avatar Dec 22 '21 14:12 AlexsaseXie